[pygobject/wip/mschraal/gtk4-menu-deprecation] gtk overrides: Drop Menu, MenuItem for Gtk 4
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject/wip/mschraal/gtk4-menu-deprecation] gtk overrides: Drop Menu, MenuItem for Gtk 4
- Date: Sun, 19 Jan 2020 13:24:52 +0000 (UTC)
commit d84affdfbe2ddd2fb6ad5dbc5760f9917206f718
Author: Marinus Schraal <mschraal gnome org>
Date: Sun Jan 19 14:17:15 2020 +0100
gtk overrides: Drop Menu, MenuItem for Gtk 4
These API's have been removed (gtk#7ee5779efcf5).
gi/overrides/Gtk.py | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/gi/overrides/Gtk.py b/gi/overrides/Gtk.py
index 3ea02ae1..b10feb75 100644
--- a/gi/overrides/Gtk.py
+++ b/gi/overrides/Gtk.py
@@ -451,15 +451,15 @@ class SizeGroup(Gtk.SizeGroup):
SizeGroup = override(SizeGroup)
__all__.append('SizeGroup')
-
-class MenuItem(Gtk.MenuItem):
- __init__ = deprecated_init(Gtk.MenuItem.__init__,
- arg_names=('label',),
- category=PyGTKDeprecationWarning)
+if Gtk._version in ("2.0", "3.0"):
+ class MenuItem(Gtk.MenuItem):
+ __init__ = deprecated_init(Gtk.MenuItem.__init__,
+ arg_names=('label',),
+ category=PyGTKDeprecationWarning)
-MenuItem = override(MenuItem)
-__all__.append('MenuItem')
+ MenuItem = override(MenuItem)
+ __all__.append('MenuItem')
def _get_utf8_length(string):
@@ -1607,7 +1607,7 @@ class TreeModelFilter(Gtk.TreeModelFilter):
TreeModelFilter = override(TreeModelFilter)
__all__.append('TreeModelFilter')
-if Gtk._version != '2.0':
+if Gtk._version == '3.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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]