The previous code would have leaked all the UpDevice objects because no
free function was set on the returned GPtrArray.
Since we already depend on upower-glib 0.99.8 which is the release in
which get_devices() was deprecated and get_devices2() was introduced, we
can simply switch to get_devices2() which does set a free function on
the returned GPtrArray, stopping the leak.
* Add another vertical size group handling only battery
rows.
* Add more vertical margins to the battery rows -- set
to 16px and 14px, respectivelly, the top and bottom
margins.
* Increase spacing between battery level and labels to
10px.
* Increase spacing between titles and subtitles to 4px.
Fixes https://gitlab.gnome.org/GNOME/gnome-control-center/issues/553
This factorizes the row creation a bit and normalizes the margins and
spacing, reducing the required width. This also makes labels like row
titles and descriptions ellipsizable so the rows can reach narrower
widths.
The pending-charge state means AC power is on but the battery is not
being charged. This can happen because its charge is above a certain
threshold, to avoid short charging cycles and prolong the battery's
life, or because the PSU is not powerful enough to charge the batteries.
Instead of lying to the user about something being estimated, we should
simply tell the truth and set the label to "Not Charging".
Closes: #249.
The code to lookup or insert items into the combobox had a few issues.
It would assume that the items are sorted, causing existing items to not
be found and be inserted instead. It also would simply forget to insert
an item if it was larger than all existing items.
This code is now changed to iterate over all items, finding the best
insertion point in the process (next item has a larger value, or the
values are not increasing anymore). The item will only be inserted if it
has not been found.
Fixes#261
gnome-settings-daemon emits notifications related to these four control
panels. If we add X-GNOME-UsesNotifications to their desktop files, the
user will be able to control the notifications.
https://wiki.gnome.org/Initiatives/GnomeGoals/NotificationSource
Signed-off-by: Philip Withnall <withnall@endlessm.com>
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
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
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.
The battery power level level bars are using the default offsets for low, high and full battery level, 0.25, 0.75 and 1.0.
Based on the suggestion from #68, this commit changes the high and full offset to 0.1 and 0.8, and the low battery level offset to 0.03 for primary batteries and UPSs, and 0.05 for other batteries and devices.
https://gitlab.gnome.org/GNOME/gnome-control-center/issues/68
Some of the current string related to saving power by
turning something off are ambiguous, and can mean both
"yes, turn off" or "yes, keep it on" at the same time.
This commit slightly rewords those sentences in order
to disambiguate them.
https://gitlab.gnome.org/GNOME/gnome-control-center/issues/53
[skip ci]
When a setting is set to a value that's not in the list of options, add
that custom value to the drop-down for the duration of the run, so as to
avoid the last item being selected and causing confusion.
https://bugzilla.gnome.org/show_bug.cgi?id=793448
Fix a use-after-free while creating the dbus proxy for
org.gnome.SettingsDaemon.Power.Keyboard. This fix is identical to the
previous fix for the screen proxy.
https://bugzilla.gnome.org/show_bug.cgi?id=794089
Another use-after-free on cancellation crash.
#0 g_type_check_instance_cast (type_instance=type_instance@entry=0x1eac3c0, iface_type=32150864) at /glib/gobject/gtype.c:4057
#1 0x0000000000494077 in got_screen_proxy_cb (source_object=<optimized out>, res=0x1eceab0, user_data=user_data@entry=0x1eac3c0)
at panels/power/cc-power-panel.c:1083
https://bugzilla.gnome.org/show_bug.cgi?id=789464
Show the "desktop" style dialogue ("Automatic suspend, when idle") even
when we have devices with batteries in use. We need "power supply"
batteries to consider the device as a laptop, or UPS-powered machine.
https://bugzilla.gnome.org/show_bug.cgi?id=793509
Recent versions of Gettext are able to translate several formats
that are used in GNOME applications. This patch migrates from
Intltool to Gettext by using meson's i18n features.
https://bugzilla.gnome.org/show_bug.cgi?id=787588
The bluetooh, network and wacom panels should not be optional
on linux, except on s390 systems which lack USB support. It
should also not be built at all on other systems.
This patch makes these panels mandatory on linux.
https://bugzilla.gnome.org/show_bug.cgi?id=792641
With the old shell gone, there is no need to work around cut off panel
names (bug #647087). As it stands now, it only confuses translators
(invisible characters are hard to, well, see).
https://bugzilla.gnome.org/show_bug.cgi?id=792629
Meson is a build system focused on speed an ease of use, which
helps speeding up the software development. This patch adds meson
support along autotools.
https://bugzilla.gnome.org/show_bug.cgi?id=785414
Ensure that the vertical spacing inside each panel is similar.
This makes the transition between each panel smoother and makes
the control center feel more cohesive.
Settings panels are given 32px above and below their content
and 32px vertical space between major sections. 12px space is
placed below headings.
Bluetooth, displays and printers are not addressed.
https://bugzilla.gnome.org/show_bug.cgi?id=786384