From cbd4fca0240899b81d45821ac13ced9c7c6bcef2 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Orsini Date: Mon, 7 Nov 2011 21:48:27 +0000 Subject: [PATCH] removed log_puts (replaced by log_printf) --- src/lib/log.c | 7 +------ src/lib/log.h | 1 - src/ui.c | 6 +++--- src/ui_appindicator.c | 4 ++-- 4 files changed, 6 insertions(+), 12 deletions(-) diff --git a/src/lib/log.c b/src/lib/log.c index 706948d..ea2e0ff 100644 --- a/src/lib/log.c +++ b/src/lib/log.c @@ -35,16 +35,11 @@ void log_open(const char *path, int lvl) file = fopen(path, "a"); if (file) - log_puts(LOG_INFO, "Start logging"); + log_printf(LOG_INFO, "Start logging"); else fprintf(stderr, _("Cannot open log file: %s\n"), path); } -void log_puts(int lvl, const char *msg) -{ - log_printf(lvl, msg); -} - void log_close() { if (!file) diff --git a/src/lib/log.h b/src/lib/log.h index a8a0245..5aaf22b 100644 --- a/src/lib/log.h +++ b/src/lib/log.h @@ -30,7 +30,6 @@ enum log_level { void log_open(const char *path, int lvl); void log_printf(int lvl, const char *fmt, ...); -void log_puts(int lvl, const char *msg); void log_close(); diff --git a/src/ui.c b/src/ui.c index 504eeb5..91816bf 100644 --- a/src/ui.c +++ b/src/ui.c @@ -69,10 +69,10 @@ on_delete_event_cb(GtkWidget *widget, GdkEvent *event, gpointer data) #if defined(HAVE_APPINDICATOR) || defined(HAVE_APPINDICATOR_029) if (is_appindicator_supported()) { - log_puts(LOG_DEBUG, "hiding, WM is supporting appindicator"); + log_printf(LOG_DEBUG, "hiding, WM is supporting appindicator"); gtk_widget_hide(ui->main_window); } else { - log_puts(LOG_DEBUG, "quitting, WM not supporting appindicator"); + log_printf(LOG_DEBUG, "quitting, WM not supporting appindicator"); ui_psensor_quit(ui); } #else @@ -126,7 +126,7 @@ void ui_psensor_quit(struct ui_psensor *ui) { save_window_pos(ui); - log_puts(LOG_DEBUG, "Destroy main window"); + log_printf(LOG_DEBUG, "Destroy main window"); gtk_widget_destroy(ui->main_window); gtk_main_quit(); } diff --git a/src/ui_appindicator.c b/src/ui_appindicator.c index 317e238..45ed0fd 100644 --- a/src/ui_appindicator.c +++ b/src/ui_appindicator.c @@ -232,7 +232,7 @@ void ui_appindicator_update(struct ui_psensor *ui) static GtkStatusIcon *unity_fallback(AppIndicator *indicator) { - log_puts(LOG_DEBUG, "ui_appindicator#unity_fallback"); + log_printf(LOG_DEBUG, "ui_appindicator#unity_fallback"); gtk_widget_show_all(main_window); @@ -244,7 +244,7 @@ static GtkStatusIcon *unity_fallback(AppIndicator *indicator) static void unity_unfallback(AppIndicator *indicator, GtkStatusIcon *status_icon) { - log_puts(LOG_DEBUG, "ui_appindicator#unity_unfallback"); + log_printf(LOG_DEBUG, "ui_appindicator#unity_unfallback"); appindicator_supported = 1; } -- 2.7.4