--- a/mcabber/src/screen.c Thu May 05 12:36:54 2005 +0000
+++ b/mcabber/src/screen.c Thu May 05 12:44:32 2005 +0000
@@ -12,6 +12,7 @@
#include "commands.h"
#include "compl.h"
#include "roster.h"
+#include "histolog.h"
#include "parsecfg.h"
#include "utils.h"
#include "list.h"
@@ -305,24 +306,22 @@
{
window_entry_t *win_entry = scr_SearchWindow(winId);
- if (win_entry != NULL) {
- top_panel(win_entry->panel);
- currentWindow = win_entry;
- chatmode = TRUE;
- roster_msg_setflag(winId, FALSE);
- roster_setflags(winId, ROSTER_FLAG_LOCK, TRUE);
- update_roster = TRUE;
+ if (!win_entry) {
+ win_entry = scr_CreateBuddyPanel(winId, FALSE);
+ }
- // Refresh the window
- scr_UpdateWindow(win_entry);
+ top_panel(win_entry->panel);
+ currentWindow = win_entry;
+ chatmode = TRUE;
+ roster_msg_setflag(winId, FALSE);
+ roster_setflags(winId, ROSTER_FLAG_LOCK, TRUE);
+ update_roster = TRUE;
- // Finished :)
- update_panels();
- // doupdate(); (update_roster should be enough?)
- } else {
- top_panel(chatPanel);
- currentWindow = win_entry; // == NULL (current window empty)
- }
+ // Refresh the window
+ scr_UpdateWindow(win_entry);
+
+ // Finished :)
+ update_panels();
top_panel(inputPanel);
}