[gnome-software] Use the 'destructive-action' class on the 'Remove' buttons.
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Use the 'destructive-action' class on the 'Remove' buttons.
- Date: Fri, 16 Aug 2013 13:27:10 +0000 (UTC)
commit 7f39ba2ba33e6e2fa3d1e5b9e647956c3d7a4764
Author: Richard Hughes <richard hughsie com>
Date: Fri Aug 16 14:26:57 2013 +0100
Use the 'destructive-action' class on the 'Remove' buttons.
src/gs-app-widget.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/gs-app-widget.c b/src/gs-app-widget.c
index 5c674b3..4f5207b 100644
--- a/src/gs-app-widget.c
+++ b/src/gs-app-widget.c
@@ -37,7 +37,6 @@ struct _GsAppWidgetPrivate
GtkWidget *widget_button;
GtkWidget *widget_description;
GtkWidget *widget_image;
- GtkWidget *widget_more;
GtkWidget *widget_name;
GtkWidget *widget_spinner;
GtkWidget *widget_status;
@@ -63,6 +62,7 @@ static void
gs_app_widget_refresh (GsAppWidget *app_widget)
{
GsAppWidgetPrivate *priv = app_widget->priv;
+ GtkStyleContext *context;
if (app_widget->priv->app == NULL)
return;
@@ -89,12 +89,16 @@ gs_app_widget_refresh (GsAppWidget *app_widget)
gtk_widget_set_visible (priv->widget_button, TRUE);
gtk_button_set_label (GTK_BUTTON (priv->widget_button),
_("Install"));
+ context = gtk_widget_get_style_context (priv->widget_button);
+ gtk_style_context_remove_class (context, "destructive-action");
break;
case GS_APP_WIDGET_KIND_REMOVE:
gtk_widget_set_visible (priv->widget_spinner, FALSE);
gtk_widget_set_visible (priv->widget_button, TRUE);
gtk_button_set_label (GTK_BUTTON (priv->widget_button),
_("Remove"));
+ context = gtk_widget_get_style_context (priv->widget_button);
+ gtk_style_context_add_class (context, "destructive-action");
break;
case GS_APP_WIDGET_KIND_UPDATE:
gtk_widget_set_visible (priv->widget_spinner, FALSE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]