Closed raveit65 closed 4 years ago
question: UP_CHECK_VERSION
checks the upower
version?
if yes, I think it can be done more changes
I see at some points:
#if UP_CHECK_VERSION (0, 99, 0)
...
#if !UP_CHECK_VERSION(0, 99, 0)
...
Your right, i checked that debian supports upower-0.99.8 since a long time for all branches.
So we can bump upower requirement, or not?
In this case i will remove checks for older versions in code.
Or i add new checks #if UP_CHECK_VERSION (0, 99, 8)
for fixing the mem leaks (deprecations).
@mate-desktop/core-team
Thoughts?
+1 bump upower requirement, since the next major version of mate-power-manager will be released in a few months, and upower-0.99.8 was released in June 2018.
@raveit65
So we can bump upower requirement, or not?
yes
In this case i will remove checks for older versions in code.
+1
Ok, done, please review.
@willysr: does Slackware still have upower 0.9.23? This PR breaks support for it.
the old upower 0.9.23 was in debian in 2013, it is very old version
why slackware don't upgrade upower?
Anyway, MATE 1.22 is not supported on slackware 14.2 because requires newer GTK+3 library that isn't available on Slackware 14.2. https://mateslackbuilds.github.io
Last supported version by Slackware 14.2 is MATE 1.18 https://mateslackbuilds.github.io/support.html
@willysr: does Slackware still have upower 0.9.23? This PR breaks support for it.
Yes, it still uses 0.9.23, even on -current. Hopefully Pat is convinced to move on to newer upower for Slackware 15.0.
@willysr We are talking about MATE-1.24 which will be released in March 2020 probably. Do you want to push Mate-1.24 to current slackware release with upower-0.9.23 ?
I mailed Patrick about his plan for Slackware 15.0 regarding upower. I think we have a good chance of bumping upower since other project (XFCE) 4.14 also requires newer upower as well. Cinnamon is also working towards old upower deprecation as well.
i can always revert this patch if somehow next Slackware still uses the old upower.
Use up_client_get_devices2()
The previous code would have leaked all the UpDevice objects because no free function was set on the returned GPtrArray.
With depending on upower-glib 0.99.8 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.
Inspired from: https://gitlab.gnome.org/GNOME/gnome-control-center/commit/c1210c5 see upower upstream: https://gitlab.freedesktop.org/upower/upower/commit/cb1071b
Please review.