diff options
author | Ted Gould <ted@canonical.com> | 2009-01-12 17:22:47 -0600 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2009-01-12 17:22:47 -0600 |
commit | cd4f548dd5427b48706b29c17a8ea67d6360afd8 (patch) | |
tree | a007cbe7d54a1e144f0a4868a7914013b72c5e75 /libindicate | |
parent | 514837a37737b049827008f7685de9d49c4034ba (diff) | |
download | libayatana-indicator-cd4f548dd5427b48706b29c17a8ea67d6360afd8.tar.gz libayatana-indicator-cd4f548dd5427b48706b29c17a8ea67d6360afd8.tar.bz2 libayatana-indicator-cd4f548dd5427b48706b29c17a8ea67d6360afd8.zip |
Whoo Hoo, we can count
Diffstat (limited to 'libindicate')
-rw-r--r-- | libindicate/server.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libindicate/server.c b/libindicate/server.c index 17db3dc..48f1c71 100644 --- a/libindicate/server.c +++ b/libindicate/server.c @@ -230,6 +230,11 @@ get_desktop (IndicateServer * server, gchar ** desktop_path, GError **error) static gboolean get_indicator_count (IndicateServer * server, guint * count, GError **error) { + guint lstcnt = g_slist_length(server->indicators); + + g_return_val_if_fail(server->num_hidden < lstcnt, TRUE); + + *count = lstcnt - server->num_hidden; return TRUE; } |