Merge lp:~gilir/ubuntu/precise/xfce4-power-manager/fix-lxde-lxpanel into lp:ubuntu/precise/xfce4-power-manager

Proposed by Julien Lavergne
Status: Merged
Merge reported by: Julien Lavergne
Merged at revision: not available
Proposed branch: lp:~gilir/ubuntu/precise/xfce4-power-manager/fix-lxde-lxpanel
Merge into: lp:ubuntu/precise/xfce4-power-manager
Diff against target: 128 lines (+98/-0)
5 files modified
debian/changelog (+12/-0)
debian/patches/07_fix_broken_empty_icon_battery.patch (+26/-0)
debian/patches/08_show_preferences_lxde.patch (+13/-0)
debian/patches/09_fix_insert_battery.patch (+44/-0)
debian/patches/series (+3/-0)
To merge this branch: bzr merge lp:~gilir/ubuntu/precise/xfce4-power-manager/fix-lxde-lxpanel
Reviewer Review Type Date Requested Status
Ubuntu branches Pending
Review via email: mp+98099@code.launchpad.net

Description of the change

07_fix_broken_empty_icon_battery.patch & 09_fix_insert_battery.patch are patches from git or bugtracker to fix empty icons on the systray, on non-xfce panel. Tested on Lubuntu without any problems.

08_show_preferences_lxde.patch is to show the power manager settings on the LXDE menus, since LXDE doesn't have any power manager, xfce4-power-manager is the one used on Lubuntu, and probably the only one suitable for LXDE.

To post a comment you must log in.
28. By Julien Lavergne

