Commit graph

17967 commits

Author SHA1 Message Date
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
Benjamin Berg
2bd03bbb6d sharing: Bind hostname_entry from UI
The entry was not bound. Due to this we could run into a segfault trying
to query the hostname_entry. This would only happen if avahi is not
running.

Fixes #178
2018-09-21 16:59:25 +00:00
Emin Tufan Çetin
a41ce635f7 Update Turkish translation 2018-09-21 16:23:16 +00: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
RyuzakiKK
ec57ffcdd5 flatpak: disable mobile-broadband-provider-info
Without this flag at false network-manager-applet requires the
mobile-broadband-provider-info dependency that is not listed in this
flatpak
2018-09-19 14:11:11 +00:00
RyuzakiKK
c84246f42c flatpak: bump NetworkManager to version 1.14.0
The build option `-ltinfo` is required, otherwise a few errors related
to libreadline.so will be thrown like:

libreadline.so: undefined reference to `tputs'
libreadline.so: undefined reference to `tgoto'
libreadline.so: undefined reference to `tgetflag'
2018-09-19 14:11:11 +00:00
RyuzakiKK
5912de10e4 flatpak: add meson build system to gnome-desktop 2018-09-19 14:11:11 +00: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
Christian Stadelmann
35e869b821 Update German translation 2018-09-18 09:42:15 +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
Matej Urbančič
8798f8281c Updated Slovenian translation 2018-09-17 21:14:21 +02: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
Matej Urbančič
c874eac8b3 Updated Slovenian translation 2018-09-17 18:30:20 +02:00
Robert Ancell
3ed16310a1 printers: Fix printer delete signal passing an extra argument.
The extra argument doesn't seem to be used, but is confusing.
2018-09-17 16:07:48 +00:00
Robert Ancell
877445cbaf printers: Use g_autoptr for GError handling 2018-09-17 15:19:21 +00: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
Kalev Lember
edc52c170d color: Fix fallout from the GtkTemplate port
Correct a typoed variable name so that calibration works again, instead
of crashing.

GLib-GObject-WARNING **: 15:52:50.561: invalid cast from 'GtkBox' to 'GtkEntry'
2018-09-15 17:30:44 +02:00
Marek Cernocky
71b4d679b3 Updated Czech translation 2018-09-15 09:38:29 +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
Adrien Plazas
6ae351ff46 flatpak: Add mozjs52
It is required by polkit.
2018-09-14 15:38:47 +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
Sam Hewitt
e6efc207e6 project: update desktop.in to reference new icon name 2018-09-12 21:30:52 +00:00
Sam Hewitt
9673a0d035 icon: update icon assets for Initiative: https://gitlab.gnome.org/GNOME/Initiatives/issues/2 2018-09-12 21:30:52 +00:00