Commit graph

59 commits

Author SHA1 Message Date
Ian Douglas Scott
8996ffac88 Move input sources from region panel to keyboard panel 2020-12-18 07:55:41 -08:00
Takao Fujiwara
5c0f6e1cde region: Search default input sources
The default input sources are not included in layout_rows_by_id or
engine_rows_by_id but in default_input_source_row of GtkListBoxRow.

https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1131
2020-09-25 03:09:06 +00:00
Robert Ancell
9d091692f8 region: Fix ... row not showing
Broken in 5368c1cb71
2018-11-12 20:33:05 +00:00
Robert Ancell
9c655bfba0 region: Create classes for input sources 2018-10-24 04:50:29 +00:00
Robert Ancell
433c247f50 region: Fix available input methods rows not showing
Some gtk_widget_show calls were missed from 5368c1cb71
2018-10-18 01:37:12 +00:00
Robert Ancell
1ea0f875ee region: Update CcInputChooser GTK+ code
- 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
2018-10-17 22:34:52 +00:00
Robert Ancell
9a75d49551 region: Use self variable to match coding style 2018-10-17 22:34:52 +00:00
Robert Ancell
5368c1cb71 region: Don't use gtk_widget_show_all
It is removed in GTK+ 4
2018-10-11 22:21:34 +00:00
Robert Ancell
b9c44d7673 region: Small whitespace fix from last commit 2018-10-10 09:19:04 +13:00
Andrea Azzarone
09753adfa6 region: Fix double-free when closing the input chooser dialog
Fixes: GNOME/gnome-control-center#225
2018-10-09 11:58:08 +01:00
Robert Ancell
a2daee0c7f region: Use GtkTemplate for input chooser dialog 2018-09-19 16:31:47 +02:00
Robert Ancell
cf2f90ce65 region: Replace old style packing properties with GtkWidget properties
Note that the toolbar properties can't yet be changed:
https://gitlab.gnome.org/GNOME/gtk/merge_requests/334
2018-09-19 14:00:20 +00:00
Takao Fujiwara
544899f094 region: Do not release locale keys in IM hash table
simple_locale is g_autofree and it should be duplicate for IM hash table.

https://gitlab.gnome.org/GNOME/gnome-control-center/issues/185
2018-09-18 08:07:25 +02:00
Robert Ancell
aaee85e5c6 region: Simplify size code for input chooser dialog
The previous code was complex and caused the dialog to abruptly change size when
interacting with it. Instead choose a reasonable default height.
2018-08-17 08:27:21 +00:00
Robert Ancell
67d39e497a region: Fix language search crash due to g_auto changes in 79e00c3 2018-06-20 17:07:08 +12:00
Robert Ancell
9ae5f9a667 Fix crash due to g_auto changes in 79e00c3 2018-06-20 16:44:36 +12:00
Gunnar Hjalmarsson
0bd90ca34b region: Show scrollbars if needed
If we are initially showing more entries than can be fit, we should
scroll then too rather than deciding in code when to do this.

https://bugzilla.gnome.org/show_bug.cgi?id=793861
2018-05-31 12:36:54 +12:00
Robert Ancell
79e00c37b0 region: Use g_auto for variables 2018-05-28 23:09:27 +00:00
Benjamin Berg
c2f601a9d4 Move common panel code from shell/ to panel/common
This creates a new static library called libwidget which the shell links
against.
2018-04-17 15:26:59 +02:00
Rui Matos
4bb33fd878 region: Avoid starting with a gap at the bottom of the input chooser
We can simply let the natural size request determine the dialog's
height.

https://bugzilla.gnome.org/show_bug.cgi?id=783058
2017-05-30 18:31:00 +02:00
Rui Matos
c99f6b58aa region: Don't return the input chooser dialog if nothing is selected
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
2017-05-30 18:31:00 +02:00
Rui Matos
6e4b4e944a region: Make the input source chooser back button activate on click
We lost this behavior with commit
3b14056a01 to fix keyboard navigation
but we can add it back by handling button events ourselves.

https://bugzilla.gnome.org/show_bug.cgi?id=783058
2017-05-30 18:31:00 +02:00
Rui Matos
2e45eeaa36 region: Be more thorough in cc_input_chooser_reset()
This should result in returning to the initial state as intended
instead of keeping the filter entry shown and the filter applied.

https://bugzilla.gnome.org/show_bug.cgi?id=765909
2016-05-13 18:39:23 +02:00
Rui Matos
ff656743f4 region: Handle escape in the input chooser's filter entry
Reset the chooser on escape.

