aboutsummaryrefslogtreecommitdiff
path: root/libindicator
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-04-05 12:46:10 -0500
committerTed Gould <ted@gould.cx>2010-04-05 12:46:10 -0500
commite900b4c7a8fc08f73533d8a49777ebbd109028dd (patch)
tree9a83e999ab9c87958f444d401ad097b6da0cf0ae /libindicator
parent20e03af6d3675ca8dab591ad6b9cd9ab18fc7e37 (diff)
downloadlibayatana-indicator-e900b4c7a8fc08f73533d8a49777ebbd109028dd.tar.gz
libayatana-indicator-e900b4c7a8fc08f73533d8a49777ebbd109028dd.tar.bz2
libayatana-indicator-e900b4c7a8fc08f73533d8a49777ebbd109028dd.zip
Make it so that we check the GNOME-Gettext-Domain as well
Diffstat (limited to 'libindicator')
-rw-r--r--libindicator/indicator-desktop-shortcuts.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/libindicator/indicator-desktop-shortcuts.c b/libindicator/indicator-desktop-shortcuts.c
index 504d023..161350b 100644
--- a/libindicator/indicator-desktop-shortcuts.c
+++ b/libindicator/indicator-desktop-shortcuts.c
@@ -234,12 +234,22 @@ parse_keyfile (IndicatorDesktopShortcuts * ids)
return;
}
+ /* Remove a previous translation domain if we had one
+ from a perviously parsed file. */
+ if (priv->domain != NULL) {
+ g_free(priv->domain);
+ priv->domain = NULL;
+ }
+
/* Check to see if there is a custom translation domain that
we should take into account. */
- if (g_key_file_has_key(priv->keyfile, G_KEY_FILE_DESKTOP_GROUP, "X-Ubuntu-Gettext-Domain", NULL)) {
- if (priv->domain != NULL) {
- g_free(priv->domain);
- }
+ if (priv->domain == NULL &&
+ g_key_file_has_key(priv->keyfile, G_KEY_FILE_DESKTOP_GROUP, "X-GNOME-Gettext-Domain", NULL)) {
+ priv->domain = g_key_file_get_string(priv->keyfile, G_KEY_FILE_DESKTOP_GROUP, "X-GNOME-Gettext-Domain", NULL);
+ }
+
+ if (priv->domain == NULL &&
+ g_key_file_has_key(priv->keyfile, G_KEY_FILE_DESKTOP_GROUP, "X-Ubuntu-Gettext-Domain", NULL)) {
priv->domain = g_key_file_get_string(priv->keyfile, G_KEY_FILE_DESKTOP_GROUP, "X-Ubuntu-Gettext-Domain", NULL);
}