Qt4 - Update check every x days. Put it in the preferences, and in the privacy Dialog...
authorJean-Baptiste Kempf <jb@videolan.org>
Thu, 31 Jan 2008 00:46:50 +0000 (00:46 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Thu, 31 Jan 2008 00:46:50 +0000 (00:46 +0000)
modules/gui/qt4/components/simple_preferences.cpp
modules/gui/qt4/main_interface.cpp
modules/gui/qt4/ui/sprefs_interface.ui

index 03fe699..ad8b500 100644 (file)
@@ -425,7 +425,14 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
             CONFIG_GENERIC( "album-art", IntegerList, ui.artFetchLabel, artFetcher );
             CONFIG_GENERIC( "fetch-meta", Bool, NULL, metaFetcher );
 #ifdef UPDATE_CHECK
             CONFIG_GENERIC( "album-art", IntegerList, ui.artFetchLabel, artFetcher );
             CONFIG_GENERIC( "fetch-meta", Bool, NULL, metaFetcher );
 #ifdef UPDATE_CHECK
-            CONFIG_GENERIC( "qt-updates-notif", Bool, NULL, qtUpdates );
+            CONFIG_GENERIC( "qt-updates-notif", Bool, NULL, updatesBox );
+            CONFIG_GENERIC_NO_BOOL( "qt-updates-days", Integer, NULL,
+                    updatesDays );
+            CONNECT( ui.updatesBox, toggled( bool ),
+                     ui.updatesDays, setEnabled( bool ) );
+#else
+            ui.updatesBox.hide();
+            ui.updatesDays.hide();
 #endif
             CONFIG_GENERIC( "qt-always-video", Bool, NULL, qtAlwaysVideo );
             CONFIG_GENERIC( "embeded-video", Bool, NULL, embedVideo );
 #endif
             CONFIG_GENERIC( "qt-always-video", Bool, NULL, qtAlwaysVideo );
             CONFIG_GENERIC( "embeded-video", Bool, NULL, embedVideo );
index 672da8e..e3bcefa 100644 (file)
@@ -519,7 +519,8 @@ int MainInterface::privacyDialog( QList<ConfigControl *> controls )
     CONFIG_GENERIC( "album-art", IntegerList ); line++;
     CONFIG_GENERIC_NOBOOL( "fetch-meta", Bool ); line++;
 #ifdef UPDATE_CHECK
     CONFIG_GENERIC( "album-art", IntegerList ); line++;
     CONFIG_GENERIC_NOBOOL( "fetch-meta", Bool ); line++;
 #ifdef UPDATE_CHECK
-    CONFIG_GENERIC_NOBOOL( "qt-updates-notif", Bool );
+    CONFIG_GENERIC_NOBOOL( "qt-updates-notif", Bool ); line++;
+    CONFIG_GENERIC_NOBOOL( "qt-updates-days", Integer ); line++;
 #endif
     QPushButton *ok = new QPushButton( qtr( "Ok" ) );
 
 #endif
     QPushButton *ok = new QPushButton( qtr( "Ok" ) );
 
index f9c5cde..bf5864d 100644 (file)
         </property>
        </widget>
       </item>
         </property>
        </widget>
       </item>
-      <item row="0" column="1" >
+      <item row="0" column="1" colspan="2" >
        <widget class="QComboBox" name="artFetcher" />
       </item>
        <widget class="QComboBox" name="artFetcher" />
       </item>
+      <item row="1" column="0" colspan="2" >
+       <widget class="QCheckBox" name="metaFetcher" >
+        <property name="text" >
+         <string>_("Fetch the metadata from the Internet")</string>
+        </property>
+       </widget>
+      </item>
       <item row="2" column="0" >
       <item row="2" column="0" >
-       <widget class="QCheckBox" name="qtUpdates" >
+       <widget class="QCheckBox" name="updatesBox" >
         <property name="text" >
          <string>_("Activate update notifier")</string>
         </property>
        </widget>
       </item>
         <property name="text" >
          <string>_("Activate update notifier")</string>
         </property>
        </widget>
       </item>
-      <item row="1" column="0" colspan="2" >
-       <widget class="QCheckBox" name="metaFetcher" >
-        <property name="text" >
-         <string>_("Fetch the metadata from the Internet")</string>
+      <item row="2" column="2" >
+       <widget class="QSpinBox" name="updatesDays" >
+        <property name="alignment" >
+         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+        </property>
+        <property name="suffix" >
+         <string> days</string>
         </property>
        </widget>
       </item>
         </property>
        </widget>
       </item>