Commit graph

207 commits

Author SHA1 Message Date
Georges Basile Stavracas Neto
9fc0a4c2b1 common/language-chooser: Center More row icon
Otherwise it gets pushed to the start of the row.
2021-03-04 09:33:44 -03:00
Georges Basile Stavracas Neto
c223ba2554 common/language-chooser: Make "More" rows visible by default
The inner box of the More row is visible, but the row itself isn't.
Make the row visible too.

Fixes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1273
2021-03-04 09:33:40 -03:00
Georges Basile Stavracas Neto
af5d13e7b5 common: Rename 'check' to 'check_image'
The C code tries to fetch and use 'check_image', but the UI definition
calls it 'check', which throws a few warnings. Renaming it in the UI file
is easier than in the C file, so I went with the former.
2021-02-23 10:28:22 -03:00
Georges Basile Stavracas Neto
7167019522 common: Add missing <child> tag to CcLanguageChooser
The UI file is not wrapping the <object> tag with <child>, which
fails to parse and blanks the dialog.

Add the missing <child>  tag around the "More" row object.

Fixes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1270
2021-02-23 10:28:15 -03:00
Robert Ancell
e50de0def6 common: Use self variable name for CcLanguageChooser 2021-02-01 04:02:22 +00:00
Robert Ancell
d7c8ecee60 common: Move CcLanguageChooser signal handlers into GtkBuilder 2021-02-01 04:02:22 +00:00
Robert Ancell
c7d2b0945d common: Consolidate CcLanguageChooser functions 2021-02-01 04:02:22 +00:00
Robert Ancell
7b07b5d060 common: Use widget types for CcLanguageChooser 2021-02-01 04:02:22 +00:00
Robert Ancell
878f5191db common: Move CcLanguageChooser more row into GtkBuilder 2021-02-01 04:02:22 +00:00
Robert Ancell
35ef98806b common: Move CcLanguageChooser language placeholder widget into GtkBuilder 2021-02-01 04:02:22 +00:00
Robert Ancell
4fb52c8496 common: Split out CcLanguageRow from CcLanguageChooser 2021-02-01 04:02:22 +00:00
Robert Ancell
0d9bf5fa06 Fix PangoAttrList leak introduced in 63243d886a 2021-01-10 20:54:48 +00:00
Mohammed Sadiq
ca7002b0ae list-row: Add API to set sensitivity of switch 2021-01-08 02:54:15 +00:00
Mohammed Sadiq
08defd6ec5 list-row: Add 'bold' property
So that we can set if title is bold or not
2021-01-08 02:54:14 +00:00
Robert Ancell
f355234323 common: Remove unused CcListBox and CcListBoxRow 2020-12-14 11:36:45 +13:00
Philip Withnall
cef9a23e6a cc-permission-infobar: Support customisable titles
Some panels may want to provide more specific context than ‘Change
Settings’.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2020-12-11 17:19:11 +00:00
Gunnar Hjalmarsson
5aee280a29 common: Display locale @modifiers properly
Fixes GNOME/gnome-desktop#50
2020-09-21 13:13:10 +00:00
Carlos Garnacho
14da368600 common: Add GsdDevice API to tell whether 2 devices are grouped
This will be used for pad devices, better than the current way of
comparing name strings coming from libwacom.

https://gitlab.gnome.org/GNOME/gnome-control-center/issues/415
2020-09-04 21:46:19 +00:00
Adrien Plazas
9e2a2836d9 Use GtkDialog instead of HdyDialog
HdyDialog has been dropped in libhandy 1.
2020-07-20 08:04:28 +02:00
Mohammed Sadiq
7683a09ff7 datetime: Use the new time editor 2020-06-15 04:55:39 +00:00
Mohammed Sadiq
63243d886a Add time editor widget 2020-06-15 04:55:39 +00:00
Matthew Leeds
7b1bed5ab0 common: Improve how we print time periods
Print e.g. "2 minutes" instead of "2 minutes 0 seconds". Also, update
the path in Totem from which this was copied. The MR to make the same
change in Totem is here:
https://gitlab.gnome.org/GNOME/totem/merge_requests/134
2020-03-30 03:43:09 +00:00
Robert Ancell
f1b84e29ef common: Connect signals with g_signal_connect_object in swapped form 2020-03-30 16:18:50 +13:00
Georges Basile Stavracas Neto
c114828ec3 trivial: Replace g_memmove by memmove 2020-02-02 12:25:42 -03:00
Felipe Borges
5d2a884ac7 common: Introduce "CcPermissionInfobar" widget
The "CcPermissionInfobar" widget is a more descriptive way to
communicate that some Settings panel needs authentication in order
to perform certain actions.

This widget doesn't handle the permissions (as in GPermission)
itself. It needs to be binded to an existing instance of GPermission,
and it will react to the permission's state (show when the current
user is not authorized, and hide when the user is authorized).

This is part of a big set of changes that aim to set a consistent
authentication method accross Settings panels.

