[pygobject] [gi-overrides] add a Gtk.Menu override for the popup method



commit 18800c4db0e1faea38fd84f635d26a7ded5d10de
Author: John (J5) Palmieri <johnp redhat com>
Date:   Tue Feb 15 13:25:13 2011 -0500

    [gi-overrides] add a Gtk.Menu override for the popup method

 gi/overrides/Gtk.py |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/gi/overrides/Gtk.py b/gi/overrides/Gtk.py
index f33b6e0..6383f43 100644
--- a/gi/overrides/Gtk.py
+++ b/gi/overrides/Gtk.py
@@ -1176,6 +1176,13 @@ class Paned(Gtk.Paned):
 Paned = override(Paned)
 __all__.append('Paned')
 
+if Gtk._version != '2.0':
+    class Menu(Gtk.Menu):
+        def popup(self, parent_menu_shell, parent_menu_item, func, data, button, activate_time):
+            self.popup_for_device(None, parent_menu_shell, parent_menu_item, func, data, button, activate_time)
+    Menu = override(Menu)
+    __all__.append('Menu')
+
 _Gtk_main_quit = Gtk.main_quit
 @override(Gtk.main_quit)
 def main_quit(*args):



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]