Fix RemoveUnused tool for crash caused by Gtk introspection bug
Fixes #11634
This commit is contained in:
parent
f1f8847a86
commit
924d82a7c4
@ -172,7 +172,11 @@ class RemoveUnused(tool.Tool, ManagedWindow, UpdateCallback):
|
||||
GObject.TYPE_STRING,
|
||||
GObject.TYPE_STRING,
|
||||
GObject.TYPE_STRING)
|
||||
# a short term Gtk introspection means we need to try both ways:
|
||||
if hasattr(self.real_model, "sort_new_with_model"):
|
||||
self.sort_model = self.real_model.sort_new_with_model()
|
||||
else:
|
||||
self.sort_model = Gtk.TreeModelSort.new_with_model(self.real_model)
|
||||
self.warn_tree.set_model(self.sort_model)
|
||||
|
||||
self.renderer = Gtk.CellRendererText()
|
||||
|
Loading…
Reference in New Issue
Block a user