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 applet_button_press (GtkWidget *widget, GdkEventButton *event, AppletInfo *info) { guint modifiers; if (event->button != 3) return FALSE; if (applet_must_skip_menu (info)) return FALSE; modifiers = event->state & gtk_accelerator_get_default_mod_mask (); if (modifiers == panel_bindings_get_mouse_button_modifier_keymask ()) applet_show_menu (info, panel_applet_get_edit_menu (info), FALSE, event); else applet_show_menu (info, panel_applet_get_menu (info), TRUE, event); return TRUE; }
static gboolean applet_do_popup_menu (GtkWidget *widget, GdkEventButton *event, AppletInfo *info) { if (mate_panel_applet_is_in_drag ()) return FALSE; if (info->type == PANEL_OBJECT_APPLET) return FALSE; applet_show_menu (info, event); return TRUE; }
static gboolean applet_button_press (GtkWidget *widget, GdkEventButton *event, AppletInfo *info) { if (event->button != 3) return FALSE; if (applet_must_skip_menu (info)) return FALSE; // Show combined menu applet_show_menu (info, panel_applet_get_menu (info), TRUE, event); return TRUE; }
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); }