projects
/
psensor.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
39b2eca
)
added highest temperature as label of the application indicator
author
Jean-Philippe Orsini
<jeanfi@gmail.com>
Wed, 16 Apr 2014 23:33:09 +0000
(
01:33
+0200)
committer
Jean-Philippe Orsini
<jeanfi@gmail.com>
Wed, 16 Apr 2014 23:33:09 +0000
(
01:33
+0200)
src/ui_appindicator.c
patch
|
blob
|
history
diff --git
a/src/ui_appindicator.c
b/src/ui_appindicator.c
index
49ca58f
..
c6b3f52
100644
(file)
--- a/
src/ui_appindicator.c
+++ b/
src/ui_appindicator.c
@@
-175,12
+175,21
@@
static GtkWidget *get_menu(struct ui_psensor *ui)
void ui_appindicator_update(struct ui_psensor *ui, unsigned int attention)
{
AppIndicatorStatus status;
void ui_appindicator_update(struct ui_psensor *ui, unsigned int attention)
{
AppIndicatorStatus status;
+ char *label;
+ double v;
if (!indicator)
return;
status = app_indicator_get_status(indicator);
if (!indicator)
return;
status = app_indicator_get_status(indicator);
+ v = psensor_get_max_current_value(ui->sensors, SENSOR_TYPE_TEMP);
+ if (v != UNKNOWN_DBL_VALUE) {
+ label = psensor_value_to_str(SENSOR_TYPE_TEMP, v, 1);
+ app_indicator_set_label(indicator, label, NULL);
+ free(label);
+ }
+
if (!attention && status == APP_INDICATOR_STATUS_ATTENTION)
app_indicator_set_status(indicator,
APP_INDICATOR_STATUS_ACTIVE);
if (!attention && status == APP_INDICATOR_STATUS_ATTENTION)
app_indicator_set_status(indicator,
APP_INDICATOR_STATUS_ACTIVE);