aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libindicate/listener.c2
-rw-r--r--libindicate/tests/listen-and-print.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/libindicate/listener.c b/libindicate/listener.c
index 2c1f3b3..5baa36f 100644
--- a/libindicate/listener.c
+++ b/libindicate/listener.c
@@ -398,7 +398,7 @@ proxy_indicator_added (DBusGProxy * proxy, guint id, const gchar * type, proxy_t
g_hash_table_insert(proxyt->indicators, g_strdup(type), indicators);
}
- if (g_hash_table_lookup(indicators, (gpointer)id)) {
+ if (!g_hash_table_lookup(indicators, (gpointer)id)) {
g_hash_table_insert(indicators, (gpointer)id, (gpointer)TRUE);
g_signal_emit(proxyt->listener, signals[INDICATOR_ADDED], 0, proxyt->name, id, type, TRUE);
}
diff --git a/libindicate/tests/listen-and-print.c b/libindicate/tests/listen-and-print.c
index 381fdf2..9ad2cc8 100644
--- a/libindicate/tests/listen-and-print.c
+++ b/libindicate/tests/listen-and-print.c
@@ -5,19 +5,19 @@
static void
indicator_added (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * type, gpointer data)
{
- g_debug("Indicator Added: %s %d %s", (gchar *)server, (guint)*indicator, type);
+ g_debug("Indicator Added: %s %d %s", (gchar *)server, (guint)indicator, type);
}
static void
indicator_removed (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * type, gpointer data)
{
- g_debug("Indicator Removed: %s %d %s", (gchar *)server, (guint)*indicator, type);
+ g_debug("Indicator Removed: %s %d %s", (gchar *)server, (guint)indicator, type);
}
static void
indicator_modified (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * type, gchar * property, gpointer data)
{
- g_debug("Indicator Modified: %s %d %s %s", (gchar *)server, (guint)*indicator, type, property);
+ g_debug("Indicator Modified: %s %d %s %s", (gchar *)server, (guint)indicator, type, property);
}
static void