Fix BaseSelector to avoid long delay before display on large trees
Fixes #10634
This commit is contained in:
parent
9c508de5fd
commit
de31a42fc8
@ -121,6 +121,7 @@
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="no_show_all">True</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="xalign">0.5</property>
|
||||
@ -132,6 +133,22 @@
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="loading">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Loading items...</property>
|
||||
<property name="width_chars">10</property>
|
||||
<attributes>
|
||||
<attribute name="font-desc" value="<Enter Value> 20"/>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
|
@ -107,7 +107,6 @@ class BaseSelector(ManagedWindow):
|
||||
self.sortorder = Gtk.SortType.ASCENDING
|
||||
|
||||
self.skip_list=skip
|
||||
self.build_tree()
|
||||
self.selection = self.tree.get_selection()
|
||||
self.track_ref_for_deletion("selection")
|
||||
|
||||
@ -123,6 +122,12 @@ class BaseSelector(ManagedWindow):
|
||||
self.showall.show()
|
||||
else:
|
||||
self.showall.hide()
|
||||
while Gtk.events_pending():
|
||||
Gtk.main_iteration()
|
||||
self.build_tree()
|
||||
loading = self.glade.get_object('loading')
|
||||
loading.hide()
|
||||
|
||||
if default:
|
||||
self.goto_handle(default)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user