ALT Linux Bugzilla
– Attachment 5324 Details for
Bug 26948
Индикатор батареи показывает всегда 100%
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
менее интрузивный вариант
batt_percentage_fix.patch (text/plain), 550 bytes, created by
Aleksey Borisenkov
on 2012-02-20 20:34:46 MSK
(
hide
)
Description:
менее интрузивный вариант
Filename:
MIME Type:
Creator:
Aleksey Borisenkov
Created:
2012-02-20 20:34:46 MSK
Size:
550 bytes
patch
obsolete
>diff --git a/lxpanel/src/plugins/batt/batt_sys.c b/lxpanel/src/plugins/batt/batt_sys.c >index 62445fe..7b7def5 100644 >--- a/lxpanel/src/plugins/batt/batt_sys.c >+++ b/lxpanel/src/plugins/batt/batt_sys.c >@@ -217,6 +217,8 @@ void battery_update(battery *b) > b->percentage = 0; > else { > int promille = (b->energy_now * 1000) / b->energy_full; >+ if (b->energy_now == -1 || b->energy_full == -1) >+ promille = (b->charge_now * 1000) / b->charge_full; > b->percentage = (promille + 5) / 10; /* round properly */ > } > if (b->percentage > 100)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 26948
:
5322
| 5324