mirror of
https://github.com/DYefremov/DemonEditor.git
synced 2026-03-05 12:01:45 +01:00
minor optimization of fav list loading
This commit is contained in:
@@ -747,6 +747,10 @@ class Application(Gtk.Application):
|
||||
|
||||
returns deleted rows list!
|
||||
"""
|
||||
if self._services_load_spinner.get_property("active"):
|
||||
show_dialog(DialogType.ERROR, self._main_window, get_message("Data loading in progress!"))
|
||||
return
|
||||
|
||||
selection = view.get_selection()
|
||||
model, paths = selection.get_selected_rows()
|
||||
model_name = get_base_model(model).get_name()
|
||||
@@ -791,10 +795,6 @@ class Application(Gtk.Application):
|
||||
|
||||
def delete_services(self, itrs, model, rows):
|
||||
""" Deleting services """
|
||||
if self._services_load_spinner.get_property("active"):
|
||||
show_dialog(DialogType.ERROR, self._main_window, get_message("Data loading in progress!"))
|
||||
return
|
||||
|
||||
for index, s_itr in enumerate(get_base_itrs(itrs, model)):
|
||||
self._services_model.remove(s_itr)
|
||||
if index % self.DEL_FACTOR == 0:
|
||||
@@ -938,6 +938,8 @@ class Application(Gtk.Application):
|
||||
if not is_marker:
|
||||
num += 1
|
||||
row[Column.FAV_NUM] = 0 if is_marker else num
|
||||
|
||||
self.on_model_changed(model)
|
||||
yield True
|
||||
|
||||
def update_bouquet_list(self):
|
||||
@@ -1667,7 +1669,7 @@ class Application(Gtk.Application):
|
||||
|
||||
def clear_current_data(self):
|
||||
""" Clearing current data from lists """
|
||||
if len(self._services_model) > self.DEL_FACTOR * 100:
|
||||
if len(self._services_model) > self.DEL_FACTOR * 50:
|
||||
self._wait_dialog.set_text("Deleting data...")
|
||||
|
||||
self._bouquets_model.clear()
|
||||
@@ -1912,6 +1914,7 @@ class Application(Gtk.Application):
|
||||
|
||||
yield True
|
||||
self._fav_view.set_model(self._fav_model)
|
||||
self.on_model_changed(self._fav_model)
|
||||
self._bouquets_view.set_sensitive(True)
|
||||
self._bouquets_view.grab_focus()
|
||||
yield True
|
||||
|
||||
@@ -171,7 +171,6 @@ Author: Dmitriy Yefremov
|
||||
<!-- column-name background -->
|
||||
<column type="GdkRGBA"/>
|
||||
</columns>
|
||||
<signal name="row-inserted" handler="on_model_changed" swapped="no"/>
|
||||
</object>
|
||||
<object class="GtkListStore" id="filter_sat_pos_list_store">
|
||||
<columns>
|
||||
|
||||
Reference in New Issue
Block a user