AudioMenu_Events = wxID_HIGHEST + 2000,
VideoMenu_Events = wxID_HIGHEST + 3000,
NavigMenu_Events = wxID_HIGHEST + 4000,
- PopupMenu_Events = wxID_HIGHEST + 6000
+ PopupMenu_Events = wxID_HIGHEST + 6000,
+ Hotkeys_Events = wxID_HIGHEST + 7000
};
BEGIN_EVENT_TABLE(Menu, wxMenu)
pi_objects[i++] = p_object->i_object_id;
ppsz_varnames[i] = "video-on-top";
pi_objects[i++] = p_object->i_object_id;
+ ppsz_varnames[i] = "directx-wallpaper";
+ pi_objects[i++] = p_object->i_object_id;
p_dec_obj = (vlc_object_t *)vlc_object_find( p_object,
VLC_OBJECT_DECODER,
pi_objects[i++] = p_object->i_object_id;
ppsz_varnames[i] = "video-on-top";
pi_objects[i++] = p_object->i_object_id;
+ ppsz_varnames[i] = "directx-wallpaper";
+ pi_objects[i++] = p_object->i_object_id;
p_dec_obj = (vlc_object_t *)vlc_object_find( p_object,
VLC_OBJECT_DECODER,
void MenuEvtHandler::OnMenuEvent( wxCommandEvent& event )
{
wxMenuItem *p_menuitem = NULL;
+ int i_hotkey_event = p_intf->p_sys->i_first_hotkey_event;
+ int i_hotkeys = p_intf->p_sys->i_hotkeys;
/* Check if this is an auto generated menu item */
if( event.GetId() < FirstAutoGenerated_Event )
return;
}
+ /* Check if this is an hotkey event */
+ if( event.GetId() >= i_hotkey_event &&
+ event.GetId() < i_hotkey_event + i_hotkeys )
+ {
+ vlc_value_t val;
+
+ val.i_int =
+ p_intf->p_vlc->p_hotkeys[event.GetId() - i_hotkey_event].i_key;
+
+ /* Get the key combination and send it to the hotkey handler */
+ var_Set( p_intf->p_vlc, "key-pressed", val );
+ msg_Err( p_intf, "received key event: %i", event.GetId() );
+ return;
+ }
+
if( !p_main_interface ||
(p_menuitem = p_main_interface->GetMenuBar()->FindItem(event.GetId()))
== NULL )
p_menuitemext->i_object_id );
if( p_object == NULL ) return;
+ wxMutexGuiLeave(); // We don't want deadlocks
var_Set( p_object, p_menuitemext->psz_var, p_menuitemext->val );
+ wxMutexGuiEnter();
vlc_object_release( p_object );
}