1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00

xmlwin_show takes window as argument

This commit is contained in:
James Booth 2015-11-01 19:45:35 +00:00
parent db4bcd3e6d
commit aa59cf98b8
4 changed files with 10 additions and 8 deletions

View File

@ -521,7 +521,10 @@ sv_ev_roster_update(const char *const barejid, const char *const name,
void
sv_ev_xmpp_stanza(const char *const msg)
{
xmlwin_show(msg);
ProfXMLWin *xmlwin = wins_get_xmlconsole();
if (xmlwin) {
xmlwin_show(xmlwin, msg);
}
}
void

View File

@ -209,7 +209,7 @@ void chatwin_otr_smp_event(ProfChatWin *chatwin, prof_otr_smp_event_t event, voi
#endif
// xml console
void xmlwin_show(const char *const msg);
void xmlwin_show(ProfXMLWin *xmlwin, const char *const msg);
// Input window
char* inp_readline(void);

View File

@ -32,16 +32,15 @@
*
*/
#include <assert.h>
#include "ui/win_types.h"
#include "window_list.h"
void
xmlwin_show(const char *const msg)
xmlwin_show(ProfXMLWin *xmlwin, const char *const msg)
{
ProfXMLWin *xmlwin = wins_get_xmlconsole();
if (!xmlwin) {
return;
}
assert(xmlwin != NULL);
ProfWin *window = (ProfWin*)xmlwin;
if (g_str_has_prefix(msg, "SENT:")) {

View File

@ -165,7 +165,7 @@ char *ui_get_line(void)
return NULL;
}
void xmlwin_show(const char * const msg) {}
void xmlwin_show(ProfXMLWin *xmlwin, const char * const msg) {}
// ui events
void ui_contact_online(char *barejid, Resource *resource, GDateTime *last_activity)