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