https://bugzilla.gnome.org/show_bug.cgi?id=765909
2016-05-13 18:39:23 +02:00
Debarshi Ray
46f19022ef region: Use listbox header helper
https://bugzilla.gnome.org/show_bug.cgi?id=760582
2016-01-13 16:56:11 +01:00
Rui Matos
3b14056a01 region: Fix the input chooser add button sensitiveness logic
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
2015-09-07 16:45:03 +02:00
Rui Matos
6434213a89 region: Set a sensible height on the input chooser
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
2015-08-18 11:14:57 +02:00
Rui Matos
66604d4ae6 region: Don't ever show all input sources in the chooser
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
2015-07-22 16:10:27 +02:00
Rui Matos
f2f4626f64 region: Avoid overly long labels causing horizontal scrolling
Just ellipsize them instead.

https://bugzilla.gnome.org/show_bug.cgi?id=752383
2015-07-15 15:24:27 +02:00
Joaquim Rocha
abb0592866 region: Reuse the input chooser instance
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.
2015-03-10 19:45:07 +01:00
Joaquim Rocha
bd6347d02a region: Clear input chooser rows instead of unrefing them
These changes prevent warnings when unreferencing the default input
source, locale and back rows which are never instanced by some locales
(and thus null).
2015-03-10 19:45:07 +01:00
Joaquim Rocha
bbae930988 region: Fix leak in input chooser
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.
2015-03-10 19:45:07 +01:00
Rui Matos
1029d0c69a region: Don't show IBus sources in the system-wide input chooser
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
2015-01-06 16:17:36 +01:00
Rui Matos
6686a79158 region: Fix deprecated API usage
https://bugzilla.gnome.org/show_bug.cgi?id=740986
2014-12-05 16:13:29 +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
Cosimo Cecchi
422166f320 region: don't crash for locales with no country_code
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
2014-10-22 15:46:28 -07:00
Rui Matos
f28e06a4b3 region: Make it possible to add an input source by activating its row
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
2014-07-18 16:05:33 +02:00
Yosef Or Boczko
4d403f4a8b region: Use the new support for RTL icons in GtkIconTheme
https://bugzilla.gnome.org/show_bug.cgi?id=730597
2014-05-23 12:31:36 +03:00
Daniel Mustieles
2c5951819d Updated FSF's address 2014-01-29 11:27:38 +01:00
Yosef Or Boczko
80aaf11b1a region: Use margin-start/end instead of margin-left/right
https://bugzilla.gnome.org/show_bug.cgi?id=712661
2013-11-19 22:29:36 +02:00
Bastien Nocera
f9db0a832d region: Use new delayed search entry API
https://bugzilla.gnome.org/show_bug.cgi?id=705151
2013-07-30 16:57:29 +02:00
Alexander Larsson
1db26b435a region: Convert to GtkListBox
https://bugzilla.gnome.org/show_bug.cgi?id=702164
2013-07-02 16:19:09 +01:00
Rui Matos
cdc4bfe3a9 region: Set button arrow icons according to locale's text direction
https://bugzilla.gnome.org/show_bug.cgi?id=700543
2013-06-05 11:27:33 +02:00
Matthias Clasen
16c2a04e5e Add context to some translated strings
We are using "Other" in various contexts that may require
different translations.
https://bugzilla.gnome.org/show_bug.cgi?id=697211
2013-05-18 18:05:18 -04:00
Rui Matos
7262670c7a region: Rate limit the input chooser filtering
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
2013-05-13 17:02:57 +02:00
Rui Matos
561c68674b region: Stop focusing the input chooser entry if already focused
Since doing so selects the entry's text and thus is prone to cause
accidental deletion.

https://bugzilla.gnome.org/show_bug.cgi?id=695466
2013-05-13 17:02:55 +02:00
Rui Matos
639a2e4ada region: Center labels and remove arrows on the input chooser dialog
https://bugzilla.gnome.org/show_bug.cgi?id=695520
2013-04-15 11:53:27 +02:00
Rui Matos
d7cecdca2f region: Use view-more-symbolic for the "More" list item
We've had some early reports that the ellipsis used to label the
"More" item in some of the lists isn't clear.

https://bugzilla.gnome.org/show_bug.cgi?id=694927
2013-04-15 11:53:27 +02:00
Rui Matos
ee9dc7a176 region: Add separators to the input chooser list
https://bugzilla.gnome.org/show_bug.cgi?id=695465
2013-04-15 11:53:27 +02:00
Rui Matos
b405db0068 region: Normalize and casefold the untranslated language name
So that it actually matches with the normalized and casefolded filter
words.

https://bugzilla.gnome.org/show_bug.cgi?id=695357
2013-03-14 17:17:47 +01:00