Commit graph

336 commits

Author SHA1 Message Date
Bastien Nocera
b3be07609a panels: Fix truncated panel names for larger fonts
Note that this fix will not automatically fix translations, which will
need to add soft-hyphens (U+00AD) to their translations themselves, and
will not fix larger fonts for which the split up syllables end up
being bigger than the maximum text width.

It's the best we can do without redesigning the Settings shell, which is
already something planned.

https://bugzilla.gnome.org/show_bug.cgi?id=647087#c13
2016-04-07 16:06:35 +02:00
Cosimo Cecchi
8dbd9ed592 region: don't access priv pointer before checking no error
If the GCancellable is cancelled by the finalize() function, the
callback will still be called potentially with an instance of the
panel that's not valid anymore.
To avoid crashing in that case, only access the priv pointer
when we have no error.

https://bugzilla.gnome.org/show_bug.cgi?id=761846
2016-02-11 20:01:25 +01:00
Jiro Matsuzawa
5ae47f0305 region: Give mnemonic to labelled widgets
https://bugzilla.gnome.org/show_bug.cgi?id=736606
2016-01-18 15:50:20 +01:00
Rui Matos
30470d7213 region: Ensure that system and user formats are consistent
The formats (or 'region') setting might be unset meaning that it's the
same as the language since that's what LC_TIME et al default to when
unset.

We already handle this for the user setting but for the system setting
we're losing that semantic when getting it from localed since we don't
allow priv->system_region to remain unset. This means that when users
change the system language, the system formats will be explicitly set
to the previous value of the system language instead of remaining
unset and thus follow the new value for the system language.

This isn't that bad on multi user systems where we display system
settings separately from user settings, but on single user systems we
change the system values to match the user values which, due to the
above mentioned semantic difference regarding the region setting,
means that when changing the language, the (unset) region will be
displayed as the same as the language but the system region will be
explicitly set to the previous language.

Fix this by making the system region have the same semantic as the
user's, i.e. allow it to remain unset until explicitly set by the
user.

https://bugzilla.gnome.org/show_bug.cgi?id=755648
2016-01-18 14:53:05 +01: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
Debarshi Ray
66c6975942 region: Silence a CRITICAL
Fall out from abb0592866

https://bugzilla.gnome.org/show_bug.cgi?id=758417
2015-11-23 11:38:57 +01:00
Debarshi Ray
be277759bb region: Use header bar in the input options dialog
https://bugzilla.gnome.org/show_bug.cgi?id=757516
2015-11-20 18:02:57 +01:00
Debarshi Ray
7d9f7f30bc region: Turn CcInputOptions into a templatized composite widget
This is a pre-requisite for using a header bar.
GtkDialog:use-header-bar is a construct-only property, and has no
effect when set from the XML. Therefore, the only option is to turn
the widget into a template and set use-header-bar from C.

There should be no behavioral changes due to this patch.

Bump required GLib version for the G_DECLARE_FINAL_TYPE macro.

https://bugzilla.gnome.org/show_bug.cgi?id=757516
2015-11-20 18:02:57 +01:00
Debarshi Ray
4261151f4d region: Remove unused variable
https://bugzilla.gnome.org/show_bug.cgi?id=757516
2015-11-20 18:02:57 +01:00
Matthias Clasen
e4c2000fa8 region: Make section heading accessible
We need to set up labelled-by/label-for relations so orca knows
to read the labels when the focus enters one of the lists.

https://bugzilla.gnome.org/show_bug.cgi?id=746758
2015-09-29 14:22:56 -04: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
4a91056bb7 region: If language isn't set in AccountsService, show current locale
For newly created user accounts, AccountsService won't have the
language property set. Instead of defaulting to en_US in that case,
let's fallback to the current locale.

https://bugzilla.gnome.org/show_bug.cgi?id=753828
2015-08-25 13:16:11 +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
Rui Matos
7916040cea region: Tick an unselected row when enter is pressed
This makes the dialog easier to use via keyboard navigation since
otherwise we would just dismiss the dialog with the current selection
on enter when the user actually intended to change the selection.

https://bugzilla.gnome.org/show_bug.cgi?id=752001
2015-07-07 18:48:56 +02:00
Rui Matos
73644fdecc region: Dismiss dialog if the activated row was already ticked
This makes the dialog a bit friendlier to use.

https://bugzilla.gnome.org/show_bug.cgi?id=752001
2015-07-07 18:48:56 +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
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