[gnome-software] trivial: Disable the update all button during an update



commit 79e131b95cf6ef06b94a3f762e2a33f27f48fae7
Author: William Hua <william hua canonical com>
Date:   Thu Apr 14 16:44:58 2016 -0400

    trivial: Disable the update all button during an update

 src/gs-shell-updates.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-shell-updates.c b/src/gs-shell-updates.c
index a5554a8..5d52647 100644
--- a/src/gs-shell-updates.c
+++ b/src/gs-shell-updates.c
@@ -966,6 +966,9 @@ gs_shell_updates_perform_update_cb (GsPluginLoader *plugin_loader,
 {
        g_autoptr(GError) error = NULL;
 
+       /* unconditionally re-enable this */
+       gtk_widget_set_sensitive (GTK_WIDGET (self->button_update_all), TRUE);
+
        /* get the results */
        if (!gs_plugin_loader_update_finish (plugin_loader, res, &error)) {
                g_warning ("Failed to perform update: %s", error->message);
@@ -1017,6 +1020,7 @@ gs_shell_updates_button_update_all_cb (GtkButton      *button,
                                       self->cancellable,
                                       (GAsyncReadyCallback) gs_shell_updates_perform_update_cb,
                                       self);
+       gtk_widget_set_sensitive (GTK_WIDGET (self->button_update_all), FALSE);
 }
 
 typedef struct {


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