mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -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)
|
sv_ev_room_subject(const char *const room, const char *const nick, const char *const subject)
|
||||||
{
|
{
|
||||||
muc_set_subject(room, subject);
|
muc_set_subject(room, subject);
|
||||||
if (muc_roster_complete(room)) {
|
ProfMucWin *mucwin = wins_get_muc(room);
|
||||||
mucwin_subject(room, nick, subject);
|
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);
|
char *subject = muc_subject(room);
|
||||||
if (subject) {
|
if (mucwin && subject) {
|
||||||
mucwin_subject(room, NULL, subject);
|
mucwin_subject(mucwin, NULL, subject);
|
||||||
}
|
}
|
||||||
|
|
||||||
GList *pending_broadcasts = muc_pending_broadcasts(room);
|
GList *pending_broadcasts = muc_pending_broadcasts(room);
|
||||||
|
@ -463,12 +463,11 @@ mucwin_requires_config(ProfMucWin *mucwin)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
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);
|
assert(mucwin != NULL);
|
||||||
if (window == NULL) {
|
|
||||||
log_error("Received room subject, but no window open for %s.", roomjid);
|
ProfWin *window = (ProfWin*)mucwin;
|
||||||
} else {
|
|
||||||
int num = wins_get_num(window);
|
int num = wins_get_num(window);
|
||||||
|
|
||||||
if (subject) {
|
if (subject) {
|
||||||
@ -496,7 +495,6 @@ mucwin_subject(const char *const roomjid, const char *const nick, const char *co
|
|||||||
status_bar_active(num);
|
status_bar_active(num);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
mucwin_kick_error(const char *const roomjid, const char *const nick, const char *const error)
|
mucwin_kick_error(const char *const roomjid, const char *const nick, const char *const error)
|
||||||
|
@ -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_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_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_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_requires_config(ProfMucWin *mucwin);
|
||||||
void mucwin_info(ProfMucWin *mucwin);
|
void mucwin_info(ProfMucWin *mucwin);
|
||||||
void mucwin_show_role_list(ProfMucWin *mucwin, muc_role_t role);
|
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_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_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_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_requires_config(ProfMucWin *mucwin) {}
|
||||||
void ui_room_destroy(const char * const roomjid) {}
|
void ui_room_destroy(const char * const roomjid) {}
|
||||||
void mucwin_info(ProfMucWin *mucwin) {}
|
void mucwin_info(ProfMucWin *mucwin) {}
|
||||||
|
Loading…
Reference in New Issue
Block a user