diff options
Diffstat (limited to 'src/ui/console.c')
-rw-r--r-- | src/ui/console.c | 156 |
1 files changed, 2 insertions, 154 deletions
diff --git a/src/ui/console.c b/src/ui/console.c index 3b8242cf..583900d9 100644 --- a/src/ui/console.c +++ b/src/ui/console.c @@ -67,10 +67,6 @@ _cons_show_time(void) { ProfWin *console = wins_get_console(); win_save_print(console, '-', NULL, NO_EOL, 0, "", ""); - - if (wins_is_current(console)) { - win_update_virtual(console); - } } static void @@ -78,10 +74,6 @@ _cons_show_word(const char * const word) { ProfWin *console = wins_get_console(); win_save_print(console, '-', NULL, NO_DATE | NO_EOL, 0, "", word); - - if (wins_is_current(console)) { - win_update_virtual(console); - } } static void @@ -96,14 +88,6 @@ _cons_debug(const char * const msg, ...) win_save_println(console, fmt_msg->str); g_string_free(fmt_msg, TRUE); va_end(arg); - - if (wins_is_current(console)) { - win_update_virtual(console); - } - cons_alert(); - - ui_current_page_off(); - ui_update_screen(); } } @@ -118,10 +102,6 @@ _cons_show(const char * const msg, ...) win_save_println(console, fmt_msg->str); g_string_free(fmt_msg, TRUE); va_end(arg); - - if (wins_is_current(console)) { - win_update_virtual(console); - } } static void @@ -136,10 +116,6 @@ _cons_show_error(const char * const msg, ...) g_string_free(fmt_msg, TRUE); va_end(arg); - if (wins_is_current(console)) { - win_update_virtual(console); - } - cons_alert(); } @@ -160,11 +136,6 @@ _cons_show_typing(const char * const barejid) } win_save_vprint(console, '-', NULL, 0, COLOUR_TYPING, "", "!! %s is typing a message...", display_usr); - - if (wins_is_current(console)) { - win_update_virtual(console); - } - cons_alert(); } @@ -179,10 +150,6 @@ _cons_show_incoming_message(const char * const short_from, const int win_index) } win_save_vprint(console, '-', NULL, 0, COLOUR_INCOMING, "", "<< incoming from %s (%d)", short_from, ui_index); - if (wins_is_current(console)) { - win_update_virtual(console); - } - cons_alert(); } @@ -223,10 +190,6 @@ _cons_about(void) pnoutrefresh(console->win, 0, 0, 1, 0, rows-3, cols-1); - if (wins_is_current(console)) { - win_update_virtual(console); - } - cons_alert(); } @@ -252,10 +215,6 @@ _cons_check_version(gboolean not_available_msg) } } - if (wins_is_current(console)) { - win_update_virtual(console); - } - cons_alert(); } } @@ -275,9 +234,6 @@ _cons_show_login_success(ProfAccount *account) win_save_vprint(console, '-', NULL, NO_DATE | NO_EOL, 0, "", " (priority %d)", accounts_get_priority_for_presence_type(account->name, presence)); win_save_print(console, '-', NULL, NO_DATE, 0, "", "."); - if (wins_is_current(console)) { - win_update_virtual(console); - } cons_alert(); } @@ -296,16 +252,12 @@ _cons_show_wins(void) } cons_show(""); - if (wins_is_current(console)) { - win_update_virtual(console); - } cons_alert(); } static void _cons_show_room_invites(GSList *invites) { - ProfWin *console = wins_get_console(); cons_show(""); if (invites == NULL) { cons_show("No outstanding chat room invites."); @@ -317,9 +269,6 @@ _cons_show_room_invites(GSList *invites) } } - if (wins_is_current(console)) { - win_update_virtual(console); - } cons_alert(); } @@ -329,9 +278,6 @@ _cons_show_info(PContact pcontact) ProfWin *console = wins_get_console(); win_show_info(console, pcontact); - if (wins_is_current(console)) { - win_update_virtual(console); - } cons_alert(); } @@ -346,7 +292,6 @@ _cons_show_caps(const char * const contact, Resource *resource) win_save_vprint(console, '-', NULL, NO_EOL, presence_colour, "", "%s", contact); win_save_print(console, '-', NULL, NO_DATE, 0, "", ":"); - if (resource->caps_str != NULL) { Capabilities *caps = caps_get(resource->caps_str); if (caps != NULL) { @@ -400,9 +345,6 @@ _cons_show_caps(const char * const contact, Resource *resource) } } - if (wins_is_current(console)) { - win_update_virtual(console); - } cons_alert(); } @@ -427,9 +369,6 @@ _cons_show_software_version(const char * const jid, const char * const presence cons_show("OS : %s", os); } - if (wins_is_current(console)) { - win_update_virtual(console); - } cons_alert(); } @@ -492,9 +431,6 @@ _cons_show_room_list(GSList *rooms, const char * const conference_node) cons_show("No chat rooms at %s", conference_node); } - if (wins_is_current(console)) { - win_update_virtual(console); - } cons_alert(); } @@ -538,10 +474,6 @@ _cons_show_bookmarks(const GList *list) win_save_newline(console); list = g_list_next(list); } - - if (wins_is_current(console)) { - win_update_virtual(console); - } } cons_alert(); } @@ -549,7 +481,6 @@ _cons_show_bookmarks(const GList *list) static void _cons_show_disco_info(const char *jid, GSList *identities, GSList *features) { - ProfWin *console = wins_get_console(); if (((identities != NULL) && (g_slist_length(identities) > 0)) || ((features != NULL) && (g_slist_length(features) > 0))) { cons_show(""); @@ -585,9 +516,6 @@ _cons_show_disco_info(const char *jid, GSList *identities, GSList *features) features = g_slist_next(features); } - if (wins_is_current(console)) { - win_update_virtual(console); - } cons_alert(); } } @@ -613,9 +541,6 @@ _cons_show_disco_items(GSList *items, const char * const jid) cons_show("No service discovery items for %s", jid); } - if (wins_is_current(console)) { - win_update_virtual(console); - } cons_alert(); } @@ -631,9 +556,6 @@ _cons_show_status(const char * const barejid) cons_show("No such contact \"%s\" in roster.", barejid); } - if (wins_is_current(console)) { - win_update_virtual(console); - } cons_alert(); } @@ -641,7 +563,6 @@ static void _cons_show_room_invite(const char * const invitor, const char * const room, const char * const reason) { - ProfWin *console = wins_get_console(); char *display_from = NULL; PContact contact = roster_get_contact(invitor); if (contact != NULL) { @@ -671,9 +592,6 @@ _cons_show_room_invite(const char * const invitor, const char * const room, free(display_from); - if (wins_is_current(console)) { - win_update_virtual(console); - } cons_alert(); } @@ -701,9 +619,6 @@ _cons_show_account_list(gchar **accounts) cons_show(""); } - if (wins_is_current(console)) { - win_update_virtual(console); - } cons_alert(); } @@ -867,9 +782,6 @@ _cons_show_account(ProfAccount *account) } } - if (wins_is_current(console)) { - win_update_virtual(console); - } cons_alert(); } @@ -991,7 +903,6 @@ _cons_titlebar_setting(void) static void _cons_show_ui_prefs(void) { - ProfWin *console = wins_get_console(); cons_show("UI preferences:"); cons_show(""); cons_theme_setting(); @@ -1003,9 +914,6 @@ _cons_show_ui_prefs(void) cons_statuses_setting(); cons_titlebar_setting(); - if (wins_is_current(console)) { - win_update_virtual(console); - } cons_alert(); } @@ -1080,14 +988,10 @@ _cons_notify_setting(void) static void _cons_show_desktop_prefs(void) { - ProfWin *console = wins_get_console(); cons_show("Desktop notification preferences:"); cons_show(""); cons_notify_setting(); - if (wins_is_current(console)) { - win_update_virtual(console); - } cons_alert(); } @@ -1143,7 +1047,6 @@ _cons_history_setting(void) static void _cons_show_chat_prefs(void) { - ProfWin *console = wins_get_console(); cons_show("Chat preferences:"); cons_show(""); cons_states_setting(); @@ -1152,9 +1055,6 @@ _cons_show_chat_prefs(void) cons_gone_setting(); cons_history_setting(); - if (wins_is_current(console)) { - win_update_virtual(console); - } cons_alert(); } @@ -1196,16 +1096,12 @@ _cons_grlog_setting(void) static void _cons_show_log_prefs(void) { - ProfWin *console = wins_get_console(); cons_show("Logging preferences:"); cons_show(""); cons_log_setting(); cons_chlog_setting(); cons_grlog_setting(); - if (wins_is_current(console)) { - win_update_virtual(console); - } cons_alert(); } @@ -1241,14 +1137,10 @@ _cons_autoaway_setting(void) static void _cons_show_presence_prefs(void) { - ProfWin *console = wins_get_console(); cons_show("Presence preferences:"); cons_show(""); cons_autoaway_setting(); - if (wins_is_current(console)) { - win_update_virtual(console); - } cons_alert(); } @@ -1288,23 +1180,18 @@ _cons_priority_setting(void) static void _cons_show_connection_prefs(void) { - ProfWin *console = wins_get_console(); cons_show("Connection preferences:"); cons_show(""); cons_reconnect_setting(); cons_autoping_setting(); cons_autoconnect_setting(); - if (wins_is_current(console)) { - win_update_virtual(console); - } cons_alert(); } static void _cons_show_otr_prefs(void) { - ProfWin *console = wins_get_console(); cons_show("OTR preferences:"); cons_show(""); @@ -1328,16 +1215,12 @@ _cons_show_otr_prefs(void) } prefs_free_string(log_value); - if (wins_is_current(console)) { - win_update_virtual(console); - } cons_alert(); } static void _cons_show_themes(GSList *themes) { - ProfWin *console = wins_get_console(); cons_show(""); if (themes == NULL) { @@ -1350,16 +1233,12 @@ _cons_show_themes(GSList *themes) } } - if (wins_is_current(console)) { - win_update_virtual(console); - } cons_alert(); } static void _cons_prefs(void) { - ProfWin *console = wins_get_console(); cons_show(""); cons_show_ui_prefs(); cons_show(""); @@ -1376,16 +1255,12 @@ _cons_prefs(void) cons_show_otr_prefs(); cons_show(""); - if (wins_is_current(console)) { - win_update_virtual(console); - } cons_alert(); } static void _cons_help(void) { - ProfWin *console = wins_get_console(); cons_show(""); cons_show("Choose a help option:"); cons_show(""); @@ -1402,16 +1277,12 @@ _cons_help(void) cons_show("/help [command] - Detailed help on a specific command."); cons_show(""); - if (wins_is_current(console)) { - win_update_virtual(console); - } cons_alert(); } static void _cons_navigation_help(void) { - ProfWin *console = wins_get_console(); cons_show(""); cons_show("Navigation:"); cons_show(""); @@ -1427,16 +1298,12 @@ _cons_navigation_help(void) cons_show("PAGE UP, PAGE DOWN : Page the main window."); cons_show(""); - if (wins_is_current(console)) { - win_update_virtual(console); - } cons_alert(); } static void _cons_show_roster_group(const char * const group, GSList *list) { - ProfWin *console = wins_get_console(); cons_show(""); if (list != NULL) { @@ -1446,23 +1313,18 @@ _cons_show_roster_group(const char * const group, GSList *list) } _show_roster_contacts(list, FALSE); - if (wins_is_current(console)) { - win_update_virtual(console); - } + cons_alert(); } static void _cons_show_roster(GSList *list) { - ProfWin *console = wins_get_console(); cons_show(""); cons_show("Roster: jid (nick) - subscription - groups"); _show_roster_contacts(list, TRUE); - if (wins_is_current(console)) { - win_update_virtual(console); - } + cons_alert(); } @@ -1477,11 +1339,6 @@ _cons_show_contact_online(PContact contact, Resource *resource, GDateTime *last_ "++", "online"); free(display_str); - - if (wins_is_current(console)) { - ui_current_page_off(); - win_update_virtual(console); - } } static void @@ -1493,11 +1350,6 @@ _cons_show_contact_offline(PContact contact, char *resource, char *status) win_show_status_string(console, display_str, "offline", status, NULL, "--", "offline"); free(display_str); - - if (wins_is_current(console)) { - ui_current_page_off(); - win_update_virtual(console); - } } static void @@ -1514,10 +1366,6 @@ _cons_show_contacts(GSList *list) } curr = g_slist_next(curr); } - - if (wins_is_current(console)) { - win_update_virtual(console); - } cons_alert(); } |