Commit graph

442 commits

Author SHA1 Message Date
Ian Douglas Scott
561a6b93dc region: Use popover for input source rows 2020-09-15 21:28:25 +00:00
Ian Douglas Scott
c3c5d724bd region: move input source ListBox code into it's own class 2020-09-14 22:07:36 +00:00
Adrien Plazas
fd60c313df Stop using HANDY_USE_UNSTABLE_API
It isn't needed anymore since libhandy 0.90.0.
2020-08-18 02:51:04 +00:00
Ian Douglas Scott
d6ef1036ac region: update HdyLeaflet usage in CcFormatChooser
This resulted in a crash when trying to open the dialog. It seems this
was changed in libhandy 1.

Mentioned in https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/785#note_878171
2020-08-07 02:30:55 +00:00
Adrien Plazas
a0dfbb7aac region: Use HdyLeaflet:folded
Replace the dropped fold enum property by the folded boolean one.
2020-07-20 08:05:54 +02:00
Adrien Plazas
f06379e30c Replace HdyColumn by HdyClamp
In libhandy 1, HdyClamp replaces HdyColumn. This stops setting values
when they match HdyClamp's defaults.
2020-07-20 08:04:28 +02:00
Adrien Plazas
9e2a2836d9 Use GtkDialog instead of HdyDialog
HdyDialog has been dropped in libhandy 1.
2020-07-20 08:04:28 +02:00
Robert Ancell
93b14a4339 panel: Move shared GCancellable code into panel class
Make the panel class provide a cancellable that will be cancelled when the panel
is destroyed. Panel implementations can use this and not have to mangage the
cancellable themselves. Consolidate cases where panels had multiple cancellables
that were all being used for this behaviour.
2020-02-03 09:36:24 +13:00
Mohammed Sadiq
eb4fe4fc42 region: Implement new design for ‘Formats’ dialog
https://gitlab.gnome.org/GNOME/gnome-control-center/issues/635
2020-01-07 14:53:23 +13:00
Georges Basile Stavracas Neto
64756d6b08 region, universal-access: Move to the Details section
They need to have their desktop files updated too.
2020-01-06 15:15:30 +00:00
Robert Ancell
d2ddaa99ea region: Replace ifdefs with #pragma once 2019-11-27 21:56:10 +00:00
Benjamin Berg
7631faa88f region: Explicitly update LC_* even when matching LANG
localed will not update the LC_* variables if they are not given. This
means that should the user switch the formats away from LANG and then
back, they will not be reset appropriately.

Simply always setting the variables even if the match will fix this.
2019-10-17 00:32:34 +00:00
Philip Chimento
412472c16d region: Fix crash in keyboard layout population
The previous code would crash if 'variants' was null and 'layouts' had
more than one element in it.
2019-09-12 18:10:20 +00:00
Mohammed Sadiq
12e1565129 region-panel: Reduce the width of popover
So that it fits into 360px.  UI wise, the margin at end is almost
always larger than start (due to text wraping).  So reducing end
margin may also let the popover content feel more center aligned.
2019-07-26 01:32:10 +00:00
Allan Day
eb8263454f region: Use correct icon for the drag handle
There's a dedicated icon for drag handles - we should make use of
it. Also, change the color of the handle so it looks like it is
part of the row.

Fixes #590
2019-07-16 22:34:26 +00:00
Michael Catanzaro
a22da99aaf Replace unsafe setlocale() use with uselocale()
setlocale() is not threadsafe except when used only to query the locale
without changing it. Let's use uselocale() instead, which changes the
locale only on the calling thread. Much better.
2019-07-03 17:15:33 -05:00
Georges Basile Stavracas Neto
75f150d5a2 shell: Add position to cc_shell_embed_widget_in_header()
So we can control where the widget should be added to. The
main window only supports left and right positions.

https://gitlab.gnome.org/GNOME/gnome-control-center/issues/528
2019-05-21 12:59:36 -03:00
Robert Ancell
d34bbda386 region: Fix input source options not being applied.
This was broken in a86cf1eca2 (3.32) when the input options dialog was converted
into a GtkPopover. Previously two GSettings objects were used, with one set to
'delay-apply' mode. The input source option didn't apply the changes.

The 'delay-apply' mode is from the original commit d3852fc831, however code was
simplified in b3199dd to only set one setting. This meant that the delay is no
longer necessary.

Fixes #440
2019-04-09 14:14:31 +12:00
Adrien Plazas
b181fccc8b region: Slide the restart revealer up
This direction is more natural given the layout.
2019-02-19 13:38:13 +00:00
Adrien Plazas
f02255090d region: Make the rows adaptive
Align the sizing of the rows on the one of HdyActionRow and ellipsize
the labels to make the panel better fit in narrow windows.
2019-02-19 13:38:13 +00:00
Adrien Plazas
e75cf5b643 region: Make CcInputRow adaptive
Align the sizing of the CcInputRow on the one of HdyActionRow and
ellipsize its labels to make it better fit narrow windows.
2019-02-19 13:38:13 +00:00
Adrien Plazas
8cb75c45a3 region: Stabilize the size of the Input Sources button
This avoids the button's size to jump as its surrounding box's size
changes because of the description label taking more or less lines.
2019-02-19 13:38:13 +00:00
Adrien Plazas
fa76b5e7e8 region: Wrap the Input Sources description
This allows the panel to reach smaller sizes.
2019-02-19 13:38:13 +00:00
Adrien Plazas
71b049951a region: Adapt the indentation
This adapts the indentation of the children of HdyColumn, which were
deliberately left intact in the previous commit to make it more
readable.
2019-02-19 13:38:13 +00:00
Adrien Plazas
23e85b6c8b region: Use a HdyColumn and a GtkScrolledWindow
Put the widget's content into a HdyColumn, itself into a
GtkScrolledWindow. This allows the panel to reach narrower sizes.

This deliberately doesn't adapt the indentation of the contained widget
to help this commit to be more readable and easier to review, it will be
adapted in the next commit.
2019-02-19 13:38:13 +00:00
Robert Ancell
03f516174d region: Stop input list being scrollable
The new add row should always be visibile and this list is not likely
to contain many rows. The panel is scrollable so this handles this edge case.
2019-02-04 13:56:41 +00:00
Robert Ancell
18007a17c1 region: Make rows reorderable with drag and drop
Drop toolbar - all functionality is now in rows.

This matches the new designs in
https://gitlab.gnome.org/Teams/Design/settings-mockups/blob/master/region-and-language/region-and-language.png
2019-02-04 13:56:41 +00:00
Robert Ancell
4d5626d066 region: Convert add input button to a row
This matches the new designs in
https://gitlab.gnome.org/Teams/Design/settings-mockups/blob/master/region-and-language/region-and-language.png
2019-02-04 13:56:41 +00:00
Robert Ancell
a193417b32 region: Reduce size of input rows
This matches the new designs in
https://gitlab.gnome.org/Teams/Design/settings-mockups/blob/master/region-and-language/region-and-language.png
2019-02-04 13:56:41 +00:00
Robert Ancell
0a70d5ab34 region: Move input settings button inside each row
This matches the new designs in
https://gitlab.gnome.org/Teams/Design/settings-mockups/blob/master/region-and-language/region-and-language.png
2019-02-04 13:56:41 +00:00
Robert Ancell
7a9d2b83df region: Move show layout button inside each row
This matches the new designs in
https://gitlab.gnome.org/Teams/Design/settings-mockups/blob/master/region-and-language/region-and-language.png
2019-02-04 13:56:41 +00:00
Robert Ancell
d4683a9ddd region: Move remove button inside each row
This matches the new designs in
https://gitlab.gnome.org/Teams/Design/settings-mockups/blob/master/region-and-language/region-and-language.png
2019-02-04 13:56:41 +00:00
Robert Ancell
9285c4392e region: Use CcInputRow type in RowData 2019-02-04 13:56:40 +00:00
Robert Ancell
fb27378c7e region: Use GTK+ widget types 2019-02-04 13:56:40 +00:00
Robert Ancell
f662c30a7d region: Use standard name for self object 2019-02-04 13:56:40 +00:00
Robert Ancell
2272ec29e3 region: Fix whitespace to be consistent with other files 2019-02-04 13:56:40 +00:00
Robert Ancell
e5c5b0452f region: Drop unnecessary whitespace 2019-02-04 13:56:40 +00:00
Robert Ancell
9d091692f8 region: Fix ... row not showing
Broken in 5368c1cb71
2018-11-12 20:33:05 +00:00
Robert Ancell
4f6e897b58 region: Use g_signal_connect_object for all signal handlers
This ensures they wont be called when the handling object is destroyed.
Also connect all in "swapped" form for improved readability.
2018-11-05 11:07:58 +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
b76baab697 region: Refactor input modification code to be async safe.
The previous code had a number of issues:
- It used a shared 'op' enum value for the operation - a second operation would
  overwrite this.
- It acted on the row selected at the time the operation was requested - this
  could have changed by the time the operation occurred.

Solved by passing all the required data though the async methods.
2018-10-11 22:30:38 +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
70fe645502 region: Tidy up GtkWidget variables
- Use correct types for each widget
- Put variables together in alphabetical order in the class
- Drop unused IDs
- Rename .ui file to match .c file
2018-10-10 23:04:10 +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
Andrea Azzarone
88ca2fcdc4 region: Autodisconnect IBusBus "connected" handler
Use g_signal_connect_object to ensure handler is not run after object is
destroyed.

Fixes: GNOME/gnome-control-center#223
2018-10-08 13:09:10 +01:00
Robert Ancell
623a62a7f9 region: Add description label and use icon for options button
As per design:
https://wiki.gnome.org/Design/SystemSettings/RegionAndLanguage
2018-09-19 15:18:18 +00:00