[Xfce4-commits] [xfce/xfce4-power-manager] 01/01: Use the newer up_client_get_devices2
noreply at xfce.org
noreply at xfce.org
Fri Apr 19 03:25:54 CEST 2019
This is an automated email from the git hooks/post-receive script.
a n d r e p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository xfce/xfce4-power-manager.
commit e79c7128fbc6fe3bf29bd194e8ea1175667af33d
Author: Andre Miranda <andreldm at xfce.org>
Date: Thu Apr 18 22:25:44 2019 -0300
Use the newer up_client_get_devices2
---
panel-plugins/power-manager-plugin/power-manager-button.c | 4 ++++
settings/xfpm-settings.c | 6 +++++-
src/xfpm-power.c | 6 +++++-
3 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/panel-plugins/power-manager-plugin/power-manager-button.c b/panel-plugins/power-manager-plugin/power-manager-button.c
index a197afc..35e5ed0 100644
--- a/panel-plugins/power-manager-plugin/power-manager-button.c
+++ b/panel-plugins/power-manager-plugin/power-manager-button.c
@@ -670,7 +670,11 @@ power_manager_button_add_all_devices (PowerManagerButton *button)
button->priv->display_device = up_client_get_display_device (button->priv->upower);
power_manager_button_add_device (button->priv->display_device, button);
+#if UP_CHECK_VERSION(0, 99, 8)
+ array = up_client_get_devices2 (button->priv->upower);
+#else
array = up_client_get_devices (button->priv->upower);
+#endif
if (array)
{
diff --git a/settings/xfpm-settings.c b/settings/xfpm-settings.c
index 26dbfc1..6c8479e 100644
--- a/settings/xfpm-settings.c
+++ b/settings/xfpm-settings.c
@@ -2248,7 +2248,11 @@ add_all_devices (void)
GPtrArray *array = NULL;
guint i;
- array = up_client_get_devices(upower);
+#if UP_CHECK_VERSION(0, 99, 8)
+ array = up_client_get_devices2 (upower);
+#else
+ array = up_client_get_devices (upower);
+#endif
if ( array )
{
diff --git a/src/xfpm-power.c b/src/xfpm-power.c
index 2aacd84..3cc2dcc 100644
--- a/src/xfpm-power.c
+++ b/src/xfpm-power.c
@@ -922,7 +922,11 @@ xfpm_power_get_power_devices (XfpmPower *power)
GPtrArray *array = NULL;
guint i;
- array = up_client_get_devices(power->priv->upower);
+#if UP_CHECK_VERSION(0, 99, 8)
+ array = up_client_get_devices2 (power->priv->upower);
+#else
+ array = up_client_get_devices (power->priv->upower);
+#endif
if ( array )
{
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list