Skip to content

Commit 42e5c91

Browse files
raveit65raveit65
authored andcommitted
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.
1 parent ddf6f38 commit 42e5c91

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

src/caja-zoom-control.c

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,16 @@ zoom_button_clicked (GtkButton *button, CajaZoomControl *zoom_control)
124124
}
125125

126126
static void
127-
zoom_popup_menu_show (GdkEventButton *event, CajaZoomControl *zoom_control)
127+
zoom_popup_menu_show (GtkWidget *widget, GdkEventButton *event, CajaZoomControl *zoom_control)
128128
{
129-
eel_pop_up_context_menu (create_zoom_menu (zoom_control),
130-
EEL_DEFAULT_POPUP_MENU_DISPLACEMENT,
131-
EEL_DEFAULT_POPUP_MENU_DISPLACEMENT,
132-
event);
129+
GtkMenu *menu;
130+
131+
menu = create_zoom_menu (zoom_control);
132+
gtk_menu_popup_at_widget (menu,
133+
widget,
134+
GDK_GRAVITY_SOUTH_WEST,
135+
GDK_GRAVITY_NORTH_WEST,
136+
(const GdkEvent*) event);
133137
}
134138

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

0 commit comments

Comments
 (0)