1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

Added cons_debug()

This commit is contained in:
James Booth 2013-01-30 00:56:14 +00:00
parent 0ef52901c9
commit 603e1934a5
2 changed files with 25 additions and 0 deletions

View File

@ -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, ...);

View File

@ -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)
{