]> git.sesse.net Git - vlc/commitdiff
* wxwidgets/menus.cpp: Added "Open Directory" in the wx popup menu
authorOlivier Teulière <ipkiss@videolan.org>
Sun, 7 Aug 2005 10:56:07 +0000 (10:56 +0000)
committerOlivier Teulière <ipkiss@videolan.org>
Sun, 7 Aug 2005 10:56:07 +0000 (10:56 +0000)
 * skins2: Added dialogs.directory() and dialogs.streamingWizard() actions
 * doc/skins/skins2-howto.xml: Updated the doc accordingly

doc/skins/skins2-howto.xml
modules/gui/skins2/commands/cmd_dialogs.hpp
modules/gui/skins2/parser/interpreter.cpp
modules/gui/skins2/src/dialogs.cpp
modules/gui/skins2/src/dialogs.hpp
modules/gui/skins2/src/generic_layout.cpp
modules/gui/wxwidgets/menus.cpp

index 22e94d8a3f4b5abff9f23110740b696507b22728..fcd70fae839084a83e98656b2789903293a2b924 100644 (file)
@@ -683,6 +683,9 @@ difficulty to understand how VLC skins work.</para>
   <listitem><para>
     <emphasis>dialog.file()</emphasis>: Show the "Open File" dialog box, with many options (stream output, subtitles, etc...).
   </para></listitem>
+  <listitem><para>
+    <emphasis>dialog.directory()</emphasis>: Show the "Open Directory" dialog box (new after VLC 0.8.2).
+  </para></listitem>
   <listitem><para>
     <emphasis>dialog.disc()</emphasis>: Show the "Open Disc" dialog box.
   </para></listitem>
@@ -698,6 +701,9 @@ difficulty to understand how VLC skins work.</para>
   <listitem><para>
     <emphasis>dialogs.fileInfo()</emphasis>: Show the "File Info" dialog box.
   </para></listitem>
+  <listitem><para>
+    <emphasis>dialogs.streamingWizard()</emphasis>: Show the "Streaming Wizard" dialog box (new after VLC 0.8.2).
+  </para></listitem>
   <listitem><para>
     <emphasis>dialogs.popup()</emphasis>: Show the popup menu, (already available with a right-click on a <link linkend="Image">Image</link> control).
   </para></listitem>
index d3862b9b1f83d23e4a3761277322a327124d8534..03c4dbc3966c35453a6278ed516460e51efe2a23 100644 (file)
@@ -46,6 +46,8 @@ typedef CmdDialogs<10> CmdDlgHidePopupMenu;
 typedef CmdDialogs<11> CmdDlgAdd;
 typedef CmdDialogs<12> CmdDlgPlaylistLoad;
 typedef CmdDialogs<13> CmdDlgPlaylistSave;
+typedef CmdDialogs<14> CmdDlgDirectory;
+typedef CmdDialogs<15> CmdDlgStreamingWizard;
 
 
 /// Generic "Open dialog" command
@@ -107,6 +109,12 @@ class CmdDialogs: public CmdGeneric
                 case 13:
                     pDialogs->showPlaylistSave();
                     break;
+                case 14:
+                    pDialogs->showDirectory( true );
+                    break;
+                case 15:
+                    pDialogs->showStreamingWizard();
+                    break;
                 default:
                     msg_Warn( getIntf(), "Unknown dialog type" );
                     break;
index 0425b60e397bae9b6f140e274287356ab6b1132b..33cb53cd5ce6036b6e38ed7362ee9891febacde9 100644 (file)
@@ -50,11 +50,13 @@ Interpreter::Interpreter( intf_thread_t *pIntf ): SkinObject( pIntf )
     REGISTER_CMD( "dialogs.changeSkin()", CmdDlgChangeSkin )
     REGISTER_CMD( "dialogs.fileSimple()", CmdDlgFileSimple )
     REGISTER_CMD( "dialogs.file()", CmdDlgFile )
