aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2012-02-27 14:38:21 -0600
committerTed Gould <ted@gould.cx>2012-02-27 14:38:21 -0600
commit7d3e660ebc647e5ae3520f11d68447f222f5e5de (patch)
treea429eaa107cada24e81e1c6e57086422f9305448
parent52c42ef36462d3dfc4396b219730a8f1d7bc8dcd (diff)
downloadlibayatana-indicator-7d3e660ebc647e5ae3520f11d68447f222f5e5de.tar.gz
libayatana-indicator-7d3e660ebc647e5ae3520f11d68447f222f5e5de.tar.bz2
libayatana-indicator-7d3e660ebc647e5ae3520f11d68447f222f5e5de.zip
Adding a value for whether it should use the TargetEnvironment, I'm removing the warning because we don't care to fix old stuff anymore
-rw-r--r--libindicator/indicator-desktop-shortcuts.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/libindicator/indicator-desktop-shortcuts.c b/libindicator/indicator-desktop-shortcuts.c
index df588d1..9b44e4a 100644
--- a/libindicator/indicator-desktop-shortcuts.c
+++ b/libindicator/indicator-desktop-shortcuts.c
@@ -285,6 +285,7 @@ parse_keyfile (IndicatorDesktopShortcuts * ids)
look for in the rest of the file */
const gchar * list_name = NULL;
const gchar * group_format = NULL;
+ gboolean should_have_target = FALSE;
switch (priv->actions) {
case ACTIONS_NONE:
@@ -293,10 +294,12 @@ parse_keyfile (IndicatorDesktopShortcuts * ids)
case ACTIONS_XAYATANA:
list_name = OLD_SHORTCUTS_KEY;
group_format = "%s " OLD_GROUP_SUFFIX;
+ should_have_target = TRUE;
break;
case ACTIONS_DESKTOP_SPEC:
list_name = ACTIONS_KEY;
group_format = ACTION_GROUP_PREFIX " %s";
+ should_have_target = FALSE;
break;
default:
g_assert_not_reached();
@@ -324,7 +327,7 @@ parse_keyfile (IndicatorDesktopShortcuts * ids)
continue;
}
- if (!should_show(priv->keyfile, groupname, priv->identity, TRUE)) {
+ if (!should_show(priv->keyfile, groupname, priv->identity, should_have_target)) {
g_free(groupname);
continue;
}
@@ -367,10 +370,6 @@ should_show (GKeyFile * keyfile, const gchar * group, const gchar * identity, gb
return FALSE;
}
return TRUE;
- } else {
- if (should_have_target) {
- g_warning(OLD_GROUP_SUFFIX " does not have key '" OLD_ENVIRON_KEY "' falling back to deprecated use of '" G_KEY_FILE_DESKTOP_KEY_ONLY_SHOW_IN "' and '" G_KEY_FILE_DESKTOP_KEY_NOT_SHOW_IN "'.");
- }
}
/* If there is a list of OnlyShowIn entries we need to check