hi,

as I have a quite narrow mainwin, the aliases often only display part of the
name.

I wanted to have the Name and/or Alias available in the popup info when
hovering over a user.

Attached is a diff, which has this functionaltiy for me.

thanks
Philipp

PS: A merge would be welcomed ;-)

-- 
A byte walks into a bar and orders a pint. Bartender asks him "What's wrong?"
Byte says "Parity error." Bartender nods and says "Yeah, I thought you looked
a bit off."
Index: mainwin.h
===================================================================
--- mainwin.h   (revision 4446)
+++ mainwin.h   (working copy)
@@ -138,6 +138,8 @@
        m_bAutoPosReplyWin,
        m_bAutoSendThroughServer,
        m_bEnableMainwinMouseMovement,
+       m_bPopAlias,
+       m_bPopName,
        m_bPopEmail,
        m_bPopPhone,
        m_bPopFax,
Index: userbox.cpp
===================================================================
--- userbox.cpp (revision 4446)
+++ userbox.cpp (working copy)
@@ -1581,9 +1581,25 @@
       }
     }
 
+    // bla123
     QString s = strFileName + QString("<nobr>") + 
QString(ICQUser::StatusToStatusStr(item->m_nStatus, item->m_bStatusInvisible))
       + QString("</nobr>");
+    
+    if (*u->GetAlias() && gMainWindow->m_bPopAlias)
+      s += tr("<br><nobr>") + codec->toUnicode(u->GetAlias()) + tr("</nobr>");
 
+    if ((*u->GetFirstName() || *u->GetLastName()) && gMainWindow->m_bPopName)
+    {
+      s += tr("<br><nobr>");
+      if (*u->GetFirstName())
+        s += codec->toUnicode(u->GetFirstName());
+      if (*u->GetFirstName() && *u->GetLastName())
+        s += " ";
+      if (*u->GetLastName())
+        s += codec->toUnicode(u->GetLastName());
+      s += tr("</nobr>");
+    }
+
     if (item->m_nStatusFull & ICQ_STATUS_FxBIRTHDAY)
       s += tr("<br><b>Birthday&nbsp;Today!</b>");
     
Index: optionsdlg.cpp
===================================================================
--- optionsdlg.cpp      (revision 4446)
+++ optionsdlg.cpp      (working copy)
@@ -244,6 +244,8 @@
   
chkEnableMainwinMouseMovement->setChecked(mainwin->m_bEnableMainwinMouseMovement);
   chkMainWinSticky->setChecked(mainwin->m_bMainWinSticky);
   chkMsgWinSticky->setChecked(mainwin->m_bMsgWinSticky);
+  popAlias->setChecked(mainwin->m_bPopAlias);
+  popName->setChecked(mainwin->m_bPopName);
   popEmail->setChecked(mainwin->m_bPopEmail);
   popPhone->setChecked(mainwin->m_bPopPhone);
   popFax->setChecked(mainwin->m_bPopFax);
@@ -543,6 +545,8 @@
   mainwin->changeMainWinSticky(chkMainWinSticky->isChecked());
   mainwin->m_bMsgWinSticky = chkMsgWinSticky->isChecked();
 
+  mainwin->m_bPopAlias= popAlias->isChecked();
+  mainwin->m_bPopName= popName->isChecked();
   mainwin->m_bPopEmail= popEmail->isChecked();
   mainwin->m_bPopPhone= popPhone->isChecked();
   mainwin->m_bPopFax= popFax->isChecked();
@@ -1450,6 +1454,8 @@
 
   boxPopWin = new QGroupBox(1, Horizontal, tr("Popup info"), w);
 
+  popAlias  = new QCheckBox(tr("Alias"), boxPopWin);
+  popName   = new QCheckBox(tr("Name"),  boxPopWin);
   popEmail  = new QCheckBox(tr("Email"), boxPopWin);
   popPhone  = new QCheckBox(tr("Phone"), boxPopWin);
   popFax    = new QCheckBox(tr("Fax"),   boxPopWin);
Index: mainwin.cpp
===================================================================
--- mainwin.cpp (revision 4446)
+++ mainwin.cpp (working copy)
@@ -464,6 +464,8 @@
   licqConf.ReadStr("ChatBackground", szTemp, "white");
   m_colorChatBkg = QColor(szTemp);
 
+  licqConf.ReadBool("showPopAlias",m_bPopAlias, false);
+  licqConf.ReadBool("showPopName",m_bPopName, false);
   licqConf.ReadBool("showPopEmail",m_bPopEmail, false);
   licqConf.ReadBool("showPopPhone",m_bPopPhone, true);
   licqConf.ReadBool("showPopFax",m_bPopFax, false);
@@ -3651,6 +3653,8 @@
   licqConf.WriteStr("TabOnTypingColor", m_colorTabTyping.name());
   licqConf.WriteStr("ChatBackground", m_colorChatBkg.name());
   
+  licqConf.WriteBool("showPopAlias",m_bPopAlias);
+  licqConf.WriteBool("showPopName",m_bPopName);
   licqConf.WriteBool("showPopEmail",m_bPopEmail);
   licqConf.WriteBool("showPopPhone",m_bPopPhone);
   licqConf.WriteBool("showPopFax",m_bPopFax);
Index: optionsdlg.h
===================================================================
--- optionsdlg.h        (revision 4446)
+++ optionsdlg.h        (working copy)
@@ -133,7 +133,8 @@
    // display tab
    QWidget* new_popup_options();
    QGroupBox *boxPopWin;
-   QCheckBox *popEmail, *popPhone, *popFax, *popCellular, *popIP,
+   QCheckBox *popAlias, *popName, *popEmail, *popPhone,
+        *popFax, *popCellular, *popIP,
        *popLastOnline, *popOnlineSince, *popIdleTime, *popID;
 
    QWidget* new_chat_options();

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Licq-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/licq-devel

Reply via email to