diff options
Diffstat (limited to 'src/info_gui.cc')
-rw-r--r-- | src/info_gui.cc | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/info_gui.cc b/src/info_gui.cc index 2559402..0d7d701 100644 --- a/src/info_gui.cc +++ b/src/info_gui.cc @@ -38,8 +38,6 @@ #include "info_gui.h" -#include "miav_config.h" - #include <stdio.h> #include <stdarg.h> @@ -59,9 +57,10 @@ bool InfoEventHandler::eventFilter( QObject *o, QEvent *e ) } } -InfoGui::InfoGui(QApplication *a, QWidget *p): Info() +InfoGui::InfoGui(QApplication *a, QWidget *p, MiavConfig *c): Info() { - log_filename = *config->readString("client_log_file"); + this->config = c; + log_filename = *(this->config->readString("client_log_file")); qapp = a; parent = p; @@ -118,6 +117,8 @@ void InfoGui::error(char *fmt, ...) va_end(argp); showmsg(buf, TXT_ERROR_TITLE, ICON_ERROR); + + log("Error: %s", buf); } void InfoGui::warn(char *fmt, ...) @@ -130,6 +131,8 @@ void InfoGui::warn(char *fmt, ...) va_end(argp); showmsg(buf, TXT_WARNING_TITLE, ICON_WARNING); + + log("Warning: %s", buf); } void InfoGui::info(char *fmt, ...) @@ -142,6 +145,8 @@ void InfoGui::info(char *fmt, ...) va_end(argp); showmsg(buf, TXT_INFO_TITLE, ICON_INFO); + + log("Info: %s", buf); } |