[Xfce4-commits] [xfce/xfce4-power-manager] 02/04: Fix build error and make variables C89 compliant

noreply at xfce.org noreply at xfce.org
Mon Aug 18 16:53:47 CEST 2014


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

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

commit af3069e6ffe40ce0a6cb79fa7e2eec08c9c7a9a7
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date:   Mon Aug 18 00:41:43 2014 +0200

    Fix build error and make variables C89 compliant
---
 panel-plugins/battery/battery-button.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/panel-plugins/battery/battery-button.c b/panel-plugins/battery/battery-button.c
index b18b827..a556546 100644
--- a/panel-plugins/battery/battery-button.c
+++ b/panel-plugins/battery/battery-button.c
@@ -191,7 +191,7 @@ find_device_in_list (BatteryButton *button, const gchar *object_path)
 static gboolean
 battery_button_device_icon_expose (GtkWidget *img, GdkEventExpose *event, gpointer userdata)
 {
-    cairo_t *cr = gdk_cairo_create (img->window);
+    cairo_t *cr;
     UpDevice *device = UP_DEVICE(userdata);
     guint type = 0;
     gdouble percentage;
@@ -206,8 +206,9 @@ battery_button_device_icon_expose (GtkWidget *img, GdkEventExpose *event, gpoint
 
     /* Don't draw the progressbar for Battery and UPS */
     if (type == UP_DEVICE_KIND_BATTERY || type == UP_DEVICE_KIND_UPS)
-        return;
+        return FALSE;
 
+    cr = gdk_cairo_create (img->window);
     width = img->allocation.width;
     height = img->allocation.height;
 

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


More information about the Xfce4-commits mailing list