aboutsummaryrefslogtreecommitdiff
path: root/libindicator
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-04-02 10:49:33 -0500
committerTed Gould <ted@gould.cx>2010-04-02 10:49:33 -0500
commit20e03af6d3675ca8dab591ad6b9cd9ab18fc7e37 (patch)
tree42a9d3fe86f4d00eb97f4622dfe9024df136791d /libindicator
parent5d02c0c8366127655de02c14514b9e39fba6172a (diff)
downloadlibayatana-indicator-20e03af6d3675ca8dab591ad6b9cd9ab18fc7e37.tar.gz
libayatana-indicator-20e03af6d3675ca8dab591ad6b9cd9ab18fc7e37.tar.bz2
libayatana-indicator-20e03af6d3675ca8dab591ad6b9cd9ab18fc7e37.zip
If we don't have a domain just use the locale function, otherwise we need to use that domain to get the translation.
Diffstat (limited to 'libindicator')
-rw-r--r--libindicator/indicator-desktop-shortcuts.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/libindicator/indicator-desktop-shortcuts.c b/libindicator/indicator-desktop-shortcuts.c
index a370c0f..504d023 100644
--- a/libindicator/indicator-desktop-shortcuts.c
+++ b/libindicator/indicator-desktop-shortcuts.c
@@ -427,11 +427,21 @@ indicator_desktop_shortcuts_nick_get_name (IndicatorDesktopShortcuts * ids, cons
return NULL;
}
- gchar * name = g_key_file_get_locale_string(priv->keyfile,
- groupheader,
- G_KEY_FILE_DESKTOP_KEY_NAME,
- NULL,
- NULL);
+ gchar * name = NULL;
+ if (priv->domain == NULL) {
+ name = g_key_file_get_locale_string(priv->keyfile,
+ groupheader,
+ G_KEY_FILE_DESKTOP_KEY_NAME,
+ NULL,
+ NULL);
+ } else {
+ gchar * tempname = g_key_file_get_string(priv->keyfile,
+ groupheader,
+ G_KEY_FILE_DESKTOP_KEY_NAME,
+ NULL);
+ name = g_strdup(g_dgettext(priv->domain, tempname));
+ g_free(tempname);
+ }
g_free(groupheader);