diff --git a/src/ui.h b/src/ui.h index 4e94b1da..d336af08 100644 --- a/src/ui.h +++ b/src/ui.h @@ -155,6 +155,7 @@ void cons_show_connection_prefs(void); void cons_show_account(ProfAccount *account); void cons_bad_command(const char * const cmd); void cons_show(const char * const cmd, ...); +void cons_debug(const char * const msg, ...); void cons_show_time(void); void cons_show_word(const char * const word); void cons_bad_show(const char * const cmd, ...); diff --git a/src/ui_windows.c b/src/ui_windows.c index e6b343d3..ba755ff2 100644 --- a/src/ui_windows.c +++ b/src/ui_windows.c @@ -1635,6 +1635,30 @@ cons_show(const char * const msg, ...) } } +void +cons_debug(const char * const msg, ...) +{ + if (strcmp(PACKAGE_STATUS, "development") == 0) { + va_list arg; + va_start(arg, msg); + GString *fmt_msg = g_string_new(NULL); + g_string_vprintf(fmt_msg, msg, arg); + _win_show_time(console->win, '-'); + wprintw(console->win, "%s\n", fmt_msg->str); + g_string_free(fmt_msg, TRUE); + va_end(arg); + + if (current_index == 0) { + dirty = TRUE; + } else { + status_bar_new(0); + } + + win_current_page_off(); + ui_refresh(); + } +} + void cons_show_word(const char * const word) {