[bijiben] trash: Add destructive_action style to buttons
- From: Pierre-Yves Luyten <pyluyten src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [bijiben] trash: Add destructive_action style to buttons
- Date: Mon, 9 Dec 2013 23:04:27 +0000 (UTC)
commit 60da9a4e1af3a0eed1e320a259abb9e5837bd35f
Author: Pierre-Yves Luyten <py luyten fr>
Date: Tue Dec 10 00:03:43 2013 +0100
trash: Add destructive_action style to buttons
ie, make the buttons red
src/bjb-trash-bar.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/bjb-trash-bar.c b/src/bjb-trash-bar.c
index 7a6300e..cbe0ac3 100644
--- a/src/bjb-trash-bar.c
+++ b/src/bjb-trash-bar.c
@@ -196,6 +196,7 @@ bjb_trash_bar_constructed (GObject *obj)
BjbTrashBar *self;
BjbTrashBarPrivate *priv;
GtkWidget *super_box, *separator;
+ GtkStyleContext *context;
G_OBJECT_CLASS (bjb_trash_bar_parent_class)->constructed (obj);
@@ -210,6 +211,8 @@ bjb_trash_bar_constructed (GObject *obj)
gtk_widget_set_hexpand (priv->normal_box, TRUE);
priv->empty_bin = gtk_button_new_with_label(_("Empty"));
gtk_widget_set_halign (priv->empty_bin, GTK_ALIGN_CENTER);
+ context = gtk_widget_get_style_context (priv->empty_bin);
+ gtk_style_context_add_class (context, "destructive-action");
gtk_box_pack_start (GTK_BOX (priv->normal_box),
priv->empty_bin,
TRUE,
@@ -248,6 +251,8 @@ bjb_trash_bar_constructed (GObject *obj)
priv->delete = gtk_button_new_with_label (_("Permanently Delete"));
gtk_widget_set_halign (priv->delete, GTK_ALIGN_END);
+ context = gtk_widget_get_style_context (priv->delete);
+ gtk_style_context_add_class (context, "destructive-action");
gtk_box_pack_start (GTK_BOX (priv->selection_box),
priv->delete,
FALSE,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]