aboutsummaryrefslogtreecommitdiff
path: root/src/messages-service.c
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-08-19 22:29:40 -0500
committerTed Gould <ted@canonical.com>2009-08-19 22:29:40 -0500
commit17745461f669047872c12a6c7db7b05a9ccb0417 (patch)
tree0f3387efe54194db3be3a090192030f9cb3d6096 /src/messages-service.c
parent99744b30f0ebf4c7054b8274c30af063ec52b248 (diff)
downloadayatana-indicator-messages-17745461f669047872c12a6c7db7b05a9ccb0417.tar.gz
ayatana-indicator-messages-17745461f669047872c12a6c7db7b05a9ccb0417.tar.bz2
ayatana-indicator-messages-17745461f669047872c12a6c7db7b05a9ccb0417.zip
Big commit. Trying to check for eclipses, but first both objects needed to track their desktop file paths. So I had to add that little nugget in as well.
Diffstat (limited to 'src/messages-service.c')
-rw-r--r--src/messages-service.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/messages-service.c b/src/messages-service.c
index c6bc5b8..f8f1aaf 100644
--- a/src/messages-service.c
+++ b/src/messages-service.c
@@ -527,7 +527,18 @@ indicator_removed (IndicateListener * listener, IndicateListenerServer * server,
static void
check_eclipses (AppMenuItem * ai)
{
+ const gchar * aidesktop = app_menu_item_get_desktop(ai);
+ if (aidesktop == NULL) return;
+ GList * llitem;
+ for (llitem = launcherList; llitem != NULL; llitem = llitem->next) {
+ const gchar * lidesktop = launcher_menu_item_get_desktop(LAUNCHER_MENU_ITEM(llitem->data));
+
+ if (!g_strcmp0(aidesktop, lidesktop)) {
+ launcher_menu_item_set_eclipsed(LAUNCHER_MENU_ITEM(llitem->data), TRUE);
+ break;
+ }
+ }
return;
}
@@ -537,7 +548,18 @@ check_eclipses (AppMenuItem * ai)
static void
remove_eclipses (AppMenuItem * ai)
{
+ const gchar * aidesktop = app_menu_item_get_desktop(ai);
+ if (aidesktop == NULL) return;
+ GList * llitem;
+ for (llitem = launcherList; llitem != NULL; llitem = llitem->next) {
+ const gchar * lidesktop = launcher_menu_item_get_desktop(LAUNCHER_MENU_ITEM(llitem->data));
+
+ if (!g_strcmp0(aidesktop, lidesktop)) {
+ launcher_menu_item_set_eclipsed(LAUNCHER_MENU_ITEM(llitem->data), FALSE);
+ break;
+ }
+ }
return;
}
@@ -609,6 +631,8 @@ build_launchers (gpointer data)
return FALSE;
}
+/* Oh, if you don't know what main() is for
+ we really shouldn't be talking. */
int
main (int argc, char ** argv)
{