X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fgui%2Fskins2%2Fcommands%2Fcmd_dialogs.hpp;h=7f5f3d757367c66e74960af4e576204d133d6bfe;hb=fb9fadde00254769f1ad3332378608b398e19296;hp=499e41245e2bd2f58a6557a41e9c40b1e8374dac;hpb=85b29bdc288a1573d43bd524908be5748a9b3640;p=vlc diff --git a/modules/gui/skins2/commands/cmd_dialogs.hpp b/modules/gui/skins2/commands/cmd_dialogs.hpp index 499e41245e..7f5f3d7573 100644 --- a/modules/gui/skins2/commands/cmd_dialogs.hpp +++ b/modules/gui/skins2/commands/cmd_dialogs.hpp @@ -1,11 +1,11 @@ /***************************************************************************** * cmd_dialogs.hpp ***************************************************************************** - * Copyright (C) 2003 VideoLAN (Centrale Réseaux) and its contributors + * Copyright (C) 2003 the VideoLAN team * $Id$ * * Authors: Cyril Deguet - * Olivier Teulière + * Olivier Teulière * * 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 template 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