Commit graph

46 commits

Author SHA1 Message Date
Robert Ancell
86d1d30c63 common: Use g_auto for variables 2018-06-07 01:08:07 +00:00
Georges Basile Stavracas Neto
35f948f5fb common: Cache D-Bus proxy 2018-04-06 22:23:38 -03:00
Bastien Nocera
41bb1a6ff2 common: Fix gtk_tree_model_get_iter_first() retval
https://bugzilla.gnome.org/show_bug.cgi?id=749892
2015-05-27 11:06:02 +02:00
Rui Matos
ed273aa8f1 cc-common-language.c: Don't check if we have translations here
The list of locales returned from gnome_get_all_locales() already
filters out the locales for which we don't have translations so this
is a redundant check since users of get_initial_languages() only show
a language if it exists in gnome_get_all_locales() .

In fact, this code stopped working correctly since we started passing
locales including the codeset suffix to insert_language() because the
translation directories usually don't include the suffix and we
weren't stripping the suffix here.

https://bugzilla.gnome.org/show_bug.cgi?id=710412
2014-10-29 15:03:43 +01:00
Rui Matos
c244568f0b cc-common-language.c: Remove a bunch of unused code
This stopped being used in the last region panel re-design. See commit
35d920f1b8 .

https://bugzilla.gnome.org/show_bug.cgi?id=710412
2014-10-29 15:02:46 +01:00
Rui Matos
880f9f1475 Use 'UTF-8' instead of 'utf8' as locale codeset suffix
This makes us work on OpenBSD's libc. GNU libc accepts both suffixes.

https://bugzilla.gnome.org/show_bug.cgi?id=710412
2014-10-29 13:59:14 +01:00
Daniel Mustieles
2c5951819d Updated FSF's address 2014-01-29 11:27:38 +01:00
Thomas Wood
0221ffefa1 common: ensure the current language has a display name in the model
https://bugzilla.gnome.org/show_bug.cgi?id=702344
2013-06-28 11:08:45 +01:00
Kalev Lember
29498bb20a common: Fix criticals when user language getting fails
Handle the error case when the call to the accountservice dbus proxy
object fails.

https://bugzilla.gnome.org/show_bug.cgi?id=699378
2013-05-01 15:25:36 +02:00
Rui Matos
f457cc8cc4 common: Cleanup initial languages code
There's no need to use our own translations and setlocale() directly
since gnome-languages already does that for us.
2013-02-19 12:25:54 +01:00
Rui Matos
a0ba3bc4fc Adapt to gnome-languages API change 2013-02-19 12:25:54 +01:00
Matthias Clasen
1ecd607bcb Move cc_add_user_language
Move it to cc-common-language.c and rename it
to cc_common_language_add_user_languages
2013-02-19 12:25:51 +01:00
Rui Matos
7221f9cd54 common: gdm-languages moved to gnome-desktop as gnome-languages
That code is useful for other core desktop modules.

https://bugzilla.gnome.org/show_bug.cgi?id=692414
2013-01-25 16:29:15 +01:00
Bastien Nocera
897243858f region: Reinstate the separator in the languages list
The separator went missing when we started adding the popular
languages to the list. Make it come back to separate the user
languages from the popular ones.
2012-12-11 09:15:55 +01:00
Bastien Nocera
becfb7a7c8 common: Fix other user's languages never getting added
Because we were looking for a locale directory with the extra
codeset (xx_XX.utf8) instead of without it.
2012-12-10 15:06:14 +01:00
Bastien Nocera
fb1f2baea5 common: Show popular languages in their own language
Instead of the current one.

https://bugzilla.gnome.org/show_bug.cgi?id=684861
2012-12-10 14:37:54 +01:00
Bastien Nocera
b30497a3bd common: Use language name translations from iso-codes 2012-11-27 11:19:13 +01:00
Jens Petersen
5bf6c416f0 common: add Japanese to the popular languages
Eigth place in the list:
http://www.andaman.org/BOOK/reprints/weber/rep-weber.htm

https://bugzilla.gnome.org/show_bug.cgi?id=684845
2012-11-27 11:19:13 +01:00
Bastien Nocera
3eb6cdd1bc common: Try to get the configured language as the current one 2012-11-23 18:51:49 +01:00
Bastien Nocera
781bda8e12 common: Split out getting the lang for a user
Into get_lang_for_user(), so it can be reused internally.
2012-11-23 18:51:49 +01:00
Thomas Wood
7dab589e9e common: remove the use of the GDK thread functions
Remove the use of gdk_threads_enter and gdk_threads_leave functions, as
they have been deprecated, and also replace gdk_threads_add_idle with
g_idle_add.

