diff --git a/src/dbus.c b/src/dbus.c index d789bd2..4bead1f 100644 --- a/src/dbus.c +++ b/src/dbus.c @@ -556,6 +556,27 @@ void signal_notification_closed(struct notification *n, enum reason reason) if (err) { LOG_W("Unable to close notification: %s", err->message); g_error_free(err); + } else { + char* reason_string; + switch (reason) { + case REASON_TIME: + reason_string="time"; + break; + case REASON_USER: + reason_string="user"; + break; + case REASON_SIG: + reason_string="signal"; + break; + case REASON_UNDEF: + reason_string="undfined"; + break; + default: + reason_string="unknown"; + } + + LOG_D("Queues: Closing notification for reason: %s", reason_string); + } } diff --git a/src/queues.c b/src/queues.c index e3445c5..8dcbabf 100644 --- a/src/queues.c +++ b/src/queues.c @@ -310,21 +310,6 @@ void queues_notification_close_id(int id, enum reason reason) { struct notification *target = NULL; - char* reason_string; - switch (reason) - { - case REASON_TIME: - reason_string="time"; - break; - case REASON_USER: - reason_string="user"; - break; - default: - reason_string="unknown"; - } - - LOG_D("Queues: Closing notification for reason: %s", reason_string); - GQueue *allqueues[] = { displayed, waiting }; for (int i = 0; i < sizeof(allqueues)/sizeof(GQueue*); i++) { for (GList *iter = g_queue_peek_head_link(allqueues[i]); iter;