Hi! I sent these patches to the list some time ago, these updated versions were made against current CVS.
The first patch makes a cosmetic change: When no firstname and lastname is set for a user (or only one of the two), Licq shows "alias ()", "alias ( lastname)" or "alias (firstname )" as the window title. The patch cleans this up. With the second patch Licq shows a KPassivePopup (KDE 3.1 required) near the dock when someone who is in the notify list goes online.
? autom4te.cache ? plugins/qt-gui/autom4te.cache Index: plugins/qt-gui/src/usereventdlg.cpp =================================================================== RCS file: /cvsroot/licq/qt-gui/src/usereventdlg.cpp,v retrieving revision 1.151 diff -u -3 -p -r1.151 usereventdlg.cpp --- plugins/qt-gui/src/usereventdlg.cpp 2 Jun 2004 14:35:50 -0000 1.151 +++ plugins/qt-gui/src/usereventdlg.cpp 6 Jun 2004 19:19:36 -0000 @@ -473,9 +473,14 @@ void UserEventCommon::SetGeneralInfo(ICQ else btnSecure->setPixmap(mainwin->pmSecureOff); - m_sBaseTitle = codec->toUnicode(u->GetAlias()) + " (" + - codec->toUnicode(u->GetFirstName()) + " " + - codec->toUnicode(u->GetLastName())+ ")"; + QString tmp = codec->toUnicode(u->GetFirstName()); + QString lastname = codec->toUnicode(u->GetLastName()); + if ((!tmp.isEmpty()) && (!lastname.isEmpty())) + tmp = tmp + " " + lastname; + else + tmp = tmp + lastname; + if (!tmp.isEmpty()) tmp = " (" + tmp + ")"; + m_sBaseTitle = codec->toUnicode(u->GetAlias()) + tmp; #if QT_VERSION >= 300 if (mainwin->userEventTabDlg && mainwin->userEventTabDlg->tabIsSelected(this)) Index: plugins/qt-gui/src/userinfodlg.cpp =================================================================== RCS file: /cvsroot/licq/qt-gui/src/userinfodlg.cpp,v retrieving revision 1.79 diff -u -3 -p -r1.79 userinfodlg.cpp --- plugins/qt-gui/src/userinfodlg.cpp 27 May 2004 07:30:00 -0000 1.79 +++ plugins/qt-gui/src/userinfodlg.cpp 6 Jun 2004 19:19:37 -0000 @@ -178,7 +178,14 @@ UserInfoDlg::UserInfoDlg(CICQDaemon *s, else { QTextCodec * codec = UserCodec::codecForICQUser(u); - m_sBasic = tr("Licq - Info ") + codec->toUnicode(u->GetAlias()) + " (" + codec->toUnicode(u->GetFirstName()) + " " + codec->toUnicode(u->GetLastName()) + ")"; + QString tmp = codec->toUnicode(u->GetFirstName()); + QString lastname = codec->toUnicode(u->GetLastName()); + if ((!tmp.isEmpty()) && (!lastname.isEmpty())) + tmp = tmp + " " + lastname; + else + tmp = tmp + lastname; + if (!tmp.isEmpty()) tmp = " (" + tmp + ")"; + m_sBasic = tr("Licq - Info ") + codec->toUnicode(u->GetAlias()) + tmp; resetCaption(); setIconText(codec->toUnicode(u->GetAlias())); gUserManager.DropUser(u);
? autom4te.cache ? plugins/qt-gui/autom4te.cache Index: plugins/qt-gui/src/mainwin.cpp =================================================================== RCS file: /cvsroot/licq/qt-gui/src/mainwin.cpp,v retrieving revision 1.316 diff -u -3 -p -r1.316 mainwin.cpp --- plugins/qt-gui/src/mainwin.cpp 3 Jun 2004 08:40:19 -0000 1.316 +++ plugins/qt-gui/src/mainwin.cpp 6 Jun 2004 19:38:00 -0000 @@ -27,6 +27,9 @@ #include <kwin.h> #include <kiconloader.h> #include <kurl.h> +#if KDE_VERSION >= 310 +#include <kpassivepopup.h> +#endif #else #include <qapplication.h> #endif @@ -1422,7 +1425,25 @@ void CMainWindow::slot_updatedUser(CICQS } if(sig->SubSignal() == USER_STATUS && sig->Argument() == 1) + { userView->AnimationOnline(szId, nPPID); +#if defined(USE_KDE) && (KDE_VERSION >= 310) + // User on notify list went online -> show popup at systray icon + if (licqIcon && u->OnlineNotify()) + { + QTextCodec *codec = UserCodec::codecForICQUser(u); + QString alias = codec->toUnicode(u->GetAlias()); + // Escape HTML + alias.replace(QChar('&'), "&"); + alias.replace(QChar('<'), "<"); + alias.replace(QChar('>'), ">"); + + QString msg(tr("<b>%1</b> is online").arg(alias)); + QPixmap px = iconForStatus(u->StatusFull()); + KPassivePopup::message("Licq", msg, px, licqIcon, NULL, 4000); + } +#endif + } // Update their floaty CUserView *v = CUserView::FindFloaty(szId, nPPID);
ciao Jörg