[gnome-tweak-tool/wip/pwood/app-chooser: 1/11] StartUpTweak: Use g_application_mark_busy()



commit efd09b142fe0348a48b236a0165406c84803bcdc
Author: Phillip Wood <phillip wood dunelm org uk>
Date:   Sun Apr 12 18:59:36 2015 +0100

    StartUpTweak: Use g_application_mark_busy()
    
    It can take a few seconds to create the AppChooser dialog so mark the
    application as busy to provide some visual feedback when the ‘+’ button
    is clicked.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=747983

 gtweak/tweaks/tweak_group_startup.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gtweak/tweaks/tweak_group_startup.py b/gtweak/tweaks/tweak_group_startup.py
index aeebcf3..b4fc3ca 100644
--- a/gtweak/tweaks/tweak_group_startup.py
+++ b/gtweak/tweaks/tweak_group_startup.py
@@ -245,10 +245,12 @@ class AutostartListBoxTweakGroup(ListBoxTweakGroup):
         AutostartFile(df).update_start_at_login(False)
 
     def _on_add_clicked(self, btn):
+        Gio.Application.get_default().mark_busy()
         a = _AppChooser(
                 self.main_window,
                 set(self._get_running_executables()))
         a.show_all()
+        Gio.Application.get_default().unmark_busy()
         resp = a.run()
         if resp == Gtk.ResponseType.OK:
             df = a.get_selected_app()


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]