--- a/mcabber/src/commands.c Tue May 23 22:05:58 2006 +0200
+++ b/mcabber/src/commands.c Wed May 24 21:52:46 2006 +0200
@@ -660,7 +660,7 @@
scr_LogPrint(LPRINT_LOGNORM, "Removing <%s>...", jid);
jb_delbuddy(jid);
- scr_ShowBuddyWindow();
+ scr_UpdateBuddyWindow();
}
static void do_group(char *arg)
@@ -1755,7 +1755,7 @@
}
// Delete the room
roster_del_user(buddy_getjid(bud));
- scr_ShowBuddyWindow();
+ scr_UpdateBuddyWindow();
buddylist_build();
update_roster = TRUE;
}
--- a/mcabber/src/jabglue.c Tue May 23 22:05:58 2006 +0200
+++ b/mcabber/src/jabglue.c Wed May 24 21:52:46 2006 +0200
@@ -948,7 +948,7 @@
}
roster_free();
update_roster = TRUE;
- scr_ShowBuddyWindow();
+ scr_UpdateBuddyWindow();
break;
case JCONN_STATE_CONNECTED:
--- a/mcabber/src/screen.c Tue May 23 22:05:58 2006 +0200
+++ b/mcabber/src/screen.c Wed May 24 21:52:46 2006 +0200
@@ -631,6 +631,21 @@
scr_ShowWindow(jid, FALSE);
}
+// scr_UpdateBuddyWindow()
+// (Re)Display the current window.
+// If chatmode is enabled, call scr_ShowBuddyWindow(),
+// else display the chat window.
+inline void scr_UpdateBuddyWindow(void)
+{
+ if (chatmode) {
+ scr_ShowBuddyWindow();
+ return;
+ }
+
+ top_panel(chatPanel);
+ top_panel(inputPanel);
+}
+
// scr_WriteInWindow()
// Write some text in the winId window (this usually is a jid).
// Use winId == NULL for the special status buffer.
--- a/mcabber/src/screen.h Tue May 23 22:05:58 2006 +0200
+++ b/mcabber/src/screen.h Wed May 24 21:52:46 2006 +0200
@@ -67,6 +67,7 @@
void scr_WriteOutgoingMessage(const char *jidto, const char *text);
void scr_ShowBuddyWindow(void);
bool scr_BuddyBufferExists(const char *jid);
+inline void scr_UpdateBuddyWindow(void);
inline void scr_set_chatmode(int enable);
inline void scr_set_multimode(int enable, char *subject);
inline int scr_get_multimode(void);