mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-25 16:46:21 +00:00
separator: Enable for MUC and PRIVWIN too
Fix https://github.com/profanity-im/profanity/issues/1238
This commit is contained in:
@@ -651,24 +651,41 @@ ui_focus_win(ProfWin *window)
|
||||
}
|
||||
|
||||
ProfWin *old_current = wins_get_current();
|
||||
|
||||
if (old_current->type == WIN_CONFIG) {
|
||||
ProfConfWin *confwin = (ProfConfWin*)old_current;
|
||||
cmd_ac_remove_form_fields(confwin->form);
|
||||
}
|
||||
|
||||
// TODO: if old win is chatwin; and has lastreadline; then remove that line
|
||||
if (old_current->type == WIN_CHAT) {
|
||||
ProfChatWin *chatwin = (ProfChatWin*)old_current;
|
||||
assert(chatwin->memcheck == PROFCHATWIN_MEMCHECK);
|
||||
//win_update_entry_message_real(old_current, chatwin->barejid, "$$$");
|
||||
win_remove_entry_message(old_current, chatwin->barejid);
|
||||
}
|
||||
|
||||
if (window->type == WIN_CONFIG) {
|
||||
ProfConfWin *confwin = (ProfConfWin*)window;
|
||||
cmd_ac_add_form_fields(confwin->form);
|
||||
}
|
||||
|
||||
// check for trackbar last position separator
|
||||
switch (old_current->type)
|
||||
{
|
||||
case WIN_CHAT:
|
||||
{
|
||||
ProfChatWin *chatwin = (ProfChatWin*)old_current;
|
||||
win_remove_entry_message(old_current, chatwin->barejid);
|
||||
break;
|
||||
}
|
||||
case WIN_MUC:
|
||||
{
|
||||
ProfMucWin *mucwin = (ProfMucWin*)old_current;
|
||||
win_remove_entry_message(old_current, mucwin->roomjid);
|
||||
break;
|
||||
}
|
||||
case WIN_PRIVATE:
|
||||
{
|
||||
ProfPrivateWin *privwin = (ProfPrivateWin*)old_current;
|
||||
win_remove_entry_message(old_current, privwin->fulljid);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
int i = wins_get_num(window);
|
||||
wins_set_current_by_num(i);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user