status icon
[psensor.git] / src / main.c
index 3ef7154..a88e25e 100644 (file)
@@ -59,6 +59,8 @@
 
 #if defined(HAVE_APPINDICATOR) || defined(HAVE_APPINDICATOR_029)
 #include "ui_appindicator.h"
+#else
+#include "ui_status.h"
 #endif
 
 #ifdef HAVE_LIBNOTIFY
@@ -314,7 +316,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);
@@ -346,10 +348,6 @@ int main(int argc, char **argv)
        textdomain(PACKAGE);
 #endif
 
-#if TUTU
-       printf("coucou\n");
-#endif
-
        while ((optc = getopt_long(argc, argv, "vhdu:", long_options,
                                   NULL)) != -1) {
                switch (optc) {
@@ -449,6 +447,8 @@ int main(int argc, char **argv)
 
 #if defined(HAVE_APPINDICATOR) || defined(HAVE_APPINDICATOR_029)
        ui_appindicator_init(&ui);
+#else
+       ui_status_create();
 #endif
 
        gdk_notify_startup_complete();
@@ -466,6 +466,9 @@ 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;