Commit b9e83af7 authored by Gildas Bazin's avatar Gildas Bazin

* modules/gui/wxwindows/menus.cpp: added file info and messages entries to the popup menu.

parent f68b20d2
......@@ -91,6 +91,8 @@ enum
OpenDisc_Event,
OpenNet_Event,
OpenCapture_Event,
MediaInfo_Event,
Messages_Event,
Preferences_Event,
FirstAutoGenerated_Event = wxID_HIGHEST + 1999,
SettingsMenu_Events = wxID_HIGHEST + 5000,
......@@ -110,6 +112,8 @@ BEGIN_EVENT_TABLE(MenuEvtHandler, wxEvtHandler)
EVT_MENU(OpenDisc_Event, MenuEvtHandler::OnShowDialog)
EVT_MENU(OpenNet_Event, MenuEvtHandler::OnShowDialog)
EVT_MENU(OpenCapture_Event, MenuEvtHandler::OnShowDialog)
EVT_MENU(MediaInfo_Event, MenuEvtHandler::OnShowDialog)
EVT_MENU(Messages_Event, MenuEvtHandler::OnShowDialog)
EVT_MENU(Preferences_Event, MenuEvtHandler::OnShowDialog)
EVT_MENU(-1, MenuEvtHandler::OnMenuEvent)
END_EVENT_TABLE()
......@@ -125,6 +129,15 @@ wxMenu *OpenStreamMenu( intf_thread_t *p_intf )
return menu;
}
wxMenu *MiscMenu( intf_thread_t *p_intf )
{
wxMenu *menu = new wxMenu;
menu->Append( MediaInfo_Event, wxU(_("Media &Info...")) );
menu->Append( Messages_Event, wxU(_("&Messages...")) );
menu->Append( Preferences_Event, wxU(_("&Preferences...")) );
return menu;
}
void PopupMenu( intf_thread_t *p_intf, wxWindow *p_parent,
const wxPoint& pos )
{
......@@ -250,9 +263,10 @@ void PopupMenu( intf_thread_t *p_intf, wxWindow *p_parent,
/* Add static entries */
popupmenu.AppendSeparator();
popupmenu.Append( MenuDummy_Event, wxU("Open..."),
popupmenu.Append( MenuDummy_Event, wxU("Open"),
OpenStreamMenu( p_intf ), wxT("") );
popupmenu.Append( Preferences_Event, wxU(_("&Preferences...")) );
popupmenu.Append( MenuDummy_Event, wxU("Miscellaneous"),
MiscMenu( p_intf ), wxT("") );
p_intf->p_sys->p_popup_menu = &popupmenu;
p_parent->PopupMenu( &popupmenu, pos.x, pos.y );
......@@ -836,6 +850,12 @@ void MenuEvtHandler::OnShowDialog( wxCommandEvent& event )
case OpenCapture_Event:
i_id = INTF_DIALOG_CAPTURE;
break;
case MediaInfo_Event:
i_id = INTF_DIALOG_FILEINFO;
break;
case Messages_Event:
i_id = INTF_DIALOG_MESSAGES;
break;
case Preferences_Event:
i_id = INTF_DIALOG_PREFS;
break;
......
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