diff options
author | Marinus Schraal <mschraal@gnome.org> | 2020-01-19 14:17:15 +0100 |
---|---|---|
committer | Marinus Schraal <mschraal@gnome.org> | 2020-01-21 14:39:40 +0100 |
commit | 28843cb1761920177e8c88baf94d147c5cb234eb (patch) | |
tree | e5a2a327b95a44a2ff0fa565b0f2d0ca5c2087bf /gi/overrides/Gtk.py | |
parent | c10c9856e4121b048f55a2c7b98a6fd8e8683c23 (diff) | |
download | pygobject-28843cb1761920177e8c88baf94d147c5cb234eb.tar.gz |
gtk overrides: Drop Menu, MenuItem for Gtk 4
These API's have been removed (gtk commit 7ee5779efcf5).
Diffstat (limited to 'gi/overrides/Gtk.py')
-rw-r--r-- | gi/overrides/Gtk.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gi/overrides/Gtk.py b/gi/overrides/Gtk.py index 3ea02ae1..834f5eb6 100644 --- a/gi/overrides/Gtk.py +++ b/gi/overrides/Gtk.py @@ -452,14 +452,14 @@ 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) |