The language input chooser is being created and destroyed every time
it is opened and closed. This is noticeably slow and is hardly
necessary as the values it contains should not change.
To fix this, these changes reuse the same instance of the input chooser
(by hiding and showing it) instead of renewing it.
The input chooser is also now shown using gtk_dialog_run to avoid having
it destroyed from the default delete event.
These changes prevent warnings when unreferencing the default input
source, locale and back rows which are never instanced by some locales
(and thus null).
The language input chooser is being leaked. The reason for the leak
is a "circular reference": the input chooser keeps a GtkBuilder
instance that gets destroyed when the chooser is, itself, destroyed.
However, the input chooser is never destroyed because the GtkBuilder
instance keeps a reference to it.
These changes dismiss the GtkBuilder once it is no longer needed in the
input chooser which fixes the leak.
The first input source gets activated by default when users log in but
we don't currently allow users to set this (other than the awkward
remove all input sources and add them again in the right order).
Allowing user re-ordering of the input source list nicely allows users
to get the default input source they want.
https://bugzilla.gnome.org/show_bug.cgi?id=743400
Currently it looks a bit unpolished that the add/remove buttons on the
other side of the toolbar look linked while this pair doesn't. Note
that the input source settings button isn't always visible but in that
case the layout button will still show up correctly as non-linked.
https://bugzilla.gnome.org/show_bug.cgi?id=743400
When iterating locales in the format chooser,
gnome_get_country_from_locale() is called for each of them to build the
locale label for the list row.
The function creating the label doesn't take into account that
gnome_get_country_from_locale() can return NULL, in which case it will
both:
- display an empty row in the list
- crash when later trying to find a word in a NULL string with strstr()
inside match_all()
Just avoid creating a widget in that case.
https://bugzilla.gnome.org/show_bug.cgi?id=742639
Since we can't export IBus sources through the localed API we
shouldn't even allow users to choose them.
This allows us to stop having to show an apologising dialog which
makes us look a bit bad and was using deprecated gtk+ API that we're
trying to get rid of. Instead, we show the same information up front,
in the input chooser.
https://bugzilla.gnome.org/show_bug.cgi?id=740986
gnome_parse_locale() can return an empty country_code for some locales,
which we are not taking into account when building the simple_locale
string.
https://bugzilla.gnome.org/show_bug.cgi?id=738963
The notification is wider then window for some languages (e.g.
France). This patch allows wrapping, limits chars and changes
margin as a result of discussion on #gnome-design.
https://bugzilla.gnome.org/show_bug.cgi?id=703392
Selecting and pressing the Add button continues to work but this
should streamline the the input chooser dialog for mouse users by
making it possible to add by double clicking a row.
https://bugzilla.gnome.org/show_bug.cgi?id=732720
GtkListBox doesn't implement GtkScrollable so it needs to be added to
a GtkViewport. Instead of having to do this in all .ui files, add a
new helper function to setup the widget tree correctly.
https://bugzilla.gnome.org/show_bug.cgi?id=732175
This is deprecated in newer automake versions, and this causes warnings
with automake 1.14:
panels/printers/Makefile.am:3: warning: 'INCLUDES' is the old name for
AM_CPPFLAGS' (or '*_CPPFLAGS')
https://bugzilla.gnome.org/show_bug.cgi?id=732189
Missing org.freedesktop.locale1 means priv->permission will not be set
and will trigger a segfault when used by set_login_button_visibility().
Unconditionally not display the Login button if localed is not available
since it will be useless anyway.
https://bugzilla.gnome.org/show_bug.cgi?id=723550
If the settings backends fail to give us valid values, show the
current environment instead of "None" since we do know which language
is actually being used.
https://bugzilla.gnome.org/show_bug.cgi?id=695535
Just like the system settings, the user's settings might be empty
because some other component failed before us. Still, we shouldn't
show an empty list since that looks broken.
https://bugzilla.gnome.org/show_bug.cgi?id=701871
Acting on every keystroke makes the UI sluggish given the number of
widgets we have so let's rate limit this to a reasonable frequency
that still feels responsive.
https://bugzilla.gnome.org/show_bug.cgi?id=695466