summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Pölsterl <sebp@k-d-w.org>2012-02-04 15:55:55 +0100
committerSebastian Pölsterl <sebp@k-d-w.org>2012-02-04 15:55:55 +0100
commitd6a899cdf70e978534326155e3fad75a705f4b20 (patch)
tree2383ee8e4ab0241bd70175afa4062d461f2797d4
parent534ec71c575a279ff1c05da20a8858bb1145b4d0 (diff)
downloadpygobject-d6a899cdf70e978534326155e3fad75a705f4b20.tar.gz
Don't issue a depreciation warning for GtkDialog's NO_SEPARATOR flag, even when unused
https://bugzilla.gnome.org/show_bug.cgi?id=665553
-rw-r--r--gi/overrides/Gtk.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/gi/overrides/Gtk.py b/gi/overrides/Gtk.py
index 3b3055c1..e24a2dec 100644
--- a/gi/overrides/Gtk.py
+++ b/gi/overrides/Gtk.py
@@ -411,10 +411,8 @@ class Dialog(Gtk.Dialog, Container):
self.set_destroy_with_parent(True)
# NO_SEPARATOR has been removed from Gtk 3
- try:
- if flags & Gtk.DialogFlags.NO_SEPARATOR:
- self.set_has_separator(False)
- except AttributeError:
+ if hasattr(Gtk.DialogFlags, "NO_SEPARATOR") and (flags & Gtk.DialogFlags.NO_SEPARATOR):
+ self.set_has_separator(False)
import warnings
warnings.warn("Gtk.DialogFlags.NO_SEPARATOR has been depricated since Gtk+-3.0", DeprecationWarning)