Commit graph

319 commits

Author SHA1 Message Date
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
87640bb6f8 region: Implement input source list re-ordering
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
2015-02-28 20:57:38 +01:00
Rui Matos
da060fa691 region: Add accessible names to toolbar buttons
https://bugzilla.gnome.org/show_bug.cgi?id=743400
2015-02-28 20:57:38 +01:00
Rui Matos
44b36798a3 region: Join the input source settings and layout buttons
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
2015-02-28 20:57:38 +01:00
Florian Müllner
4179afc55c region: Shut up a compiler warning
The variable cannot actually be used uninitialized, but that's not
obvious to the compiler.
2015-02-28 11:38:58 +01:00
Cosimo Cecchi
eb93004ead region: fix a crash when iterating locales
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
2015-01-10 11:44:38 +08: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
Michael Catanzaro
212a4e9b6e region: Make Add/Done buttons blue
https://bugzilla.gnome.org/show_bug.cgi?id=737966
2014-10-17 12:19:41 +02:00
Jinkyu Yi
047ae3c937 region: obtain keyboard variant from IBus
This will fix unable to show keyboard variant from IBus through menu.

https://bugzilla.gnome.org/show_bug.cgi?id=735065
2014-09-26 17:54:38 +02:00
Ondrej Holy
d82a2101d5 user-accounts & region: allow multiline notifications
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
2014-09-19 13:35:15 +02:00
David King
86b7af3f0e panels: Mark label strings as translatable
https://bugzilla.gnome.org/show_bug.cgi?id=736052
2014-09-04 16:00:20 +01:00
David King
745c7ef9de panels: Fix all but one uses of use-stock property
Avoid the deprecated use-stock.

https://bugzilla.gnome.org/show_bug.cgi?id=736052
2014-09-04 14:14:31 +01:00
Christophe Fergeau
5572fb9a75 region: Remove "Shift" hack from region panel
The region panel hardcodes that to switch input source backward, one
uses the shift modfier with the shortcut to switch input source forward.

https://bugzilla.gnome.org/show_bug.cgi?id=731618
2014-08-17 20:16:27 +02:00
Rui Matos
746e3b7974 region: Add Cancel/OK buttons to the format chooser
These were lost with the transition to headerbars.

https://bugzilla.gnome.org/show_bug.cgi?id=732725
2014-07-18 16:05:42 +02: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
Bastien Nocera
57a1ac1177 region: Update for list box API change 2014-06-26 16:00:45 +02:00
Rui Matos
61a6c6f0cb shell: Fix list box scrolling helper
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
2014-06-25 17:29:30 +02:00
Christophe Fergeau
1df05bdde7 region: Use AM_CPPFLAGS rather than INCLUDES
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
2014-06-25 12:46:42 +02:00
Bastien Nocera
ccec8ad7e1 region: Use new listbox helpers
https://bugzilla.gnome.org/show_bug.cgi?id=732106
2014-06-24 11:35:31 +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
Yosef Or Boczko
8913ad2f36 region: Use header bar in all the dialogs
https://bugzilla.gnome.org/show_bug.cgi?id=724299
2014-04-28 17:29:18 +03:00
Antoine Jacoutot
c5268f8a4b region-panel: do not show Login button if localed is not available
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
2014-02-04 15:34:09 +01: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
Jasper St. Pierre
dd52ac9417 Add NoDisplay to all gnome-control-center panel .desktop files
These aren't apps -- they're simply launchers for gnome-control-center.
They should not be shown as apps in the UI at all.

https://bugzilla.gnome.org/show_bug.cgi?id=712246
2013-11-15 08:44:53 -05:00
Rui Matos
455b457c7f region: Never show "None" for language and formats
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
2013-10-15 23:19:32 +02:00
Rui Matos
9e975b036f region: Allow setting system-wide formats
https://bugzilla.gnome.org/show_bug.cgi?id=695535
2013-10-15 23:19:29 +02:00
Rui Matos
559161b4cb region: Remove unused toplevel window from .ui file
https://bugzilla.gnome.org/show_bug.cgi?id=708286
2013-10-01 10:05:03 +02:00
Matthias Clasen
c7bda5467b region: Add a missing xalign in the format-chooser
The 'Measurement' label wasn't right-aligned, and only worked
because it is the longest. Pointed out in

https://bugzilla.gnome.org/show_bug.cgi?id=707162
2013-09-01 15:04:49 -04:00
Yosef Or Boczko
648be6c11a region: Fix stretched "Login Screen" button 2013-08-21 20:42:09 +03:00
Daiki Ueno
9a7ff8afbd region: translate IBus engine name if possible
https://bugzilla.gnome.org/show_bug.cgi?id=705907
2013-08-15 18:08:45 +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
Yosef Or Boczko
720f1b4a87 region: Fix the look of login button
https://bugzilla.gnome.org/show_bug.cgi?id=703769
2013-07-12 11:18:17 +03: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
Thomas Wood
98e8b1aaa3 region: prevent the "Formats" and "Add Input" dialogs from being resizable
https://bugzilla.gnome.org/show_bug.cgi?id=702487
2013-06-18 17:38:38 +01:00
Rui Matos
243b3062dc region: Make sure not to display an empty input sources list
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
2013-06-17 17:22:34 +02: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
Rui Matos
cf2399e978 region: Show the XKB option for the input source switch shortcut
Mutter now uses the "grp" XKB option to implement a special
modifiers-only shortcut use by gnome-shell to switch input sources.

https://bugzilla.gnome.org/show_bug.cgi?id=700346
2013-05-27 10:23:30 +02:00
Rui Matos
1f03f33230 Remove the input-source-switcher setting
Mutter now has a special modifiers-only shortcut used by gnome-shell
to switch input sources which no longer uses this setting.

This reverts commit ae3014ba3e.
This reverts commit 77b7569c3d.

https://bugzilla.gnome.org/show_bug.cgi?id=700346
2013-05-27 10:23:26 +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
0b7479572e Revert "Revert "Use a common definition for modifier-only keybindings array""
This reverts commit 34906dba27.
2013-05-13 16:26:01 +02:00
Rui Matos
0d064f1b01 Revert "wip remove input-sources-switcher label"
This reverts commit 8a76727604.
2013-05-13 16:25:39 +02:00
Rui Matos
017fbbc0e6 region: Don't crash if the user disabled IS switch keybindings
A 0 length string for a keybinding means it is disabled so the whole
adding <Shift> magic to the backward accelerator string is pointless
anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=700176
2013-05-13 16:22:07 +02:00