mirror of
https://github.com/profanity-im/profanity.git
synced 2024-11-03 19:37:16 -05:00
Removed ui_xmlconsole_exists
This commit is contained in:
parent
be90e44d4a
commit
486d2e0495
@ -4397,10 +4397,11 @@ cmd_vercheck(ProfWin *window, const char *const command, gchar **args)
|
||||
gboolean
|
||||
cmd_xmlconsole(ProfWin *window, const char *const command, gchar **args)
|
||||
{
|
||||
if (!ui_xmlconsole_exists()) {
|
||||
ui_create_xmlconsole_win();
|
||||
} else {
|
||||
ProfXMLWin *xmlwin = wins_get_xmlconsole();
|
||||
if (xmlwin) {
|
||||
ui_open_xmlconsole_win();
|
||||
} else {
|
||||
ui_create_xmlconsole_win();
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
@ -222,24 +222,31 @@ ui_load_colours(void)
|
||||
}
|
||||
}
|
||||
|
||||
gboolean
|
||||
ui_xmlconsole_exists(void)
|
||||
void
|
||||
ui_create_xmlconsole_win(void)
|
||||
{
|
||||
ProfWin *window = wins_new_xmlconsole();
|
||||
ui_switch_win(window);
|
||||
}
|
||||
|
||||
void
|
||||
ui_open_xmlconsole_win(void)
|
||||
{
|
||||
ProfXMLWin *xmlwin = wins_get_xmlconsole();
|
||||
if (xmlwin) {
|
||||
return TRUE;
|
||||
} else {
|
||||
return FALSE;
|
||||
ui_switch_win((ProfWin*)xmlwin);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ui_handle_stanza(const char *const msg)
|
||||
{
|
||||
if (ui_xmlconsole_exists()) {
|
||||
ProfXMLWin *xmlconsole = wins_get_xmlconsole();
|
||||
ProfWin *window = (ProfWin*) xmlconsole;
|
||||
ProfXMLWin *xmlwin = wins_get_xmlconsole();
|
||||
if (!xmlwin) {
|
||||
return;
|
||||
}
|
||||
|
||||
ProfWin *window = (ProfWin*)xmlwin;
|
||||
if (g_str_has_prefix(msg, "SENT:")) {
|
||||
win_print(window, '-', 0, NULL, 0, 0, "", "SENT:");
|
||||
win_print(window, '-', 0, NULL, 0, THEME_ONLINE, "", &msg[6]);
|
||||
@ -249,7 +256,6 @@ ui_handle_stanza(const char *const msg)
|
||||
win_print(window, '-', 0, NULL, 0, THEME_AWAY, "", &msg[6]);
|
||||
win_print(window, '-', 0, NULL, 0, THEME_AWAY, "", "");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
@ -897,22 +903,6 @@ ui_new_private_win(const char *const fulljid)
|
||||
return (ProfPrivateWin*)window;
|
||||
}
|
||||
|
||||
void
|
||||
ui_create_xmlconsole_win(void)
|
||||
{
|
||||
ProfWin *window = wins_new_xmlconsole();
|
||||
ui_switch_win(window);
|
||||
}
|
||||
|
||||
void
|
||||
ui_open_xmlconsole_win(void)
|
||||
{
|
||||
ProfXMLWin *xmlwin = wins_get_xmlconsole();
|
||||
if (xmlwin) {
|
||||
ui_switch_win((ProfWin*)xmlwin);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ui_outgoing_private_msg(ProfPrivateWin *privwin, const char *const message)
|
||||
{
|
||||
|
@ -189,7 +189,6 @@ void ui_statusbar_new(const int win);
|
||||
void ui_write(char *line, int offset);
|
||||
void ui_invalid_command_usage(const char *const cmd, void (*setting_func)(void));
|
||||
void ui_create_xmlconsole_win(void);
|
||||
gboolean ui_xmlconsole_exists(void);
|
||||
void ui_open_xmlconsole_win(void);
|
||||
gboolean ui_win_has_unsaved_form(int num);
|
||||
void ui_inp_history_append(char *inp);
|
||||
|
@ -321,10 +321,6 @@ void ui_inp_history_append(char *inp) {}
|
||||
void ui_invalid_command_usage(const char * const usage, void (*setting_func)(void)) {}
|
||||
|
||||
void ui_create_xmlconsole_win(void) {}
|
||||
gboolean ui_xmlconsole_exists(void)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void ui_open_xmlconsole_win(void) {}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user