projects
/
psensor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
avoid to use cpp in code
[psensor.git]
/
src
/
main.c
diff --git
a/src/main.c
b/src/main.c
index
5ca03aa
..
175568e
100644
(file)
--- a/
src/main.c
+++ b/
src/main.c
@@
-44,6
+44,7
@@
#include "slog.h"
#include "ui_pref.h"
#include "ui_graph.h"
#include "slog.h"
#include "ui_pref.h"
#include "ui_graph.h"
+#include <ui_notify.h>
#include "ui_status.h"
#ifdef HAVE_UNITY
#include "ui_status.h"
#ifdef HAVE_UNITY
@@
-64,17
+65,13
@@
#include "ui_appindicator.h"
#include "ui_appindicator.h"
-#ifdef HAVE_LIBNOTIFY
-#include "ui_notify.h"
-#endif
-
#ifdef HAVE_GTOP
#include <pgtop2.h>
#endif
static const char *program_name;
#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"
{
printf("psensor %s\n", VERSION);
printf(_("Copyright (C) %s jeanfi@gmail.com\n"
@@
-86,7
+83,7
@@
static void print_version()
"2010-2014");
}
"2010-2014");
}
-static void print_help()
+static void print_help(
void
)
{
printf(_("Usage: %s [OPTION]...\n"), program_name);
{
printf(_("Usage: %s [OPTION]...\n"), program_name);
@@
-211,7
+208,7
@@
static void indicators_update(struct ui_psensor *ui)
ui_status_update(ui, attention);
}
ui_status_update(ui, attention);
}
-gboolean ui_refresh_thread(gpointer data)
+
static
gboolean ui_refresh_thread(gpointer data)
{
struct config *cfg;
gboolean ret;
{
struct config *cfg;
gboolean ret;
@@
-251,10
+248,8
@@
gboolean ui_refresh_thread(gpointer data)
static void cb_alarm_raised(struct psensor *sensor, void *data)
{
static void cb_alarm_raised(struct psensor *sensor, void *data)
{
-#ifdef HAVE_LIBNOTIFY
if (sensor->alarm_enabled)
ui_notify(sensor, (struct ui_psensor *)data);
if (sensor->alarm_enabled)
ui_notify(sensor, (struct ui_psensor *)data);
-#endif
notify_cmd(sensor);
}
notify_cmd(sensor);
}
@@
-353,7
+348,7
@@
static void associate_preferences(struct psensor **sensors)
}
}
}
}
-static void log_init()
+static void log_init(
void
)
{
const char *dir;
char *path;
{
const char *dir;
char *path;
@@
-402,7
+397,7
@@
static gboolean initial_window_show(gpointer data)
return FALSE;
}
return FALSE;
}
-static void log_glib_info()
+static void log_glib_info(
void
)
{
log_debug("Compiled with GLib %d.%d.%d",
GLIB_MAJOR_VERSION,
{
log_debug("Compiled with GLib %d.%d.%d",
GLIB_MAJOR_VERSION,