mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-08-24 18:25:50 +00:00
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
This commit is contained in:
parent
8988ae66fc
commit
27238daf92
|
@ -1,3 +1,10 @@
|
|||
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);
|
||||
|
|
Loading…
Reference in a new issue