Move reason_string debug log to dbus.c

This commit is contained in:
fwsmit 2021-01-09 13:48:51 +01:00
parent 6a6cd6697f
commit 3ba614b59b
2 changed files with 21 additions and 15 deletions

View File

@ -556,6 +556,27 @@ void signal_notification_closed(struct notification *n, enum reason reason)
if (err) { if (err) {
LOG_W("Unable to close notification: %s", err->message); LOG_W("Unable to close notification: %s", err->message);
g_error_free(err); 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);
} }
} }

View File

@ -310,21 +310,6 @@ void queues_notification_close_id(int id, enum reason reason)
{ {
struct notification *target = NULL; 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 }; GQueue *allqueues[] = { displayed, waiting };
for (int i = 0; i < sizeof(allqueues)/sizeof(GQueue*); i++) { for (int i = 0; i < sizeof(allqueues)/sizeof(GQueue*); i++) {
for (GList *iter = g_queue_peek_head_link(allqueues[i]); iter; for (GList *iter = g_queue_peek_head_link(allqueues[i]); iter;