associate_cb_alarm_raised(ui.sensors, &ui);
if (ui.config->slog_enabled)
- slog_activate(NULL, ui.sensors, &ui.sensors_mutex, 5);
+ slog_activate(NULL,
+ ui.sensors,
+ &ui.sensors_mutex,
+ config_get_slog_interval());
#if !defined(HAVE_APPINDICATOR) && !defined(HAVE_APPINDICATOR_029)
ui_status_init(&ui);
/*
* hack, did not find a cleaner solution.
- * wait 2s to ensure that the status icon is attempted to be
+ * wait 30s to ensure that the status icon is attempted to be
* drawn before determining whether the main window must be
* show.
*/
- g_timeout_add(2000, (GSourceFunc)initial_window_show, &ui);
+ if (ui.config->hide_on_startup)
+ g_timeout_add(30000, (GSourceFunc)initial_window_show, &ui);
+ else
+ initial_window_show(&ui);
+ printf("main loop\n");
/* main loop */
gtk_main();
- g_object_ref(app);
+ g_object_unref(app);
cleanup(&ui);
log_debug("Quitting...");
log_close();
+ if (url)
+ free(url);
+
return 0;
}