[eog] EogThumbView: Fix deprecated gtk_menu_popup usage
- From: Felix Riemann <friemann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [eog] EogThumbView: Fix deprecated gtk_menu_popup usage
- Date: Fri, 2 Feb 2018 19:02:22 +0000 (UTC)
commit b8625de2490c0e16f734e74e17d766024b7da5ec
Author: Felix Riemann <friemann gnome org>
Date: Fri Feb 2 19:37:25 2018 +0100
EogThumbView: Fix deprecated gtk_menu_popup usage
src/eog-thumb-view.c | 27 +++------------------------
1 files changed, 3 insertions(+), 24 deletions(-)
---
diff --git a/src/eog-thumb-view.c b/src/eog-thumb-view.c
index 4bd3b5f..0878a76 100644
--- a/src/eog-thumb-view.c
+++ b/src/eog-thumb-view.c
@@ -50,8 +50,6 @@ static void eog_thumb_view_init (EogThumbView *thumbview);
static EogImage* eog_thumb_view_get_image_from_path (EogThumbView *thumbview,
GtkTreePath *path);
-static void eog_thumb_view_popup_menu (EogThumbView *widget,
- GdkEventButton *event);
static void eog_thumb_view_update_columns (EogThumbView *view);
static gboolean
@@ -404,6 +402,7 @@ static gboolean
thumbview_on_button_press_event_cb (GtkWidget *thumbview, GdkEventButton *event,
gpointer user_data)
{
+ EogThumbView *view = EOG_THUMB_VIEW (thumbview);
GtkTreePath *path;
/* Ignore double-clicks and triple-clicks */
@@ -421,7 +420,8 @@ thumbview_on_button_press_event_cb (GtkWidget *thumbview, GdkEventButton *event,
gtk_icon_view_select_path (GTK_ICON_VIEW (thumbview), path);
gtk_icon_view_set_cursor (GTK_ICON_VIEW (thumbview), path, NULL, FALSE);
}
- eog_thumb_view_popup_menu (EOG_THUMB_VIEW (thumbview), event);
+ gtk_menu_popup_at_pointer (GTK_MENU (view->priv->menu),
+ (const GdkEvent*) event);
gtk_tree_path_free (path);
@@ -1053,24 +1053,3 @@ eog_thumb_view_set_thumbnail_popup (EogThumbView *thumbview,
G_CALLBACK (thumbview_on_button_press_event_cb), NULL);
}
-
-
-static void
-eog_thumb_view_popup_menu (EogThumbView *thumbview, GdkEventButton *event)
-{
- GtkWidget *popup;
- int button, event_time;
-
- popup = thumbview->priv->menu;
-
- if (event) {
- button = event->button;
- event_time = event->time;
- } else {
- button = 0;
- event_time = gtk_get_current_event_time ();
- }
-
- gtk_menu_popup (GTK_MENU (popup), NULL, NULL, NULL, NULL,
- button, event_time);
-}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]