mirror of
https://github.com/profanity-im/profanity.git
synced 2024-11-03 19:37:16 -05:00
Added cons_debug()
This commit is contained in:
parent
0ef52901c9
commit
603e1934a5
1
src/ui.h
1
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, ...);
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user