Renamed window_show_time -> window_print_time

This commit is contained in:
James Booth
2013-04-21 02:10:13 +01:00
parent e151ce707d
commit a3b861a711
4 changed files with 78 additions and 78 deletions

View File

@@ -331,7 +331,7 @@ ui_show_incoming_msg(const char * const from, const char * const message,
// no spare windows left
if (win_index == 0) {
if (tv_stamp == NULL) {
window_show_time(console, '-');
window_print_time(console, '-');
} else {
GDateTime *time = g_date_time_new_from_timeval_utc(tv_stamp);
gchar *date_fmt = g_date_time_format(time, "%H:%M:%S");
@@ -368,7 +368,7 @@ ui_show_incoming_msg(const char * const from, const char * const message,
// currently viewing chat window with sender
if (win_index == current_index) {
if (tv_stamp == NULL) {
window_show_time(window, '-');
window_print_time(window, '-');
} else {
GDateTime *time = g_date_time_new_from_timeval_utc(tv_stamp);
gchar *date_fmt = g_date_time_format(time, "%H:%M:%S");
@@ -407,7 +407,7 @@ ui_show_incoming_msg(const char * const from, const char * const message,
}
if (tv_stamp == NULL) {
window_show_time(window, '-');
window_print_time(window, '-');
} else {
GDateTime *time = g_date_time_new_from_timeval_utc(tv_stamp);
gchar *date_fmt = g_date_time_format(time, "%H:%M:%S");
@@ -501,7 +501,7 @@ ui_disconnected(void)
for (i = 1; i < NUM_WINS; i++) {
if (windows[i] != NULL) {
ProfWin *window = windows[i];
window_show_time(window, '-');
window_print_time(window, '-');
wattron(window->win, COLOUR_ERROR);
wprintw(window->win, "%s\n", "Lost connection.");
wattroff(window->win, COLOUR_ERROR);
@@ -615,7 +615,7 @@ win_current_show(const char * const msg, ...)
va_start(arg, msg);
GString *fmt_msg = g_string_new(NULL);
g_string_vprintf(fmt_msg, msg, arg);
window_show_time(current, '-');
window_print_time(current, '-');
wprintw(current->win, "%s\n", fmt_msg->str);
g_string_free(fmt_msg, TRUE);
va_end(arg);
@@ -626,7 +626,7 @@ win_current_show(const char * const msg, ...)
void
win_current_bad_show(const char * const msg)
{
window_show_time(current, '-');
window_print_time(current, '-');
wattron(current->win, COLOUR_ERROR);
wprintw(current->win, "%s\n", msg);
wattroff(current->win, COLOUR_ERROR);
@@ -666,7 +666,7 @@ win_show_error_msg(const char * const from, const char *err_msg)
// chat window exists
if (win_index < NUM_WINS) {
window = windows[win_index];
window_show_time(window, '-');
window_print_time(window, '-');
_win_show_error_msg(window->win, err_msg);
if (win_index == current_index) {
dirty = TRUE;
@@ -696,7 +696,7 @@ win_show_system_msg(const char * const from, const char *message)
}
window = windows[win_index];
window_show_time(window, '-');
window_print_time(window, '-');
wprintw(window->win, "*%s %s\n", bare_jid, message);
// this is the current window
@@ -718,7 +718,7 @@ win_show_gone(const char * const from)
// chat window exists
if (win_index < NUM_WINS) {
window = windows[win_index];
window_show_time(window, '-');
window_print_time(window, '-');
wattron(window->win, COLOUR_GONE);
wprintw(window->win, "*%s ", from);
wprintw(window->win, "has left the conversation.");
@@ -812,7 +812,7 @@ win_show_outgoing_msg(const char * const from, const char * const to,
window = windows[win_index];
}
window_show_time(window, '-');
window_print_time(window, '-');
if (strncmp(message, "/me ", 4) == 0) {
wattron(window->win, COLOUR_ME);
wprintw(window->win, "*%s ", from);
@@ -845,7 +845,7 @@ win_show_room_roster(const char * const room, GList *roster, const char * const
int win_index = _find_prof_win_index(room);
ProfWin *window = windows[win_index];
window_show_time(window, '!');
window_print_time(window, '!');
if ((roster == NULL) || (g_list_length(roster) == 0)) {
wattron(window->win, COLOUR_ROOMINFO);
if (presence == NULL) {
@@ -894,7 +894,7 @@ win_show_room_member_offline(const char * const room, const char * const nick)
int win_index = _find_prof_win_index(room);
ProfWin *window = windows[win_index];
window_show_time(window, '!');
window_print_time(window, '!');
wattron(window->win, COLOUR_OFFLINE);
wprintw(window->win, "<- %s has left the room.\n", nick);
wattroff(window->win, COLOUR_OFFLINE);
@@ -910,7 +910,7 @@ win_show_room_member_online(const char * const room, const char * const nick,
int win_index = _find_prof_win_index(room);
ProfWin *window = windows[win_index];
window_show_time(window, '!');
window_print_time(window, '!');
wattron(window->win, COLOUR_ONLINE);
wprintw(window->win, "-> %s has joined the room.\n", nick);
wattroff(window->win, COLOUR_ONLINE);
@@ -940,7 +940,7 @@ win_show_room_member_nick_change(const char * const room,
int win_index = _find_prof_win_index(room);
ProfWin *window = windows[win_index];
window_show_time(window, '!');
window_print_time(window, '!');
wattron(window->win, COLOUR_THEM);
wprintw(window->win, "** %s is now known as %s\n", old_nick, nick);
wattroff(window->win, COLOUR_THEM);
@@ -955,7 +955,7 @@ win_show_room_nick_change(const char * const room, const char * const nick)
int win_index = _find_prof_win_index(room);
ProfWin *window = windows[win_index];
window_show_time(window, '!');
window_print_time(window, '!');
wattron(window->win, COLOUR_ME);
wprintw(window->win, "** You are now known as %s\n", nick);
wattroff(window->win, COLOUR_ME);
@@ -997,7 +997,7 @@ win_show_room_message(const char * const room_jid, const char * const nick,
int win_index = _find_prof_win_index(room_jid);
ProfWin *window = windows[win_index];
window_show_time(window, '-');
window_print_time(window, '-');
if (strcmp(nick, muc_get_room_nick(room_jid)) != 0) {
if (strncmp(message, "/me ", 4) == 0) {
wattron(window->win, COLOUR_THEM);
@@ -1061,7 +1061,7 @@ win_show_room_subject(const char * const room_jid, const char * const subject)
int win_index = _find_prof_win_index(room_jid);
ProfWin *window = windows[win_index];
window_show_time(window, '!');
window_print_time(window, '!');
wattron(window->win, COLOUR_ROOMINFO);
wprintw(window->win, "Room subject: ");
wattroff(window->win, COLOUR_ROOMINFO);
@@ -1084,7 +1084,7 @@ win_show_room_broadcast(const char * const room_jid, const char * const message)
int win_index = _find_prof_win_index(room_jid);
ProfWin *window = windows[win_index];
window_show_time(window, '!');
window_print_time(window, '!');
wattron(window->win, COLOUR_ROOMINFO);
wprintw(window->win, "Room message: ");
wattroff(window->win, COLOUR_ROOMINFO);
@@ -1336,7 +1336,7 @@ _show_status_string(ProfWin *window, const char * const from,
if (!prefs_get_boolean(PREF_STATUSES))
return;
window_show_time(window, '-');
window_print_time(window, '-');
if (show != NULL) {
if (strcmp(show, "away") == 0) {