Commit graph

336 commits

Author SHA1 Message Date
Bastien Nocera
e264df66b1 region: Fix possible crasher on startup
When the X11Variant localed property was empty, variants[i] was
being checked even though only variants[0] was defined (an empty
string).

==17035== Invalid read of size 8
==17035==    at 0x26B9529A: on_localed_properties_changed (gnome-region-panel-system.c:339)
==17035==    by 0x26B95546: localed_proxy_ready (gnome-region-panel-system.c:381)
==17035==    by 0x8CA2589: g_simple_async_result_complete (gsimpleasyncresult.c:775)
==17035==    by 0x8CA25BB: complete_in_idle_cb (gsimpleasyncresult.c:787)
==17035==    by 0x94B8ED4: g_idle_dispatch (gmain.c:4806)
==17035==    by 0x94B6890: g_main_dispatch (gmain.c:2715)
==17035==    by 0x94B7440: g_main_context_dispatch (gmain.c:3219)
==17035==    by 0x94B7623: g_main_context_iterate (gmain.c:3290)
==17035==    by 0x94B76E7: g_main_context_iteration (gmain.c:3351)
==17035==    by 0x8CDB1A1: g_application_run (gapplication.c:1620)
==17035==    by 0x4083C6: main (control-center.c:256)
==17035==  Address 0x13b92e18 is 0 bytes after a block of size 8 alloc'd
==17035==    at 0x4A0883C: malloc (vg_replace_malloc.c:270)
==17035==    by 0x94BE97B: standard_malloc (gmem.c:85)
==17035==    by 0x94BEA04: g_malloc (gmem.c:159)
==17035==    by 0x94BED2F: g_malloc_n (gmem.c:400)
==17035==    by 0x94DB26A: g_strsplit (gstrfuncs.c:2281)
==17035==    by 0x26B95169: on_localed_properties_changed (gnome-region-panel-system.c:319)
==17035==    by 0x26B95546: localed_proxy_ready (gnome-region-panel-system.c:381)
==17035==    by 0x8CA2589: g_simple_async_result_complete (gsimpleasyncresult.c:775)
==17035==    by 0x8CA25BB: complete_in_idle_cb (gsimpleasyncresult.c:787)
==17035==    by 0x94B8ED4: g_idle_dispatch (gmain.c:4806)
==17035==    by 0x94B6890: g_main_dispatch (gmain.c:2715)
==17035==    by 0x94B7440: g_main_context_dispatch (gmain.c:3219)
2012-11-05 09:37:55 +01:00
Jeremy Bicha
e32494f2f0 Show Printers & Region panels in Unity but hide Background
Ubuntu plans to fork a separate Appearance panel this cycle so
that Gnomebuntu can use the GNOME Background panel.

I believe Ubuntu will try to use the Printers and Region & Language
panels instead of system-config-printer & language-selector

https://bugzilla.gnome.org/show_bug.cgi?id=687258
2012-10-31 06:50:05 -04:00
Rui Matos
8f0091c2c9 region: Add the Marathi phonetic input source to the white list
https://bugzilla.gnome.org/show_bug.cgi?id=685721
2012-10-08 17:45:30 +02:00
Rui Matos
3e32d858a1 region: Add inscript2 m17n keymaps to the whitelist
https://bugzilla.gnome.org/show_bug.cgi?id=684854
2012-10-02 16:17:20 +02:00
Rui Matos
c7677010a0 region: Repopulate input sources chooser when IBus becomes available
Otherwise the IBus sources wouldn't be available in the chooser until
it was closed and re-opened.

https://bugzilla.gnome.org/show_bug.cgi?id=684874
2012-10-02 16:17:20 +02:00
Daiki Ueno
fb6c89f45a region: build IBus setup app filename only from the engine prefix
There are 84 m17n engines in the whitelist and they all use
ibus-setup-m17n.  To reduce the number of .desktop files, this
patch uses the prefix before the first ":" to construct the .desktop
filename and set IBUS_ENGINE_NAME envvar to let the setup app know
the actual engine ID.

