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
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.
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
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>
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>
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).
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
01874f7 added this `gtk_widget_show (label)` call, which seems to be
erroneous. The previous `g_object_new()` call had `"visible", FALSE,`.
It should only be shown when searching panels. This fixes that,
restoring the older behavior.
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.
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. :)
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.
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.
`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.
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
It simplifies the code, and allows us to have some consistency
between projects (either inside and outside GNOME, mind you).
I took the liberty to rename and reword some of the options so
that they actually describe which ones are optional, and also
which ones are hard dependencies detected at build time.
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