Commit graph

415 commits

Author SHA1 Message Date
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
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
5d167f024f region: Simplify placeholder input row
Instead of adding/removing a row, create one in the .ui file and show/hide it.
2018-09-17 09:37:45 +02:00
Robert Ancell
a86cf1eca2 region: Use a GtkPopover instead of GtkDialog for input options
As per design:
https://wiki.gnome.org/Design/SystemSettings/RegionAndLanguage
2018-09-14 15:47:36 +00:00
Robert Ancell
66981da275 region: Make full widget for input rows
The row widgets are not full GtkWidgets. This means they are harder
to understand, use g_object_set_data which looses type safety and
cause the one .c file to be overly large.

Update this code to use a CcInputRow widget that uses GTK+ best
practice.
2018-09-11 10:40:27 +12:00
Robert Ancell
37d02369b7 region: Cancel async permission requests when panel is closed 2018-09-10 15:45:31 +00:00
Robert Ancell
d4340c4efc region: Fix language section not being marked insensitive
This is due to the widget not being extracted from region.ui and was introduced
in 5c418b8983.
2018-09-10 14:55:57 +00:00
Robert Ancell
0bdeb39319 region: Replace tab characters with spaces 2018-09-10 14:49:32 +00:00
Robert Ancell
b718a20713 region: Don't leak GFile objects
Creating the restart file leaked GFile objects. It also stored the path in the
object, which is unnecessary as it can just be generated on demand.

This leak has was introduced when the feature was in
db551f1c5d
2018-09-10 14:43:04 +00:00
Robert Ancell
f036b3a706 region: Remove duplicate cancellable code
There was a GCancellable used for IBus operations that was generated each time
an operation was done. The cancellable was only used to cancel such operations
when the panel is closed. We can just use the shared cancellable for this.
2018-09-10 15:51:53 +12:00
Robert Ancell
13b2de1c03 region: Remove placeholder text
Placeholder text was marked as translatable, but this is always replaced so
no need to set or translate it.
2018-08-28 09:51:58 +12:00
Georges Basile Stavracas Neto
fc29c0c5a8 Revert "region: Cache D-Bus proxy"
This reverts commit 10dfbb526e.
2018-08-27 12:56:20 +00: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
148e4c8fd0 common: Use GtkTemplate for the language chooser dialog 2018-07-18 22:39:32 +00:00
Robert Ancell
0f60dd1b71 region: Use GtkTemplate for format chooser dialog 2018-07-14 16:14:57 +00:00
Robert Ancell
556388f373 region: Fix small memory leak
Was introduced in 79e00c3
2018-07-02 21:52:03 +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
Robert Ancell
9a7850a7aa region: Move callbacks into .ui file 2018-06-03 00:41:58 +00: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
Georges Basile Stavracas Neto
d357f1de9e region: Remove unused variable 2018-05-30 17:42:07 -03:00
Robert Ancell
5c418b8983 region: Use GtkTemplate 2018-05-29 11:38:39 +12:00
Robert Ancell
8436a4fe29 region: Replace ifdefs with #pragma once 2018-05-29 11:27:04 +12:00
Robert Ancell
5be47a16a5 region: Replace GObject boilerplace with G_DECLARE_TYPE 2018-05-29 11:27:04 +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