https://bugzilla.gnome.org/show_bug.cgi?id=684935
2012-10-02 16:17:19 +02:00
Bastien Nocera
9dcf8cbfef region: Remove dead button
The button hasn't ever been hooked to anything. Let's remove it.

https://bugzilla.gnome.org/show_bug.cgi?id=684864
2012-10-01 11:39:04 +02:00
Bastien Nocera
287b0b917a region: Fix possibly uninitialised variable 2012-09-27 16:13:11 +02:00
Rui Matos
4abdc131c9 Revert "region: Create a source from the X layout in use when setting is empty"
This reverts commit 1e0192555b.

https://bugzilla.gnome.org/show_bug.cgi?id=684584
2012-09-25 13:20:34 +02:00
Bastien Nocera
c8b4efd10b region: Switch to the input sources section
When clicking on the link.

https://bugzilla.gnome.org/show_bug.cgi?id=684280
2012-09-21 21:37:05 +02:00
Daiki Ueno
b4251d847b region: move Amharic in IBus engine whitelist
Move Amharic input method to non-trivial unconfirmed section.

https://bugzilla.gnome.org/show_bug.cgi?id=683697
2012-09-16 17:29:57 -04:00
Daiki Ueno
e09ca1074c region: add non-trivial IBus engines to whitelist
Add non-trivial IBus engines such as transliteration based ones.
Though these engines have not yet confirmed by local language
users, it would be probably safe to leave them.

https://bugzilla.gnome.org/show_bug.cgi?id=683697
2012-09-16 17:29:55 -04:00
Daiki Ueno
bd5105d7f6 region: whitelist IBus engines with no XKB equiv
Some IBus engines don't have XKB equivalents, so need to be
whitelisted to be usable.

https://bugzilla.gnome.org/show_bug.cgi?id=683697
2012-09-16 17:29:54 -04:00
Daiki Ueno
ab43e935a5 region: add wubi and erbi to IBus engine whitelist
wubi and erbi (both from ibus-table) are popular stroke based input
methods for inputing Simplified Chinese and Traditional Chinese.
A local user said that wubi covers at least 20% of the Simplified
Chinese users.  erbi is similar to wubi and getting popular because
of easiness to learn.

https://bugzilla.gnome.org/show_bug.cgi?id=683697
2012-09-16 17:29:53 -04:00
Daiki Ueno
521bcadd51 region: remove Farsi item from IBus engine whitelist
m17n:fa:isiri is removed from IBus engine whitelist, since it
has XKB equivalent.

https://bugzilla.gnome.org/show_bug.cgi?id=683697
2012-09-16 17:29:51 -04:00
Daiki Ueno
89007c64ff region: mark Vietnamese IBus engine whitelist as confirmed
A local user confirmed that the Vietnamese whitelist items cover 90% of
the language users, thus it is now marked as "confirmed".

https://bugzilla.gnome.org/show_bug.cgi?id=683697
2012-09-16 17:29:49 -04:00
Matthias Clasen
f251788f9a region: Fix a layout problem on the system tab
The Format: row was being pushed to the bottom, and when the
input sources value was longer on the one side than the other,
the horizontal alignment was broken.
2012-09-16 15:52:49 -04:00
Bastien Nocera
914e8b2562 region: Handle input sources in the system tab
Unfortunately we don't have a way yet to make gsettings system wide
defaults so we are just using the localed API to export the XKB input
sources and ignore the IBus ones.

https://bugzilla.gnome.org/show_bug.cgi?id=683875
2012-09-16 13:33:05 -04:00
Rui Matos
1e0192555b region: Create a source from the X layout in use when setting is empty
We don't want to show an empty input sources list so we create a
source from the current X layout in case the setting is empty.

https://bugzilla.gnome.org/show_bug.cgi?id=683879
2012-09-14 03:07:45 +02:00
Rui Matos
fb6881d53b region: Handle the case of an empty input sources list
We would end up in an endless loop on update.

https://bugzilla.gnome.org/show_bug.cgi?id=683879
2012-09-14 03:07:45 +02:00
Daiki Ueno
8af69625d3 region: Use ibus_get_language_name() to get a language from its code
ibus_engine_desc_get_language() may return an empty string or language
codes that gdm_get_language_from_name() doesn't understand. Use
ibus_get_language_name() instead to handle such cases properly.

