diff options
author | Simon Feltman <sfeltman@src.gnome.org> | 2013-11-12 18:19:34 -0800 |
---|---|---|
committer | Simon Feltman <sfeltman@src.gnome.org> | 2013-11-12 18:19:34 -0800 |
commit | 890fb7b97823985d5c800284ead43a49174db244 (patch) | |
tree | 1d75b8b9914ba759b3b194a26c103ca4cef677e6 /gi/overrides/Gtk.py | |
parent | 795201873a3aae530598f5e16470b6a8d2d55c23 (diff) | |
download | pygobject-890fb7b97823985d5c800284ead43a49174db244.tar.gz |
Revert TreeStore and ListStore initializer replacements
Revert changes to Tree/ListStore where the __init__ overrides were replaced
with __new__ overrides which accept column types directly. The issue with
the change is sub-classes of these types can override __init__ themself
passing in their own column types to the super class. These sub-classes
expect the super class to handle column type setup via __init__ and hence
the change described is an API break. This reverts parts of commit:
2f2069c9efcd8f312ce9ffa572df371fbc08822d
Diffstat (limited to 'gi/overrides/Gtk.py')
-rw-r--r-- | gi/overrides/Gtk.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gi/overrides/Gtk.py b/gi/overrides/Gtk.py index 96802fbe..c0a90960 100644 --- a/gi/overrides/Gtk.py +++ b/gi/overrides/Gtk.py @@ -909,8 +909,9 @@ __all__.append('TreeModelSort') class ListStore(Gtk.ListStore, TreeModel, TreeSortable): - def __new__(self, *column_types): - return Gtk.ListStore.new(column_types) + def __init__(self, *column_types): + Gtk.ListStore.__init__(self) + self.set_column_types(column_types) def _do_insert(self, position, row): if row is not None: @@ -1157,8 +1158,9 @@ __all__.append('TreePath') class TreeStore(Gtk.TreeStore, TreeModel, TreeSortable): - def __new__(self, *column_types): - return Gtk.TreeStore.new(column_types) + def __init__(self, *column_types): + Gtk.TreeStore.__init__(self) + self.set_column_types(column_types) def _do_insert(self, parent, position, row): if row is not None: |