dwlb

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 8c162e6157cc9c72d0b4f7150050c1d2eb786669
parent bc55b0fd0ffc494e8efe381e8e603d5c5f5435b1
Author: Janne Veteläinen <janne.vetelainen@elisanet.fi>
Date:   Fri, 19 Jul 2024 08:29:17 +0300

Check if item is already tracked

Diffstat:
Msystray/snwatcher.c | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/systray/snwatcher.c b/systray/snwatcher.c @@ -62,6 +62,12 @@ sn_watcher_register_item(SnWatcher *self, const char *busname, const char *busobj) { + // Check if we are already tracking this item + if (g_list_find_custom(self->tracked_items, busname,(GCompareFunc)strcmp) + != NULL) { + return; + } + g_debug("Registering %s", busname); self->tracked_items = g_list_prepend(self->tracked_items, g_strdup(busname));