diff options
Diffstat (limited to 'libindicator')
-rw-r--r-- | libindicator/indicator-desktop-shortcuts.c | 16 |
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); |