aboutsummaryrefslogtreecommitdiff
path: root/libindicator
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2012-02-27 15:05:40 -0600
committerTed Gould <ted@gould.cx>2012-02-27 15:05:40 -0600
commitf6d6509200a393e1f855fc442363792439cd0ebe (patch)
tree634bee28b5ea7bc799df0b908ef74b916515fac7 /libindicator
parent8c71262d7f91064d34c9a8976c7ad2dde47fca6f (diff)
downloadlibayatana-indicator-f6d6509200a393e1f855fc442363792439cd0ebe.tar.gz
libayatana-indicator-f6d6509200a393e1f855fc442363792439cd0ebe.tar.bz2
libayatana-indicator-f6d6509200a393e1f855fc442363792439cd0ebe.zip
Handling the different group names when getting the name as well
Diffstat (limited to 'libindicator')
-rw-r--r--libindicator/indicator-desktop-shortcuts.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/libindicator/indicator-desktop-shortcuts.c b/libindicator/indicator-desktop-shortcuts.c
index f684905..55998d0 100644
--- a/libindicator/indicator-desktop-shortcuts.c
+++ b/libindicator/indicator-desktop-shortcuts.c
@@ -503,7 +503,21 @@ indicator_desktop_shortcuts_nick_get_name (IndicatorDesktopShortcuts * ids, cons
g_return_val_if_fail(priv->keyfile != NULL, NULL);
g_return_val_if_fail(is_valid_nick((gchar **)priv->nicks->data, nick), NULL);
- gchar * groupheader = g_strdup_printf("%s " OLD_GROUP_SUFFIX, nick);
+ const gchar * group_format = NULL;
+
+ switch (priv->actions) {
+ case ACTIONS_XAYATANA:
+ group_format = "%s " OLD_GROUP_SUFFIX;
+ break;
+ case ACTIONS_DESKTOP_SPEC:
+ group_format = ACTION_GROUP_PREFIX " %s";
+ break;
+ default:
+ g_assert_not_reached();
+ return NULL;
+ }
+
+ gchar * groupheader = g_strdup_printf(group_format, nick);
if (!g_key_file_has_group(priv->keyfile, groupheader)) {
g_warning("The group for nick '%s' doesn't exist anymore.", nick);
g_free(groupheader);