diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-08-29 10:03:56 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-08-29 10:03:56 +0000 |
commit | a5ee6eee9ba9f86332b8dff79a1036594401a674 (patch) | |
tree | 95bf273a9ce2dc9de0daa54993e4177da08bbf08 /src/utils.c | |
parent | 1895dda4b0fc535741c9aaca412b41571bec5e53 (diff) |
separate UI codes from utils.c.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@524 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/utils.c')
-rw-r--r-- | src/utils.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/utils.c b/src/utils.c index 7bc8e8a5..dc72b814 100644 --- a/src/utils.c +++ b/src/utils.c @@ -52,7 +52,6 @@ #include "utils.h" #include "socket.h" -#include "statusbar.h" #define BUFFSIZE 8192 @@ -3302,7 +3301,7 @@ void set_debug_mode(gboolean enable) debug_mode = enable; } -void log_dummy_func(const gchar *str) +static void log_dummy_func(const gchar *str) { } @@ -3311,6 +3310,8 @@ static LogFunc log_message_ui_func = log_dummy_func; static LogFunc log_warning_ui_func = log_dummy_func; static LogFunc log_error_ui_func = log_dummy_func; +static LogFunc log_show_status_func = log_dummy_func; + void set_log_ui_func(LogFunc print_func, LogFunc message_func, LogFunc warning_func, LogFunc error_func) { @@ -3320,6 +3321,11 @@ void set_log_ui_func(LogFunc print_func, LogFunc message_func, log_error_ui_func = error_func; } +void set_log_show_status_func(LogFunc status_func) +{ + log_show_status_func = status_func; +} + void debug_print(const gchar *format, ...) { va_list args; @@ -3356,7 +3362,7 @@ void log_print(const gchar *format, ...) fflush(log_fp); } if (log_verbosity_count) - statusbar_puts_all(buf + TIME_LEN); + log_show_status_func(buf + TIME_LEN); } void log_message(const gchar *format, ...) @@ -3380,7 +3386,7 @@ void log_message(const gchar *format, ...) fputs(buf + TIME_LEN, log_fp); fflush(log_fp); } - statusbar_puts_all(buf + TIME_LEN); + log_show_status_func(buf + TIME_LEN); } void log_warning(const gchar *format, ...) |