This also allows us to use the same method in gnome-shell to get
consistent display strings.

https://bugzilla.gnome.org/show_bug.cgi?id=682851
2012-09-09 23:16:07 +02:00
Rui Matos
9d46f8393c region: Expand the supported IBus engines whitelist
Thanks to Daiki Ueno for assembling the list.

https://bugzilla.gnome.org/show_bug.cgi?id=682313
2012-09-04 16:11:30 +02:00
Rui Matos
2a87480f26 region: Honor the 'show-all-sources' gsettings key
This setting overrides our supported IBus engines whitelist and makes
us show every engine installed on the system when enabled.

https://bugzilla.gnome.org/show_bug.cgi?id=682313
2012-09-04 14:06:01 +02:00
Rui Matos
7171520e72 region: Use the async IBus engines getter
https://bugzilla.gnome.org/show_bug.cgi?id=683035
2012-09-03 18:43:24 +02:00
Rui Matos
658083fffa region: Don't use IBus if running in fallback mode
In fallback mode we don't want to touch IBus since the gnome-shell UI
isn't there to provide the full integrated user experience.

We expect users to continue using existing IBus UIs in fallback mode.

https://bugzilla.gnome.org/show_bug.cgi?id=682864
2012-08-28 14:26:53 +02:00
Rui Matos
dee8e0917a region: Use a filter model on input sources
This allows us to hide some entries which for whatever reason we can't
display without removing them from gsettings.

This reverts commit 54835c8f44.
This reverts commit 953cc81b0f.
This reverts commit ab0594239c.
This reverts commit 03f08fd36c.

https://bugzilla.gnome.org/show_bug.cgi?id=682864
2012-08-28 14:26:52 +02:00
Ray Strode
b0e7a5efa8 panels: add register macro
Bastien says he doesn't like the blank class_finalize
functions in every panel and he would like a wrapper
macro to hide them.

This commit does that.
2012-08-21 14:32:33 -04:00
Matthias Clasen
1e4b0649f4 region: Handle being opened twice gracefully
When the going from the region panel to the overview and back,
the input methods in the list loose their display names. What
is happening is that we recreate the ibus object, but the second
time around it is already connected since ibus uses a shared
singleton connection internally. Thus, the ::connected signal
is never emitted, and we don't fetch the engines.

Work around this by checking if the newly created ibus object
is already connected, and directly calling fetch_ibus_engines
if it is. To make this work, we have to set up the treeview
with its model earlier.
2012-07-19 21:38:48 -04:00
Matthias Clasen
0af48c80a9 region: Make the code more robust
update_ibus_active_sources may very well be called with
an empty treeview. The code that iterates over the model
was assuming that there is at least one item. Fix that
by checking the return value of gtk_tree_model_get_iter_first().
2012-07-19 21:35:49 -04:00
Matthias Clasen
64150f1458 Avoid losing the selection
When the active input sources list is changed in any way (add or
remove or reorder a source), we write the list to the setting,
and then we get a changed signal for the setting, and rebuild
the list from the setting. Doing so loses the selection, unless
we take extra precaution to keep it.

https://bugzilla.gnome.org/show_bug.cgi?id=680027
2012-07-17 00:01:54 -04:00
Matthias Clasen
54835c8f44 Remove one more leftover reference to a filter model
The active input sources are no longer stored in a filter model.
Also, use gtk_list_store_insert_with_values for atomic insertion.
2012-07-16 23:59:03 -04:00
Matthias Clasen
953cc81b0f Region: Remove references to a no-longer-existing filter model
There was some code left around for dealing with a filter model,
but we don't have the active input sources in a filtered list
anymore. This was leading to crashes when removing or rearranging
input sources.
2012-07-16 12:13:18 -04:00
Bastien Nocera
ab0594239c region: Fix compilation failure
A use of the removed tree_view_get_actual_model() crept in.
2012-07-16 17:05:48 +01:00
Bastien Nocera
661019dadc region: Remove unneeded signal blockers
The value isn't going to change from under us, as the settings
object is in delayed mode.
2012-07-16 15:24:23 +01:00
Rui Matos
3579d7bb97 region: Try to keep the current input source when modifying the list
When modifying the input sources list the currently active source's
index might change. We must change the current setting accordingly to
keep it active.

