Commit 58e54052 authored by Clément Stenac's avatar Clément Stenac

Add dialogs.audioPopup, dialogs.videoPopup and dialogs.miscPopup commands

parent a31e6840
......@@ -42,8 +42,7 @@ typedef CmdDialogs<5> CmdDlgNet;
typedef CmdDialogs<6> CmdDlgMessages;
typedef CmdDialogs<7> CmdDlgPrefs;
typedef CmdDialogs<8> CmdDlgFileInfo;
typedef CmdDialogs<9> CmdDlgShowPopupMenu;
typedef CmdDialogs<10> CmdDlgHidePopupMenu;
typedef CmdDialogs<11> CmdDlgAdd;
typedef CmdDialogs<12> CmdDlgPlaylistLoad;
typedef CmdDialogs<13> CmdDlgPlaylistSave;
......@@ -53,6 +52,15 @@ typedef CmdDialogs<16> CmdDlgPlaytreeLoad;
typedef CmdDialogs<17> CmdDlgPlaytreeSave;
typedef CmdDialogs<18> CmdDlgPlaylist;
typedef CmdDialogs<30> CmdDlgShowPopupMenu;
typedef CmdDialogs<31> CmdDlgHidePopupMenu;
typedef CmdDialogs<32> CmdDlgShowAudioPopupMenu;
typedef CmdDialogs<33> CmdDlgHideAudioPopupMenu;
typedef CmdDialogs<34> CmdDlgShowVideoPopupMenu;
typedef CmdDialogs<35> CmdDlgHideVideoPopupMenu;
typedef CmdDialogs<36> CmdDlgShowMiscPopupMenu;
typedef CmdDialogs<37> CmdDlgHideMiscPopupMenu;
/// Generic "Open dialog" command
template<int TYPE>
......@@ -98,13 +106,7 @@ class CmdDialogs: public CmdGeneric
case 8:
pDialogs->showFileInfo();
break;
case 9:
pDialogs->showPopupMenu( true );
break;
case 10:
pDialogs->showPopupMenu( false );
break;
case 11:
case 11:
pDialogs->showFile( false );
break;
case 12:
......@@ -122,6 +124,30 @@ class CmdDialogs: public CmdGeneric
case 18:
pDialogs->showPlaylist();
break;
case 30:
pDialogs->showPopupMenu( true, INTF_DIALOG_POPUPMENU );
break;
case 31:
pDialogs->showPopupMenu( false, INTF_DIALOG_POPUPMENU );
break;
case 32:
pDialogs->showPopupMenu( true, INTF_DIALOG_AUDIOPOPUPMENU );
break;
case 33:
pDialogs->showPopupMenu( false,INTF_DIALOG_AUDIOPOPUPMENU );
break;
case 34:
pDialogs->showPopupMenu( true, INTF_DIALOG_VIDEOPOPUPMENU );
break;
case 35:
pDialogs->showPopupMenu( false,INTF_DIALOG_VIDEOPOPUPMENU );
break;
case 36:
pDialogs->showPopupMenu( true, INTF_DIALOG_MISCPOPUPMENU );
break;
case 37:
pDialogs->showPopupMenu( false,INTF_DIALOG_MISCPOPUPMENU );
break;
default:
msg_Warn( getIntf(), "unknown dialog type" );
break;
......
......@@ -60,7 +60,12 @@ Interpreter::Interpreter( intf_thread_t *pIntf ): SkinObject( pIntf )
REGISTER_CMD( "dialogs.prefs()", CmdDlgPrefs )
REGISTER_CMD( "dialogs.fileInfo()", CmdDlgFileInfo )
REGISTER_CMD( "dialogs.streamingWizard()", CmdDlgStreamingWizard )
REGISTER_CMD( "dialogs.popup()", CmdDlgShowPopupMenu )
REGISTER_CMD( "dialogs.audioPopup()", CmdDlgShowAudioPopupMenu )
REGISTER_CMD( "dialogs.videoPopup()", CmdDlgShowVideoPopupMenu )
REGISTER_CMD( "dialogs.miscPopup()", CmdDlgShowMiscPopupMenu )
REGISTER_CMD( "dvd.nextTitle()", CmdDvdNextTitle )
REGISTER_CMD( "dvd.previousTitle()", CmdDvdPreviousTitle )
REGISTER_CMD( "dvd.nextChapter()", CmdDvdNextChapter )
......
......@@ -57,7 +57,6 @@ void Dialogs::showChangeSkinCB( intf_dialog_args_t *pArg )
}
}
void Dialogs::showPlaylistLoadCB( intf_dialog_args_t *pArg )
{
intf_thread_t *pIntf = (intf_thread_t *)pArg->p_arg;
......@@ -97,7 +96,7 @@ static int PopupMenuCB( vlc_object_t *p_this, const char *psz_variable,
vlc_value_t old_val, vlc_value_t new_val, void *param )
{
Dialogs *p_dialogs = (Dialogs *)param;
p_dialogs->showPopupMenu( new_val.b_bool != 0 );
p_dialogs->showPopupMenu( new_val.b_bool != 0, INTF_DIALOG_POPUPMENU );
return VLC_SUCCESS;
}
......@@ -337,11 +336,11 @@ void Dialogs::showStreamingWizard()
}
void Dialogs::showPopupMenu( bool bShow )
void Dialogs::showPopupMenu( bool bShow, int popupType = INTF_DIALOG_POPUPMENU )
{
if( m_pProvider && m_pProvider->pf_show_dialog )
{
m_pProvider->pf_show_dialog( m_pProvider, INTF_DIALOG_POPUPMENU,
m_pProvider->pf_show_dialog( m_pProvider, popupType,
(int)bShow, 0 );
}
}
......
......@@ -89,8 +89,8 @@ class Dialogs: public SkinObject
/// Show the Playlist
void showPlaylist();
/// Show the popup menu
void showPopupMenu( bool bShow );
/// Show a popup menu
void showPopupMenu( bool bShow, int popupType );
/// Show an interaction dialog
void showInteraction( interaction_dialog_t * );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment