Commit graph

80 commits

Author SHA1 Message Date
Georges Basile Stavracas Neto
10dfbb526e region: Cache D-Bus proxy 2018-04-06 22:23:39 -03:00
Allan Day
87568e9250 Harmonize list box row layouts
While it isn't possible, or even advisable, to make all the list
box rows the same height, using a number of standard heights will
make the control center feel more harmoneous.

Adust the height of the list box rows in Color, Date & Time,
Mouse & Touchpad, Network, Privacy, Region & Language, Sharing
and Universal Access. Makes standard rows that contain labels
and/or controls 58px tall. Some other rows, such as those which
contain two lines of text, are allowed to be taller.

https://bugzilla.gnome.org/show_bug.cgi?id=786384
2017-08-20 18:38:48 +02:00
Felipe Borges
db551f1c5d region: Make the "Restart" notification persistent
When the Language is changed in the Region panel, a "Restart"
notification is shown, but if the user closes the window without
acting on the restart session notification, there is no way to
get back to it.

This way we create a temporary file in the g_get_user_runtime_dir ()
directory flagging whether we should present the "Restart"
notification.

https://bugzilla.gnome.org/show_bug.cgi?id=702351
2017-07-10 15:27:34 +02:00
Felipe Borges
79295b6260 region: Drop "restart" in-app notification
This changes are based on the mockups available at
https://wiki.gnome.org/Design/SystemSettings/RegionAndLanguage

https://bugzilla.gnome.org/show_bug.cgi?id=702351
2017-07-10 15:27:34 +02:00
Felipe Borges
a739ebf377 region: Embed "Restart session" button below the Language entry
This change is based on the mockups available at
https://wiki.gnome.org/Design/SystemSettings/RegionAndLanguage

https://bugzilla.gnome.org/show_bug.cgi?id=702351
2017-07-10 15:27:34 +02:00
Mohammed Sadiq
aebf04f6f2 region: Fix memory leak
The returned result of g_variant_get_strv() has to be freed
when no-longer needed

https://bugzilla.gnome.org/show_bug.cgi?id=782047
2017-05-02 12:55:04 +02:00
Felipe Borges
6f51428094 region: Use GtkRevealer instead of GdNotification
GtkRevealer combined with the "app-notification" class is enough
to represent the notification concept nowadays.

https://bugzilla.gnome.org/show_bug.cgi?id=775183
2016-11-29 15:50:50 +01:00
Rui Matos
bbdcaaa039 region: Avoid a crash on panel destruction
GtkListBox might emit the row-selected signal while being destroyed
and our row-selected handler accesses widgets owned by GtkBuilder so,
depending on the order on which the builder destroys its objects, we
could crash on the signal handler when destroying the builder.

Using g_signal_connect_object() avoids this issue by disconnecting us
before our finalize() runs.

https://bugzilla.gnome.org/show_bug.cgi?id=770563
2016-08-30 17:16:39 +02:00
Allan Day
ed34cd7d04 region: improve spacing
The layout of the panel felt constrained and wasn't consistent
with the other panels. More vertical spacing required.

https://bugzilla.gnome.org/show_bug.cgi?id=764645
2016-08-23 15:54:45 +01:00
Cosimo Cecchi
b3199dd641 region: remove handling of current input source GSetting
This is not read anymore by gnome-shell or gnome-settings-daemon, and
there's no point for gnome-control-center to read or write it anymore.

https://bugzilla.gnome.org/show_bug.cgi?id=766846
2016-05-25 11:00:41 -07: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
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
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
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
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
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
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
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
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
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
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
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
Yosef Or Boczko
648be6c11a region: Fix stretched "Login Screen" button 2013-08-21 20:42:09 +03: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
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
2822e04a89 region: Fix setting the system language
We need to actually change the variable holding the system language so
that it gets applied.

https://bugzilla.gnome.org/show_bug.cgi?id=694922
2013-04-15 11:53:27 +02:00
Rui Matos
6154170bb3 region: Apply user settings system-wide on single account systems
On single account systems we don't show the login button but the user
should still be able to set system-wide locale settings. We can simply
export the user's own settings to the system in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=694922
2013-04-15 11:53:27 +02:00
Rui Matos
d515aabbf1 region: Remove useless parameter
locald settings are system settings by definition so we can just use
priv->system_language directly.

https://bugzilla.gnome.org/show_bug.cgi?id=695535
2013-03-14 17:14:20 +01:00
Rui Matos
9c64f316b1 region: Show restart notification only if strictly needed
If the user is changing the setting back to the current locale we
shouldn't show the restart notification.

https://bugzilla.gnome.org/show_bug.cgi?id=695534
2013-03-14 16:52:51 +01:00
Rui Matos
50ea2c11ce region: Use a GDBusProxy to access org.gnome.SessionManager
We'll use this interface beyond just calling Logout() so lets keep a
proxy around.

https://bugzilla.gnome.org/show_bug.cgi?id=695534
2013-03-14 16:52:51 +01:00
Rui Matos
3efb71bab7 region: Cancel any async operations with callbacks on finalize
Otherwise we may end up using a finalized "object" in the callbacks.

https://bugzilla.gnome.org/show_bug.cgi?id=695534
2013-03-14 16:52:51 +01:00
Rui Matos
e2163ea9ed region: Translate restart notification into the target language
We used to do this before the panel re-design.

https://bugzilla.gnome.org/show_bug.cgi?id=695534
2013-03-14 16:52:51 +01:00
Rui Matos
bbc28af85d region: Display current locale country in formats if setting is empty
https://bugzilla.gnome.org/show_bug.cgi?id=694888
2013-03-14 16:52:51 +01:00
Rui Matos
3a51c94281 region: Remove the "None" input source row when adding a real one
https://bugzilla.gnome.org/show_bug.cgi?id=694887
2013-03-12 15:21:15 +01:00
Rui Matos
4eb0a72d86 region: Improve explanation when there are no input sources
https://bugzilla.gnome.org/show_bug.cgi?id=694887
2013-03-12 15:21:14 +01:00
Rui Matos
4b09dd843f region: Prevent window from getting too tall with many input sources
https://bugzilla.gnome.org/show_bug.cgi?id=695443
2013-03-12 15:21:12 +01:00
Bastien Nocera
de1b612cc0 region: Fix crash when changing the language
1. Load region panel
2. Change language
3. Go back to overview
4. Load region panel
5. Change language
6. Crash

As the ActUser and ActUserManager object aren't reference counted,
we need to disconnect the signals ourselves when exiting the panel
otherwise we'll receive the signals from the old signal connection,
which will use the old panel object.
2013-02-20 14:53:41 +01:00
Rui Matos
80e7738210 region: Dim the icons on IBus input source rows 2013-02-19 12:25:56 +01:00
Rui Matos
2b07d810aa region: New 'Add Input Source' dialog design 2013-02-19 12:25:55 +01:00