summaryrefslogtreecommitdiff
path: root/src/themes/coco/coco-theme.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/themes/coco/coco-theme.c')
-rw-r--r--src/themes/coco/coco-theme.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/themes/coco/coco-theme.c b/src/themes/coco/coco-theme.c
index b72c743..6291354 100644
--- a/src/themes/coco/coco-theme.c
+++ b/src/themes/coco/coco-theme.c
@@ -578,15 +578,18 @@ add_notification_action(GtkWindow *nw, const char *text, const char *key,
{
gtk_widget_show(windata->actions_box);
- windata->pie_countdown = gtk_drawing_area_new();
- gtk_widget_set_halign (windata->pie_countdown, GTK_ALIGN_END);
- gtk_widget_show(windata->pie_countdown);
-
- gtk_box_pack_end (GTK_BOX (windata->actions_box), windata->pie_countdown, FALSE, TRUE, 0);
- gtk_widget_set_size_request(windata->pie_countdown,
- PIE_WIDTH, PIE_HEIGHT);
- g_signal_connect(G_OBJECT(windata->pie_countdown), "draw",
- G_CALLBACK(countdown_expose_cb), windata);
+ /* Don't try to re-add a pie_countdown */
+ if (!windata->pie_countdown) {
+ windata->pie_countdown = gtk_drawing_area_new();
+ gtk_widget_set_halign (windata->pie_countdown, GTK_ALIGN_END);
+ gtk_widget_show(windata->pie_countdown);
+
+ gtk_box_pack_end (GTK_BOX (windata->actions_box), windata->pie_countdown, FALSE, TRUE, 0);
+ gtk_widget_set_size_request(windata->pie_countdown,
+ PIE_WIDTH, PIE_HEIGHT);
+ g_signal_connect(G_OBJECT(windata->pie_countdown), "draw",
+ G_CALLBACK(countdown_expose_cb), windata);
+ }
}
button = gtk_button_new();