Mercurial > geeqie.yaz
diff src/debug.c @ 678:6d6f042b8ca5
Add a log window that shows normal and debug messages. For now, it was added to Help menu.
author | zas_ |
---|---|
date | Sat, 17 May 2008 21:26:45 +0000 |
parents | fbebf5cf4a55 |
children | bbe9cef644f8 |
line wrap: on
line diff
--- a/src/debug.c Fri May 16 20:12:11 2008 +0000 +++ b/src/debug.c Sat May 17 21:26:45 2008 +0000 @@ -10,7 +10,9 @@ */ #include "main.h" +#include "debug.h" +#include "logwindow.h" /* * Logging functions @@ -26,7 +28,11 @@ ret = vsnprintf(buf, sizeof(buf), format, ap); va_end(ap); - puts(buf); + printf("%s", buf); + if (strcmp(domain, DOMAIN_INFO) == 0) + log_window_append(buf, LOG_NORMAL); + else + log_window_append(buf, LOG_MSG); return ret; }