mirror of
https://github.com/profanity-im/profanity.git
synced 2025-02-02 15:08:15 -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
|
gboolean
|
||||||
cmd_xmlconsole(ProfWin *window, const char *const command, gchar **args)
|
cmd_xmlconsole(ProfWin *window, const char *const command, gchar **args)
|
||||||
{
|
{
|
||||||
if (!ui_xmlconsole_exists()) {
|
ProfXMLWin *xmlwin = wins_get_xmlconsole();
|
||||||
ui_create_xmlconsole_win();
|
if (xmlwin) {
|
||||||
} else {
|
|
||||||
ui_open_xmlconsole_win();
|
ui_open_xmlconsole_win();
|
||||||
|
} else {
|
||||||
|
ui_create_xmlconsole_win();
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -222,33 +222,39 @@ ui_load_colours(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
void
|
||||||
ui_xmlconsole_exists(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();
|
ProfXMLWin *xmlwin = wins_get_xmlconsole();
|
||||||
if (xmlwin) {
|
if (xmlwin) {
|
||||||
return TRUE;
|
ui_switch_win((ProfWin*)xmlwin);
|
||||||
} else {
|
|
||||||
return FALSE;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ui_handle_stanza(const char *const msg)
|
ui_handle_stanza(const char *const msg)
|
||||||
{
|
{
|
||||||
if (ui_xmlconsole_exists()) {
|
ProfXMLWin *xmlwin = wins_get_xmlconsole();
|
||||||
ProfXMLWin *xmlconsole = wins_get_xmlconsole();
|
if (!xmlwin) {
|
||||||
ProfWin *window = (ProfWin*) xmlconsole;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (g_str_has_prefix(msg, "SENT:")) {
|
ProfWin *window = (ProfWin*)xmlwin;
|
||||||
win_print(window, '-', 0, NULL, 0, 0, "", "SENT:");
|
if (g_str_has_prefix(msg, "SENT:")) {
|
||||||
win_print(window, '-', 0, NULL, 0, THEME_ONLINE, "", &msg[6]);
|
win_print(window, '-', 0, NULL, 0, 0, "", "SENT:");
|
||||||
win_print(window, '-', 0, NULL, 0, THEME_ONLINE, "", "");
|
win_print(window, '-', 0, NULL, 0, THEME_ONLINE, "", &msg[6]);
|
||||||
} else if (g_str_has_prefix(msg, "RECV:")) {
|
win_print(window, '-', 0, NULL, 0, THEME_ONLINE, "", "");
|
||||||
win_print(window, '-', 0, NULL, 0, 0, "", "RECV:");
|
} else if (g_str_has_prefix(msg, "RECV:")) {
|
||||||
win_print(window, '-', 0, NULL, 0, THEME_AWAY, "", &msg[6]);
|
win_print(window, '-', 0, NULL, 0, 0, "", "RECV:");
|
||||||
win_print(window, '-', 0, NULL, 0, THEME_AWAY, "", "");
|
win_print(window, '-', 0, NULL, 0, THEME_AWAY, "", &msg[6]);
|
||||||
}
|
win_print(window, '-', 0, NULL, 0, THEME_AWAY, "", "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -897,22 +903,6 @@ ui_new_private_win(const char *const fulljid)
|
|||||||
return (ProfPrivateWin*)window;
|
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
|
void
|
||||||
ui_outgoing_private_msg(ProfPrivateWin *privwin, const char *const message)
|
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_write(char *line, int offset);
|
||||||
void ui_invalid_command_usage(const char *const cmd, void (*setting_func)(void));
|
void ui_invalid_command_usage(const char *const cmd, void (*setting_func)(void));
|
||||||
void ui_create_xmlconsole_win(void);
|
void ui_create_xmlconsole_win(void);
|
||||||
gboolean ui_xmlconsole_exists(void);
|
|
||||||
void ui_open_xmlconsole_win(void);
|
void ui_open_xmlconsole_win(void);
|
||||||
gboolean ui_win_has_unsaved_form(int num);
|
gboolean ui_win_has_unsaved_form(int num);
|
||||||
void ui_inp_history_append(char *inp);
|
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_invalid_command_usage(const char * const usage, void (*setting_func)(void)) {}
|
||||||
|
|
||||||
void ui_create_xmlconsole_win(void) {}
|
void ui_create_xmlconsole_win(void) {}
|
||||||
gboolean ui_xmlconsole_exists(void)
|
|
||||||
{
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
void ui_open_xmlconsole_win(void) {}
|
void ui_open_xmlconsole_win(void) {}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user