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

mucwin_hide_occupants takes ProfMucWin

This commit is contained in:
James Booth 2015-11-02 01:01:37 +00:00
parent 668f92ece2
commit 6779c5bf68
5 changed files with 9 additions and 7 deletions

View File

@ -3180,7 +3180,7 @@ cmd_occupants(ProfWin *window, const char *const command, gchar **args)
mucwin->showjid = FALSE; mucwin->showjid = FALSE;
mucwin_update_occupants(mucwin); mucwin_update_occupants(mucwin);
} else { } else {
mucwin_hide_occupants(mucwin->roomjid); mucwin_hide_occupants(mucwin);
} }
} else { } else {
cons_bad_cmd_usage(command); cons_bad_cmd_usage(command);

View File

@ -647,7 +647,7 @@ ui_hide_all_room_rosters(void)
if (window->type == WIN_MUC && win_has_active_subwin(window)) { if (window->type == WIN_MUC && win_has_active_subwin(window)) {
ProfMucWin *mucwin = (ProfMucWin*)window; ProfMucWin *mucwin = (ProfMucWin*)window;
assert(mucwin->memcheck == PROFMUCWIN_MEMCHECK); assert(mucwin->memcheck == PROFMUCWIN_MEMCHECK);
mucwin_hide_occupants(mucwin->roomjid); mucwin_hide_occupants(mucwin);
} }
curr = g_list_next(curr); curr = g_list_next(curr);
} }

View File

@ -773,10 +773,12 @@ mucwin_show_occupants(ProfMucWin *mucwin)
} }
void void
mucwin_hide_occupants(const char *const roomjid) mucwin_hide_occupants(ProfMucWin *mucwin)
{ {
ProfWin *window = (ProfWin*)wins_get_muc(roomjid); assert(mucwin != NULL);
if (window && win_has_active_subwin(window)) {
ProfWin *window = (ProfWin*)mucwin;
if (win_has_active_subwin(window)) {
wins_hide_subwin(window); wins_hide_subwin(window);
} }
} }

View File

@ -196,7 +196,7 @@ void mucwin_occupant_presence(ProfMucWin *mucwin, const char *const nick, const
const char *const status); const char *const status);
void mucwin_update_occupants(ProfMucWin *mucwin); void mucwin_update_occupants(ProfMucWin *mucwin);
void mucwin_show_occupants(ProfMucWin *mucwin); void mucwin_show_occupants(ProfMucWin *mucwin);
void mucwin_hide_occupants(const char *const roomjid); void mucwin_hide_occupants(ProfMucWin *mucwin);
void mucwin_affiliation_list_error(ProfMucWin *mucwin, const char *const affiliation, const char *const error); void mucwin_affiliation_list_error(ProfMucWin *mucwin, const char *const affiliation, const char *const error);
void mucwin_handle_affiliation_list(ProfMucWin *mucwin, const char *const affiliation, GSList *jids); void mucwin_handle_affiliation_list(ProfMucWin *mucwin, const char *const affiliation, GSList *jids);
void mucwin_affiliation_set_error(ProfMucWin *mucwin, const char *const jid, const char *const affiliation, void mucwin_affiliation_set_error(ProfMucWin *mucwin, const char *const jid, const char *const affiliation,

View File

@ -233,7 +233,7 @@ void mucwin_occupant_presence(ProfMucWin *mucwin, const char * const nick, const
const char * const status) {} const char * const status) {}
void mucwin_update_occupants(ProfMucWin *mucwin) {} void mucwin_update_occupants(ProfMucWin *mucwin) {}
void mucwin_show_occupants(ProfMucWin *mucwin) {} void mucwin_show_occupants(ProfMucWin *mucwin) {}
void mucwin_hide_occupants(const char * const roomjid) {} void mucwin_hide_occupants(ProfMucWin *mucwin) {}
void ui_show_roster(void) {} void ui_show_roster(void) {}
void ui_hide_roster(void) {} void ui_hide_roster(void) {}
void ui_roster_add(const char * const barejid, const char * const name) {} void ui_roster_add(const char * const barejid, const char * const name) {}