appchooser: make the "Find applications online" follow search state

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
This commit is contained in:
Cosimo Cecchi 2011-10-03 11:50:53 -04:00
parent 569b5ffd5b
commit 3a6996ea83

View File

@ -137,6 +137,7 @@ search_for_mimetype_ready_cb (GObject *source,
} }
else else
{ {
gtk_widget_set_sensitive (self->priv->online_button, TRUE);
gtk_app_chooser_refresh (GTK_APP_CHOOSER (self->priv->app_chooser_widget)); 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; GtkAppChooserDialog *self = user_data;
self->priv->online_cancellable = g_cancellable_new (); 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, _gtk_app_chooser_online_search_for_mimetype_async (self->priv->online,
self->priv->content_type, self->priv->content_type,
GTK_WINDOW (self), GTK_WINDOW (self),