mirror of
https://github.com/profanity-im/profanity.git
synced 2024-11-03 19:37:16 -05:00
Renamed ui_switch_win -> ui_focus_win
This commit is contained in:
parent
14a81fbbbe
commit
75bce88b8a
@ -912,7 +912,7 @@ cmd_win(ProfWin *window, const char *const command, gchar **args)
|
|||||||
if (!focuswin) {
|
if (!focuswin) {
|
||||||
cons_show("Window %d does not exist.", num);
|
cons_show("Window %d does not exist.", num);
|
||||||
} else {
|
} else {
|
||||||
ui_switch_win(focuswin);
|
ui_focus_win(focuswin);
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -1499,7 +1499,7 @@ cmd_msg(ProfWin *window, const char *const command, gchar **args)
|
|||||||
if (!privwin) {
|
if (!privwin) {
|
||||||
privwin = ui_new_private_win(full_jid->str);
|
privwin = ui_new_private_win(full_jid->str);
|
||||||
}
|
}
|
||||||
ui_switch_win((ProfWin*)privwin);
|
ui_focus_win((ProfWin*)privwin);
|
||||||
|
|
||||||
if (msg) {
|
if (msg) {
|
||||||
cl_ev_send_priv_msg(privwin, msg);
|
cl_ev_send_priv_msg(privwin, msg);
|
||||||
@ -1524,7 +1524,7 @@ cmd_msg(ProfWin *window, const char *const command, gchar **args)
|
|||||||
if (!chatwin) {
|
if (!chatwin) {
|
||||||
chatwin = chatwin_new(barejid);
|
chatwin = chatwin_new(barejid);
|
||||||
}
|
}
|
||||||
ui_switch_win((ProfWin*)chatwin);
|
ui_focus_win((ProfWin*)chatwin);
|
||||||
|
|
||||||
if (msg) {
|
if (msg) {
|
||||||
cl_ev_send_msg(chatwin, msg);
|
cl_ev_send_msg(chatwin, msg);
|
||||||
@ -2745,7 +2745,7 @@ cmd_form(ProfWin *window, const char *const command, gchar **args)
|
|||||||
if (!new_current) {
|
if (!new_current) {
|
||||||
new_current = wins_get_console();
|
new_current = wins_get_console();
|
||||||
}
|
}
|
||||||
ui_switch_win(new_current);
|
ui_focus_win(new_current);
|
||||||
wins_close_by_num(num);
|
wins_close_by_num(num);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3094,7 +3094,7 @@ cmd_room(ProfWin *window, const char *const command, gchar **args)
|
|||||||
ProfMucConfWin *confwin = wins_get_muc_conf(mucwin->roomjid);
|
ProfMucConfWin *confwin = wins_get_muc_conf(mucwin->roomjid);
|
||||||
|
|
||||||
if (confwin) {
|
if (confwin) {
|
||||||
ui_switch_win((ProfWin*)confwin);
|
ui_focus_win((ProfWin*)confwin);
|
||||||
} else {
|
} else {
|
||||||
iq_request_room_config_form(mucwin->roomjid);
|
iq_request_room_config_form(mucwin->roomjid);
|
||||||
}
|
}
|
||||||
@ -4399,10 +4399,10 @@ cmd_xmlconsole(ProfWin *window, const char *const command, gchar **args)
|
|||||||
{
|
{
|
||||||
ProfXMLWin *xmlwin = wins_get_xmlconsole();
|
ProfXMLWin *xmlwin = wins_get_xmlconsole();
|
||||||
if (xmlwin) {
|
if (xmlwin) {
|
||||||
ui_switch_win((ProfWin*)xmlwin);
|
ui_focus_win((ProfWin*)xmlwin);
|
||||||
} else {
|
} else {
|
||||||
ProfWin *window = wins_new_xmlconsole();
|
ProfWin *window = wins_new_xmlconsole();
|
||||||
ui_switch_win(window);
|
ui_focus_win(window);
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -4712,7 +4712,7 @@ cmd_pgp(ProfWin *window, const char *const command, gchar **args)
|
|||||||
if (!chatwin) {
|
if (!chatwin) {
|
||||||
chatwin = chatwin_new(barejid);
|
chatwin = chatwin_new(barejid);
|
||||||
}
|
}
|
||||||
ui_switch_win((ProfWin*)chatwin);
|
ui_focus_win((ProfWin*)chatwin);
|
||||||
} else {
|
} else {
|
||||||
chatwin = (ProfChatWin*)window;
|
chatwin = (ProfChatWin*)window;
|
||||||
assert(chatwin->memcheck == PROFCHATWIN_MEMCHECK);
|
assert(chatwin->memcheck == PROFCHATWIN_MEMCHECK);
|
||||||
@ -4913,7 +4913,7 @@ cmd_otr(ProfWin *window, const char *const command, gchar **args)
|
|||||||
if (!chatwin) {
|
if (!chatwin) {
|
||||||
chatwin = chatwin_new(barejid);
|
chatwin = chatwin_new(barejid);
|
||||||
}
|
}
|
||||||
ui_switch_win((ProfWin*)chatwin);
|
ui_focus_win((ProfWin*)chatwin);
|
||||||
|
|
||||||
if (chatwin->pgp_send) {
|
if (chatwin->pgp_send) {
|
||||||
ui_current_print_formatted_line('!', 0, "You must disable PGP encryption before starting an OTR session.");
|
ui_current_print_formatted_line('!', 0, "You must disable PGP encryption before starting an OTR session.");
|
||||||
|
@ -664,7 +664,7 @@ ui_win_has_unsaved_form(int num)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ui_switch_win(ProfWin *window)
|
ui_focus_win(ProfWin *window)
|
||||||
{
|
{
|
||||||
assert(window != NULL);
|
assert(window != NULL);
|
||||||
|
|
||||||
@ -869,7 +869,7 @@ ui_room_join(const char *const roomjid, gboolean focus)
|
|||||||
|
|
||||||
|
|
||||||
if (focus) {
|
if (focus) {
|
||||||
ui_switch_win(window);
|
ui_focus_win(window);
|
||||||
} else {
|
} else {
|
||||||
int num = wins_get_num(window);
|
int num = wins_get_num(window);
|
||||||
status_bar_active(num);
|
status_bar_active(num);
|
||||||
@ -883,7 +883,7 @@ void
|
|||||||
ui_switch_to_room(const char *const roomjid)
|
ui_switch_to_room(const char *const roomjid)
|
||||||
{
|
{
|
||||||
ProfWin *window = (ProfWin*)wins_get_muc(roomjid);
|
ProfWin *window = (ProfWin*)wins_get_muc(roomjid);
|
||||||
ui_switch_win(window);
|
ui_focus_win(window);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -1339,7 +1339,7 @@ ui_handle_room_configuration(const char *const roomjid, DataForm *form)
|
|||||||
ProfMucConfWin *confwin = (ProfMucConfWin*)window;
|
ProfMucConfWin *confwin = (ProfMucConfWin*)window;
|
||||||
assert(confwin->memcheck == PROFCONFWIN_MEMCHECK);
|
assert(confwin->memcheck == PROFCONFWIN_MEMCHECK);
|
||||||
|
|
||||||
ui_switch_win(window);
|
ui_focus_win(window);
|
||||||
ui_show_form(confwin);
|
ui_show_form(confwin);
|
||||||
|
|
||||||
win_print(window, '-', 0, NULL, 0, 0, "", "");
|
win_print(window, '-', 0, NULL, 0, 0, "", "");
|
||||||
@ -1391,11 +1391,11 @@ ui_handle_room_config_submit_result(const char *const roomjid)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (muc_window) {
|
if (muc_window) {
|
||||||
ui_switch_win((ProfWin*)muc_window);
|
ui_focus_win((ProfWin*)muc_window);
|
||||||
win_print(muc_window, '!', 0, NULL, 0, THEME_ROOMINFO, "", "Room configuration successful");
|
win_print(muc_window, '!', 0, NULL, 0, THEME_ROOMINFO, "", "Room configuration successful");
|
||||||
} else {
|
} else {
|
||||||
ProfWin *console = wins_get_console();
|
ProfWin *console = wins_get_console();
|
||||||
ui_switch_win(console);
|
ui_focus_win(console);
|
||||||
cons_show("Room configuration successful: %s", roomjid);
|
cons_show("Room configuration successful: %s", roomjid);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -456,7 +456,7 @@ _go_to_win(int i)
|
|||||||
{
|
{
|
||||||
ProfWin *window = wins_get_by_num(i);
|
ProfWin *window = wins_get_by_num(i);
|
||||||
if (window) {
|
if (window) {
|
||||||
ui_switch_win(window);
|
ui_focus_win(window);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -535,7 +535,7 @@ _inp_rl_altleft_handler(int count, int key)
|
|||||||
{
|
{
|
||||||
ProfWin *window = wins_get_previous();
|
ProfWin *window = wins_get_previous();
|
||||||
if (window) {
|
if (window) {
|
||||||
ui_switch_win(window);
|
ui_focus_win(window);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -545,7 +545,7 @@ _inp_rl_altright_handler(int count, int key)
|
|||||||
{
|
{
|
||||||
ProfWin *window = wins_get_next();
|
ProfWin *window = wins_get_next();
|
||||||
if (window) {
|
if (window) {
|
||||||
ui_switch_win(window);
|
ui_focus_win(window);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -63,7 +63,7 @@ void ui_update(void);
|
|||||||
void ui_close(void);
|
void ui_close(void);
|
||||||
void ui_redraw(void);
|
void ui_redraw(void);
|
||||||
void ui_resize(void);
|
void ui_resize(void);
|
||||||
void ui_switch_win(ProfWin *window);
|
void ui_focus_win(ProfWin *window);
|
||||||
void ui_sigwinch_handler(int sig);
|
void ui_sigwinch_handler(int sig);
|
||||||
void ui_handle_otr_error(const char *const barejid, const char *const message);
|
void ui_handle_otr_error(const char *const barejid, const char *const message);
|
||||||
unsigned long ui_get_idle_time(void);
|
unsigned long ui_get_idle_time(void);
|
||||||
|
@ -536,7 +536,7 @@ wins_swap(int source_win, int target_win)
|
|||||||
}
|
}
|
||||||
if (wins_get_current_num() == source_win) {
|
if (wins_get_current_num() == source_win) {
|
||||||
wins_set_current_by_num(target_win);
|
wins_set_current_by_num(target_win);
|
||||||
ui_switch_win(console);
|
ui_focus_win(console);
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
@ -557,7 +557,7 @@ wins_swap(int source_win, int target_win)
|
|||||||
status_bar_active(source_win);
|
status_bar_active(source_win);
|
||||||
}
|
}
|
||||||
if ((wins_get_current_num() == source_win) || (wins_get_current_num() == target_win)) {
|
if ((wins_get_current_num() == source_win) || (wins_get_current_num() == target_win)) {
|
||||||
ui_switch_win(console);
|
ui_focus_win(console);
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -617,7 +617,7 @@ wins_tidy(void)
|
|||||||
windows = new_windows;
|
windows = new_windows;
|
||||||
current = 1;
|
current = 1;
|
||||||
ProfWin *console = wins_get_console();
|
ProfWin *console = wins_get_console();
|
||||||
ui_switch_win(console);
|
ui_focus_win(console);
|
||||||
g_list_free(keys);
|
g_list_free(keys);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
} else {
|
} else {
|
||||||
|
@ -65,7 +65,7 @@ void ui_close(void) {}
|
|||||||
void ui_redraw(void) {}
|
void ui_redraw(void) {}
|
||||||
void ui_resize(void) {}
|
void ui_resize(void) {}
|
||||||
|
|
||||||
void ui_switch_win(ProfWin *win) {}
|
void ui_focus_win(ProfWin *win) {}
|
||||||
|
|
||||||
#ifdef HAVE_LIBOTR
|
#ifdef HAVE_LIBOTR
|
||||||
void chatwin_otr_secured(ProfChatWin *chatwin, gboolean trusted) {}
|
void chatwin_otr_secured(ProfChatWin *chatwin, gboolean trusted) {}
|
||||||
|
Loading…
Reference in New Issue
Block a user