https://bugzilla.gnome.org/show_bug.cgi?id=688231
2012-11-13 13:49:08 +00:00
Bastien Nocera
f48db43be9 common: Add more debug for select_current_language() 2012-09-26 22:55:18 +02:00
Matthias Clasen
a955ec4152 Switch files created by me to GPLv2+
This matches the rest of the control-center code base.
https://bugzilla.gnome.org/show_bug.cgi?id=683420
2012-09-06 19:07:09 -04:00
Javier Jardón
b682a3c6e9 common: Add Arabic as a common language
https://bugzilla.gnome.org/show_bug.cgi?id=671530
2012-08-22 16:17:20 +01:00
Bastien Nocera
0e2b4a9600 common: Add Russian as a common language
https://bugzilla.gnome.org/show_bug.cgi?id=671530
2012-08-22 16:16:14 +01:00
Colin Walters
20a980d6ca Fix missing = 2012-08-22 09:42:18 -04:00
Jasper St. Pierre
d2aa0ce5d8 common: Fix memory leaks in language sorting
https://bugzilla.gnome.org/show_bug.cgi?id=679836
2012-08-22 13:47:40 +01:00
Matthias Clasen
2d0203bfad common: Make insertion of new languages quicker
See https://bugzilla.gnome.org/show_bug.cgi?id=672293#c6
2012-03-27 13:52:23 +02:00
Bastien Nocera
94555eadc8 common: Look harder for some languages
It's fairly common to have de rather than de_DE translations, ditto
for French and Spanish that share most of the vocabulary.
2012-03-08 13:53:20 +01:00
Rodrigo Moya
95d9cffaaa region: Always add English to the list, as it should always be available 2011-10-11 16:18:45 +02:00
Rodrigo Moya
3c34c0f029 region: Only show locales for languages that have translations 2011-10-11 13:24:25 +02:00
Bastien Nocera
d403011d0e common: Tweak default user list 2011-08-26 22:45:35 +01:00
Matthias Clasen
9e02793982 common: Add a region mode to the language chooser
In this mode, locales are primarily represented by their
region component, instead of their language component.
2011-08-22 14:29:55 -04:00
Matthias Clasen
3f122250e1 common: Add api for region names
Similar to how we format language names, add a variant that
emphasizes the region part of a locale. We show the language
in parentheses as discriminator only where needed.
2011-08-22 14:29:54 -04:00
Matthias Clasen
be235bd9ae region: Redo the language tab
Prepopulate the list with a small set of 'common' languages,
as we already did in the user panel, and use a language chooser
to add to that list.
2011-08-22 14:29:53 -04:00
Rodrigo Moya
87baf75e9c region: Added missing assignment for loop control variable 2011-06-17 11:04:47 +02:00
Matthias Clasen
3be36e735b Drop the sync language loading code
All users have been ported to use the async variant.
2011-02-23 23:43:16 -05:00
Matthias Clasen
012c52f4f5 Add an async variant of language loading
This just code loads one language at a time in an idle,
to avoid blocking the UI for a long time. The function returns
the id of the sources, so you can just call g_source_remove()
if you don't need the languages anymore (e.g if the user goes
to another panel before the list is fully populated).

https://bugzilla.gnome.org/show_bug.cgi?id=643096
2011-02-24 03:12:19 +00:00
Yanko Kaneti
7cfa641feb Avoid using locales without language names.
Quick and dirty fix for not using all the iso-codes resources for
finding a suitable language name for a locale.
2011-02-03 18:35:29 +00:00
Bastien Nocera
1edc17e126 common: Add API to select the current language 2011-01-26 18:40:41 +00:00
Bastien Nocera
e48c04a092 common: Remove debug 2011-01-25 18:45:03 +00:00
Bastien Nocera
f7f1b4c073 user-accounts: Move more of the treeview setup to common/
Make more of the code common one, so we can re-use it for
the region panel. Show the user's current locale first, as well
as the list of languages used by other users, followed by a separator.
2011-01-25 17:09:10 +00:00
Bastien Nocera
9229ab875e user-accounts: Move um_get_current_language to common/ 2011-01-24 18:26:00 +00:00
Bastien Nocera
93832da41f user-accounts: Move more functions to common/ 2011-01-24 18:20:54 +00:00
Bastien Nocera
5dd0a8c47a user-accounts: Move um_get_iter_for_language to common/
More sharing
2011-01-24 18:20:53 +00:00
Bastien Nocera
930540ea28 user-accounts: Move gdm-languages to common/
Move gdm-languages and some of the helper functions to common/,
so that we can share it with the region panel.
2011-01-24 18:10:10 +00:00