[Xfce4-commits] [xfce/xfce4-power-manager] 01/01: Unconditional Upower0.99 symbols is evil

noreply at xfce.org noreply at xfce.org
Tue May 27 07:03:01 CEST 2014


This is an automated email from the git hooks/post-receive script.

eric pushed a commit to branch master
in repository xfce/xfce4-power-manager.

commit b8bd237b2dabb86b8609b470dfa61dbbad36a24b
Author: Eric Koegel <eric.koegel at gmail.com>
Date:   Tue May 27 08:00:14 2014 +0300

    Unconditional Upower0.99 symbols is evil
---
 common/xfpm-power-common.c |    4 +++-
 settings/xfpm-settings.c   |    2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/common/xfpm-power-common.c b/common/xfpm-power-common.c
index c99be8a..5b4f152 100644
--- a/common/xfpm-power-common.c
+++ b/common/xfpm-power-common.c
@@ -297,7 +297,7 @@ get_device_icon_name (UpClient *upower, UpDevice *device)
 gchar*
 get_device_description (UpClient *upower, UpDevice *device)
 {
-    UpDevice *display_device;
+    UpDevice *display_device = NULL;
     gchar *tip = NULL;
     gchar *est_time_str = NULL;
     guint type = 0, state = 0;
@@ -319,7 +319,9 @@ get_device_description (UpClient *upower, UpDevice *device)
                   "online", &online,
                    NULL);
 
+#if UP_CHECK_VERSION(0, 99, 0)
     display_device = up_client_get_display_device (upower);
+#endif
 
     if (device == display_device)
     {
diff --git a/settings/xfpm-settings.c b/settings/xfpm-settings.c
index a625747..9f3586f 100644
--- a/settings/xfpm-settings.c
+++ b/settings/xfpm-settings.c
@@ -1800,7 +1800,7 @@ update_device_details (UpDevice *device)
     /* Attempt to redisplay the current page (or display the first item
      * on startup.
      */
-    if (current_page - 1 == page_index || current_page == -1)
+    if (current_page - 1 == page_index)
     {
         DBG("current page == page index");
         gtk_notebook_set_current_page (GTK_NOTEBOOK (device_details_notebook), page_index);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list