status
[psensor.git] / src / main.c
index 6f5f321..f06ea5b 100644 (file)
@@ -40,6 +40,7 @@
 #include "lmsensor.h"
 #include "ui_pref.h"
 #include "ui_graph.h"
+#include "ui_status.h"
 
 #ifdef HAVE_UNITY
 #include "ui_unity.h"
@@ -314,7 +315,7 @@ static void log_init()
        path = malloc(strlen(dir)+1+strlen("log")+1);
        sprintf(path, "%s/%s", dir, "log");
 
-       log_open(path, LOG_INFO);
+       log_open(path);
 
        free(dir);
        free(path);
@@ -445,6 +446,8 @@ int main(int argc, char **argv)
 
 #if defined(HAVE_APPINDICATOR) || defined(HAVE_APPINDICATOR_029)
        ui_appindicator_init(&ui);
+#else
+       ui_status_init();
 #endif
 
        gdk_notify_startup_complete();
@@ -462,10 +465,19 @@ int main(int argc, char **argv)
 #ifdef HAVE_LIBATIADL
        amd_cleanup();
 #endif
+#ifdef HAVE_REMOTE_SUPPORT
+       rsensor_cleanup();
+#endif
 
        psensor_list_free(ui.sensors);
        ui.sensors = NULL;
 
+#if defined(HAVE_APPINDICATOR) || defined(HAVE_APPINDICATOR_029)
+       ui_appindicator_cleanup();
+#else
+       ui_status_cleanup();
+#endif
+
        g_mutex_unlock(ui.sensors_mutex);
 
        config_cleanup();