mirror of
https://github.com/profanity-im/profanity.git
synced 2024-11-03 19:37:16 -05:00
Moved remaining static functions to console module
This commit is contained in:
parent
8a280b43ca
commit
e151ce707d
@ -152,6 +152,24 @@ cons_bad_command(const char * const cmd)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
cons_show_typing(const char * const short_from)
|
||||||
|
{
|
||||||
|
window_show_time(console, '-');
|
||||||
|
wattron(console->win, COLOUR_TYPING);
|
||||||
|
wprintw(console->win, "!! %s is typing a message...\n", short_from);
|
||||||
|
wattroff(console->win, COLOUR_TYPING);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
cons_show_incoming_message(const char * const short_from, const int win_index)
|
||||||
|
{
|
||||||
|
window_show_time(console, '-');
|
||||||
|
wattron(console->win, COLOUR_INCOMING);
|
||||||
|
wprintw(console->win, "<< incoming from %s (%d)\n", short_from, win_index + 1);
|
||||||
|
wattroff(console->win, COLOUR_INCOMING);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
cons_about(void)
|
cons_about(void)
|
||||||
{
|
{
|
||||||
|
@ -166,6 +166,8 @@ void cons_show_disco_info(const char *from, GSList *identities, GSList *features
|
|||||||
void cons_show_room_invite(const char * const invitor, const char * const room,
|
void cons_show_room_invite(const char * const invitor, const char * const room,
|
||||||
const char * const reason);
|
const char * const reason);
|
||||||
void cons_check_version(gboolean not_available_msg);
|
void cons_check_version(gboolean not_available_msg);
|
||||||
|
void cons_show_typing(const char * const short_from);
|
||||||
|
void cons_show_incoming_message(const char * const short_from, const int win_index);
|
||||||
|
|
||||||
// status bar actions
|
// status bar actions
|
||||||
void status_bar_refresh(void);
|
void status_bar_refresh(void);
|
||||||
|
@ -83,9 +83,6 @@ static void _show_status_string(ProfWin *window, const char * const from,
|
|||||||
const char * const show, const char * const status,
|
const char * const show, const char * const status,
|
||||||
GDateTime *last_activity, const char * const pre,
|
GDateTime *last_activity, const char * const pre,
|
||||||
const char * const default_show);
|
const char * const default_show);
|
||||||
static void _cons_show_typing(const char * const short_from);
|
|
||||||
static void _cons_show_incoming_message(const char * const short_from,
|
|
||||||
const int win_index);
|
|
||||||
static void _win_handle_switch(const wint_t * const ch);
|
static void _win_handle_switch(const wint_t * const ch);
|
||||||
static void _win_handle_page(const wint_t * const ch);
|
static void _win_handle_page(const wint_t * const ch);
|
||||||
static void _win_resize_all(void);
|
static void _win_resize_all(void);
|
||||||
@ -266,11 +263,11 @@ ui_show_typing(const char * const from)
|
|||||||
if (prefs_get_boolean(PREF_INTYPE)) {
|
if (prefs_get_boolean(PREF_INTYPE)) {
|
||||||
// no chat window for user
|
// no chat window for user
|
||||||
if (win_index == NUM_WINS) {
|
if (win_index == NUM_WINS) {
|
||||||
_cons_show_typing(from);
|
cons_show_typing(from);
|
||||||
|
|
||||||
// have chat window but not currently in it
|
// have chat window but not currently in it
|
||||||
} else if (win_index != current_index) {
|
} else if (win_index != current_index) {
|
||||||
_cons_show_typing(from);
|
cons_show_typing(from);
|
||||||
dirty = TRUE;
|
dirty = TRUE;
|
||||||
|
|
||||||
// in chat window with user
|
// in chat window with user
|
||||||
@ -400,7 +397,7 @@ ui_show_incoming_msg(const char * const from, const char * const message,
|
|||||||
// not currently viewing chat window with sender
|
// not currently viewing chat window with sender
|
||||||
} else {
|
} else {
|
||||||
status_bar_new(win_index);
|
status_bar_new(win_index);
|
||||||
_cons_show_incoming_message(from, win_index);
|
cons_show_incoming_message(from, win_index);
|
||||||
if (prefs_get_boolean(PREF_FLASH))
|
if (prefs_get_boolean(PREF_FLASH))
|
||||||
flash();
|
flash();
|
||||||
|
|
||||||
@ -1034,7 +1031,7 @@ win_show_room_message(const char * const room_jid, const char * const nick,
|
|||||||
// not currenlty on groupchat window
|
// not currenlty on groupchat window
|
||||||
} else {
|
} else {
|
||||||
status_bar_new(win_index);
|
status_bar_new(win_index);
|
||||||
_cons_show_incoming_message(nick, win_index);
|
cons_show_incoming_message(nick, win_index);
|
||||||
if (current_index == 0) {
|
if (current_index == 0) {
|
||||||
dirty = TRUE;
|
dirty = TRUE;
|
||||||
}
|
}
|
||||||
@ -1414,24 +1411,6 @@ _show_status_string(ProfWin *window, const char * const from,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
_cons_show_typing(const char * const short_from)
|
|
||||||
{
|
|
||||||
window_show_time(console, '-');
|
|
||||||
wattron(console->win, COLOUR_TYPING);
|
|
||||||
wprintw(console->win, "!! %s is typing a message...\n", short_from);
|
|
||||||
wattroff(console->win, COLOUR_TYPING);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
_cons_show_incoming_message(const char * const short_from, const int win_index)
|
|
||||||
{
|
|
||||||
window_show_time(console, '-');
|
|
||||||
wattron(console->win, COLOUR_INCOMING);
|
|
||||||
wprintw(console->win, "<< incoming from %s (%d)\n", short_from, win_index + 1);
|
|
||||||
wattroff(console->win, COLOUR_INCOMING);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_win_handle_switch(const wint_t * const ch)
|
_win_handle_switch(const wint_t * const ch)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user