From 9627530cdaeb8d0ad9984f55f6fb0804740a1343 Mon Sep 17 00:00:00 2001 From: Lars Uebernickel Date: Fri, 24 May 2013 18:17:45 -0400 Subject: 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. --- tests/com.canonical.indicator.no-such-service | 3 +++ tests/com.canonical.indicator.test | 6 ++++++ tests/com.canonical.test.indicator | 4 ---- tests/com.canonical.test.nosuchservice.indicator | 4 ---- tests/test-indicator-ng.c | 10 +++++----- 5 files changed, 14 insertions(+), 13 deletions(-) create mode 100644 tests/com.canonical.indicator.no-such-service create mode 100644 tests/com.canonical.indicator.test delete mode 100644 tests/com.canonical.test.indicator delete mode 100644 tests/com.canonical.test.nosuchservice.indicator (limited to 'tests') diff --git a/tests/com.canonical.indicator.no-such-service b/tests/com.canonical.indicator.no-such-service new file mode 100644 index 0000000..54cc4fd --- /dev/null +++ b/tests/com.canonical.indicator.no-such-service @@ -0,0 +1,3 @@ +[Indicator Service] +Name=indicator-test +ObjectPath=/com/canonical/indicator/test diff --git a/tests/com.canonical.indicator.test b/tests/com.canonical.indicator.test new file mode 100644 index 0000000..0c7122f --- /dev/null +++ b/tests/com.canonical.indicator.test @@ -0,0 +1,6 @@ +[Indicator Service] +Name=indicator-test +ObjectPath=/com/canonical/indicator/test + +[desktop] +ObjectPath=/com/canonical/indicator/test/desktop diff --git a/tests/com.canonical.test.indicator b/tests/com.canonical.test.indicator deleted file mode 100644 index dad4c94..0000000 --- a/tests/com.canonical.test.indicator +++ /dev/null @@ -1,4 +0,0 @@ -[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.test.nosuchservice.indicator deleted file mode 100644 index 8464749..0000000 --- a/tests/com.canonical.test.nosuchservice.indicator +++ /dev/null @@ -1,4 +0,0 @@ -[Indicator Service] -Name=indicator-test -BusName=com.canonical.indicator.test.nosuchservice -ObjectPath=/com/canonical/indicator/test 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); -- cgit v1.2.3