[gnome-commander/gcmd-1-10] Use gtk_menu_popup instead of deprecated gnome_popup_menu_do_popup
- From: Uwe Scholz <uwescholz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander/gcmd-1-10] Use gtk_menu_popup instead of deprecated gnome_popup_menu_do_popup
- Date: Wed, 15 Apr 2020 12:29:46 +0000 (UTC)
commit 4a93f0a80a81febbca79daf3cc90e9d41f47d099
Author: Uwe Scholz <u scholz83 gmx de>
Date: Wed Apr 15 14:27:05 2020 +0200
Use gtk_menu_popup instead of deprecated gnome_popup_menu_do_popup
src/gnome-cmd-dir-indicator.cc | 22 ++++++++++++++--------
src/gnome-cmd-file-list.cc | 3 +--
2 files changed, 15 insertions(+), 10 deletions(-)
---
diff --git a/src/gnome-cmd-dir-indicator.cc b/src/gnome-cmd-dir-indicator.cc
index a12ade89..d0df61ca 100644
--- a/src/gnome-cmd-dir-indicator.cc
+++ b/src/gnome-cmd-dir-indicator.cc
@@ -20,7 +20,6 @@
*/
#include <config.h>
-#include <libgnomeui/gnome-popup-menu.h>
#include "gnome-cmd-includes.h"
#include "gnome-cmd-dir-indicator.h"
@@ -361,12 +360,13 @@ void gnome_cmd_dir_indicator_show_history (GnomeCmdDirIndicator *indicator)
path);
}
- gnome_popup_menu_do_popup (indicator->priv->dir_history_popup,
- (GtkMenuPositionFunc) get_popup_pos,
- indicator,
- nullptr,
- nullptr,
- nullptr);
+ gtk_menu_popup (GTK_MENU (indicator->priv->dir_history_popup),
+ nullptr,
+ nullptr,
+ (GtkMenuPositionFunc) get_popup_pos,
+ indicator,
+ 0,
+ gtk_get_current_event_time());
gint w = -1;
@@ -415,7 +415,13 @@ void gnome_cmd_dir_indicator_show_bookmarks (GnomeCmdDirIndicator *indicator)
add_menu_item (indicator, GTK_MENU_SHELL (indicator->priv->bookmark_popup), _("Add current dir"),
GTK_SIGNAL_FUNC (on_bookmarks_add_current), indicator);
add_menu_item (indicator, GTK_MENU_SHELL (indicator->priv->bookmark_popup), _("Manage bookmarks…"),
GTK_SIGNAL_FUNC (on_bookmarks_manage), indicator);
- gnome_popup_menu_do_popup (indicator->priv->bookmark_popup, (GtkMenuPositionFunc) get_popup_pos,
indicator, nullptr, nullptr, nullptr);
+ gtk_menu_popup (GTK_MENU (indicator->priv->bookmark_popup),
+ nullptr,
+ nullptr,
+ (GtkMenuPositionFunc) get_popup_pos,
+ indicator,
+ 0,
+ gtk_get_current_event_time());
gint w = -1;
diff --git a/src/gnome-cmd-file-list.cc b/src/gnome-cmd-file-list.cc
index eaecfb17..09e07c2e 100644
--- a/src/gnome-cmd-file-list.cc
+++ b/src/gnome-cmd-file-list.cc
@@ -22,7 +22,6 @@
#include <config.h>
#include <stdio.h>
#include <glib-object.h>
-#include <libgnomeui/gnome-popup-menu.h>
#include "gnome-cmd-includes.h"
#include "gnome-cmd-file-selector.h"
@@ -817,7 +816,7 @@ static void show_file_popup (GnomeCmdFileList *fl, GdkEventButton *event)
g_object_ref (menu);
g_object_set_data_full (*fl, "file_popup_menu", menu, g_object_unref);
- gnome_popup_menu_do_popup (menu, nullptr, nullptr, event, fl, nullptr);
+ gtk_menu_popup (GTK_MENU (menu), nullptr, nullptr, nullptr, fl, event->button, event->time);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]