1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00

Moved cons_show_time() to console module

This commit is contained in:
James Booth 2013-04-21 01:37:44 +01:00
parent 9de4ab6bb9
commit 3945a72484
2 changed files with 26 additions and 26 deletions

View File

@ -65,6 +65,12 @@ cons_refresh(void)
}
}
void
cons_show_time(void)
{
window_show_time(console, '-');
}
void
cons_show(const char * const msg, ...)
{
@ -80,6 +86,26 @@ cons_show(const char * const msg, ...)
dirty = TRUE;
}
void
cons_bad_show(const char * const msg, ...)
{
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, '-');
wattron(console->win, COLOUR_ERROR);
wprintw(console->win, "%s\n", fmt_msg->str);
wattroff(console->win, COLOUR_ERROR);
g_string_free(fmt_msg, TRUE);
va_end(arg);
dirty = TRUE;
if (!win_current_is_console()) {
status_bar_new(0);
}
}
void
cons_about(void)
{
@ -1141,26 +1167,6 @@ cons_show_contacts(GSList *list)
}
}
void
cons_bad_show(const char * const msg, ...)
{
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, '-');
wattron(console->win, COLOUR_ERROR);
wprintw(console->win, "%s\n", fmt_msg->str);
wattroff(console->win, COLOUR_ERROR);
g_string_free(fmt_msg, TRUE);
va_end(arg);
dirty = TRUE;
if (!win_current_is_console()) {
status_bar_new(0);
}
}
static void
_cons_splash_logo(void)
{

View File

@ -1145,12 +1145,6 @@ win_room_show_status(const char * const contact)
}
}
void
cons_show_time(void)
{
window_show_time(console, '-');
}
void
cons_debug(const char * const msg, ...)
{