- 16 May, 2022 1 commit
-
-
Benjamin Berg authored
-
- 10 May, 2022 1 commit
-
-
Benjamin Berg authored
This removes the priv member from the struct, but also means that g_autoptr works with the class.
-
- 09 May, 2022 3 commits
-
-
Benjamin Berg authored
Add last-refresh and poll-timeout properties. Update the last-refresh property automatically from the internal refresh method. Note that it is fine if we miss (some) updates for now, as the polling code which uses the property will update it.
-
Benjamin Berg authored
-
Benjamin Berg authored
The reason of a refresh may be interesting to special case certain situation (e.g. discontinuity of charge after wakeup, polling again after an event). As such, add an enum parameter that signals the reason for the refresh.
-
- 20 Apr, 2022 2 commits
-
-
Benjamin Berg authored
There are only a few cases where we separate construction and coldplug. Porting to GInitable is relatively natural here and makes the code a little nicer overall. In the case that immediate coldplug/initialization is not desired, we can still split the operations.
-
Benjamin Berg authored
We can just assume that a device with a NULL native device is the display device. Using this, we can special case the naming and rely on the normal internal up_device_register_device function to register the display device.
-
- 19 Apr, 2022 1 commit
-
-
Bastien Nocera authored
The Refresh D-Bus method could be used by clients to force re-reading the state of batteries in the upower backends. This is not needed as all the backends should be sending events when their states changes, removing the need for an explicit refresh. This is also a potential security problem if applications keep on refreshing their data. We now only allow access to the Refresh() method if the daemon was started in debugging mode. This should make it clearer that it is a debug tool. Also remove a mention of the never implemented refresh-power-source polkit authorisation.
-
- 01 Apr, 2022 2 commits
-
-
Benjamin Berg authored
Rather than this weird situation where they are immediately passed in through the "coldplug" method. Doing this is the first step to make UpDevice into an initable object (removing the "coldplug" method).
-
Benjamin Berg authored
Might as well use g_object_run_dispose to break the cycle to the display device.
-
- 21 Feb, 2022 1 commit
-
-
Bastien Nocera authored
As a follow-up to dc891bd5 Closes: #173
-
- 16 Feb, 2022 1 commit
-
-
Bastien Nocera authored
It was only used in one function. The value should be kept in the DisplayDevice instead, but we need to make sure that the UpDevice code never changes the warning-level, only the daemon does.
-
- 07 Sep, 2021 1 commit
-
-
Bastien Nocera authored
We always have a config.h now, and don't rely on autotools setting this cflags for us to know it.
-
- 30 Jun, 2021 2 commits
-
-
The code in up_device_notify() will still eventually be reached when the up_device_coldplug() implementations are called, and properties are set for the device type for the first time (rather than during instance construction).
-
Before, the low level for changing the battery icon was hardcoded. However, as the `low_percentage` property is settable by the user using `PercentageLow` option. That can lead to inconsistencies when PercentageLow is not the default. For example, if PercentageLow is set higher than 10, the Low Battery level warning will be sent at the user-set level, but the battery icon would not be updated to "caution" until the percentage drops below 10%. This issue is solved in this commit by using the `low_percentage` property for the comparison instead of hardcoding the default.
-
- 18 Jun, 2021 1 commit
-
-
Pablo Correa Gomez authored
-
- 21 Feb, 2019 2 commits
-
-
Christian Kellner authored
G_TYPE_INSTANCE_GET_PRIVATE has been deprecated since glib version 2.58 and should be replaced with the xxx_get_instance_private (obj) which is generated by G_ADD_PRIVATE.
-
Christian Kellner authored
Use G_DEFINE_TYPE_WITH_CODE (..., G_PRIVATE_ADD (...)) instead of the (deprecated since glib 2.58) function g_type_class_add_private to add a private structure for a type. Bump the minimal required version of glib to 2.38.0, the version where G_PRIVATE_ADD was added.
-
- 19 Apr, 2018 1 commit
-
-
Bastien Nocera authored
Rather than relying on the percentage equivalence, which just doesn't work for "Unknown" battery levels. https://bugs.freedesktop.org/show_bug.cgi?id=97484
-
- 31 Oct, 2017 1 commit
-
-
Bastien Nocera authored
Rather than using != NULL, followed by unref(). https://bugs.freedesktop.org/show_bug.cgi?id=103380
-
- 08 Sep, 2017 1 commit
-
-
GDBus doesn't like '@' in the object path, so escape it. https://bugs.freedesktop.org/show_bug.cgi?id=93095
-
- 06 Apr, 2017 1 commit
-
-
Bastien Nocera authored
Export approximate battery levels that devices can use, exported by the kernel as POWER_SUPPLY_CAPACITY_LEVEL_* values. This avoids bizarrely accurate values showing up in UIs when we only have ok/warning levels of accuracy in some cases. https://bugs.freedesktop.org/show_bug.cgi?id=100359
-
- 24 Mar, 2017 1 commit
-
-
Bastien Nocera authored
g_debug() already adds a linefeed.
-
- 29 Jul, 2015 4 commits
-
-
Just use the default marshaller.
-
Simplifies some state tracking.
-
Removes proxying of properties from one object to the other.
-
-
- 26 Nov, 2014 2 commits
-
-
This makes it easier to find real memory leaks with valgrind. After calling the up_backend_unplug functions, you cannot restart it with up_backend_coldplug since the lists are cleared. Tested with Linux only (not on *BSD; dummy compiles). https://bugs.freedesktop.org/show_bug.cgi?id=82659
-
dbus_g_method_return[_error] does not claim the passed parameters, the caller must free it theirselves. complex is filled with an GValueArray pointer (see UP_DBUS_STRUCT_DOUBLE_DOUBLE) but its contents are not freed (memleak!). This patch introduces a deprecation warning due to the use g_value_array_free, but since UP_DBUS_STRUCT_DOUBLE_DOUBLE is a GValueArray, this is unavoidable. https://bugs.freedesktop.org/show_bug.cgi?id=82659
-
- 18 Oct, 2013 3 commits
-
-
Bastien Nocera authored
Failure to refresh was supposed to be non-fatal, but since we started putting objects on the bus *after* refresh, we were skipping the registration if refresh failed, as is the case in the UPS test case.
-
Bastien Nocera authored
-
Bastien Nocera authored
-
- 17 Oct, 2013 2 commits
-
-
Bastien Nocera authored
When the device was removed, we forgot to cancel sending out changed properties, causing illegal memory accesses.
-
Bastien Nocera authored
Now that we send out PropertiesChanged signals (on the daemon side) and "notify" signals (on the client side), there's no need for the all encompassing DeviceChanged and Changed signals. They would have woken up any client, even if they were not interested in receiving the signals.
-
- 16 Oct, 2013 5 commits
-
-
Bastien Nocera authored
So we can update the display device warning level.
-
Bastien Nocera authored
The interface name was missing ".Device" at the end, so wasn't getting registered by clients.
-
Bastien Nocera authored
The IconName and WarningLevel properties were not sent out through PropertiesChanged when they changed for devices.
-
Bastien Nocera authored
And export a DisplayDevice object which can be used by desktop shells to show/hide the status icon.
-
Bastien Nocera authored
-
- 15 Oct, 2013 1 commit
-
-
Bastien Nocera authored
-