Codebase list sugar-log-activity / 8db4fd5
Fix AttributeError on GTK 3.24.14 GTK 3.24.14 introduced a breaking change to fix a constructor for Gtk.TreeModelSort. e3247ed0d9 ("Annotate GtkTreeModelSort.new_with_model() appropriately") https://gitlab.gnome.org/GNOME/gtk/issues/1077 https://bugzilla.gnome.org/show_bug.cgi?id=680009 https://bugzilla.gnome.org/show_bug.cgi?id=634823 Reported-by: Peter Robinson <pbrobinson@gmail.com> Signed-off-by: James Cameron <quozl@laptop.org> James Cameron authored 4 years ago Ibiam Chihurumnaya committed 4 years ago
1 changed file(s) with 7 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
108108 self._treemodel = Gtk.TreeStore(GObject.TYPE_STRING,
109109 GObject.TYPE_STRING)
110110
111 # README: https://bugzilla.gnome.org/show_bug.cgi?id=680009
112 sorted = self._treemodel.sort_new_with_model()
111 if hasattr(Gtk.TreeModelSort, 'new_with_model'):
112 # GTK 3.24.14 and later
113 sorted = Gtk.TreeModelSort.new_with_model(self._treemodel)
114 else:
115 # GTK 3.24.13 and earlier, gtk/e3247ed0d9
116 sorted = self._treemodel.sort_new_with_model()
117
113118 sorted.set_sort_column_id(0, Gtk.SortType.ASCENDING)
114119 sorted.set_sort_func(0, self._sort_logfile)
115120 self._treeview.set_model(sorted)