summaryrefslogtreecommitdiff
path: root/src/caja-zoom-control.c
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2018-05-06 16:56:33 +0200
committerraveit65 <[email protected]>2018-05-10 21:42:28 +0200
commit42e5c91bee1d9f7ae88d291187f6f792c0f36145 (patch)
treece6d7d3092471a3504cd838a9d500e1c1411c48e /src/caja-zoom-control.c
parentddf6f38db4e842abecd4f2ee77012050822b3775 (diff)
downloadcaja-42e5c91bee1d9f7ae88d291187f6f792c0f36145.tar.bz2
caja-42e5c91bee1d9f7ae88d291187f6f792c0f36145.tar.xz
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.
Diffstat (limited to 'src/caja-zoom-control.c')
-rw-r--r--src/caja-zoom-control.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/caja-zoom-control.c b/src/caja-zoom-control.c
index 99f1b5e0..9143edda 100644
--- a/src/caja-zoom-control.c
+++ b/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.