[PATCH 2/8] Make on_updates_settings_clicked timed callback
Vratislav Podzimek
vpodzime at redhat.com
Wed Apr 9 15:15:45 UTC 2014
Updating mountpoint settings often takes quite a lot of time when the installer
seems to be hanged. With the @timed_action decorator it first calls busyCursor(),
then runs and then calls unbusyCursor() providing better UX. With such short
delay and threshold parameters, it means the callback is run basically instantly
just with a time for Gtk to switch the cursor.
Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
---
pyanaconda/ui/gui/spokes/custom.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
index 2697e49..5f01845 100644
--- a/pyanaconda/ui/gui/spokes/custom.py
+++ b/pyanaconda/ui/gui/spokes/custom.py
@@ -80,7 +80,7 @@ from pyanaconda.ui.gui.spokes.lib.custom_storage_helpers import get_container_ty
from pyanaconda.ui.gui.spokes.lib.custom_storage_helpers import AddDialog, ConfirmDeleteDialog, DisksDialog, ContainerDialog, HelpDialog
from pyanaconda.ui.gui.utils import setViewportBackground, enlightbox, fancy_set_sensitive, ignoreEscape
-from pyanaconda.ui.gui.utils import really_hide, really_show, GtkActionList
+from pyanaconda.ui.gui.utils import really_hide, really_show, GtkActionList, timed_action
from pyanaconda.ui.gui.categories.system import SystemCategory
from gi.repository import Gdk, Gtk
@@ -2480,6 +2480,7 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
dlg.run()
dlg.destroy()
+ @timed_action(delay=50, threshold=100)
def on_update_settings_clicked(self, button):
""" call _save_right_side, then, perhaps, populate_right_side. """
self._save_right_side(self._current_selector)
--
1.9.0
More information about the anaconda-patches
mailing list