Commit graph

6254 commits

Author SHA1 Message Date
Robert Ancell
15717be456 network: Correctly detect when ethernet devices are hotplugged.
Fixes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/995
2020-11-19 23:32:16 +00:00
Robert Ancell
7fb336e17b printers: Make printers panel have a smaller minimum width.
Allow the ink-level to overlap with the buttons.
2020-11-19 23:24:31 +00:00
Robert Ancell
64a2e54ec6 network: Update design of the WiFi list.
https://gitlab.gnome.org/Teams/Design/settings-mockups/raw/master/wifi/wifi-list.png

Fixes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1185
2020-11-16 17:01:16 +13:00
Robert Ancell
3beaa9d158 network: Move signals handlers into .ui files 2020-11-11 20:13:46 +00:00
Robert Ancell
012e9cae25 universal-access: Use modern packing tags in CcZoomOptionsDialog 2020-11-11 20:01:55 +00:00
Robert Ancell
c13a276abd universal-access: Remove unused tags in CcZoomOptionsDialog .ui file 2020-11-11 20:01:55 +00:00
Robert Ancell
99d7097548 universal-access: Rename widgets to standard names and use standard types 2020-11-11 20:01:55 +00:00
Robert Ancell
4ac698eabd universal-access: Split pointing dialog into its own widget 2020-11-11 20:01:55 +00:00
Robert Ancell
0bd133489d universal-access: Split typing dialog into its own widget 2020-11-11 20:01:55 +00:00
Robert Ancell
2f4058d7e9 universal-access: Split cursor blinking dialog into its own widget 2020-11-11 20:01:55 +00:00
Robert Ancell
31102bd256 universal-access: Split repeat keys dialog into its own widget 2020-11-11 20:01:55 +00:00
Robert Ancell
9aaee503c9 universal-access: Split visual alerts dialog into its own widget 2020-11-11 20:01:55 +00:00
Robert Ancell
828a2bee45 universal-access: Split sound keys dialog into its own widget 2020-11-11 20:01:55 +00:00
Robert Ancell
9a6631a31d universal-access: Split screen reader dialog into its own widget 2020-11-11 20:01:55 +00:00
Robert Ancell
12a19878a6 universal-access: Split cursor size dialog into its own widget 2020-11-11 20:01:55 +00:00
Robert Ancell
accf1b82a0 universal-access: Launch zoom options dialog modally 2020-11-11 20:01:55 +00:00
Robert Ancell
a27be44a1d universal-access: Set dialog parent externally 2020-11-11 20:01:55 +00:00
Robert Ancell
88b9b2a149 universal-access: Rename ZoomOptions to standard CcZoomOptionsDialog 2020-11-11 20:01:54 +00:00
Robert Ancell
3e489cc650 universal-access: Simplify row activation code.
The existing code used three methods for working out how each row worked.
2020-11-11 20:01:54 +00:00
Robert Ancell
b259d5207b applications: Fix NULL hash table being unreffed.
When clicking away from the applications panel you can see:
(gnome-control-center:95304): GLib-CRITICAL **: 09:12:52.941: g_hash_table_unref: assertion 'hash_table != NULL' failed
2020-11-10 02:08:35 +00:00
Robert Ancell
06eb07bbd6 printers: Remove dead PPD dialog code 2020-11-10 14:47:20 +13:00
Robert Ancell
551d72280b network: Stop using deprecated nm_device_*_get_hw_address
There is a general nm_device_get_hw_address which has been available since
NetworkManager 0.9.10.
2020-11-08 22:41:40 +00:00
Robert Ancell
83925b3e41 network: Sort Wifi connections
Sort connected first, then configured, then by strength.

Fixes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/736
2020-11-08 20:06:42 +00:00
Robert Ancell
bc6400a8d7 network: Fix SAE password visibility toggle.
Was trying to toggle the wrong widget.
2020-11-05 12:36:38 +13:00
Robert Ancell
1306a73e8b notifications: Remove thread loading applications
Stop the app list being loaded in a thread. This is complicated and dangerous as
it accesses a hash table that can also be accessed from the main thread. The
operation is not expensive enough to warrant a thread, and similar code in the
application panel doesn't use one here.
2020-11-03 18:14:00 +00:00
Carlos Garnacho
27e1140c9d search: Check for either tracker 2.x or 3.x schemas
The Tracker3 schema points to the same dconf path and is backwards
compatible with Tracker 2.x settings. Check for either here, with a
preference to Tracker 3.x.

Eventually, Tracker 2.x will be fully phased out, and this will not
be necessary.

Fixes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1173
2020-11-02 21:47:22 +00:00
Philip Withnall
e522e5e732 wacom: Fix a critical warning if loading a cursor fails
It’s possible for `gdk_cursor_new_for_display()` to return `NULL`. It’s
OK to pass `NULL` to `gdk_window_set_cursor()`, but not OK to then unref
it.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2020-11-02 21:41:03 +00:00
Philip Withnall
243ff6a511 user-accounts: Fix a critical warning if loading a cursor fails
It’s possible for `gdk_cursor_new_for_display()` to return `NULL`. It’s
OK to pass `NULL` to `gdk_window_set_cursor()`, but not OK to then unref
it.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2020-11-02 21:41:03 +00:00
Robert Ancell
7bbbef5fde printers: Fix autoptr object not being initialized to NULL.
Won't cause a problem in this case but should be done for safety.

