diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2017-07-12 08:36:13 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2017-07-12 08:36:14 +0900 |
commit | d3b61d1e80a91482c2fc844810627064b1087280 (patch) | |
tree | 31e43590946ac70b8a14429f488f1e4f01956293 /gi/overrides/Gtk.py | |
parent | 385fb5df2f7c3ec197b954e8a8ddac5297fe4043 (diff) | |
download | pygobject2-d3b61d1e80a91482c2fc844810627064b1087280.tar.gz pygobject2-d3b61d1e80a91482c2fc844810627064b1087280.tar.bz2 pygobject2-d3b61d1e80a91482c2fc844810627064b1087280.zip |
Imported Upstream version 2.28.1
Change-Id: Ib2dc5ea9bbd21a07cf091b6a5352485ef15f637a
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'gi/overrides/Gtk.py')
-rw-r--r-- | gi/overrides/Gtk.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/gi/overrides/Gtk.py b/gi/overrides/Gtk.py index 55d139e..30e883c 100644 --- a/gi/overrides/Gtk.py +++ b/gi/overrides/Gtk.py @@ -410,6 +410,7 @@ class MessageDialog(Gtk.MessageDialog, Dialog): kwds['text'] = message_format Gtk.MessageDialog.__init__(self, _buttons_property=buttons, + message_type=type, **kwds) Dialog.__init__(self, parent=parent, flags=flags) @@ -731,9 +732,7 @@ class TreeModel(Gtk.TreeModel): # we may need to convert to a basic type type_ = self.get_column_type(column) - if type_ == GObject.TYPE_PYOBJECT: - pass # short-circut branching - elif type_ == GObject.TYPE_STRING: + if type_ == GObject.TYPE_STRING: if isinstance(value, str): value = str(value) elif sys.version_info < (3, 0): @@ -773,7 +772,10 @@ class TreeModel(Gtk.TreeModel): # so we don't have to do it here value_container = GObject.Value() value_container.init(type_) - if type_ == GObject.TYPE_CHAR: + if type_ == GObject.TYPE_PYOBJECT: + value_container.set_boxed(value) + value = value_container + elif type_ == GObject.TYPE_CHAR: value_container.set_char(value) value = value_container elif type_ == GObject.TYPE_UCHAR: @@ -1116,6 +1118,8 @@ class TreeViewColumn(Gtk.TreeViewColumn): if success: return (start_pos, width,) + def set_cell_data_func(self, cell_renderer, func, func_data=None): + super(TreeViewColumn, self).set_cell_data_func(cell_renderer, func, func_data) TreeViewColumn = override(TreeViewColumn) __all__.append('TreeViewColumn') |