/*
- Copyright (C) 2010-2011 wpitchoune@gmail.com
+ Copyright (C) 2010-2011 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
#include "config.h"
#include "cfg.h"
-#include "hdd.h"
#include "psensor.h"
#include "graph.h"
#include "ui.h"
void print_version()
{
printf("psensor %s\n", VERSION);
- printf(_("Copyright (C) %s wpitchoune@gmail.com\n\
+ printf(_("Copyright (C) %s jeanfi@gmail.com\n\
License GPLv2: GNU GPL version 2 or later \
<http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>\n\
This is free software: you are free to change and redistribute it.\n\
struct config *cfg = ui->config;
while (1) {
- /*gdk_threads_enter();*/
g_mutex_lock(ui->sensors_mutex);
if (!sensors)
nvidia_psensor_list_update(sensors);
#endif
- /*gdk_threads_leave();*/
g_mutex_unlock(ui->sensors_mutex);
sleep(cfg->sensor_update_interval);
cfg = ui->config;
g_mutex_lock(ui->sensors_mutex);
- /*gdk_threads_enter();*/
graph_update(ui->sensors, ui->w_graph, ui->config);
- ui_sensorlist_update(ui->ui_sensorlist);
+ ui_sensorlist_update(ui);
#if defined(HAVE_APPINDICATOR) || defined(HAVE_APPINDICATOR_029)
ui_appindicator_update(ui);
#endif
#ifdef HAVE_UNITY
- ui_unity_launcher_entry_update(ui->sensors);
+ ui_unity_launcher_entry_update(ui->sensors,
+ !cfg->unity_launcher_count_disabled);
#endif
if (ui->graph_update_interval != cfg->graph_update_interval) {
}
g_mutex_unlock(ui->sensors_mutex);
- /*gdk_threads_leave();*/
if (ret == FALSE)
g_timeout_add(1000 * ui->graph_update_interval,
associate_cb_alarm_raised(ui.sensors, &ui);
/* main window */
- ui.main_window = ui_window_create(&ui);
- ui.main_box = NULL;
+ ui_window_create(&ui);
+ ui.sensor_box = NULL;
/* drawing box */
ui.w_graph = ui_graph_create(&ui);
/* sensor list */
- ui.ui_sensorlist = ui_sensorlist_create(ui.sensors);
+ ui_sensorlist_create(&ui);
- ui_main_box_create(&ui);
-
- gtk_widget_show_all(ui.main_window);
+ ui_window_update(&ui);
thread = g_thread_create((GThreadFunc) update_psensor_measures,
&ui, TRUE, &error);
psensor_list_free(ui.sensors);
- /* gdk_threads_leave(); */
+#ifdef HAVE_NVIDIA
+ nvidia_cleanup();
+#endif
return 0;
}