aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am2
-rw-r--r--src/status-items.c20
2 files changed, 21 insertions, 1 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 4f654da..de4fccb 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -67,7 +67,7 @@ indicator_messages_service_CFLAGS = \
-Wl,--as-needed \
-Werror \
-DG_LOG_DOMAIN=\"Indicator-Messages\" \
- -DSTAUTS_PROVIDER_DIR=\"$(STATUS_PROVIDER_DIR)\"
+ -DSTATUS_PROVIDER_DIR=\"$(STATUS_PROVIDER_DIR)\"
indicator_messages_service_LDADD = $(APPLET_LIBS)
diff --git a/src/status-items.c b/src/status-items.c
index c0f60cd..e5e0d71 100644
--- a/src/status-items.c
+++ b/src/status-items.c
@@ -42,6 +42,10 @@ static const gchar * panel_active_icons[STATUS_PROVIDER_STATUS_LAST] = {
/* STATUS_PROVIDER_STATUS_DISCONNECTED */ "indicator-messages-new-user-disconnected"
};
+/* Prototypes */
+static gboolean provider_directory_parse (gpointer dir);
+
+/* Globals */
static StatusProviderStatus current_status = STATUS_PROVIDER_STATUS_DISCONNECTED;
GList * menuitems = NULL;
@@ -66,6 +70,8 @@ status_items_build (void)
menuitems = g_list_append(menuitems, item);
}
+ g_idle_add(provider_directory_parse, STATUS_PROVIDER_DIR);
+
return menuitems;
}
@@ -79,3 +85,17 @@ status_current_panel_icon (gboolean alert)
return panel_icons[current_status];
}
}
+
+/* Start parsing a directory and setting up the entires in the idle loop */
+static gboolean
+provider_directory_parse (gpointer directory)
+{
+ const gchar * dir = (const gchar *)directory;
+
+ if (!g_file_test(dir, G_FILE_TEST_EXISTS)) {
+ return FALSE;
+ }
+
+
+ return FALSE;
+}