hi,

as i've mentionend in the past, i've been using a heavily patched licq
1.2.7 from july 2003. today i upgraded to the latest cvs and applied 
the history chatview patch (attached). i had to comment "ICQUser *u =
gUserManager.FetchUser(m_nUin, LOCK_R);", otherwise it wouldn't compile.

could you please check the source, whether this patch does break
anything?

---
i have one bigger problem, although i think it isn't necessarily related
to the cvs version. after installation i ran the upgrade-1.3.0 script.
but ALL contacts, regardless of their status, have the invisible icon,
the popup does show their status correctly though. i'm using everything
from thomas (skin, icons, ...).

---
for what reason exactly, is licq sometimes unable to retrieve the
away/NA message? i often get "Away Response for ... [error]".

where do i have to edit the source to let licq not insert a <br> or
linebreak after each message i send or receive? an egrep -r didn't show
up something useful to me.
it was the behaviour in my older licq installation and i liked it;)

another small wish ;)
my older licq showed me the program versions of other miranda clients,
now it only says "MIRANDA" in the popup. is it possible to integrate the
version numbers again?

typeahead is far better now than the version/patch i was using, it also
works with special chars. thanks!

thx,
JG
--- plugins/qt-gui/src/usereventdlg.cpp~	2003-05-01 07:45:09.000000000 +0200
+++ plugins/qt-gui/src/usereventdlg.cpp	2003-05-06 16:24:26.000000000 +0200
@@ -1603,6 +1603,56 @@
 #if QT_VERSION >= 300
     connect(mleHistory, SIGNAL(viewurl(QWidget*, QString)), mainwin, SLOT(slot_viewurl(QWidget *, QString)));
 #endif
+
+    // Fill history for ChatView, just a quick'n'dirty hack - jm
+#define HISTORY_COUNT 10
+
+    //ICQUser *u = gUserManager.FetchUser(m_nUin, LOCK_R);
+    if (u != NULL)
+    {
+      HistoryList lHistoryList;
+      if (u->GetHistory(lHistoryList) && (lHistoryList.size() > 0))
+      {
+	// Save new messages which are already in the list
+	// This relies on the fact that each message uses two paragraphs
+	int paras = mleHistory->paragraphs();
+	int entries = (paras <= 1 ? 0 : paras / 2);
+	QStringList str;
+	for (int i = 0; i < entries*2; i++)
+	  str.append(mleHistory->text(i));
+
+	mleHistory->clear();
+
+	// Add history
+	HistoryListIter tempIter = lHistoryList.end();
+	for (int i = 0; i < HISTORY_COUNT + entries; i++)
+	{
+	  if (tempIter == lHistoryList.begin()) break;
+	  tempIter--;
+	}
+	for (int i = 0; i < HISTORY_COUNT; i++)
+	{
+	  if (tempIter == lHistoryList.end()) break;
+	  mleHistory->addMsg((*tempIter));
+	  tempIter++;
+	}
+
+	// Show where new messages start
+#if QT_VERSION >= 300
+	mleHistory->append("<hr>");
+#else
+	// what to do for qt2?
+#endif
+
+	// Re-add new messages
+	for (QStringList::Iterator it = str.begin(); it != str.end(); ++it)
+	  mleHistory->append(*it);
+	mleHistory->GotoEnd();
+      }
+      gUserManager.DropUser(u);
+    }
+
     connect (mainwin, SIGNAL(signal_sentevent(ICQEvent *)), mleHistory, SLOT(addMsg(ICQEvent *)));
     //splView->setResizeMode(mleHistory, QSplitter::FollowSizeHint);
   }
@@ -1711,6 +1761,56 @@
 #if QT_VERSION >= 300
     connect(mleHistory, SIGNAL(viewurl(QWidget*, QString)), mainwin, SLOT(slot_viewurl(QWidget *, QString)));
 #endif

Attachment: pgp6OyeUbhlcV.pgp
Description: PGP signature

Reply via email to