summaryrefslogtreecommitdiff
path: root/src/themes/standard/theme.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/themes/standard/theme.c')
-rw-r--r--src/themes/standard/theme.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/themes/standard/theme.c b/src/themes/standard/theme.c
index 5508172..c4a75d6 100644
--- a/src/themes/standard/theme.c
+++ b/src/themes/standard/theme.c
@@ -1036,10 +1036,12 @@ void add_notification_action(GtkWindow* nw, const char* text, const char* key, A
}
}
- button = gtk_button_new();
- gtk_widget_show(button);
- gtk_box_pack_start(GTK_BOX(windata->actions_box), button, FALSE, FALSE, 0);
+ if (windata->action_icons) {
+ button = gtk_button_new_from_icon_name(key, GTK_ICON_SIZE_BUTTON);
+ goto add_button;
+ }
+ button = gtk_button_new();
hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 6);
gtk_widget_show(hbox);
gtk_container_add(GTK_CONTAINER(button), hbox);
@@ -1072,9 +1074,15 @@ void add_notification_action(GtkWindow* nw, const char* text, const char* key, A
gtk_label_set_markup(GTK_LABEL(label), buf);
g_free(buf);
+add_button:
+ gtk_widget_show(button);
+ gtk_box_pack_start(GTK_BOX(windata->actions_box), button, FALSE, FALSE, 0);
+
g_object_set_data(G_OBJECT(button), "_nw", nw);
g_object_set_data_full(G_OBJECT(button), "_action_key", g_strdup(key), g_free);
g_signal_connect(G_OBJECT(button), "button-release-event", G_CALLBACK(action_clicked_cb), cb);
+
+ gtk_widget_show_all(windata->actions_box);
}
void clear_notification_actions(GtkWindow* nw)