avoid to shadow var
[psensor.git] / src / ui_unity.c
index 046fa6c..2c00403 100644 (file)
@@ -18,6 +18,7 @@
  */
 #include <unity.h>
 
+#include <temperature.h>
 #include <ui_unity.h>
 
 static int initialized;
@@ -26,13 +27,13 @@ static unsigned int last_visible = -1;
 
 void ui_unity_launcher_entry_update(struct psensor **sensors,
                                    unsigned int show,
-                                   int use_celcius)
+                                   int use_celsius)
 {
        double v;
 
        if (!initialized) {
                psensor_entry = unity_launcher_entry_get_for_desktop_file
-                       ("psensor.desktop");
+                       (PSENSOR_DESKTOP_FILE);
 
                unity_launcher_entry_set_count(psensor_entry, 0);
                initialized = 1;
@@ -51,8 +52,8 @@ void ui_unity_launcher_entry_update(struct psensor **sensors,
        if (sensors && *sensors) {
                v = psensor_get_max_current_value(sensors, SENSOR_TYPE_TEMP);
 
-               if (!use_celcius)
-                       v = celcius_to_fahrenheit(v);
+               if (!use_celsius)
+                       v = celsius_to_fahrenheit(v);
 
                unity_launcher_entry_set_count(psensor_entry, v);
        }