Commit graph

18106 commits

Author SHA1 Message Date
Robert Ancell
71eefdd8f6 user-accounts: Fix user carousel not showing
This bug was introduced in 02559b0f69
2018-10-24 04:57:35 +00:00
Robert Ancell
9c655bfba0 region: Create classes for input sources 2018-10-24 04:50:29 +00:00
Jonathan Kang
a0998bbb03 wifi: Disable periodic scan only when Wi-Fi is disabled
The periodic Wi-Fi scan is introduced in 84279c4a. It's designed to
scan the Wi-Fi list every 15 seconds and disable the scan when Wi-Fi is
disabled.

But currently the periodic check is disabled every time
wireless_enabled_toggled() is called, which is wrong. Because it can
mean Wi-Fi is enabled or disabled.

Fix that by disabling periodic scan only when Wi-Fi is disabled.

fixes 84279c4a
2018-10-24 04:38:53 +00:00
Matej Urbančič
5b5ec95397 Updated Slovenian translation 2018-10-23 16:36:31 +02:00
Robert Ancell
f9e088d49e user-accounts: Use g_signal_connect_object with UmUserManager
The UmUserManager object could last longer than the panel. Use
g_signal_connect_object to do this automatically. Remove manual old method.

Connect signals in swapped form.
2018-10-23 06:41:21 +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
c11890667b background: Fix warning when XDG_PICTURES_DIR not defined
Make the code match the existing monitor to fall back to the home directory.

The error message was:
(gnome-control-center:22910): GLib-GIO-CRITICAL **: 16:42:17.915: g_file_new_for_path: assertion 'path != NULL' failed
2018-10-18 01:31:27 +00:00
Robert Ancell
74b54f6336 sound: Don't use gtk_widget_show_all
It is removed in GTK+ 4
2018-10-18 01:18:57 +00:00
Robert Ancell
c058f15d10 sharing: Don't use gtk_widget_show_all
It is removed in GTK+ 4
2018-10-18 01:18:57 +00:00
Robert Ancell
02559b0f69 user-accounts: Don't use gtk_widget_show_all
It is removed in GTK+ 4
2018-10-18 01:18:57 +00:00
Robert Ancell
39e0396fd6 online-accounts: Don't use gtk_widget_show_all
It is removed in GTK+ 4
2018-10-18 01:18:57 +00:00
Robert Ancell
417fc57392 datetime: 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-10-18 01:13:49 +00:00
Robert Ancell
33c91ce738 privacy: Use GtkTemplate
Switch from GtkBuilder to using GtkTemplate.
Rename widget IDs to be more readable.
Drop widget IDs that are not used.
Move code into the .ui file that can be.
2018-10-18 01:01:07 +00:00
Robert Ancell
c0f41daff0 shell: Remove the lock button from the shell
Only the date time panel used it, all other panels add their own shell using
cc_shell_embed_widget_in_header which was added after the date time panel was
written. Update the date time panel to use this method.
2018-10-18 00:25:40 +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
58d5c9411d shell: Remove AppMenu
https://wiki.gnome.org/Initiatives/GnomeGoals/AppMenuRetirement
2018-10-17 22:14:27 +00:00
Daniel Drake
79dc78b819 display: Hide unsupported resolutions again
Previously, low resolutions were hidden from the control center
because when such display modes are activated, GNOME is unusable;
many important UI elements do not fit on the screen at all.
https://bugzilla.gnome.org/show_bug.cgi?id=626822

This was removed in c0f686bb0f
without explanation; reinstate it here.

