[geocode-glib] lib: Handle the "language" key from Telepathy
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geocode-glib] lib: Handle the "language" key from Telepathy
- Date: Wed, 24 Oct 2012 16:42:41 +0000 (UTC)
commit c1d5003b04fa4f1f0b3275df8e6b26264e3a8484
Author: Bastien Nocera <hadess hadess net>
Date: Wed Oct 24 16:08:15 2012 +0200
lib: Handle the "language" key from Telepathy
geocode-glib/geocode-glib.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/geocode-glib/geocode-glib.c b/geocode-glib/geocode-glib.c
index 8d9fb48..486f839 100644
--- a/geocode-glib/geocode-glib.c
+++ b/geocode-glib/geocode-glib.c
@@ -241,7 +241,7 @@ struct {
{ "text", NULL },
{ "description", NULL },
{ "uri", NULL },
- { "language", NULL }, /* FIXME: Should we ignore this? */
+ { "language", "locale" },
};
static void
@@ -704,9 +704,11 @@ get_resolve_query_for_params (GeocodeObject *object)
if (object->priv->type == GEOCODE_GLIB_RESOLVE_REVERSE)
g_hash_table_insert (ht, "gflags", "R");
- locale = geocode_object_get_lang ();
- if (locale)
- g_hash_table_insert (ht, "locale", locale);
+ if (g_hash_table_lookup (ht, "locale") == NULL) {
+ locale = geocode_object_get_lang ();
+ if (locale)
+ g_hash_table_insert (ht, "locale", locale);
+ }
params = soup_form_encode_hash (ht);
g_hash_table_destroy (ht);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]