diff options
author | raveit65 <[email protected]> | 2018-05-05 21:23:26 +0200 |
---|---|---|
committer | lukefromdc <[email protected]> | 2018-05-07 16:04:11 -0400 |
commit | ddf6f38db4e842abecd4f2ee77012050822b3775 (patch) | |
tree | 385890e85b2de303f8b1897f72de3b777ff6532b /eel | |
parent | ded490e1bc432210e6006e94273cc160a0af8e75 (diff) | |
download | caja-ddf6f38db4e842abecd4f2ee77012050822b3775.tar.bz2 caja-ddf6f38db4e842abecd4f2ee77012050822b3775.tar.xz |
Replace deprecated gtk_menu_popup
Replace deprecated gtk_menu_popup in eel-editable-label,caja-dnd, emblem-sidebar,caja-side-pane, fm-tree-view, caja-navigation-window-pane, and caja-zoom-control
Diffstat (limited to 'eel')
-rw-r--r-- | eel/eel-editable-label.c | 39 |
1 files changed, 2 insertions, 37 deletions
diff --git a/eel/eel-editable-label.c b/eel/eel-editable-label.c index ec606302..c3f84376 100644 --- a/eel/eel-editable-label.c +++ b/eel/eel-editable-label.c @@ -3048,37 +3048,6 @@ popup_menu_detach (GtkWidget *attach_widget, } static void -popup_position_func (GtkMenu *menu, - gint *x, - gint *y, - gboolean *push_in, - gpointer user_data) -{ - EelEditableLabel *label; - GtkWidget *widget; - GtkRequisition req; - GtkAllocation allocation; - gint scale; - - label = EEL_EDITABLE_LABEL (user_data); - widget = GTK_WIDGET (label); - - g_assert (gtk_widget_get_realized (widget)); - - gdk_window_get_origin (gtk_widget_get_window (widget), x, y); - - gtk_widget_get_preferred_size (widget, &req, NULL); - gtk_widget_get_allocation (widget, &allocation); - scale = gtk_widget_get_scale_factor (widget); - - *x += allocation.width / 2; - *y += allocation.height; - - *x = CLAMP (*x, 0, MAX (0, WidthOfScreen (gdk_x11_screen_get_xscreen (gdk_screen_get_default ())) / scale - req.width)); - *y = CLAMP (*y, 0, MAX (0, HeightOfScreen (gdk_x11_screen_get_xscreen (gdk_screen_get_default ())) / scale - req.height)); -} - -static void eel_editable_label_toggle_overwrite (EelEditableLabel *label) { label->overwrite_mode = !label->overwrite_mode; @@ -3157,14 +3126,10 @@ popup_targets_received (GtkClipboard *clipboard, label->popup_menu); if (info->button) - gtk_menu_popup (GTK_MENU (label->popup_menu), NULL, NULL, - NULL, NULL, - info->button, info->time); + gtk_menu_popup_at_pointer (GTK_MENU (label->popup_menu), NULL); else { - gtk_menu_popup (GTK_MENU (label->popup_menu), NULL, NULL, - popup_position_func, label, - info->button, info->time); + gtk_menu_popup_at_pointer (GTK_MENU (label->popup_menu), NULL); gtk_menu_shell_select_first (GTK_MENU_SHELL (label->popup_menu), FALSE); } } |