[pygobject/pygtk-compat: 9/10] GtkIconSet: Add a default value for the pixbuf constructor parameter
- From: Johan Dahlin <johan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject/pygtk-compat: 9/10] GtkIconSet: Add a default value for the pixbuf constructor parameter
- Date: Fri, 16 Mar 2012 19:41:10 +0000 (UTC)
commit e8d4e94f8db8a87f38ebbc6a25165fd02222286d
Author: Johan Dahlin <johan gnome org>
Date: Fri Mar 16 16:08:23 2012 -0300
GtkIconSet: Add a default value for the pixbuf constructor parameter
gi/overrides/Gtk.py | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/gi/overrides/Gtk.py b/gi/overrides/Gtk.py
index cd65d2c..6cdd362 100644
--- a/gi/overrides/Gtk.py
+++ b/gi/overrides/Gtk.py
@@ -1450,6 +1450,17 @@ class Window(Gtk.Window):
Window = override(Window)
__all__.append('Window')
+class IconSet(Gtk.IconSet):
+ def __new__(cls, pixbuf=None):
+ if pixbuf is not None:
+ iconset = Gtk.IconSet.new_from_pixbuf(pixbuf)
+ else:
+ iconset = Gtk.IconSet.__new__(cls)
+ return iconset
+
+IconSet = override(IconSet)
+__all__.append('IconSet')
+
class TreeModelFilter(Gtk.TreeModelFilter):
def set_visible_func(self, func, data=None):
super(TreeModelFilter, self).set_visible_func(func, data)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]