See #685, #556, and #771
2020-01-06 14:43:11 +00:00
Carlos Garnacho
62d69fb313 common: Fix again tracking of udev device removals
This got fixed in commit 008b1f68c8, and broken again the very same
way in commit 3600cb5a40. Go me.
2019-12-05 17:25:45 +01:00
Robert Ancell
1ea6941fb8 common: Replace ifdefs with #pragma once 2019-11-27 21:56:10 +00:00
Umang Jain
8f513989ef cc-language-dialog: Increase height to 475px
Increase height so that "view-more-symbolic" icon appears
by default when the language-dialog is displayed. This
improves UI-feedback for the user for browsing additional
language entries.
2019-11-21 03:54:28 +00:00
Georges Basile Stavracas Neto
255a1ab948 power: Move helper function to panels/common
It will be used by the Lock Screen panel in the future.
2019-11-07 14:19:23 +13:00
Robert Ancell
4376140183 common: Make the privileged group configurable (i.e. wheel vs sudo)
Fixes #559
2019-10-31 03:34:28 +00:00
Mohammed Sadiq
8950cd5ec2 common: Add cc-list-row 2019-10-29 09:48:08 +13:00
Mohammed Sadiq
23a7401467 language-chooser: Port to HdyDialog
so that it works well on small screens
2019-09-09 22:14:18 +00:00
Robert Ancell
1752cf3bb5 Make /etc/os-release support common
The existing code is used in multiple places with slightly different
implementations.
2019-09-09 21:42:10 +00:00
Carlos Garnacho
f57a117cc1 common: Update to gdk/x11 API
We use gdk_error_trap*() in this little piece of remaining x11
code. Update to gdk_x11_display_error_trap*() found more recent
gtk.
2019-08-08 15:18:07 +00:00
Carlos Garnacho
7e6301d449 common: Remove unused X11/XI1/XI2 API
Those went unused over time. Time to clean those up.
2019-08-08 15:18:07 +00:00
Carlos Garnacho
3600cb5a40 common: Unite GsdDeviceManager
Drop the subtypes, and keep a single udev-based GsdDeviceManager,
which will work on both backends, and should work on all platforms
we care about (?).
2019-08-08 15:18:07 +00:00
Carlos Garnacho
9e5ccbd748 common: Drop update-from-gsd usage
Those files are no longer existent in gnome-settings-daemon, so
this module is free to do as it pleases with them, there doesn't
need to exist any synchronization anymore.
2019-08-08 15:18:07 +00:00
Robert Ancell
e85816f83b common: Fix crash in language chooser
A report in Red Hat bugzilla [1] shows for some reason the country is set to
NULL and this causes a crash when comparing against search terms. The solution
is to handle the NULL without crashing.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1685251
2019-03-26 22:02:32 +00:00
Benjamin Berg
42006249af Remove internal copy of HdyValueObject
The relevant code is included in libhandy 0.8 and can be removed now
that we depend on a new enough version.
2019-03-04 16:59:25 +00:00
Benjamin Berg
b789a1cda2 common: Add CcValueObject until HdyValueObject is available
libhandy now has HdyValueObject, this simply copies the class over as it
will only become available in libhandy 0.8.
2019-01-29 12:05:43 +01:00
Peter Hutterer
008b1f68c8 common: fix udev-based device removal
libgudev allocs a new GUdevDevice object for each event, so the pointer value
for the 'add' udev event differs from the one for the 'remove' event. If we
use the pointer value as hash table key, we'll never remove the device.
Switch to use the syspath of the device instead, that one is unique per
device.

Fixes #309
2018-12-11 10:56:28 +10:00
Robert Ancell
f649308f1f common: Fix ... row not showing in language chooser
Broken in 67a9f47464
2018-11-12 20:33:05 +00:00
Robert Ancell
700b857ab8 common: Fix language chooser showing all languages as checked
If the language chooser was created and a language not set all the
checks are shown beside each entry. Solved by hiding these checks
by default.

https://gitlab.gnome.org/GNOME/gnome-control-center/issues/250
2018-10-26 16:59:04 +13:00
Robert Ancell
67a9f47464 common: Don't use gtk_widget_show_all
It is removed in GTK+ 4
2018-10-11 22:21:34 +00:00
Robert Ancell
b2cd50019f common: Change language chooser layout to match design
Have the language name on the left and the country on the right dimmed as per:
https://wiki.gnome.org/Design/SystemSettings/RegionAndLanguage
2018-09-17 16:32:52 +00:00
Robert Ancell
a2401d8f9a common: Update language chooser dialog title and buttons to match design
Update to use "Select Language" and "Select" as per:
https://wiki.gnome.org/Design/SystemSettings/RegionAndLanguage
2018-09-14 15:18:42 +00:00
Robert Ancell
8af63dc40a common: Disable language chooser confirm button until a language is selected
Make the button insenstive until a language is chosen as per:
https://wiki.gnome.org/Design/SystemSettings/RegionAndLanguage
2018-08-27 18:33:52 +00:00
Robert Ancell
828024e225 common: Make language chooser dialog match design
Update the chooser to:

* Use a search bar at the top of the dialog, not the bottom
* Have a larger window
* Remove space from around listbox

https://wiki.gnome.org/Design/SystemSettings/RegionAndLanguage

Merges !129
2018-07-22 09:54:21 -03:00
Robert Ancell
148e4c8fd0 common: Use GtkTemplate for the language chooser dialog 2018-07-18 22:39:32 +00:00
Robert Ancell
65c43b4fac common: Fix missing reference
Was introduced in 86d1d30
2018-07-02 21:11:42 +00:00