]> git.sesse.net Git - vlc/blobdiff - modules/gui/skins2/commands/cmd_dialogs.hpp
Skins strings (Refs:#438)
[vlc] / modules / gui / skins2 / commands / cmd_dialogs.hpp
old mode 100755 (executable)
new mode 100644 (file)
index 23552e3..7f5f3d7
@@ -1,11 +1,11 @@
 /*****************************************************************************
  * cmd_dialogs.hpp
  *****************************************************************************
- * Copyright (C) 2003 VideoLAN
+ * Copyright (C) 2003 the VideoLAN team
  * $Id$
  *
  * Authors: Cyril Deguet     <asmax@via.ecp.fr>
- *          Olivier Teulière <ipkiss@via.ecp.fr>
+ *          Olivier Teulière <ipkiss@via.ecp.fr>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef CMD_DIALOGS_HPP
@@ -29,6 +29,7 @@
 #include "../src/dialogs.hpp"
 #include "cmd_change_skin.hpp"
 
+#include <vlc_interaction.h>
 
 template<int TYPE = 0> class CmdDialogs;
 
@@ -46,6 +47,10 @@ typedef CmdDialogs<10> CmdDlgHidePopupMenu;
 typedef CmdDialogs<11> CmdDlgAdd;
 typedef CmdDialogs<12> CmdDlgPlaylistLoad;
 typedef CmdDialogs<13> CmdDlgPlaylistSave;
+typedef CmdDialogs<14> CmdDlgDirectory;
+typedef CmdDialogs<15> CmdDlgStreamingWizard;
+typedef CmdDialogs<16> CmdDlgPlaytreeLoad;
+typedef CmdDialogs<17> CmdDlgPlaytreeSave;
 
 
 /// Generic "Open dialog" command
@@ -107,8 +112,14 @@ 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" );
+                    msg_Warn( getIntf(), "unknown dialog type" );
                     break;
             }
         }
@@ -117,5 +128,36 @@ class CmdDialogs: public CmdGeneric
         virtual string getType() const { return "dialog"; }
 };
 
+class CmdInteraction: public CmdGeneric
+{
+    public:
+        CmdInteraction( intf_thread_t *pIntf, interaction_dialog_t *
+                        p_dialog ): CmdGeneric( pIntf ), m_pDialog( p_dialog )
+        {}
+        virtual ~CmdInteraction() {}
+
+        /// This method does the real job of the command
+        virtual void execute()
+        {
+            if( m_pDialog->i_type == INTERACT_PROGRESS )
+            {
+                 /// \todo Handle progress in the interface
+            }
+            else
+            {
+                /// Get the dialogs provider
+                Dialogs *pDialogs = Dialogs::instance( getIntf() );
+                if( pDialogs == NULL )
+                {
+                    return;
+                }
+                pDialogs->showInteraction( m_pDialog );
+            }
+        }
+
+        virtual string getType() const { return "interaction"; }
+    private:
+        interaction_dialog_t *m_pDialog;
+};
 
 #endif