summaryrefslogtreecommitdiff
path: root/gi/overrides/Gtk.py
diff options
context:
space:
mode:
Diffstat (limited to 'gi/overrides/Gtk.py')
-rw-r--r--gi/overrides/Gtk.py12
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')