https://bugzilla.gnome.org/show_bug.cgi?id=662489
2012-07-16 15:23:37 +01:00
Rui Matos
49f7d379bc region: Fix a couple of memory leaks
Unref the GSettings object and build the GnomeXkbInfo only
once. There's no need to free and keep rebuilding the latter since it
doesn't keep any state and is a bit expensive to build.

https://bugzilla.gnome.org/show_bug.cgi?id=662489
2012-07-16 15:18:33 +01:00
Bastien Nocera
03f08fd36c region: Never hide items from view
If IBus is unavailable to get the input source's display name,
just show the ID instead, and populate the display name when we get
a change (eg. when fetching the input sources from IBus is done).
2012-07-16 15:17:24 +01:00
Rui Matos
5e737900b0 region: Wire up the input source settings button
For XKB input sources the settings button remains unsensitive. For
IBus sources we make it sensitive and launch the engine's setup tool
on clicked if there is one.

https://bugzilla.gnome.org/show_bug.cgi?id=662489
2012-07-16 15:17:24 +01:00
Rui Matos
412e53079f region: Add IBus input sources
We query IBus for the available engines and present them alongside XKB
layouts.

https://bugzilla.gnome.org/show_bug.cgi?id=662489
2012-07-16 15:17:24 +01:00
Cosimo Cecchi
2e2ad76e59 region: Input Sources tab has a different spacing
The first two tabs have 12px, make this 12px too.

https://bugzilla.gnome.org/show_bug.cgi?id=678168
2012-06-15 11:36:21 -04:00
Bastien Nocera
d07be14ba0 region: Use '&' instead of 'and'
Using "&" not only keeps the names shorter but would also keeps the
user focused on the other words which compose the name.

https://bugzilla.gnome.org/show_bug.cgi?id=676562
2012-06-06 17:45:15 +01:00
Bastien Nocera
e880784fcb region: Update the shortcuts labels on startup
https://bugzilla.gnome.org/show_bug.cgi?id=662489
2012-06-01 19:01:57 +01:00
Rui Matos
0a78c3504e region: Add XKB input sources
We allow the user to choose from all XKB layouts installed and keep a
user picked list in gsettings.

https://bugzilla.gnome.org/show_bug.cgi?id=662489
2012-06-01 18:46:38 +01:00
Rui Matos
375bf2363f region: Improved keynav on the input chooser
This makes the dialog return when the user presses Enter on the filter
entry and prevents the GtkTreeView search popup from being used since
we already handle searching on that tree view.

https://bugzilla.gnome.org/show_bug.cgi?id=662489
2012-06-01 18:46:38 +01:00
Rui Matos
e38f9acf39 region: Improved selection handling on the input chooser
This makes the input chooser list always have a selected row and be
centered on it when the filter is applied.

https://bugzilla.gnome.org/show_bug.cgi?id=662489
2012-06-01 18:46:38 +01:00
Rui Matos
0fb0d6139b region: Removal of the Layouts tab
https://bugzilla.gnome.org/show_bug.cgi?id=662489
2012-06-01 18:46:38 +01:00
Rui Matos
bfaeb6a41d region: Add an initial input sources tab
This is just the scaffolding according to
https://live.gnome.org/Design/SystemSettings/RegionAndLanguage
No code behind it yet.

Original code from Matthias Clasen.

https://bugzilla.gnome.org/show_bug.cgi?id=662489
2012-06-01 18:46:37 +01:00
Florian Müllner
79b11894dd region: Add get_help_uri() implementation
https://bugzilla.gnome.org/show_bug.cgi?id=675471
2012-05-18 18:48:38 +02:00
Piotr Drąg
5f124d6008 all: fix up tooltips
Idea from commit d5088b2eb1.
2012-05-18 18:39:31 +02:00
Bastien Nocera
57bba26311 region: Fix possible crasher with empty layout 2012-03-07 18:27:25 +01:00