X-Git-Url: http://git.wpitchoune.net/gitweb/?p=psensor-pkg-ubuntu.git;a=blobdiff_plain;f=src%2Fui_unity.c;fp=src%2Fui_unity.c;h=0000000000000000000000000000000000000000;hp=2c00403377b4e55bcaedbc48ec4d6ab9b5b88eb8;hb=4487aa672b4ea293173ff44bb76f79fb59bae024;hpb=3a67d56a58c3b1000a8dedb8b783ad7472f66850 diff --git a/src/ui_unity.c b/src/ui_unity.c deleted file mode 100644 index 2c00403..0000000 --- a/src/ui_unity.c +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (C) 2010-2014 jeanfi@gmail.com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301 USA - */ -#include - -#include -#include - -static int initialized; -static UnityLauncherEntry *psensor_entry; -static unsigned int last_visible = -1; - -void ui_unity_launcher_entry_update(struct psensor **sensors, - unsigned int show, - int use_celsius) -{ - double v; - - if (!initialized) { - psensor_entry = unity_launcher_entry_get_for_desktop_file - (PSENSOR_DESKTOP_FILE); - - unity_launcher_entry_set_count(psensor_entry, 0); - initialized = 1; - } - - if (last_visible != show) { - if (show) - unity_launcher_entry_set_count_visible(psensor_entry, - TRUE); - else - unity_launcher_entry_set_count_visible(psensor_entry, - FALSE); - last_visible = show; - } - - if (sensors && *sensors) { - v = psensor_get_max_current_value(sensors, SENSOR_TYPE_TEMP); - - if (!use_celsius) - v = celsius_to_fahrenheit(v); - - unity_launcher_entry_set_count(psensor_entry, v); - } -}