aboutsummaryrefslogtreecommitdiff
path: root/libindicator
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2012-02-27 15:08:19 -0600
committerTed Gould <ted@gould.cx>2012-02-27 15:08:19 -0600
commita69f559acd97f91614397479ea6fdd6240620cd5 (patch)
treefcdebd4152d599f32773ef6696be477a104e2d40 /libindicator
parentf6d6509200a393e1f855fc442363792439cd0ebe (diff)
downloadlibayatana-indicator-a69f559acd97f91614397479ea6fdd6240620cd5.tar.gz
libayatana-indicator-a69f559acd97f91614397479ea6fdd6240620cd5.tar.bz2
libayatana-indicator-a69f559acd97f91614397479ea6fdd6240620cd5.zip
Get the right group in exec too!
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 55998d0..13c1667 100644
--- a/libindicator/indicator-desktop-shortcuts.c
+++ b/libindicator/indicator-desktop-shortcuts.c
@@ -578,7 +578,21 @@ indicator_desktop_shortcuts_nick_exec (IndicatorDesktopShortcuts * ids, const gc
g_return_val_if_fail(priv->keyfile != NULL, FALSE);
g_return_val_if_fail(is_valid_nick((gchar **)priv->nicks->data, nick), FALSE);
- 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 FALSE;
+ }
+
+ 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);