aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorLars Uebernickel <lars.uebernickel@canonical.com>2013-05-24 18:17:45 -0400
committerLars Uebernickel <lars.uebernickel@canonical.com>2013-05-24 18:17:45 -0400
commit9627530cdaeb8d0ad9984f55f6fb0804740a1343 (patch)
treeb12c32e71f0ec21311c403734f0e239c7b84d7cd /tools
parent2712010f2411973ff1687be63e3961f5c76acec3 (diff)
downloadlibayatana-indicator-9627530cdaeb8d0ad9984f55f6fb0804740a1343.tar.gz
libayatana-indicator-9627530cdaeb8d0ad9984f55f6fb0804740a1343.tar.bz2
libayatana-indicator-9627530cdaeb8d0ad9984f55f6fb0804740a1343.zip
IndicatorNg: update indicator file format
The old file format had some shortcomings: (1) It was impossible to efficiently reuse a menu for different profiles, because the profile name was implicit in the object path. The only way to do this was to export the same menu twice. Now, object paths have to be set explicitly in the indicator file. (2) The well-known dbus name of a service and the name of its service file were similar but slightly different (com.canonical.indicator.test vs com.canonical.test.indicator), which caused some confusion on when to use which. Now, the file name *is* the bus name, and the `BusName` key has been dropped. The new file format is documented in README.
Diffstat (limited to 'tools')
-rw-r--r--tools/indicator-loader.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/indicator-loader.c b/tools/indicator-loader.c
index 5659dea..2ec9913 100644
--- a/tools/indicator-loader.c
+++ b/tools/indicator-loader.c
@@ -150,7 +150,7 @@ load_module (const gchar * name, GtkWidget * menu)
io = indicator_object_new_from_file(name);
}
#if GTK_MAJOR_VERSION == 3
- else if (g_str_has_suffix(name, ".indicator")) {
+ else {
GError *error = NULL;
io = INDICATOR_OBJECT (indicator_ng_new_for_profile (name, profile, &error));
@@ -162,9 +162,10 @@ load_module (const gchar * name, GtkWidget * menu)
title = g_strdup_printf ("%s %s", profile, name);
}
-#endif
+#else
else
return FALSE;
+#endif
/* Connect to it's signals */
g_signal_connect(G_OBJECT(io), INDICATOR_OBJECT_SIGNAL_ENTRY_ADDED, G_CALLBACK(entry_added), menu);