[gitg] Fix deprecation menu.popup()
- From: Alberto Fanjul <albfan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg] Fix deprecation menu.popup()
- Date: Thu, 4 Apr 2019 20:50:26 +0000 (UTC)
commit cf61f15ad81b2fab370323021b5e1968e12e23af
Author: Adwait Rawat <adwait rawat gmail com>
Date: Fri Mar 22 02:30:42 2019 +0900
Fix deprecation menu.popup()
libgitg/gitg-diff-view-file.vala | 11 +----------
libgitg/gitg-sidebar.vala | 11 +----------
2 files changed, 2 insertions(+), 20 deletions(-)
---
diff --git a/libgitg/gitg-diff-view-file.vala b/libgitg/gitg-diff-view-file.vala
index afec0608..d4e31cc9 100644
--- a/libgitg/gitg-diff-view-file.vala
+++ b/libgitg/gitg-diff-view-file.vala
@@ -236,17 +236,8 @@ class Gitg.DiffViewFile : Gtk.Grid
menu.add(copy_file_path);
- uint button = 0;
- uint evtime = Gdk.CURRENT_TIME;
-
- if (event != null)
- {
- button = event.button;
- evtime = event.time;
- }
-
menu.attach_to_widget(d_expander, null);
- menu.popup(null, null, null, button, evtime);
+ menu.popup_at_pointer(event);
}
private bool expander_button_press_event(Gtk.Widget widget, Gdk.EventButton? event)
diff --git a/libgitg/gitg-sidebar.vala b/libgitg/gitg-sidebar.vala
index 43fa9c8a..c2541296 100644
--- a/libgitg/gitg-sidebar.vala
+++ b/libgitg/gitg-sidebar.vala
@@ -483,16 +483,7 @@ public class Sidebar : Gtk.TreeView
menu.show_all();
menu.attach_to_widget(this, null);
- uint button = 0;
- uint32 t = Gdk.CURRENT_TIME;
-
- if (event != null)
- {
- button = event.button;
- t = event.time;
- }
-
- menu.popup(null, null, null, button, t);
+ menu.popup_at_pointer(event);
return true;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]