]> git.sesse.net Git - vlc/commitdiff
Fix default category selection
authorAntoine Cellerier <dionoea@videolan.org>
Sun, 27 Aug 2006 16:19:00 +0000 (16:19 +0000)
committerAntoine Cellerier <dionoea@videolan.org>
Sun, 27 Aug 2006 16:19:00 +0000 (16:19 +0000)
modules/gui/qt4/components/simple_preferences.cpp
modules/gui/qt4/components/simple_preferences.hpp
modules/gui/qt4/dialogs/prefs_dialog.cpp

index ef663b0d358c4a1a93c8a8ef8ac595c2a8d044ba..98da2b18bcf2260d43f6f30a5e7e3013864bbc6c 100644 (file)
 
 #define ITEM_HEIGHT 50
 
-enum {
-    SPrefsVideo,
-    SPrefsAudio,
-    SPrefsInputAndCodecs,
-    SPrefsPlaylist,
-    SPrefsInterface,
-    SPrefsSubtitles,
-    SPrefsAdvanced
-};
-
 /*********************************************************************
  * The List of categories
  *********************************************************************/
@@ -91,6 +81,8 @@ SPrefsCatList::SPrefsCatList( intf_thread_t *_p_intf, QWidget *_parent ) :
     ADD_CATEGORY( SPrefsInterface, "Interface", interface_50x50_xpm );
     ADD_CATEGORY( SPrefsSubtitles, "Subtitles", subtitles_50x50_xpm );
     ADD_CATEGORY( SPrefsAdvanced, "Advanced", advanced_50x50_xpm );
+
+    setCurrentRow( SPrefsInterface );
 }
 
 void SPrefsCatList::ApplyAll()
index 28267e01418e0fcee88ae2d99a5fc6d9471daf0e..7403cbdbf7783e4560b2cac88dd938a61e09c37c 100644 (file)
 #include <vlc/vlc.h>
 #include <vlc/intf.h>
 
+enum {
+    SPrefsVideo,
+    SPrefsAudio,
+    SPrefsInputAndCodecs,
+    SPrefsPlaylist,
+    SPrefsInterface,
+    SPrefsSubtitles,
+    SPrefsAdvanced
+};
+#define SPrefsDefaultCat SPrefsInterface
+
 class ConfigControl;
 
 class SPrefsCatList : public QListWidget
index 373da3ad254d57a6fcf244537e39dae21be4a20a..59af6e2dbcdfc1aabd95c7cbb576aa39b7ac12b6 100644 (file)
@@ -143,7 +143,7 @@ void PrefsDialog::setSmall()
         advanced_panel->hide();
     }
     if( !simple_panel )
-        simple_panel = new SPrefsPanel( p_intf, main_panel, 0 );
+        simple_panel = new SPrefsPanel( p_intf, main_panel, SPrefsDefaultCat );
     main_panel_l->addWidget( simple_panel );
     simple_panel->show();
     adv_chk->hide();