Introduced in ad226b420c
2020-11-02 09:25:04 +13:00
Robert Ancell
509beee6dc printers: Fix leak of printer name in callbacks.
printer_set_ppd_async and printer_set_ppd_file_async copy the printer name, but
this isn't freed in any cases that use these callback (the string isn't even
used at all).
2020-10-29 23:10:05 +00:00
Robert Ancell
ad226b420c printers: Use g_autoptr with GThread 2020-10-30 11:42:14 +13:00
Robert Ancell
902f90e5ea printers: Add methods for getting printer name and location
Remove the GObject properties that aren't type safe.
2020-10-29 20:36:48 +00:00
Jens Georg
598505e719 sharing: Also disable Tracker3
Fixes #1160
2020-10-29 20:31:17 +00:00
Benjamin Berg
43b444fba3 display: Try harder to select a good and working scale
When swicthing configurations, we should ensure that the selected scale
is valid. This is complicated by the fact that it depends on other
factors whether we need a single global scale or not.

Try to retain the scale that monitors have if possible. If that does not
work, try to use the old scale of the primary monitor everywhere. This
should result in a good behaviour in most situations.

Co-authored-by: Stéphane Travostino <steph@combo.cc>

Fixes: #1038
2020-10-29 20:27:29 +00:00
Marek Kasik
c18875c623 printers: Do not cleanup task after getting bus
Use g_steal_pointer() on task in get_bus_cb() in pp-printer.c
to not invalidate a pointer passed to a DBus call.
Cleanup the task in callback of the DBus call.
2020-10-29 20:19:01 +00:00
Bastien Nocera
f1bcaf1fbc power: Add "Power Mode" section
Use power-profiles-daemon[1] to implement switchable power profiles.
The performance profile will only be available on systems which provide
this functionality.

[1]: https://gitlab.freedesktop.org/hadess/power-profiles-daemon
2020-10-29 16:58:24 +01:00
Robert Ancell
2def271824 printers: Add pp_job_new and associated methods.
The previous code was leaking a string (job title), used an integer pointer
instead of an integer for an id and requited a lot of memory management for a
string array. There was a lot of boilerplate code required for property
management which was not being used much. This is why type safe methods are a
much better idea than GObject properties. :)
2020-10-27 13:03:56 +00:00
Philip Withnall
e8d9fc565b user-accounts: Pass --user argument to select user in malcontent-control
This eases the transition from g-c-c to malcontent-control a little.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Helps: https://gitlab.freedesktop.org/pwithnall/malcontent/-/issues/19
2020-10-20 12:50:48 +01:00
Robert Ancell
35790b5430 power: Replace g_object_new with gtk widget methods
This improves compile time type checking.
2020-10-19 04:07:53 +00:00
Robert Ancell
83d3724ff6 online-accounts: Replace g_object_new with gtk widget methods
This improves compile time type checking.
2020-10-19 04:07:53 +00:00
Robert Ancell
e09e53a8c2 keyboard: Replace g_object_new with gtk widget methods
This improves compile time type checking.
2020-10-19 04:07:53 +00:00
Robert Ancell
9418093900 background: Replace g_object_new with gtk widget methods
This improves compile time type checking.
2020-10-19 04:07:53 +00:00
Ian Douglas Scott
8b7eac0a7b keyboard: replace CcAltCharsKeyDialog with a generic XkbModifierDialog
Previously, there were multiple redundant lists of possible values for
this setting. This uses one struct to define not only all the possible
values, but also anything specific to the alternate characters key, so
this can be used for other modifiers.

This also changes the style of the dialog to use a GtkListBox.
2020-10-19 04:00:32 +00:00
Ian Douglas Scott
f40d4865fa power: Use CcBatteryRow for devices section as well
This had another slightly different version of the same code.
2020-10-14 22:56:16 +00:00
Ian Douglas Scott
dc9a3c993a power: Remove unused status code in add_device
It seems this was added in ee36b0df91, but the `status` variable has
been unused since a9683772d9 (committed in 2012).

Seems safe to remove if it's been unused since 2012.
2020-10-14 22:56:16 +00:00
Ian Douglas Scott
af8c3247b4 power: Remove get_battery_level()
This was added in 6c447dc14a to deal with
both older and newer UPower versions.

It should be safe now to assume a UPower version with this property.
2020-10-14 22:56:16 +00:00
Ian Douglas Scott
f297f544f1 power: Refactor battery row code into a CcBatteryRow type
`set_primary()` and `add_primary()` had a lot of redundant code. This
unifies them, and moves them to a custom widget called `CcBatteryRow`.
This also decreases the somewhat excessive size of `cc-power-panel.c`,
and makes it easier to see the layout of widgets, now that it's
specified in xml.

Before this, `warning-battery-offset` was set to `0.03` for a "primary"
battery, and `0.05` otherwise. I expect this is a bug, so I've changed
both to `0.03`.

No other style or behavior change is intended.
2020-10-14 22:56:16 +00:00
Benjamin Berg
64686cfee3 user-accounts: Consistently return translated strings for fprint helper
Always return translated strings from the fprint translation helper
header. This makes things more consistent overall.
2020-10-13 09:31:00 +00:00
Benjamin Berg
e80b4b5f58 user-accounts: Fix free of const string due to incorrect translations
A duplicatend and translated string could be passed to gettext another
time. If that string can be translated, then a static string would be
returned rather than the const one, causing an invalid free.

Fixes: #1149
2020-10-13 09:31:00 +00:00
Benjamin Berg
66c81d8128 display: Fix possible recursion when configuration type changes
The UI rebuilding code may change the configuration type, which in turn
can trigger a UI rebuild. This should not be done if we are already
updating the UI (but must be done otherwise, as that means the user has
chosen to change the configuration).

Fixes: #1141
2020-10-12 03:22:15 +00:00