[pygobject] Don't issue a depreciation warning for GtkDialog's NO_SEPARATOR flag, even when unused
- From: Sebastian Polsterl <sebp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] Don't issue a depreciation warning for GtkDialog's NO_SEPARATOR flag, even when unused
- Date: Sat, 4 Feb 2012 15:00:02 +0000 (UTC)
commit d6a899cdf70e978534326155e3fad75a705f4b20
Author: Sebastian PÃlsterl <sebp k-d-w org>
Date: Sat Feb 4 15:55:55 2012 +0100
Don't issue a depreciation warning for GtkDialog's NO_SEPARATOR flag, even when unused
https://bugzilla.gnome.org/show_bug.cgi?id=665553
gi/overrides/Gtk.py | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/gi/overrides/Gtk.py b/gi/overrides/Gtk.py
index 3b3055c..e24a2de 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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]