static gboolean applet_key_press (GtkWidget *widget, GdkEventKey *event, AppletInfo *info) { GdkEventButton eventbutton; gboolean is_popup = FALSE; gboolean is_edit_popup = FALSE; if (applet_must_skip_menu (info)) return FALSE; eventbutton.button = 3; eventbutton.time = event->time; /* We're not connecting to the popup-menu signal since we want to be * able to deal with two cases: * - exact keybinding of popup-menu => we open the context menu * - keybinding of popup-menu + modifier from metacity => we open menu * to "edit" */ panel_util_key_event_is_popup (event, &is_popup, &is_edit_popup); if (is_edit_popup) applet_show_menu (info, panel_applet_get_edit_menu (info), FALSE, &eventbutton); else if (is_popup) applet_show_menu (info, panel_applet_get_menu (info), TRUE, &eventbutton); return (is_popup || is_edit_popup); }
static gboolean panel_key_press_event (PanelToplevel *toplevel, GdkEventKey *event) { gboolean is_popup = FALSE; /* We're not connecting to the popup-menu signal since we want to be * able to handle keybinding of popup-menu + modifier from metacity */ panel_util_key_event_is_popup (event, NULL, &is_popup); if (!is_popup) panel_util_key_event_is_popup_panel (event, &is_popup, NULL); if (is_popup) return panel_popup_menu (toplevel, 3, event->time); return FALSE; }
static gboolean applet_key_press (GtkWidget *widget, GdkEventKey *event, AppletInfo *info) { GdkEventButton eventbutton; gboolean is_popup = FALSE; gboolean is_edit_popup = FALSE; if (applet_must_skip_menu (info)) return FALSE; eventbutton.button = 3; eventbutton.time = event->time; panel_util_key_event_is_popup (event, &is_popup, &is_edit_popup); // Hacked out the old code and show the popup always if (is_edit_popup || is_popup ) applet_show_menu (info, panel_applet_get_menu (info), TRUE, &eventbutton); return (is_popup || is_edit_popup); }