mirror of
https://github.com/profanity-im/profanity.git
synced 2025-02-02 15:08:15 -05:00
Moved cons_debug() to console module
This commit is contained in:
parent
3945a72484
commit
0c912990c7
@ -71,6 +71,29 @@ cons_show_time(void)
|
||||
window_show_time(console, '-');
|
||||
}
|
||||
|
||||
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);
|
||||
window_show_time(console, '-');
|
||||
wprintw(console->win, "%s\n", fmt_msg->str);
|
||||
g_string_free(fmt_msg, TRUE);
|
||||
va_end(arg);
|
||||
|
||||
dirty = TRUE;
|
||||
if (!win_current_is_console()) {
|
||||
status_bar_new(0);
|
||||
}
|
||||
|
||||
win_current_page_off();
|
||||
ui_refresh();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
cons_show(const char * const msg, ...)
|
||||
{
|
||||
|
@ -1145,30 +1145,6 @@ win_room_show_status(const char * const contact)
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
window_show_time(console, '-');
|
||||
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