aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-05-15 16:46:44 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-05-15 16:46:44 +0200
commitac3c9604df50561a91dcc75329d37f29e184967a (patch)
treee3b2ddd919f13b79afe17d89f4348d8233e71d21
parent9c42187a5ad75b28054c349b0034be7cec72c6ad (diff)
downloadlibayatana-indicator-ac3c9604df50561a91dcc75329d37f29e184967a.tar.gz
libayatana-indicator-ac3c9604df50561a91dcc75329d37f29e184967a.tar.bz2
libayatana-indicator-ac3c9604df50561a91dcc75329d37f29e184967a.zip
One step back... Mimick Canonical's API. Use their namespace for item attributes.
-rw-r--r--libayatana-indicator/indicator-ng.c10
-rw-r--r--tests/indicator-test-service.c2
2 files changed, 6 insertions, 6 deletions
diff --git a/libayatana-indicator/indicator-ng.c b/libayatana-indicator/indicator-ng.c
index db234c9..d1d2854 100644
--- a/libayatana-indicator/indicator-ng.c
+++ b/libayatana-indicator/indicator-ng.c
@@ -358,7 +358,7 @@ indicator_ng_menu_item_is_of_type (GMenuModel *menu,
gchar *type;
gboolean has_type = FALSE;
- if (g_menu_model_get_item_attribute (menu, index, "x-ayatanaindicator-type", "s", &type))
+ if (g_menu_model_get_item_attribute (menu, index, "x-canonical-type", "s", &type))
{
has_type = g_str_equal (type, expected_type);
g_free (type);
@@ -392,7 +392,7 @@ indicator_ng_menu_changed (GMenuModel *menu,
g_clear_pointer (&self->scroll_action, g_free);
g_clear_pointer (&self->secondary_action, g_free);
- if (indicator_ng_menu_item_is_of_type (self->menu, 0, "org.ayatana.indicator.root"))
+ if (indicator_ng_menu_item_is_of_type (self->menu, 0, "com.canonical.indicator.root"))
{
GMenuModel *popup;
gchar *action;
@@ -404,14 +404,14 @@ indicator_ng_menu_changed (GMenuModel *menu,
g_free (action);
}
- if (g_menu_model_get_item_attribute (self->menu, 0, "x-ayatanaindicator-scroll-action", "s", &action))
+ if (g_menu_model_get_item_attribute (self->menu, 0, "x-canonical-scroll-action", "s", &action))
{
if (g_str_has_prefix (action, "indicator."))
self->scroll_action = g_strdup (action + strlen ("indicator."));
g_free (action);
}
- if (g_menu_model_get_item_attribute (self->menu, 0, "x-ayatanaindicator-secondary-action", "s", &action))
+ if (g_menu_model_get_item_attribute (self->menu, 0, "x-canonical-secondary-action", "s", &action))
{
if (g_str_has_prefix (action, "indicator."))
self->secondary_action = g_strdup (action + strlen ("indicator."));
@@ -435,7 +435,7 @@ indicator_ng_menu_changed (GMenuModel *menu,
indicator_ng_update_entry (self);
}
else
- g_warning ("indicator menu item must be of type 'org.ayatana.indicator.root'");
+ g_warning ("indicator menu item must be of type 'com.canonical.indicator.root'");
}
}
diff --git a/tests/indicator-test-service.c b/tests/indicator-test-service.c
index 8ab9208..a633c95 100644
--- a/tests/indicator-test-service.c
+++ b/tests/indicator-test-service.c
@@ -83,7 +83,7 @@ main (int argc, char **argv)
submenu = g_menu_new ();
g_menu_append (submenu, "Show", "indicator.show");
item = g_menu_item_new (NULL, "indicator._header");
- g_menu_item_set_attribute (item, "x-ayatanaindicator-type", "s", "org.ayatana.indicator.root");
+ g_menu_item_set_attribute (item, "x-canonical-type", "s", "com.canonical.indicator.root");
g_menu_item_set_submenu (item, G_MENU_MODEL (submenu));
indicator.menu = g_menu_new ();
g_menu_append_item (indicator.menu, item);