~ubuntu-branches/ubuntu/utopic/xfce4-power-manager/utopic-proposed

« back to all changes in this revision

Viewing changes to debian/patches/07_fix_broken_empty_icon_battery.patch

  • Committer: Package Import Robot
  • Author(s): Lionel Le Folgoc
  • Date: 2012-04-03 22:15:05 UTC
  • mfrom: (2.3.8)
  • Revision ID: package-import@ubuntu.com-20120403221505-2dvza7w2d97zb7qn
Tags: 1.0.11-0ubuntu1
* New upstream bugfix release.
* debian/patches:
  - 0001-Solaris-specific-code-for-determining-the-start-time.patch,
    02_fix-notify-detect.patch,
    07_fix_broken_empty_icon_battery.patch: dropped, included upstream.
  - xubuntu_fix-status-icon-other-devices.patch: refreshed to apply cleanly.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Origin: commit:643962eb2d46d48042db0ab278c46813da8b6e9b
2
 
From: Ali Abdallah <aliov@xfce.org>
3
 
Subject: Fix Broken empty battery icon..
4
 
 
5
 
---
6
 
Index: xfce4-power-manager/src/xfpm-battery.c
7
 
===================================================================
8
 
--- xfce4-power-manager/src/xfpm-battery.c      2012-02-25 16:32:49.000000000 +0100
9
 
+++ xfce4-power-manager/src/xfpm-battery.c      2012-02-25 16:35:54.000000000 +0100
10
 
@@ -309,10 +309,14 @@
11
 
                        battery->priv->icon_prefix, 
12
 
                        xfpm_battery_get_icon_index (battery->priv->type, battery->priv->percentage));
13
 
        }
14
 
+       else if ( battery->priv->state == XFPM_DEVICE_STATE_EMPTY)
15
 
+       {
16
 
+           g_snprintf (icon_name, 128, "%s%s", battery->priv->icon_prefix, battery->priv->ac_online ? "000-charging" : "000");
17
 
+       }
18
 
     }
19
 
     else
20
 
     {
21
 
-       if ( !battery->priv->present )
22
 
+       if ( !battery->priv->present || battery->priv->state == XFPM_DEVICE_STATE_EMPTY )
23
 
        {
24
 
            g_snprintf (icon_name, 128, "%s000", battery->priv->icon_prefix);
25
 
        }