mirror of
https://github.com/profanity-im/profanity.git
synced 2024-11-03 19:37:16 -05:00
mucwin_subject takes ProfMucWin
This commit is contained in:
parent
0592c7f9e9
commit
23ada0d38b
@ -146,8 +146,9 @@ void
|
||||
sv_ev_room_subject(const char *const room, const char *const nick, const char *const subject)
|
||||
{
|
||||
muc_set_subject(room, subject);
|
||||
if (muc_roster_complete(room)) {
|
||||
mucwin_subject(room, nick, subject);
|
||||
ProfMucWin *mucwin = wins_get_muc(room);
|
||||
if (mucwin && muc_roster_complete(room)) {
|
||||
mucwin_subject(mucwin, nick, subject);
|
||||
}
|
||||
}
|
||||
|
||||
@ -581,8 +582,8 @@ sv_ev_muc_self_online(const char *const room, const char *const nick, gboolean c
|
||||
}
|
||||
|
||||
char *subject = muc_subject(room);
|
||||
if (subject) {
|
||||
mucwin_subject(room, NULL, subject);
|
||||
if (mucwin && subject) {
|
||||
mucwin_subject(mucwin, NULL, subject);
|
||||
}
|
||||
|
||||
GList *pending_broadcasts = muc_pending_broadcasts(room);
|
||||
|
@ -463,12 +463,11 @@ mucwin_requires_config(ProfMucWin *mucwin)
|
||||
}
|
||||
|
||||
void
|
||||
mucwin_subject(const char *const roomjid, const char *const nick, const char *const subject)
|
||||
mucwin_subject(ProfMucWin *mucwin, const char *const nick, const char *const subject)
|
||||
{
|
||||
ProfWin *window = (ProfWin*)wins_get_muc(roomjid);
|
||||
if (window == NULL) {
|
||||
log_error("Received room subject, but no window open for %s.", roomjid);
|
||||
} else {
|
||||
assert(mucwin != NULL);
|
||||
|
||||
ProfWin *window = (ProfWin*)mucwin;
|
||||
int num = wins_get_num(window);
|
||||
|
||||
if (subject) {
|
||||
@ -495,7 +494,6 @@ mucwin_subject(const char *const roomjid, const char *const nick, const char *co
|
||||
} else {
|
||||
status_bar_active(num);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -175,7 +175,7 @@ void mucwin_occupant_role_and_affiliation_change(ProfMucWin *mucwin, const char
|
||||
void mucwin_roster(ProfMucWin *mucwin, GList *occupants, const char *const presence);
|
||||
void mucwin_history(ProfMucWin *mucwin, const char *const nick, GDateTime *timestamp, const char *const message);
|
||||
void mucwin_message(ProfMucWin *mucwin, const char *const nick, const char *const message);
|
||||
void mucwin_subject(const char *const roomjid, const char *const nick, const char *const subject);
|
||||
void mucwin_subject(ProfMucWin *mucwin, const char *const nick, const char *const subject);
|
||||
void mucwin_requires_config(ProfMucWin *mucwin);
|
||||
void mucwin_info(ProfMucWin *mucwin);
|
||||
void mucwin_show_role_list(ProfMucWin *mucwin, muc_role_t role);
|
||||
|
@ -206,7 +206,7 @@ void mucwin_occupant_role_and_affiliation_change(ProfMucWin *mucwin, const char
|
||||
void mucwin_roster(ProfMucWin *mucwin, GList *occupants, const char * const presence) {}
|
||||
void mucwin_history(ProfMucWin *mucwin, const char * const nick, GDateTime *timestamp, const char * const message) {}
|
||||
void mucwin_message(ProfMucWin *mucwin, const char * const nick, const char * const message) {}
|
||||
void mucwin_subject(const char * const roomjid, const char * const nick, const char * const subject) {}
|
||||
void mucwin_subject(ProfMucWin *mucwin, const char * const nick, const char * const subject) {}
|
||||
void mucwin_requires_config(ProfMucWin *mucwin) {}
|
||||
void ui_room_destroy(const char * const roomjid) {}
|
||||
void mucwin_info(ProfMucWin *mucwin) {}
|
||||
|
Loading…
Reference in New Issue
Block a user