]> Pileus Git - ~andy/gtk/commitdiff
appchooser: make the "Find applications online" follow search state
authorCosimo Cecchi <cosimoc@gnome.org>
Mon, 3 Oct 2011 15:50:53 +0000 (11:50 -0400)
committerCosimo Cecchi <cosimoc@gnome.org>
Tue, 4 Oct 2011 15:34:10 +0000 (11:34 -0400)
Set the button as insensitive while searching, so that it can't be
accidentally clicked twice.

https://bugzilla.gnome.org/show_bug.cgi?id=651818

gtk/gtkappchooserdialog.c

index ac1f0afdd4380f95ae38cda466a74b1389cf1f7d..8d03cc00c921de8d4c8bb5cd7ace9979a5b117e9 100644 (file)
@@ -137,6 +137,7 @@ search_for_mimetype_ready_cb (GObject      *source,
     }
   else
     {
+      gtk_widget_set_sensitive (self->priv->online_button, TRUE);
       gtk_app_chooser_refresh (GTK_APP_CHOOSER (self->priv->app_chooser_widget));
     }
 
@@ -152,6 +153,8 @@ online_button_clicked_cb (GtkButton *b,
   GtkAppChooserDialog *self = user_data;
 
   self->priv->online_cancellable = g_cancellable_new ();
+  gtk_widget_set_sensitive (self->priv->online_button, FALSE);
+
   _gtk_app_chooser_online_search_for_mimetype_async (self->priv->online,
                                                     self->priv->content_type,
                                                     GTK_WINDOW (self),