diff options
-rw-r--r-- | gi/overrides/Gtk.py | 16 | ||||
-rw-r--r-- | tests/test_overrides_gtk.py | 1 |
2 files changed, 9 insertions, 8 deletions
diff --git a/gi/overrides/Gtk.py b/gi/overrides/Gtk.py index 3fda3315..dc767b40 100644 --- a/gi/overrides/Gtk.py +++ b/gi/overrides/Gtk.py @@ -1645,16 +1645,16 @@ if GTK2 or GTK3: __all__.append('VScrollbar') -class Paned(Gtk.Paned): - def pack1(self, child, resize=False, shrink=True): - super(Paned, self).pack1(child, resize, shrink) - - def pack2(self, child, resize=True, shrink=True): - super(Paned, self).pack2(child, resize, shrink) +if GTK2 or GTK3: + class Paned(Gtk.Paned): + def pack1(self, child, resize=False, shrink=True): + super(Paned, self).pack1(child, resize, shrink) + def pack2(self, child, resize=True, shrink=True): + super(Paned, self).pack2(child, resize, shrink) -Paned = override(Paned) -__all__.append('Paned') + Paned = override(Paned) + __all__.append('Paned') if GTK2 or GTK3: diff --git a/tests/test_overrides_gtk.py b/tests/test_overrides_gtk.py index 091a6a24..9c1d1c95 100644 --- a/tests/test_overrides_gtk.py +++ b/tests/test_overrides_gtk.py @@ -2723,6 +2723,7 @@ class TestTextBuffer(unittest.TestCase): @unittest.skipUnless(Gtk, 'Gtk not available') +@unittest.skipIf(Gtk_version == "4.0", "not in gtk4") class TestPaned(unittest.TestCase): def test_pack_defaults(self): |