aboutsummaryrefslogtreecommitdiff
path: root/libindicate
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-01-15 23:19:21 -0600
committerTed Gould <ted@canonical.com>2009-01-15 23:19:21 -0600
commitad1cc2dcd28d83bd83ac7ad8f5d97f70546ea900 (patch)
treeadcf62fbcef6064f14d36b2966e5dc112aede373 /libindicate
parentfe3addbe95bcd54af249b315ee8d10be71005be8 (diff)
downloadlibayatana-indicator-ad1cc2dcd28d83bd83ac7ad8f5d97f70546ea900.tar.gz
libayatana-indicator-ad1cc2dcd28d83bd83ac7ad8f5d97f70546ea900.tar.bz2
libayatana-indicator-ad1cc2dcd28d83bd83ac7ad8f5d97f70546ea900.zip
Fixing the printing and the saving of indicators.
Diffstat (limited to 'libindicate')
-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