Also prevent the scaling from being selected or activated if the
effective scaled resolution would result in an equivalently low
resolution being used.
2018-10-17 22:08:03 +00:00
Benjamin Berg
f95ded101c display: Sync scale button state after update
We need to re-sync the scale button scale when updating the state
dynamically. Otherwise changing the resolution will always show a scale
of 100% (first item) rather than the actual active one.
2018-10-17 22:08:03 +00:00
Benjamin Berg
d534f67047 display: Do not show scale and refresh rate rows
The visibility is explicitly controlled in the functions that create the
rows in question. This regression was introduced in commit 3d177b67
(display: Don't use gtk_widget_show_all).
2018-10-17 22:08:03 +00:00
Robert Ancell
04b0b68be4 display: Fix compile warnings using g_clear_pointer 2018-10-17 09:19:37 +13:00
Robert Ancell
9fa1e73da8 notifications: Use GtkTemplate
Switch from GtkBuilder to using GtkTemplate.
Rename widget IDs to be more readable.
Drop widget IDs that are not used.
Move code into the .ui file that can be.
Connect signals in swapped form.
2018-10-15 20:42:45 +00:00
Robert Ancell
044eeb0d06 display: Stop night light dialog being destroyed twice
The night light dialog is both marked as "destroy_with_parent" and explicitly
destroyed in the panel. Drop one of these.

Causes the warning after opening the dialog then closing the app:
(gnome-control-center:19887): Gtk-CRITICAL **: 11:00:01.370: gtk_widget_destroy: assertion 'GTK_IS_WIDGET (widget)' failed

This bug was introduced in ed36688c58
2018-10-14 22:51:22 +00:00
Marek Cernocky
7b12c0028f Updated Czech translation 2018-10-12 09:13:27 +02: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
3d177b6769 display: Don't use gtk_widget_show_all
It is removed in GTK+ 4
2018-10-11 22:21:34 +00:00
Robert Ancell
f3e642da56 shell: Drop unused no-show-all properties 2018-10-11 22:21:34 +00:00
Robert Ancell
6e3adb6568 search: Don't use gtk_widget_show_all
It is removed in GTK+ 4
2018-10-11 22:21:34 +00:00
Robert Ancell
2a6c151483 notifications: Don't use gtk_widget_show_all
It is removed in GTK+ 4
2018-10-11 22:21:34 +00:00
Robert Ancell
bb7e0e71e1 privacy: Don't use gtk_widget_show_all
It is removed in GTK+ 4
2018-10-11 22:21:34 +00: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
24d495d0f5 universal-access: Don't use gtk_widget_show_all
It is removed in GTK+ 4
2018-10-11 22:21:34 +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
99220dad50 power: Don't use gtk_widget_show_all
It is removed in GTK+ 4
2018-10-11 22:21:34 +00:00
Robert Ancell
1b24d7ca5f mouse: Don't use gtk_widget_show_all
It is removed in GTK+ 4
2018-10-11 22:21:34 +00:00
Marek Cernocky
0a2b55d2f2 Added translation context for "1 hour" in Screen Lock dialog 2018-10-11 12:08:17 +02:00
Marek Cernocky
505b65429d Updated Czech translation 2018-10-11 10:23:21 +02:00
Robert Ancell
442a7b62bb Remove invalid tag in GtkBuilder file
This was introduced in commit fa08a3b
2018-10-11 16:09:14 +13:00
Jonathan Kang
4af9803f51 power: set no-show-all to TRUE on wifi and mobile rows
The Wi-Fi and mobile broadband row's visibility depends on related
device status. But calling gtk_widget_show_all on the whole list box
makes them visible even related device is not avialbe. Fix that by
setting no-show-all of these two widgets as TRUE.

https://gitlab.gnome.org/GNOME/gnome-control-center/issues/189
2018-10-11 02:07:51 +00:00
Corentin Noël
a6acc98371 common: fix some wrong autofree uses
g_autofree an array only g_free the first element, GStrv is the string array type.
2018-10-11 14:50:38 +13: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
9da8e1b68d background: Fix warning when opening background selection dialog
This was due to the callback occurring before all the widgets had been added to
the dialog.

Also remove the workaround for the handler occuring during/after dispose by
using g_signal_connect_object.

The warnings were:
(gnome-control-center:13048): Gtk-CRITICAL **: 09:42:17.841: gtk_bin_get_child: assertion 'GTK_IS_BIN (bin)' failed
(gnome-control-center:13048): Gtk-CRITICAL **: 09:42:17.841: gtk_icon_view_unselect_all: assertion 'GTK_IS_ICON_VIEW (icon_view)' failed
2018-10-10 22:57:43 +00:00
Marek Cernocky
fa08a3bfe6 Added a translation context for the time options in Power and Privacy panels 2018-10-10 20:56:14 +00:00
Andrea Azzarone
f34ea2bd5e power: Use g_signal_connect_object
Objects created using the object storage API are not disposed when the panel
that created them is disposed. In order to prevent segfaults we need to manually
disconnect signal handler connected to these objects or we can do it
automatically using g_signal_connect_object.

Fixes: https://launchpad.net/bugs/1797205
2018-10-10 20:12:19 +01:00
Robert Ancell
6ce1a1dce6 datetime: Don't use gtk_widget_show_all
It is removed in GTK+ 4
2018-10-10 04:01:11 +00:00
Robert Ancell
d2d8a501cd background: Don't use gtk_widget_show_all
It is removed in GTK+ 4
2018-10-10 04:01:11 +00:00
Robert Ancell
256dccb7d6 bluetooth: Don't use gtk_widget_show_all
It is removed in GTK+ 4
2018-10-10 04:01:11 +00:00
Robert Ancell
bb4a9703e3 keyboard: Don't use gtk_widget_show_all
It is removed in GTK+ 4
2018-10-10 04:01:11 +00:00
Robert Ancell
ea1a4b0afc mouse: Don't use gtk_widget_show_all
It is removed in GTK+ 4
2018-10-10 04:01:11 +00:00
Robert Ancell
216736b8dd datetime: Fix warning running callback before objects are created
The following warning occurs when the datetime panel is created:
(gnome-control-center:3173): GLib-GIO-CRITICAL **: 09:18:38.531: g_settings_get_value: assertion 'G_IS_SETTINGS (settings)' failed

This is due to the callback being called before the settings object is created
2018-10-09 20:30:16 +00:00