+    REGISTER_CMD( "dialogs.directory()", CmdDlgDirectory )
     REGISTER_CMD( "dialogs.disc()", CmdDlgDisc )
     REGISTER_CMD( "dialogs.net()", CmdDlgNet )
     REGISTER_CMD( "dialogs.messages()", CmdDlgMessages )
     REGISTER_CMD( "dialogs.prefs()", CmdDlgPrefs )
     REGISTER_CMD( "dialogs.fileInfo()", CmdDlgFileInfo )
+    REGISTER_CMD( "dialogs.streamingWizard()", CmdDlgStreamingWizard )
     REGISTER_CMD( "dialogs.popup()", CmdDlgShowPopupMenu )
     REGISTER_CMD( "playlist.load()", CmdDlgPlaylistLoad )
     REGISTER_CMD( "playlist.save()", CmdDlgPlaylistSave )
index 347fd9c689338d573e92f316eb5f433fca806939..713d8c3ebc6d27f9891c993faa8c8d1255453cd5 100644 (file)
@@ -263,6 +263,16 @@ void Dialogs::showFile( bool play )
 }
 
 
+void Dialogs::showDirectory( bool play )
+{
+    if( m_pProvider && m_pProvider->pf_show_dialog )
+    {
+        m_pProvider->pf_show_dialog( m_pProvider, INTF_DIALOG_DIRECTORY,
+                                     (int)play, 0 );
+    }
+}
+
+
 void Dialogs::showDisc( bool play )
 {
     if( m_pProvider && m_pProvider->pf_show_dialog )
@@ -303,9 +313,18 @@ void Dialogs::showPrefs()
 
 void Dialogs::showFileInfo()
 {
-   if( m_pProvider && m_pProvider->pf_show_dialog )
+    if( m_pProvider && m_pProvider->pf_show_dialog )
+    {
+        m_pProvider->pf_show_dialog( m_pProvider, INTF_DIALOG_FILEINFO, 0, 0 );
+    }
+}
+
+
+void Dialogs::showStreamingWizard()
+{
+    if( m_pProvider && m_pProvider->pf_show_dialog )
     {
-       m_pProvider->pf_show_dialog( m_pProvider, INTF_DIALOG_FILEINFO, 0, 0 );
+        m_pProvider->pf_show_dialog( m_pProvider, INTF_DIALOG_WIZARD, 0, 0 );
     }
 }
 
index cf6fda5033f37fe0362d7054fd04dbdefb403c22..239f7339986446c20c3c459fa5167ded808ed180 100644 (file)
@@ -33,8 +33,7 @@
 class Dialogs: public SkinObject
 {
     public:
-        /// Get the instance of Dialogs
-        /// Returns NULL if initialization failed
+        /// Get the instance of Dialogs (or NULL if initialization failed)
         static Dialogs *instance( intf_thread_t *pIntf );
 
         /// Delete the instance of Dialogs
@@ -49,20 +48,29 @@ class Dialogs: public SkinObject
         /// Show the Save Playlist dialog
         void showPlaylistSave();
 
-        /// Show the Quick Open File dialog.
-        /// If play is false, just add the item in the playlist
+        /** Show the Quick Open File dialog.
+         *  If play is false, just add the item in the playlist
+         */
         void showFileSimple( bool play );
 
-        /// Show the Open File dialog
-        /// If play is false, just add the item in the playlist
+        /** Show the Open File dialog
+         *  If play is false, just add the item in the playlist
+         */
         void showFile( bool play );
 
-        /// Show the Open Disc dialog
-        /// If play is false, just add the item in the playlist
+        /** Show the Open Directory dialog
+         *  If play is false, just add the item in the playlist
+         */
+        void showDirectory( bool play );
+
+        /** Show the Open Disc dialog
+         *  If play is false, just add the item in the playlist
+         */
         void showDisc( bool play );
 
-        /// Show the Open Network Stream dialog
-        /// If play is false, just add the item in the playlist
+        /** Show the Open Network Stream dialog
+         *  If play is false, just add the item in the playlist
+         */
         void showNet( bool play );
 
         /// Show the Messages dialog
@@ -74,6 +82,9 @@ class Dialogs: public SkinObject
         /// Show the FileInfo dialog
         void showFileInfo();
 
+        /// Show the Streaming Wizard dialog
+        void showStreamingWizard();
+
         /// Show the popup menu
         void showPopupMenu( bool bShow );
 
@@ -96,9 +107,10 @@ class Dialogs: public SkinObject
         /// Initialization method
         bool init();
 
-        /// Show a generic open/save dialog, initialized with the given
-        /// parameters
-        /// The 'flags' parameter is a logical or of the flags_t values
+        /** Show a generic open/save dialog, initialized with the given
+         *  parameters
+         *  The 'flags' parameter is a logical or of the flags_t values
+         */
         void showFileGeneric( const string &rTitle, const string &rExtensions,
                               DlgCallback callback, int flags );
 
index e557f60d472f093616f828f42da44a04e25efe82..f89442453abc507a70701e207a72ddc05d348e79 100644 (file)
@@ -81,7 +81,7 @@ void GenericLayout::onControlRelease( const CtrlGeneric &rCtrl )
 
 
 void GenericLayout::addControl( CtrlGeneric *pControl,
-                              const Position &rPosition, int layer )
+                                const Position &rPosition, int layer )
 {
     if( pControl )
     {
index b5ffdfca708840cf196f689045386cc05b1d8d0a..3e6ec89e34939db1348f639274d7cc28abdf2224 100644 (file)
@@ -88,6 +88,7 @@ enum
     MenuDummy_Event = wxID_HIGHEST + 1000,
     OpenFileSimple_Event = wxID_HIGHEST + 1100,
     OpenFile_Event,
+    OpenDirectory_Event,
     OpenDisc_Event,
     OpenNet_Event,
     OpenCapture_Event,
@@ -114,6 +115,7 @@ END_EVENT_TABLE()
 BEGIN_EVENT_TABLE(MenuEvtHandler, wxEvtHandler)
     EVT_MENU(OpenFileSimple_Event, MenuEvtHandler::OnShowDialog)
     EVT_MENU(OpenFile_Event, MenuEvtHandler::OnShowDialog)
+    EVT_MENU(OpenDirectory_Event, MenuEvtHandler::OnShowDialog)
     EVT_MENU(OpenDisc_Event, MenuEvtHandler::OnShowDialog)
     EVT_MENU(OpenNet_Event, MenuEvtHandler::OnShowDialog)
     EVT_MENU(OpenCapture_Event, MenuEvtHandler::OnShowDialog)
@@ -128,6 +130,7 @@ wxMenu *OpenStreamMenu( intf_thread_t *p_intf )
     wxMenu *menu = new wxMenu;
     menu->Append( OpenFileSimple_Event, wxU(_("Quick &Open File...")) );
     menu->Append( OpenFile_Event, wxU(_("Open &File...")) );
+    menu->Append( OpenDirectory_Event, wxU(_("Open D&irectory...")) );
     menu->Append( OpenDisc_Event, wxU(_("Open &Disc...")) );
     menu->Append( OpenNet_Event, wxU(_("Open &Network Stream...")) );
     menu->Append( OpenCapture_Event, wxU(_("Open &Capture Device...")) );
@@ -891,6 +894,9 @@ void MenuEvtHandler::OnShowDialog( wxCommandEvent& event )
         case OpenFile_Event:
             i_id = INTF_DIALOG_FILE;
             break;
+        case OpenDirectory_Event:
+            i_id = INTF_DIALOG_DIRECTORY;
+            break;
         case OpenDisc_Event:
             i_id = INTF_DIALOG_DISC;
             break;