diff options
author | Lars Uebernickel <lars.uebernickel@canonical.com> | 2013-05-24 18:17:45 -0400 |
---|---|---|
committer | Lars Uebernickel <lars.uebernickel@canonical.com> | 2013-05-24 18:17:45 -0400 |
commit | 9627530cdaeb8d0ad9984f55f6fb0804740a1343 (patch) | |
tree | b12c32e71f0ec21311c403734f0e239c7b84d7cd /tests | |
parent | 2712010f2411973ff1687be63e3961f5c76acec3 (diff) | |
download | libayatana-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 'tests')
-rw-r--r-- | tests/com.canonical.indicator.no-such-service (renamed from tests/com.canonical.test.indicator) | 1 | ||||
-rw-r--r-- | tests/com.canonical.indicator.test (renamed from tests/com.canonical.test.nosuchservice.indicator) | 4 | ||||
-rw-r--r-- | tests/test-indicator-ng.c | 10 |
3 files changed, 8 insertions, 7 deletions
diff --git a/tests/com.canonical.test.indicator b/tests/com.canonical.indicator.no-such-service index dad4c94..54cc4fd 100644 --- a/tests/com.canonical.test.indicator +++ b/tests/com.canonical.indicator.no-such-service @@ -1,4 +1,3 @@ [Indicator Service] Name=indicator-test -BusName=com.canonical.indicator.test ObjectPath=/com/canonical/indicator/test diff --git a/tests/com.canonical.test.nosuchservice.indicator b/tests/com.canonical.indicator.test index 8464749..0c7122f 100644 --- a/tests/com.canonical.test.nosuchservice.indicator +++ b/tests/com.canonical.indicator.test @@ -1,4 +1,6 @@ [Indicator Service] Name=indicator-test -BusName=com.canonical.indicator.test.nosuchservice ObjectPath=/com/canonical/indicator/test + +[desktop] +ObjectPath=/com/canonical/indicator/test/desktop diff --git a/tests/test-indicator-ng.c b/tests/test-indicator-ng.c index 150cc37..7b677d3 100644 --- a/tests/test-indicator-ng.c +++ b/tests/test-indicator-ng.c @@ -50,11 +50,11 @@ test_instantiation (void) GError *error = NULL; GMainLoop *loop; - indicator = indicator_ng_new (SRCDIR "/com.canonical.test.nosuchservice.indicator", &error); + indicator = indicator_ng_new (SRCDIR "/com.canonical.indicator.no-such-service", &error); g_assert (indicator); g_assert (error == NULL); - g_assert_cmpstr (indicator_ng_get_service_file (indicator), ==, SRCDIR "/com.canonical.test.nosuchservice.indicator"); + g_assert_cmpstr (indicator_ng_get_service_file (indicator), ==, SRCDIR "/com.canonical.indicator.no-such-service"); g_assert_cmpstr (indicator_ng_get_profile (indicator), ==, "desktop"); { @@ -65,7 +65,7 @@ test_instantiation (void) "profile", &profile, NULL); - g_assert_cmpstr (service_file, ==, SRCDIR "/com.canonical.test.nosuchservice.indicator"); + g_assert_cmpstr (service_file, ==, SRCDIR "/com.canonical.indicator.no-such-service"); g_assert_cmpstr (profile, ==, "desktop"); g_free (service_file); @@ -89,7 +89,7 @@ test_instantiation_with_profile (void) IndicatorNg *indicator; GError *error = NULL; - indicator = indicator_ng_new_for_profile (SRCDIR "/com.canonical.test.indicator", "greeter", &error); + indicator = indicator_ng_new_for_profile (SRCDIR "/com.canonical.indicator.test", "greeter", &error); g_assert (indicator); g_assert (error == NULL); @@ -107,7 +107,7 @@ test_menu (void) GList *entries; IndicatorObjectEntry *entry; - indicator = indicator_ng_new (SRCDIR "/com.canonical.test.indicator", &error); + indicator = indicator_ng_new (SRCDIR "/com.canonical.indicator.test", &error); g_assert (indicator); g_assert (error == NULL); |