changeset 180:42a33611233b

[/trunk] Changeset 192 by mikael * Improve history stuff: load buddy buffer even when not sending/receiving a message.
author mikael
date Thu, 05 May 2005 12:44:32 +0000
parents d416d5cb8ddb
children 4a0bde661562
files mcabber/src/TODO mcabber/src/screen.c
diffstat 2 files changed, 15 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/mcabber/src/TODO	Thu May 05 12:36:54 2005 +0000
+++ b/mcabber/src/TODO	Thu May 05 12:44:32 2005 +0000
@@ -7,7 +7,6 @@
 TODO:
 
 * Presence notification is always accepted.  We should ask...
-* Read history
 * Display status
 * Get timestamp for offline messages
 * /connect /disconnect ?
--- 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);
 }