Commit graph

18140 commits

Author SHA1 Message Date
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
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
Kristjan SCHMIDT
98174c511e Update Esperanto translation 2018-10-07 09:50:13 +00:00
Debarshi Ray
5579314a38 online-accounts: Track the lifecycle of CcGoaPanel across async calls
Due to an API bug in GNOME Online Accounts, the asynchronous
goa_provider_get_all method doesn't accept a GCancellable argument.
This makes it difficult to cancel an ongoing call when the CcGoaPanel
gets destroyed.

Prior to commit c26f8ae018, this was hacked around by taking a
reference on the panel for the duration of the call. Instead of
cancelling a pending call on destruction, it would keep the panel alive
until the call was over. However, that was lost during commit
c26f8ae018.

One thing to bear in mind is that GtkWidgets, CcGoaPanel is one, can
be destroyed by a gtk_widget_destroy call, which is subtly different
than a simple sequence of g_object_unref calls. When gtk_widget_destroy
is used, it invokes the GObject::dispose virtual method of the widget.
It is expected this will cause anything holding a reference to this
widget to drop their references, leading to GObject::finalize being
called. However, there is no guarantee that this will happen in the
same iteration of the GMainLoop. Therefore, it is possible that when
the goa_provider_get_all call finishes, the CcGoaPanel might be in a
disposed, but not yet finalized state.

When a GObject is in a disposed-but-not-finalized state, only a very
limited number of operations can be performed on it. Its reference
count can be altered, the memory used by the instance struct can be
accessed, but none of the member GObjects can be assumed to be valid.
eg., it's definitely illegal to add new rows to the member GtkListBox.
Hence a boolean flag is used to mark the destroyed state of the panel.

This second part is a small improvement over the earlier hack.

https://gitlab.gnome.org/GNOME/gnome-control-center/issues/208
2018-10-05 11:20:37 +02:00
Georges Basile Stavracas Neto
e7ee09dc2c
project: Add Benjamin as the maintainer of Display
He stepped up to it, and is being a responsive contributor to
it, so let's make this position official.
2018-10-04 11:12:02 -03:00
Benjamin Berg
22a512f032 display: Correctly add minor axis to snapping
There was an issue where the "minor" axis snapping would not be done if
the "major" axis snapping had a zero distance. This could be seen when e.g.
moving a monitor on the right up/down slightly. In that case, no
snapping to align the bottom/top edges were done unless you also moved
the mouse sideways a bit.

Fixes #211
2018-10-04 04:58:22 +00:00
Marek Cernocky
fda145035b Updated Czech translation 2018-10-01 17:24:16 +02:00
Марко Костић
1a74dada4f Update Serbian translation
(cherry picked from commit 33e47bf1c6)
2018-09-29 12:01:27 +00:00
Georges Basile Stavracas Neto
94f00aecf9 object-cache: Fix function documentation name 2018-09-25 21:02:11 -03:00
Georges Basile Stavracas Neto
2987b7bf5e object-cache: Add more debug messages
Enough to ask users to run Settings with "G_MESSAGES_DEBUG=all"
and get some meaningful output.
2018-09-25 21:01:14 -03:00
Georges Basile Stavracas Neto
3668140dd3 object-cache: Assert task_data before using it
It is not useful to assert that task_data != NULL after
using it to build the D-Bus key.

Move the assertion to before it is first used and get
rid of this inconsistency.
2018-09-25 20:46:22 -03:00
Georges Basile Stavracas Neto
7f5b5d6060 object-cache: Declare singleton instance as static
Otherwise, it is visible for other compile units. This
is a theoretical problem though, there's nothing wrong
happening right now.
2018-09-25 20:45:12 -03:00
Andrea Azzarone
d7857c113a object-storage: Check for cancellation before resulting in assert failure
As per doumentation: "It is a programming error to create an identical proxy
while asynchronously creating one. Not cancelling this operation will result in
an assertion failure when calling cc_object_storage_create_dbus_proxy_finish()."
In order to fullfill the second part we need to check for errors (including
cancellation ones) before we generate an assertion failure.

Fixes: https://gitlab.gnome.org/GNOME/gnome-control-center/issues/158
2018-09-25 17:12:18 +02:00
Benjamin Berg
75556d7c5a power: Handle cancelled kbd brightness proxy creation
The code must not access the passed panel if the operation to create the
keyboard proxy has been cancelled. This fixes a possible crash when
switching away from the power panel.
2018-09-25 02:46:54 +00:00
Adrien Plazas
30e58787b2 bluetooth: Allow the Bluetooth panel to reach narrower sizes 2018-09-24 10:05:36 +02:00