[pygobject] Revert TreeStore and ListStore initializer replacements
- From: Simon Feltman <sfeltman src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] Revert TreeStore and ListStore initializer replacements
- Date: Wed, 13 Nov 2013 02:28:04 +0000 (UTC)
commit 890fb7b97823985d5c800284ead43a49174db244
Author: Simon Feltman <sfeltman src gnome org>
Date: Tue Nov 12 18:19:34 2013 -0800
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
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 96802fb..c0a9096 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:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]