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
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
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).
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
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
Instead of splitting the list of layouts into layouts and variants,
we were expecting strings of the form:
layout1 variant1, layout2 variant2
to be handled automatically. We should instead create the lists
of layouts and variants separately before passing them to localed.
https://bugzilla.gnome.org/show_bug.cgi?id=670607
When enabled, "extra" layouts are rendered as italic.
It was broken, the markup was visible literally - now it is real italic text
Signed-off-by: Sergey V. Udaltsov <svu@gnome.org>
Using systemd's SetX11Keyboard() method in localed. Disable
the functionality altogether if systemd is not found.
This version supports multiple keyboard layouts by passing comma
separated layouts, as supported by X11.
https://bugzilla.gnome.org/show_bug.cgi?id=659300
The big combo box is not very usable, so as a first improvement,
move things around so that we can use a list on the left, and
put the examples on the right.
Also add a 'need logout' hint in the same style as on the
language tab.
setlocale() returns a string representing the _new_ locale, so
we have to get the current locale with setlocale (..., NULL) first,
and we have to copy it since it returns a static string that will
otherwise get overwritten.
This code was creating a GString conditionally, but using
it unconditionally afterwards. Instead of special-casing
the str == NULL case, just always create it.