]> git.sesse.net Git - vlc/commitdiff
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 03fe699217d2af9ad0afab4de38f1ada1f705116..ad8b5007a9c62985f3856169f1d8543cd80402ff 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( "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 );
index 672da8ec211027aad2ef560362e25210de067909..e3bcefa89a683670a0c6880ffc159b787e252d8e 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_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" ) );
 
index f9c5cdee9f9aa7d7a5c7ac5da1021d52421bcb76..bf5864d2b3fc170fa65e9575216cbe2c8063c932 100644 (file)
         </property>
        </widget>
       </item>
-      <item row="0" column="1" >
+      <item row="0" column="1" colspan="2" >
        <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" >
-       <widget class="QCheckBox" name="qtUpdates" >
+       <widget class="QCheckBox" name="updatesBox" >
         <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>