Skip to content

Commit

Permalink
zoom-control: don't use eel_pop_up_context_menu function
Browse files Browse the repository at this point in the history
in favor of constant using of gtk_menu_popup_at_widget

for mouse and keyboard events.
  • Loading branch information
raveit65 authored and raveit65 committed May 10, 2018
1 parent ddf6f38 commit 42e5c91
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/caja-zoom-control.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -124,12 +124,16 @@ zoom_button_clicked (GtkButton *button, CajaZoomControl *zoom_control)
} }


static void 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), GtkMenu *menu;
EEL_DEFAULT_POPUP_MENU_DISPLACEMENT,
EEL_DEFAULT_POPUP_MENU_DISPLACEMENT, menu = create_zoom_menu (zoom_control);
event); gtk_menu_popup_at_widget (menu,
widget,
GDK_GRAVITY_SOUTH_WEST,
GDK_GRAVITY_NORTH_WEST,
(const GdkEvent*) event);
} }


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

0 comments on commit 42e5c91

Please sign in to comment.