aboutsummaryrefslogtreecommitdiff
path: root/libindicate/server.c
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-01-13 13:43:32 -0600
committerTed Gould <ted@canonical.com>2009-01-13 13:43:32 -0600
commit0b4e54d7e08c652fd0468b307f0fe6eeb987a149 (patch)
treeb1cdee4ab52113123e448473fd8d46668aca6877 /libindicate/server.c
parentbba89edeba9b17832b1f6971c603541ee5877c8c (diff)
downloadlibayatana-indicator-0b4e54d7e08c652fd0468b307f0fe6eeb987a149.tar.gz
libayatana-indicator-0b4e54d7e08c652fd0468b307f0fe6eeb987a149.tar.bz2
libayatana-indicator-0b4e54d7e08c652fd0468b307f0fe6eeb987a149.zip
Ah, we weren't checking if we were visible. Now things are better.
Diffstat (limited to 'libindicate/server.c')
-rw-r--r--libindicate/server.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libindicate/server.c b/libindicate/server.c
index f79c78e..8878f69 100644
--- a/libindicate/server.c
+++ b/libindicate/server.c
@@ -96,6 +96,7 @@ indicate_server_init (IndicateServer * server)
server->path = g_strdup("/org/freedesktop/indicate");
server->indicators = NULL;
server->num_hidden = 0;
+ server->visible = FALSE;
return;
}
@@ -126,6 +127,11 @@ indicate_server_error_quark (void)
void
indicate_server_show (IndicateServer * server)
{
+ g_return_if_fail(INDICATE_IS_SERVER(server));
+
+ if (server->visible)
+ return;
+
DBusGConnection * connection;
connection = dbus_g_bus_get(DBUS_BUS_SESSION, NULL);
@@ -133,6 +139,7 @@ indicate_server_show (IndicateServer * server)
dbus_g_connection_register_g_object(connection,
server->path,
G_OBJECT(server));
+ server->visible = TRUE;
return;
}