- Move more code into the .ui file
- Don't save the dialog between runs - it's cheap to generate on demand
- Hold references on data passed to dialog
- Connect signals in "swapped" form
- Use standard naming format for signal callbacks
In some cases we end up getting an input source row activated without
it being selected. This seems like a GtkListBox bug but we can easily
avoid it.
https://bugzilla.gnome.org/show_bug.cgi?id=783058
Going back when the back row just gets selected breaks keyboard
navigation. This behavior got introduced by mistake in commit
f28e06a4. Instead, let's just do the add button sensitiveness logic
here. The back row still works when activated.
https://bugzilla.gnome.org/show_bug.cgi?id=754524
On systems that have only a few locales installed we might end up
starting with an awkwardly small height. To avoid that we can set our
initial height to be the same as the main window.
https://bugzilla.gnome.org/show_bug.cgi?id=753537
While filtering we're adding all the input source rows to the
GtkListBox. This is a performance issue since GtkListBox doesn't
really cope with a big number of rows.
Instead, we'll filter the locale rows in a way such that we'll show a
locale row for which any input source name matches. From this filtered
locales view, users will still need to activate a locale row to get to
the input source rows view.
https://bugzilla.gnome.org/show_bug.cgi?id=752383
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.
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
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
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