#include "slog.h"
#include "ui_pref.h"
#include "ui_graph.h"
+#include <ui_notify.h>
#include "ui_status.h"
#ifdef HAVE_UNITY
#include "ui_appindicator.h"
-#ifdef HAVE_LIBNOTIFY
-#include "ui_notify.h"
-#endif
-
#ifdef HAVE_GTOP
#include <pgtop2.h>
#endif
static const char *program_name;
-static void print_version()
+static void print_version(void)
{
printf("psensor %s\n", VERSION);
printf(_("Copyright (C) %s jeanfi@gmail.com\n"
"2010-2014");
}
-static void print_help()
+static void print_help(void)
{
printf(_("Usage: %s [OPTION]...\n"), program_name);
ui_status_update(ui, attention);
}
-gboolean ui_refresh_thread(gpointer data)
+static gboolean ui_refresh_thread(gpointer data)
{
struct config *cfg;
gboolean ret;
static void cb_alarm_raised(struct psensor *sensor, void *data)
{
-#ifdef HAVE_LIBNOTIFY
if (sensor->alarm_enabled)
ui_notify(sensor, (struct ui_psensor *)data);
-#endif
notify_cmd(sensor);
}
s->name = n;
}
- s->appindicator_enabled = config_is_appindicator_enabled(s->id);
-
sensor_cur++;
}
}
-static void log_init()
+static void log_init(void)
{
const char *dir;
char *path;
}
static struct option long_options[] = {
- {"version", no_argument, 0, 'v'},
- {"help", no_argument, 0, 'h'},
- {"url", required_argument, 0, 'u'},
- {"debug", required_argument, 0, 'd'},
- {"new-instance", no_argument, 0, 'n'},
- {0, 0, 0, 0}
+ {"version", no_argument, NULL, 'v'},
+ {"help", no_argument, NULL, 'h'},
+ {"url", required_argument, NULL, 'u'},
+ {"debug", required_argument, NULL, 'd'},
+ {"new-instance", no_argument, NULL, 'n'},
+ {NULL, 0, NULL, 0}
};
static gboolean initial_window_show(gpointer data)
return FALSE;
}
-static void log_glib_info()
+static void log_glib_info(void)
{
log_debug("Compiled with GLib %d.%d.%d",
GLIB_MAJOR_VERSION,