]> git.sesse.net Git - vlc/commitdiff
Add a tristate for WX playlist mode (normal/embedded/both).
authorClément Stenac <zorglub@videolan.org>
Mon, 13 Mar 2006 07:12:18 +0000 (07:12 +0000)
committerClément Stenac <zorglub@videolan.org>
Mon, 13 Mar 2006 07:12:18 +0000 (07:12 +0000)
For the moment, defaults to normal. (Closes:#494)

modules/gui/wxwidgets/interface.cpp
modules/gui/wxwidgets/wxwidgets.cpp

index 2d519fb30aa9bdb3828f2fec8e56b665802041a4..5eea799bc98480b94c2768fd1e9858161f082425 100644 (file)
@@ -669,7 +669,7 @@ void Interface::CreateOurToolBar()
 #define HELP_PLAY N_("Play")
 #define HELP_PAUSE N_("Pause")
 #define HELP_PLO N_("Playlist")
-#define HELP_SPLO N_("Small playlist")
+#define HELP_SPLO N_("Embedded playlist")
 #define HELP_PLP N_("Previous playlist item")
 #define HELP_PLN N_("Next playlist item")
 #define HELP_SLOW N_("Play slower")
@@ -711,10 +711,12 @@ void Interface::CreateOurToolBar()
     toolbar->AddTool( NextStream_Event, wxT(""), wxBitmap( next_xpm ),
                       wxU(_(HELP_PLN)) );
     toolbar->AddSeparator();
-    toolbar->AddTool( Playlist_Event, wxT(""), wxBitmap( playlist_xpm ),
-                      wxU(_(HELP_PLO)) );
-    toolbar->AddTool( PlaylistSmall_Event, wxT(""),
-                      wxBitmap( playlist_small_xpm ), wxU(_(HELP_SPLO)) );
+    if( config_GetInt( p_intf, "wx-playlist-view" ) != 1 )
+        toolbar->AddTool( Playlist_Event, wxT(""), wxBitmap( playlist_xpm ),
+                          wxU(_(HELP_PLO)) );
+    if( config_GetInt( p_intf, "wx-playlist-view" ) >= 1 )
+        toolbar->AddTool( PlaylistSmall_Event, wxT(""),
+                          wxBitmap( playlist_small_xpm ), wxU(_(HELP_SPLO)) );
     }
 
     wxControl *p_dummy_ctrl =
index 31c2e8b290e2b5f62bca4e076e03c090842562fa..3b11a138d62565938b1e527add5a67a4ff0700c8 100644 (file)
@@ -100,6 +100,17 @@ private:
 #define SYSTRAY_TEXT N_("Show systray icon")
 #define SYSTRAY_LONGTEXT N_("Show systray icon")
 
+#define PLAYLIST_TEXT N_("Playlist view" )
+#define PLAYLIST_LONGTEXT N_("There are two possible playlist views in the " \
+                "interface : the normal playlist (separate window), or an " \
+                "embedded playlist (within the main interface, but with " \
+                "less features. You can select which one will be available " \
+                "on the toolbar (or both)." )
+
+static int pi_playlist_views[] = { 0,1,2 };
+static char *psz_playlist_views[] = { N_("Normal" ), N_("Embedded" ) ,
+                                      N_("Both") };
+
 vlc_module_begin();
 #ifdef WIN32
     int i_score = 150;
@@ -134,6 +145,9 @@ vlc_module_begin();
     add_deprecated( "wxwin-minimal", VLC_FALSE); /*Deprecated since 0.8.4*/
     add_bool( "wx-autosize", 1, NULL,
               SIZE_TO_VIDEO_TEXT, SIZE_TO_VIDEO_LONGTEXT, VLC_TRUE );
+    add_integer( "wx-playlist-view", 0, NULL, PLAYLIST_TEXT, PLAYLIST_LONGTEXT,
+             VLC_FALSE );
+        change_integer_list( pi_playlist_views, psz_playlist_views, 0 );
     add_deprecated( "wxwin-autosize", VLC_FALSE); /*Deprecated since 0.8.4*/
 /* wxCocoa pretends to support this, but at least 2.6.x doesn't */
 #ifndef __APPLE__