Commit 27238daf authored by Andrew Walton's avatar Andrew Walton Committed by Andrew Walton

Pass a language code to g_key_file_set_locale_string() so that we can

2009-02-06  A. Walton  <awalton@gnome.org>

	* libnautilus-private/nautilus-link.c (get_language),
	(nautilus_link_local_set_key):
	Pass a language code to g_key_file_set_locale_string() so that we can
	actually rename .desktop files.


svn path=/trunk/; revision=14923
parent 8988ae66
2009-02-06 A. Walton <awalton@gnome.org>
* libnautilus-private/nautilus-link.c (get_language),
(nautilus_link_local_set_key):
Pass a language code to g_key_file_set_locale_string() so that we can
actually rename .desktop files.
2009-02-04 Cosimo Cecchi <cosimoc@gnome.org>
* src/nautilus-application.c: (create_window):
......
......@@ -293,6 +293,22 @@ nautilus_link_local_create (const char *directory_uri,
return TRUE;
}
static const char *
get_language (void)
{
const char * const *langs_pointer;
int i;
langs_pointer = g_get_language_names ();
for (i = 0; langs_pointer[i] != NULL; i++) {
/* find first without encoding */
if (strchr (langs_pointer[i], '.') == NULL) {
return langs_pointer[i];
}
}
return NULL;
}
static gboolean
nautilus_link_local_set_key (const char *uri,
const char *key,
......@@ -313,7 +329,8 @@ nautilus_link_local_set_key (const char *uri,
g_key_file_set_locale_string (key_file,
MAIN_GROUP,
key,
NULL, value);
get_language (),
value);
success = _g_key_file_save_to_gfile (key_file, file, NULL);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment