~ubuntu-branches/ubuntu/quantal/xfce4-power-manager/quantal-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): Julien Lavergne
  • Date: 2012-03-18 17:38:44 UTC
  • Revision ID: package-import@ubuntu.com-20120318173844-alounqmy70m3ed1c
Tags: 1.0.10-5ubuntu2
* debian/patches:
 - 07_fix_broken_empty_icon_battery.patch: From upstream, fix empty icons in
   the systray (LP: #846878)
 - 08_show_preferences_lxde.patch: Hide settings menu only on desktop
   environment which have another power manager.
 - 09_fix_insert_battery.patch: Another patch to fix empty icon when
   removing a battery. Thanks Henry Gebhardt for the patch.
 - 10_dim_brightness.patch: From upstream, only dim brightness if the current
   level is brighter. (LP: #900592)

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
        }