Add the patches.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2012-02-09 21:52:19 +0000
3+++ debian/changelog 2012-03-18 15:42:22 +0000
4@@ -1,3 +1,15 @@
5+xfce4-power-manager (1.0.10-5ubuntu2) UNRELEASED; urgency=low
6+
7+ * debian/patches:
8+ - 07_fix_broken_empty_icon_battery.patch: From upstream, fix empty icons in
9+ the systray (LP: #846878)
10+ - 08_show_preferences_lxde.patch: Hide settings menu only on desktop
11+ environment which have another power manager.
12+ - 09_fix_insert_battery.patch: Another patch to fix empty icon when
13+ removing a battery. Thanks Henry Gebhardt for the patch.
14+
15+ -- Julien Lavergne <gilir@ubuntu.com> Mon, 27 Feb 2012 01:27:57 +0100
16+
17 xfce4-power-manager (1.0.10-5ubuntu1) precise; urgency=low
18
19 * Merge from Debian unstable for the hardening changes (added patches
20
21=== added file 'debian/patches/07_fix_broken_empty_icon_battery.patch'
22--- debian/patches/07_fix_broken_empty_icon_battery.patch 1970-01-01 00:00:00 +0000
23+++ debian/patches/07_fix_broken_empty_icon_battery.patch 2012-03-18 15:42:22 +0000
24@@ -0,0 +1,26 @@
25+From 643962eb2d46d48042db0ab278c46813da8b6e9b Mon Sep 17 00:00:00 2001
26+From: Ali Abdallah <aliov@xfce.org>
27+Date: Mon, 27 Jun 2011 14:27:15 +0000
28+Subject: Fix Broken empty battery icon..
29+
30+---
31+Index: xfce4-power-manager/src/xfpm-battery.c
32+===================================================================
33+--- xfce4-power-manager/src/xfpm-battery.c 2012-02-25 16:32:49.000000000 +0100
34++++ xfce4-power-manager/src/xfpm-battery.c 2012-02-25 16:35:54.000000000 +0100
35+@@ -309,10 +309,14 @@
36+ battery->priv->icon_prefix,
37+ xfpm_battery_get_icon_index (battery->priv->type, battery->priv->percentage));
38+ }
39++ else if ( battery->priv->state == XFPM_DEVICE_STATE_EMPTY)
40++ {
41++ g_snprintf (icon_name, 128, "%s%s", battery->priv->icon_prefix, battery->priv->ac_online ? "000-charging" : "000");
42++ }
43+ }
44+ else
45+ {
46+- if ( !battery->priv->present )
47++ if ( !battery->priv->present || battery->priv->state == XFPM_DEVICE_STATE_EMPTY )
48+ {
49+ g_snprintf (icon_name, 128, "%s000", battery->priv->icon_prefix);
50+ }
51
52=== added file 'debian/patches/08_show_preferences_lxde.patch'
53--- debian/patches/08_show_preferences_lxde.patch 1970-01-01 00:00:00 +0000
54+++ debian/patches/08_show_preferences_lxde.patch 2012-03-18 15:42:22 +0000
55@@ -0,0 +1,13 @@
56+Index: xfce4-power-manager/settings/xfce4-power-manager-settings.desktop.in
57+===================================================================
58+--- xfce4-power-manager/settings/xfce4-power-manager-settings.desktop.in 2011-02-14 10:55:03.000000000 +0100
59++++ xfce4-power-manager/settings/xfce4-power-manager-settings.desktop.in 2012-02-27 01:07:05.000000000 +0100
60+@@ -8,7 +8,7 @@
61+ Terminal=false
62+ Type=Application
63+ Categories=X-XFCE;Settings;DesktopSettings;X-XfceSettingsDialog;
64+-OnlyShowIn=XFCE;
65++NotShowIn=GNOME;KDE;Unity;
66+ StartupNotify=true
67+ X-XfcePluggable=true
68+ X-XfceHelpFile=xfce4-power-manager.html
69
70=== added file 'debian/patches/09_fix_insert_battery.patch'
71--- debian/patches/09_fix_insert_battery.patch 1970-01-01 00:00:00 +0000
72+++ debian/patches/09_fix_insert_battery.patch 2012-03-18 15:42:22 +0000
73@@ -0,0 +1,44 @@
74+From 6f87cc775b4c72f5708d6582173077b856ba01f5 Mon Sep 17 00:00:00 2001
75+From: Henry Gebhardt <hsggebhardt@googlemail.com>
76+Date: Wed, 29 Feb 2012 14:14:33 +0100
77+Subject: [PATCH] Fix empty systray icon in some panels on battery removal and
78+ addition
79+
80+Unreferencing a GtkStatusIcon is not enough to get rid of it entirely.
81+
82+This fixes these bugs:
83+
84+ https://bugzilla.xfce.org/show_bug.cgi?id=7603
85+ http://bugzilla.xfce.org/show_bug.cgi?id=8424
86+ https://bugs.launchpad.net/ubuntu/+source/lxpanel/+bug/846878
87+ https://bugzilla.redhat.com/show_bug.cgi?id=765726
88+---
89+ src/xfpm-battery.c | 2 ++
90+ src/xfpm-power.c | 1 +
91+ 2 files changed, 3 insertions(+), 0 deletions(-)
92+
93+Index: xfce4-power-manager/src/xfpm-battery.c
94+===================================================================
95+--- xfce4-power-manager/src/xfpm-battery.c 2012-03-02 19:25:29.000000000 +0100
96++++ xfce4-power-manager/src/xfpm-battery.c 2012-03-02 19:31:07.000000000 +0100
97+@@ -782,6 +782,8 @@
98+ g_object_unref (battery->priv->notify);
99+ g_object_unref (battery->priv->button);
100+
101++ gtk_status_icon_set_visible(GTK_STATUS_ICON(battery), FALSE);
102++
103+ G_OBJECT_CLASS (xfpm_battery_parent_class)->finalize (object);
104+ }
105+
106+Index: xfce4-power-manager/src/xfpm-power.c
107+===================================================================
108+--- xfce4-power-manager/src/xfpm-power.c 2012-03-02 19:25:29.000000000 +0100
109++++ xfce4-power-manager/src/xfpm-power.c 2012-03-02 19:31:07.000000000 +0100
110+@@ -1118,6 +1118,7 @@
111+
112+ if ( power->priv->adapter_icon )
113+ {
114++ gtk_status_icon_set_visible (power->priv->adapter_icon, FALSE);
115+ g_object_unref (power->priv->adapter_icon);
116+ power->priv->adapter_icon = NULL;
117+ }
118
119=== modified file 'debian/patches/series'
120--- debian/patches/series 2012-02-09 21:52:19 +0000
121+++ debian/patches/series 2012-03-18 15:42:22 +0000
122@@ -6,3 +6,6 @@
123 06_fix-suspend-auth-check.patch
124 xubuntu_fix-xfconf-type-brightness-level.patch
125 xubuntu_fix-status-icon-other-devices.patch
126+07_fix_broken_empty_icon_battery.patch
127+08_show_preferences_lxde.patch
128+09_fix_insert_battery.patch

Subscribers

People subscribed via source and target branches