summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkos Chandras <hwoarang@gentoo.org>2012-05-07 10:14:24 +0000
committerMarkos Chandras <hwoarang@gentoo.org>2012-05-07 10:14:24 +0000
commit708738731d79aa22974042bd22e7341e1de693d3 (patch)
tree794966f40066bfa18a2102b9aceb2cd46fdd61a8 /lxde-base
parentDrop old. (diff)
downloadhistorical-708738731d79aa22974042bd22e7341e1de693d3.tar.gz
historical-708738731d79aa22974042bd22e7341e1de693d3.tar.bz2
historical-708738731d79aa22974042bd22e7341e1de693d3.zip
Fixes for bug #408541 and #400855
Package-Manager: portage-2.1.10.57/cvs/Linux x86_64
Diffstat (limited to 'lxde-base')
-rw-r--r--lxde-base/lxpanel/ChangeLog12
-rw-r--r--lxde-base/lxpanel/Manifest26
-rw-r--r--lxde-base/lxpanel/files/lxpanel-0.5.8-dynamic-width.patch40
-rw-r--r--lxde-base/lxpanel/files/lxpanel-0.5.8-thermal-plugin.patch246
-rw-r--r--lxde-base/lxpanel/lxpanel-0.5.8-r3.ebuild58
5 files changed, 344 insertions, 38 deletions
diff --git a/lxde-base/lxpanel/ChangeLog b/lxde-base/lxpanel/ChangeLog
index d1aaa3d864f0..2b50f16c6d0c 100644
--- a/lxde-base/lxpanel/ChangeLog
+++ b/lxde-base/lxpanel/ChangeLog
@@ -1,6 +1,16 @@
# ChangeLog for lxde-base/lxpanel
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/lxde-base/lxpanel/ChangeLog,v 1.38 2012/05/04 05:50:38 jdhore Exp $
+# $Header: /var/cvsroot/gentoo-x86/lxde-base/lxpanel/ChangeLog,v 1.39 2012/05/07 10:14:24 hwoarang Exp $
+
+*lxpanel-0.5.8-r3 (07 May 2012)
+
+ 07 May 2012; Markos Chandras <hwoarang@gentoo.org> +lxpanel-0.5.8-r3.ebuild,
+ +files/lxpanel-0.5.8-dynamic-width.patch,
+ files/lxpanel-0.5.8-thermal-plugin.patch:
+ Add patch for fixing dynamic width and autohide results thanks to Jack Chen
+ <speed.up08311990@gmail.com>. Fixes bug #408541. Backport thermal plugin
+ patch from upstream git repository. Fixes bug #400855. Thanks to Maxim
+ Kammerer <mk@dee.su>
04 May 2012; Jeff Horelick <jdhore@gentoo.org> lxpanel-0.5.6.ebuild,
lxpanel-0.5.7-r1.ebuild, lxpanel-0.5.8.ebuild, lxpanel-0.5.8-r1.ebuild,
diff --git a/lxde-base/lxpanel/Manifest b/lxde-base/lxpanel/Manifest
index fed4892b0034..c84c3a7e47f4 100644
--- a/lxde-base/lxpanel/Manifest
+++ b/lxde-base/lxpanel/Manifest
@@ -1,10 +1,14 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA512
+
AUX lxpanel-0.5.1-sandbox.patch 833 RMD160 83957b8e65104c12c2220027faf24d846fe4b3b9 SHA1 24f5f2c737e56f5bc457fa49426c5115e9d15498 SHA256 1df1574a0faf8d02465f7673f7967b14b2d0bd33f8ac9c5769888ef6c4272489
AUX lxpanel-0.5.6-broken-apps.patch 567 RMD160 628f01083f7c06476394447aacdc6fa542359bab SHA1 23ae82f23458596e1bb356cf897e5310cb05c080 SHA256 0b914f680f2dbaafb3a4966a9795e3d154839cb910eca9f58bdf18d41901eb25
AUX lxpanel-0.5.6-symbol-alarm.patch 1461 RMD160 5ed09d071a349b7554400ea73d16f6aacdc4ad8d SHA1 6b111b32eb1ae9ee869df8ff0ac4c23b8ccbfbb8 SHA256 afafb59ea3e537147ff4d81feb5ec2a3a18eaa628f992c5a44321fa29b85e6af
AUX lxpanel-0.5.7-requisition.patch 1003 RMD160 88d9b762099ed3cbebdf6ce9277720a70ea96ab2 SHA1 4ec1715f8fa00bcae92157ba2fb500f3852cb3e6 SHA256 cc25d00f4d9efc6be1ddb2adfb8f13dff37547632db5563528e68a78e3c2d36f
AUX lxpanel-0.5.7-tooltip-netstatus.patch 1084 RMD160 323191b9177b50ff44ab61b91d0704afd0e798bb SHA1 511e3291cb60970864af10da87f65df12abf2174 SHA256 df6bbcdac99fa9a79b7329ec51b07ca3cccb05cf128d4d98ed8f65f57541a93f
AUX lxpanel-0.5.8-battery-meter.patch 939 RMD160 eaf55c514a433b8a62f27837b6d68f4523c3b9cd SHA1 34cc4fd3ee4ac867c463d97d3b703493224ba14d SHA256 c65b77e37b682b32a713904ff03b66e074c4d5ae701449e68310e075c3e2d4c3
-AUX lxpanel-0.5.8-thermal-plugin.patch 5610 RMD160 6414113ed28ef26a280693c75f37503820e63324 SHA1 97e92465a3e29f2daec50b826f68241e11ca0265 SHA256 fc21ed5afaec365f323e4dfc20f47b15b277e8eca9be8545fabbdfc8f86b8ccc
+AUX lxpanel-0.5.8-dynamic-width.patch 1616 RMD160 e6c14456ea3451fc530f77d2d90f401bc4989138 SHA1 c7b20e50a21a26db5c0c5342b7b3d59dcc5d287c SHA256 4588d3c75f1c3e90e59a0ff686333581117910f8d8ab5b33917c6f0c4976efb1
+AUX lxpanel-0.5.8-thermal-plugin.patch 11680 RMD160 5421f7c92d9a3b23c98cbc7626099a37f8d03565 SHA1 b9f54c0d233febb08b7c804457d90f57b2434fda SHA256 959bb8d666a21d3b2aad3e22d7b5ed2d688978d64c74703ba098a9724d4595bd
DIST lxpanel-0.5.6.tar.gz 1074786 RMD160 5e5ebdd185d06fe0d1965ec2ed12ffecf0984b7e SHA1 fc5483e6016ac52c38b38274cca7661f2aa828ab SHA256 9c04839e2d23feec8b107a1d76899aca645416862b4b6ca01f8db743944348e1
DIST lxpanel-0.5.7.tar.gz 1166355 RMD160 489dc9515ab0f6bac5136a0c4c93fbcb26f48e97 SHA1 276168fb4560899e83a6a340448c961d63333717 SHA256 89d1b55b207e61b7b7433cb51302bdbee644fb78b5b57892d67cb19072f548a1
DIST lxpanel-0.5.8.tar.gz 1166241 RMD160 34e3cc6fb9de1c0590f6ec281750061c1098dc1a SHA1 a9d6bd9d15a3588fb959aa32880ad888c58359f7 SHA256 6a3579d6f384c03a33a03e4d32016428c84eb0f2bc421704f724fe2cc015cddd
@@ -12,6 +16,24 @@ EBUILD lxpanel-0.5.6.ebuild 1550 RMD160 2239cfd2b7cd7541b18858ce1bfffd768a98d3ed
EBUILD lxpanel-0.5.7-r1.ebuild 1562 RMD160 e60ea470290571021c88ece7bb1cf89c9cfdae5a SHA1 33c0e5f4824662a856514a382c31bffd1a25afda SHA256 7fbdc72943c14ad9ce47efd684ab581f7a7b1892e3be6a1da3251fdb95288cff
EBUILD lxpanel-0.5.8-r1.ebuild 1513 RMD160 6de6cfe7a008e41e586b6397b5aa1208f1b8df2a SHA1 de7b21f23b93dd473a76a153dd4453d0b749a100 SHA256 180127d67fb96c6482aaae2c3d126564a7b95ab5ee7c7a6623fefe753f048de0
EBUILD lxpanel-0.5.8-r2.ebuild 1561 RMD160 0b232d211f70acec4a7967c4ed156dddf70e9edc SHA1 a4dc7772ab24b633aa6c25f69e3e5824561e638b SHA256 c56f1f2b13da5975ac6eb49b5d0d06ef08749548271713dd9d280b8c11658803
+EBUILD lxpanel-0.5.8-r3.ebuild 1610 RMD160 0f5a16ce57345ead5aea1360f73f205596b62f16 SHA1 8b860052cb13562dd615934c273d0ae6f765ba4f SHA256 35943affe69f782529cd0bcd4ecac445356488023068e0f9cf9cfd63e7fdbdc1
EBUILD lxpanel-0.5.8.ebuild 1460 RMD160 54f36c6c715467e36f7b734ae296e2d02c59d0b5 SHA1 3360e0ccecc13158ce7527b2bcedfc74e12e732e SHA256 5c8b925361269c15e67e6748e28a2f66fc1558edd44b3d24d40c6a15324bbe9b
-MISC ChangeLog 5635 RMD160 62857cddfc83813a0ebaccaf63254ffdbe090c0e SHA1 6a0fae02b2df314328c224f0b99af355b153bf91 SHA256 3370eb5137830f7f64c06c9db7e37986afb7c0ee2c7c27a900df94dcc2f169ae
+MISC ChangeLog 6087 RMD160 b14e8afe1572f9add1a87797d77784664d4c2922 SHA1 910d297c257e701abd5df7896ce96232ca03b9f9 SHA256 5cbdb0261e2019a9ae38dea24dbc3dfec88df0b9d9f3effb02d4a0b5e53fc284
MISC metadata.xml 159 RMD160 35036c133a5c9c7edccc3cdfed5789092f884048 SHA1 bdf1b7cc6ffbdd223b6f05aa072e857dfc981c4f SHA256 09574ccad15f69d5367ecbb1a491cd636fb88582f69987d2ec217109dfe8befb
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.19 (GNU/Linux)
+
+iQIcBAEBCgAGBQJPp6CFAAoJEPqDWhW0r/LCK/EP/04atqP9sDd9lf/zbBaGyobk
+8yAIOs1PZHvXEeNzGpp1kIA10mdONBnaYsV4vfv9bWIrwXY1zjB033PuynbIdlt8
+CpzoqOLwtNbGLha/VIB8RpRrW2xthjU6jaApWWwu7bmEVKdh4s6NgO1BGRpC32qo
+jNMTEmT43dv7eafoG7txzzDcEL289gNxCYMLjtsoQ/93E7AQ1yGvB+a6/LE+p8oW
+M0AiwQaIHp6HmI4DpT2Ot7pxuixmDw25Yt5eO9Dj8FvR53z68nsn1LTrXXddbOze
+7OzbBxaki5VNpVy5kAh1kgow6xGyn6JehEwbmHwl26DJzaGF649Q01k6ZJ/TVRlw
+IZEIyzDRbmwH8c+wiVdbcbhYT+3Z2n2EMJp1rd3eKfUhZyH6rCyl9GF+8zSqiBYJ
+SuZM6t07TVzrgMdU5k3TWwelZ9PxLgeG1f/kDt453Gy+/QRv1toZjN38QLzg8ARm
+2VctwUDJ7dXuR9t8UpwvXUWvo0XbuJwTXBH0cAH4n6tsRdcegNvWfgjaGFVyFNzU
+Ql0TYD6RIIekVIL7aUdpUjnkeFJAoMezEJUNdPunSVrc9pYz8naoX7qTWZZOhp/q
+dDxXHuq7hRtsIfhGZThn3P0eD3Q1iZmvtrJfVYBUV5EjJ5ojbehcF6BthqfF8Xr1
+2CawKBbsgzPR99Dari7v
+=7/M5
+-----END PGP SIGNATURE-----
diff --git a/lxde-base/lxpanel/files/lxpanel-0.5.8-dynamic-width.patch b/lxde-base/lxpanel/files/lxpanel-0.5.8-dynamic-width.patch
new file mode 100644
index 000000000000..0aea7b1a0d67
--- /dev/null
+++ b/lxde-base/lxpanel/files/lxpanel-0.5.8-dynamic-width.patch
@@ -0,0 +1,40 @@
+# See https://bugs.gentoo.org/show_bug.cgi?id=408541
+diff -urN lxpanel-0.5.8.bak/src/panel.c lxpanel-0.5.8/src/panel.c
+--- lxpanel-0.5.8.bak/src/panel.c 2012-03-16 18:09:33.000000000 +0800
++++ lxpanel-0.5.8/src/panel.c 2012-03-16 22:38:58.000000000 +0800
+@@ -484,13 +484,29 @@
+ {
+ ENTER;
+
+- if (p->widthtype == WIDTH_REQUEST)
+- p->width = (p->orientation == ORIENT_HORIZ) ? req->width : req->height;
+- if (p->heighttype == HEIGHT_REQUEST)
+- p->height = (p->orientation == ORIENT_HORIZ) ? req->height : req->width;
++ if (p->autohide && !p->visible)
++ {
++ /* When the panel is in invisible state, the content box also got hidden, thus always
++ * report 0 size. Ask the content box instead for its size. */
++ GtkRequisition req_box;
++ gtk_widget_size_request(p->box, &req_box);
++ if (p->widthtype == WIDTH_REQUEST)
++ p->width = (p->orientation == ORIENT_HORIZ) ? req_box.width : req_box.height;
++ if (p->heighttype == HEIGHT_REQUEST)
++ p->height = (p->orientation == ORIENT_HORIZ) ? req_box.height : req_box.width;
++ }
++ else
++ {
++ if (p->widthtype == WIDTH_REQUEST)
++ p->width = (p->orientation == ORIENT_HORIZ) ? req->width : req->height;
++ if (p->heighttype == HEIGHT_REQUEST)
++ p->height = (p->orientation == ORIENT_HORIZ) ? req->height : req->width;
++ }
+ calculate_position(p);
+- req->width = p->aw;
+- req->height = p->ah;
++
++ gtk_widget_set_size_request( widget, p->aw, p->ah );
++// req->width = p->aw;
++// req->height = p->ah;
+
+ RET( TRUE );
+ }
diff --git a/lxde-base/lxpanel/files/lxpanel-0.5.8-thermal-plugin.patch b/lxde-base/lxpanel/files/lxpanel-0.5.8-thermal-plugin.patch
index 0db90b7a19e3..0d9a1e7ecf99 100644
--- a/lxde-base/lxpanel/files/lxpanel-0.5.8-thermal-plugin.patch
+++ b/lxde-base/lxpanel/files/lxpanel-0.5.8-thermal-plugin.patch
@@ -1,17 +1,10 @@
-From 266c072d1e954266157989891eec069006772e97 Mon Sep 17 00:00:00 2001
-From: Henry Gebhardt <hsggebhardt@googlemail.com>
-Date: Fri, 23 Dec 2011 21:02:53 +0100
-Subject: [PATCH] plugins/thermal: support both /proc and sysfs interfaces
-
----
- src/plugins/thermal/thermal.c | 108 +++++++++++++++++++++++++++++++++++------
- 1 files changed, 93 insertions(+), 15 deletions(-)
+X-Git-Url: http://lxde.git.sourceforge.net/git/gitweb.cgi?p=lxde%2Flxpanel;a=blobdiff_plain;f=src%2Fplugins%2Fthermal%2Fthermal.c;h=1ac80939630e4c26b376a45dc7474ddca8246189;hp=afe5e89135fa28d72f7aa625f70214c3adb3239e;hb=HEAD;hpb=8e33d60b30bb9236d7a16c06e8f079936c8dd9b0
diff --git a/src/plugins/thermal/thermal.c b/src/plugins/thermal/thermal.c
-index afe5e89..616c4a0 100644
+index afe5e89..1ac8093 100644
--- a/src/plugins/thermal/thermal.c
+++ b/src/plugins/thermal/thermal.c
-@@ -32,12 +32,17 @@
+@@ -32,12 +32,18 @@
#include "dbg.h"
@@ -25,7 +18,8 @@ index afe5e89..616c4a0 100644
+#define PROC_TRIP_CRITICAL "critical (S5):"
-typedef struct {
-+#define SYSFS_THERMAL_DIRECTORY "/sys/class/thermal/thermal_zone0/" /* must be slash-terminated */
++#define SYSFS_THERMAL_DIRECTORY "/sys/class/thermal/" /* must be slash-terminated */
++#define SYSFS_THERMAL_SUBDIR_PREFIX "thermal_zone"
+#define SYSFS_THERMAL_TEMPF "temp"
+#define SYSFS_THERMAL_TRIP "trip_point_0_temp"
+
@@ -34,7 +28,16 @@ index afe5e89..616c4a0 100644
Plugin * plugin;
GtkWidget *main;
GtkWidget *namew;
-@@ -54,17 +59,20 @@ typedef struct {
+@@ -45,7 +51,7 @@ typedef struct {
+ int critical;
+ int warning1;
+ int warning2;
+- int custom_levels, auto_sensor;
++ int not_custom_levels, auto_sensor;
+ char *sensor,
+ *str_cl_normal,
+ *str_cl_warning1,
+@@ -54,17 +60,20 @@ typedef struct {
GdkColor cl_normal,
cl_warning1,
cl_warning2;
@@ -57,7 +60,7 @@ index afe5e89..616c4a0 100644
if (!(state = fopen( sstmp, "r"))) {
//printf("cannot open %s\n",sstmp);
-@@ -72,10 +80,10 @@ get_critical(thermal *th){
+@@ -72,15 +81,15 @@ get_critical(thermal *th){
}
while( fgets(buf, 256, state) &&
@@ -70,7 +73,13 @@ index afe5e89..616c4a0 100644
while( *pstr && *pstr == ' ' )
++pstr;
-@@ -90,14 +98,14 @@ get_critical(thermal *th){
+ pstr[strlen(pstr)-3] = '\0';
+- printf("Critical: [%s]\n",pstr);
++ //printf("Critical: [%s]\n",pstr);
+ fclose(state);
+ return atoi(pstr);
+ }
+@@ -90,14 +99,14 @@ get_critical(thermal *th){
}
static gint
@@ -87,7 +96,7 @@ index afe5e89..616c4a0 100644
if (!(state = fopen( sstmp, "r"))) {
//printf("cannot open %s\n",sstmp);
-@@ -122,11 +130,79 @@ get_temperature(thermal *th){
+@@ -122,11 +131,77 @@ get_temperature(thermal *th){
}
static gint
@@ -109,7 +118,6 @@ index afe5e89..616c4a0 100644
+ ! ( pstr = buf ) );
+ if( pstr )
+ {
-+ printf("Critical: [%s]\n",pstr);
+ fclose(state);
+ return atoi(pstr)/1000;
+ }
@@ -149,7 +157,7 @@ index afe5e89..616c4a0 100644
+static void
+set_get_functions(thermal *th)
+{
-+ if (strncmp(th->sensor, "/sys/", 5) == 0){
++ if (th->sensor && strncmp(th->sensor, "/sys/", 5) == 0){
+ th->get_temperature = sysfs_get_temperature;
+ th->get_critical = sysfs_get_critical;
+ } else {
@@ -162,41 +170,209 @@ index afe5e89..616c4a0 100644
update_display(thermal *th)
{
char buffer [60];
- int n;
+- int n;
- int temp = get_temperature(th);
+ int temp = th->get_temperature(th);
GdkColor color;
if(temp >= th->warning2)
-@@ -155,7 +231,7 @@ check_sensors( thermal* th )
+@@ -141,42 +216,92 @@ update_display(thermal *th)
+ panel_draw_label_text(th->plugin->panel, th->namew, "NA", TRUE, TRUE);
+ else
+ {
+- n = sprintf(buffer, "<span color=\"#%06x\"><b>%02d</b></span>", gcolor2rgb24(&color), temp);
++ sprintf(buffer, "<span color=\"#%06x\"><b>%02d</b></span>", gcolor2rgb24(&color), temp);
+ gtk_label_set_markup (GTK_LABEL(th->namew), buffer) ;
+ }
+
+ RET(TRUE);
+ }
+
++
++/* get_sensor():
++ * - Get the sensor directory, and store it in '*sensor'.
++ * - It is searched for in 'directory'.
++ * - Only the subdirectories starting with 'subdir_prefix' are accepted as sensors.
++ * - 'subdir_prefix' may be NULL, in which case any subdir is considered a sensor. */
+ static void
+-check_sensors( thermal* th )
++get_sensor(char** sensor, char const* directory, char const* subdir_prefix)
+ {
+ GDir *sensorsDirectory;
const char *sensor_name;
char sensor_path[100];
- if (! (sensorsDirectory = g_dir_open(THERMAL_DIRECTORY, 0, NULL)))
-+ if (! (sensorsDirectory = g_dir_open(PROC_THERMAL_DIRECTORY, 0, NULL)))
++ if (! (sensorsDirectory = g_dir_open(directory, 0, NULL)))
{
- th->sensor = NULL;
+- th->sensor = NULL;
++ *sensor = NULL;
return;
-@@ -164,7 +240,7 @@ check_sensors( thermal* th )
+ }
+
/* Scan the thermal_zone directory for available sensors */
while ((sensor_name = g_dir_read_name(sensorsDirectory))) {
if (sensor_name[0] != '.') {
- sprintf(sensor_path,"%s%s/",THERMAL_DIRECTORY, sensor_name);
-+ sprintf(sensor_path,"%s%s/",PROC_THERMAL_DIRECTORY, sensor_name);
- if(th->sensor) {
- g_free(th->sensor);
- th->sensor = NULL;
-@@ -254,7 +330,9 @@ thermal_constructor(Plugin *p, char** fp)
- if(th->sensor == NULL) th->auto_sensor = TRUE;
- if(th->auto_sensor) check_sensors(th);
+- if(th->sensor) {
+- g_free(th->sensor);
+- th->sensor = NULL;
++ if (subdir_prefix) {
++ if (strncmp(sensor_name, subdir_prefix, strlen(subdir_prefix)) != 0)
++ continue;
+ }
+- th->sensor = strdup(sensor_path);
+- //printf("sensor: %s\n", b->sensor);
++ sprintf(sensor_path,"%s%s/", directory, sensor_name);
++ if(*sensor) {
++ g_free(*sensor);
++ *sensor = NULL;
++ }
++ *sensor = strdup(sensor_path);
+ break;
+ }
+ }
+ g_dir_close(sensorsDirectory);
+ }
-- th->critical = get_critical(th);
++static void
++check_sensors( thermal *th )
++{
++ if(th->sensor) {
++ g_free(th->sensor);
++ th->sensor = NULL;
++ }
++
++ get_sensor(&th->sensor, PROC_THERMAL_DIRECTORY, NULL);
++
++ if (!th->sensor)
++ get_sensor(&th->sensor, SYSFS_THERMAL_DIRECTORY, SYSFS_THERMAL_SUBDIR_PREFIX);
++
++ //printf("thermal sensor: %s\n", th->sensor);
++}
++
++
++static void applyConfig(Plugin* p)
++{
++ thermal *th = p->priv;
++ ENTER;
++
++ if (th->str_cl_normal) gdk_color_parse(th->str_cl_normal, &th->cl_normal);
++ if (th->str_cl_warning1) gdk_color_parse(th->str_cl_warning1, &th->cl_warning1);
++ if (th->str_cl_warning2) gdk_color_parse(th->str_cl_warning2, &th->cl_warning2);
++
++ if(th->sensor == NULL) th->auto_sensor = TRUE;
++ if(th->auto_sensor) check_sensors(th);
++
+ set_get_functions(th);
+
+ th->critical = th->get_critical(th);
++
++ if(th->not_custom_levels){
++ th->warning1 = th->critical - 10;
++ th->warning2 = th->critical - 5;
++ }
++
++ RET();
++}
++
+ static int
+ thermal_constructor(Plugin *p, char** fp)
+ {
+@@ -197,6 +322,11 @@ thermal_constructor(Plugin *p, char** fp)
+ th->main = p->pwid;
+ th->tip = gtk_tooltips_new();
- if(!th->custom_levels){
- th->warning1 = th->critical - 10;
---
-1.7.4.1
-
++ /* By default, use automatic, that is, "not custom" temperature levels. If
++ * we were using custom levels, they would be 0°C at startup, so we would
++ * display in warning colors by default. */
++ th->not_custom_levels = TRUE;
++
+ g_signal_connect (G_OBJECT (p->pwid), "button_press_event",
+ G_CALLBACK (plugin_button_press_event), (gpointer) p);
+
+@@ -220,7 +350,7 @@ thermal_constructor(Plugin *p, char** fp)
+ }else if (!g_ascii_strcasecmp(s.t[0], "AutomaticSensor")){
+ th->auto_sensor= atoi(s.t[1]);
+ }else if (!g_ascii_strcasecmp(s.t[0], "CustomLevels")){
+- th->custom_levels= atoi(s.t[1]);
++ th->not_custom_levels= atoi(s.t[1]);
+ }else if (!g_ascii_strcasecmp(s.t[0], "Sensor")){
+ th->sensor= g_strdup(s.t[1]);
+ }else if (!g_ascii_strcasecmp(s.t[0], "Warning1Temp")){
+@@ -236,7 +366,6 @@ thermal_constructor(Plugin *p, char** fp)
+ goto error;
+ }
+ }
+-
+ }
+
+ if(!th->str_cl_normal)
+@@ -246,20 +375,7 @@ thermal_constructor(Plugin *p, char** fp)
+ if(!th->str_cl_warning2)
+ th->str_cl_warning2 = g_strdup("#ff0000");
+
+- gdk_color_parse(th->str_cl_normal, &(th->cl_normal));
+- gdk_color_parse(th->str_cl_warning1, &(th->cl_warning1));
+- gdk_color_parse(th->str_cl_warning2, &(th->cl_warning2));
+-
+-
+- if(th->sensor == NULL) th->auto_sensor = TRUE;
+- if(th->auto_sensor) check_sensors(th);
+-
+- th->critical = get_critical(th);
+-
+- if(!th->custom_levels){
+- th->warning1 = th->critical - 10;
+- th->warning2 = th->critical - 5;
+- }
++ applyConfig(p);
+
+ gtk_widget_show(th->namew);
+
+@@ -272,27 +388,6 @@ error:
+ RET(FALSE);
+ }
+
+-static void applyConfig(Plugin* p)
+-{
+-
+- thermal *th = (thermal *)p->priv;
+-
+- ENTER;
+-
+- if (th->str_cl_normal) gdk_color_parse(th->str_cl_normal, &th->cl_normal);
+- if (th->str_cl_warning1) gdk_color_parse(th->str_cl_warning1, &th->cl_warning1);
+- if (th->str_cl_warning2) gdk_color_parse(th->str_cl_warning2, &th->cl_warning2);
+-
+- if(th->auto_sensor) check_sensors(th);
+-
+- if(th->custom_levels){
+- th->warning1 = th->critical - 10;
+- th->warning2 = th->critical - 5;
+- }
+-
+- RET();
+-}
+-
+ static void config(Plugin *p, GtkWindow* parent) {
+ ENTER;
+
+@@ -306,7 +401,7 @@ static void config(Plugin *p, GtkWindow* parent) {
+ _("Warning2"), &th->str_cl_warning2, CONF_TYPE_STR,
+ _("Automatic sensor location"), &th->auto_sensor, CONF_TYPE_BOOL,
+ _("Sensor"), &th->sensor, CONF_TYPE_STR,
+- _("Automatic temperature levels"), &th->custom_levels, CONF_TYPE_BOOL,
++ _("Automatic temperature levels"), &th->not_custom_levels, CONF_TYPE_BOOL,
+ _("Warning1 Temperature"), &th->warning1, CONF_TYPE_INT,
+ _("Warning2 Temperature"), &th->warning2, CONF_TYPE_INT,
+ NULL);
+@@ -338,7 +433,7 @@ static void save_config( Plugin* p, FILE* fp )
+ lxpanel_put_str( fp, "NormalColor", th->str_cl_normal );
+ lxpanel_put_str( fp, "Warning1Color", th->str_cl_warning1 );
+ lxpanel_put_str( fp, "Warning2Color", th->str_cl_warning2 );
+- lxpanel_put_int( fp, "CustomLevels", th->custom_levels );
++ lxpanel_put_int( fp, "CustomLevels", th->not_custom_levels );
+ lxpanel_put_int( fp, "Warning1Temp", th->warning1 );
+ lxpanel_put_int( fp, "Warning2Temp", th->warning2 );
+ lxpanel_put_int( fp, "AutomaticSensor", th->auto_sensor );
diff --git a/lxde-base/lxpanel/lxpanel-0.5.8-r3.ebuild b/lxde-base/lxpanel/lxpanel-0.5.8-r3.ebuild
new file mode 100644
index 000000000000..3d83ca16b464
--- /dev/null
+++ b/lxde-base/lxpanel/lxpanel-0.5.8-r3.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/lxde-base/lxpanel/lxpanel-0.5.8-r3.ebuild,v 1.1 2012/05/07 10:14:24 hwoarang Exp $
+
+EAPI="4"
+
+inherit autotools eutils
+
+DESCRIPTION="Lightweight X11 desktop panel for LXDE"
+HOMEPAGE="http://lxde.org/"
+SRC_URI="mirror://sourceforge/lxde/${P}.tar.gz"
+
+LICENSE="GPL-2"
+KEYWORDS="~alpha ~amd64 ~arm ~ppc ~x86 ~x86-interix ~amd64-linux ~x86-linux"
+SLOT="0"
+IUSE="+alsa"
+RESTRICT="test" # bug 249598
+
+RDEPEND="x11-libs/gtk+:2
+ x11-libs/libXmu
+ x11-libs/libXpm
+ lxde-base/lxmenu-data
+ lxde-base/menu-cache
+ alsa? ( media-libs/alsa-lib )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ sys-devel/gettext"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.5.1-sandbox.patch
+ epatch "${FILESDIR}"/${PN}-0.5.6-broken-apps.patch
+ epatch "${FILESDIR}"/${P}-battery-meter.patch
+ epatch "${FILESDIR}"/${P}-thermal-plugin.patch
+ epatch "${FILESDIR}"/${P}-dynamic-width.patch
+ eautoreconf
+}
+
+src_configure() {
+ local plugins=all
+ [[ ${CHOST} == *-interix* ]] && plugins=deskno,kbled,xkb
+
+ econf $(use_enable alsa) --with-x --with-plugins=${plugins}
+ # the gtk+ dep already pulls in libX11, so we might as well hardcode with-x
+}
+
+src_install () {
+ emake DESTDIR="${D}" install
+ dodoc AUTHORS ChangeLog README
+
+ # Get rid of the .la files.
+ find "${D}" -name '*.la' -delete
+}
+
+pkg_postinst() {
+ elog "If you have problems with broken icons shown in the main panel,"
+ elog "you will have to configure panel settings via its menu."
+ elog "This will not be an issue with first time installations."
+}