Skip to content
Permalink
Browse files

zoom-control: don't use eel_pop_up_context_menu function

in favor of constant using of gtk_menu_popup_at_widget

for mouse and keyboard events.
  • Loading branch information...
raveit65 committed May 6, 2018
1 parent ddf6f38 commit 42e5c91bee1d9f7ae88d291187f6f792c0f36145
Showing with 10 additions and 6 deletions.
  1. +10 −6 src/caja-zoom-control.c
@@ -124,12 +124,16 @@ zoom_button_clicked (GtkButton *button, CajaZoomControl *zoom_control)
}

static void
zoom_popup_menu_show (GdkEventButton *event, CajaZoomControl *zoom_control)
zoom_popup_menu_show (GtkWidget *widget, GdkEventButton *event, CajaZoomControl *zoom_control)
{
eel_pop_up_context_menu (create_zoom_menu (zoom_control),
EEL_DEFAULT_POPUP_MENU_DISPLACEMENT,
EEL_DEFAULT_POPUP_MENU_DISPLACEMENT,
event);
GtkMenu *menu;

menu = create_zoom_menu (zoom_control);
gtk_menu_popup_at_widget (menu,
widget,
GDK_GRAVITY_SOUTH_WEST,
GDK_GRAVITY_NORTH_WEST,
(const GdkEvent*) event);
}

static void
@@ -162,7 +166,7 @@ caja_zoom_control_button_press_event (GtkWidget *widget,
/* check for the context menu button and show the menu */
if (event->button == CONTEXTUAL_MENU_BUTTON)
{
zoom_popup_menu_show (event, zoom_control);
zoom_popup_menu_show (widget, event, zoom_control);
return TRUE;
}
/* We don't change our state (to reflect the new zoom) here.

0 comments on commit 42e5c91

Please sign in to comment.
You can’t perform that action at this time.