Changeset 5779 for trunk/qt-gui
- Timestamp:
- 11/08/07 06:27:03 (13 months ago)
- Location:
- trunk/qt-gui/src
- Files:
-
- 7 modified
-
adduserdlg.cpp (modified) (1 diff)
-
licqgui.cpp (modified) (1 diff)
-
mainwin.cpp (modified) (7 diffs)
-
outputwin.cpp (modified) (2 diffs)
-
support.cpp (modified) (1 diff)
-
usereventdlg.cpp (modified) (5 diffs)
-
usereventdlg.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/qt-gui/src/adduserdlg.cpp
r4699 r5779 91 91 connect (btnOk, SIGNAL(clicked()), SLOT(ok()) ); 92 92 connect (edtUin, SIGNAL(returnPressed()), SLOT(ok()) ); 93 connect (btnCancel, SIGNAL(clicked()), SLOT(reject()) );93 connect (btnCancel, SIGNAL(clicked()), SLOT(close()) ); 94 94 95 95 // Set Tab Order -
trunk/qt-gui/src/licqgui.cpp
r5501 r5779 274 274 275 275 #ifndef USE_KDE 276 char buf[ 500];277 snprintf(buf, sizeof(buf), "%s/licq_qt-gui.style", BASE_DIR);278 buf[ sizeof(buf)- 1] = '\0';276 char buf[MAX_FILENAME_LEN]; 277 snprintf(buf, MAX_FILENAME_LEN, "%s/licq_qt-gui.style", BASE_DIR); 278 buf[MAX_FILENAME_LEN - 1] = '\0'; 279 279 280 280 QStyle *style = SetStyle(styleName); -
trunk/qt-gui/src/mainwin.cpp
r5644 r5779 604 604 pluginDlg = NULL; 605 605 userEventTabDlg = NULL; 606 m_nRealHeight = 0;606 m_nRealHeight = hVal; 607 607 608 608 ICQOwner *o = gUserManager.FetchOwner(LOCK_R); … … 954 954 } 955 955 956 956 unsigned minHeight = skin->frame.border.top + skin->frame.border.bottom; 957 setMinimumHeight(minHeight); 958 setMaximumHeight(m_bInMiniMode ? minHeight : QWIDGETSIZE_MAX); 959 957 960 // Message Label 958 961 delete lblMsg; … … 1766 1769 } 1767 1770 1768 void CMainWindow::slot_socket(const char *szId, unsigned long nPPID, unsigned long nConvoId) 1769 { 1770 // Add the user to an ongoing conversation 1771 void CMainWindow::slot_socket(const char *szId, unsigned long nPPID, unsigned long convoId) 1772 { 1771 1773 QPtrListIterator<UserSendCommon> it(licqUserSend); 1772 1774 … … 1775 1777 if (strcmp((*it)->Id(), szId) == 0 && (*it)->PPID() == nPPID) 1776 1778 { 1777 (*it)->SetConvoId(nConvoId); 1778 break; 1779 } 1780 } 1781 } 1782 1783 void CMainWindow::slot_convoJoin(const char *szId, unsigned long /* nPPID */, unsigned long nConvoId) 1784 { 1785 // Add the user to an ongoing conversation 1779 (*it)->SetConvoId(convoId); 1780 break; 1781 } 1782 } 1783 } 1784 1785 void CMainWindow::slot_convoJoin(const char *szId, unsigned long ppid, unsigned long convoId) 1786 { 1786 1787 QPtrListIterator<UserSendCommon> it(licqUserSend); 1787 1788 1788 1789 for (; it.current(); ++it) 1789 1790 { 1790 if ((*it)->ConvoId() == nConvoId) 1791 { 1792 (*it)->convoJoin(szId, nConvoId); 1793 return; 1794 } 1795 } 1796 1797 // No conversation shown, so make one 1798 1799 } 1800 1801 void CMainWindow::slot_convoLeave(const char *szId, unsigned long /* nPPID */, unsigned long nConvoId) 1802 { 1803 // Add the user to an ongoing conversation 1791 if ((*it)->PPID() == ppid && (*it)->ConvoId() == convoId) 1792 { 1793 (*it)->convoJoin(szId, convoId); 1794 break; 1795 } 1796 } 1797 } 1798 1799 void CMainWindow::slot_convoLeave(const char *szId, unsigned long ppid, unsigned long convoId) 1800 { 1804 1801 QPtrListIterator<UserSendCommon> it(licqUserSend); 1805 1802 1806 1803 for (; it.current(); ++it) 1807 1804 { 1808 if ((*it)-> ConvoId() == nConvoId)1809 { 1810 (*it)->convoLeave(szId, nConvoId);1811 return;1805 if ((*it)->PPID() == ppid && (*it)->ConvoId() == convoId && (*it)->FindUserInConvo(szId)) 1806 { 1807 (*it)->convoLeave(szId, convoId); 1808 break; 1812 1809 } 1813 1810 } … … 2635 2632 break; 2636 2633 case mnuUserGeneral: 2637 if ( isalpha(szId[0]))2634 if (nPPID == LICQ_PPID && isalpha(szId[0])) 2638 2635 tab = UserInfoDlg::AboutInfo; 2639 2636 else … … 2665 2662 break; 2666 2663 case mnuUserGeneral: 2667 if ( isalpha(szId[0]))2664 if (nPPID == LICQ_PPID && isalpha(szId[0])) 2668 2665 f->showTab(UserInfoDlg::AboutInfo); 2669 2666 else … … 3769 3766 void CMainWindow::ToggleMiniMode() 3770 3767 { 3771 3772 if (m_bInMiniMode) 3773 { 3774 userView->show(); 3775 setMaximumHeight(4096); 3776 resize(width(), m_nRealHeight); 3777 setMinimumHeight(100); 3778 } 3779 else 3780 { 3781 userView->QWidget::hide(); 3782 m_nRealHeight = height(); 3783 unsigned short newH = skin->frame.border.top + skin->frame.border.bottom; 3784 setMinimumHeight(newH); 3785 resize(width(), newH); 3786 setMaximumHeight(newH); 3787 } 3788 m_bInMiniMode = !m_bInMiniMode; 3789 mnuSystem->setItemChecked(mnuSystem->idAt(MNUxITEM_MINIxMODE), m_bInMiniMode); 3768 m_bInMiniMode = !m_bInMiniMode; 3769 3770 if (m_bInMiniMode) 3771 { 3772 m_nRealHeight = height(); 3773 setMaximumHeight(minimumHeight()); 3774 userView->QWidget::hide(); 3775 } 3776 else 3777 { 3778 setMaximumHeight(QWIDGETSIZE_MAX); 3779 resize(width(), m_nRealHeight); 3780 userView->show(); 3781 } 3782 3783 mnuSystem->setItemChecked(mnuSystem->idAt(MNUxITEM_MINIxMODE), m_bInMiniMode); 3790 3784 } 3791 3785 -
trunk/qt-gui/src/outputwin.cpp
r5328 r5779 51 51 52 52 outputBox = new CLogWidget(this); 53 outputBox->setMinimumHeight(outputBox->frameWidth() *254 + 16*outputBox->fontMetrics().lineSpacing());55 outputBox->setMinimumWidth(outputBox->minimumHeight() *2);53 outputBox->setMinimumHeight(outputBox->frameWidth() * 2 54 + 16 * outputBox->fontMetrics().lineSpacing()); 55 outputBox->setMinimumWidth(outputBox->minimumHeight() * 2); 56 56 top_lay->addWidget(outputBox); 57 57 … … 77 77 lay->addWidget(btnClear); 78 78 lay->addWidget(btnHide); 79 80 adjustSize(); 79 81 80 82 sn = new QSocketNotifier(Pipe(), QSocketNotifier::Read, this); -
trunk/qt-gui/src/support.cpp
r5640 r5779 62 62 63 63 if (retFormat != 32 || retNItems != 1 || retMoreBytes != 0) 64 { 64 65 gLog.Info("Error reading current desktop property."); 66 *current = 0UL; 67 } 65 68 } 66 69 -
trunk/qt-gui/src/usereventdlg.cpp
r5626 r5779 621 621 } 622 622 623 bool UserEventCommon::FindUserInConvo(c har *szId)623 bool UserEventCommon::FindUserInConvo(const char *szId) 624 624 { 625 625 char *szRealId; … … 1818 1818 gUserManager.DropUser(u); 1819 1819 1820 QString strMsg = QString( "%1 has joined the conversation.")1820 QString strMsg = QString(tr("%1 has joined the conversation.")) 1821 1821 .arg(userName); 1822 1822 mleHistory->addNotice(QDateTime::currentDateTime(), strMsg); … … 1826 1826 { 1827 1827 char *szRealId; 1828 //XXX The PPID? 1829 ICQUser::MakeRealId(szId, LICQ_PPID, szRealId); 1828 ICQUser::MakeRealId(szId, m_nPPID, szRealId); 1830 1829 m_lUsers.push_back(szRealId); 1831 1830 delete [] szRealId; … … 1852 1851 userName = szId; 1853 1852 1854 QString strMsg = QString( "%1 has left the conversation.")1853 QString strMsg = QString(tr("%1 has left the conversation.")) 1855 1854 .arg(userName); 1856 1855 mleHistory->addNotice(QDateTime::currentDateTime(), strMsg); 1857 1856 1858 1857 // Remove the typing notification if active 1859 if (u && u->GetTyping() == ICQ_TYPING_ACTIVE) 1860 { 1861 u->SetTyping(ICQ_TYPING_INACTIVEx0); 1862 nfoStatus->unsetPalette(); 1863 if (mainwin->m_bTabbedChatting && mainwin->userEventTabDlg) 1864 mainwin->userEventTabDlg->updateTabLabel(u); 1858 if (u != 0) 1859 { 1860 if (u->GetTyping() == ICQ_TYPING_ACTIVE) 1861 { 1862 u->SetTyping(ICQ_TYPING_INACTIVEx0); 1863 nfoStatus->unsetPalette(); 1864 if (mainwin->m_bTabbedChatting && mainwin->userEventTabDlg) 1865 mainwin->userEventTabDlg->updateTabLabel(u); 1866 } 1865 1867 } 1866 1868 gUserManager.DropUser(u); … … 1916 1918 QWidget *desktop = qApp->desktop(); 1917 1919 QSize s = p->sizeHint(); 1918 s = p->sizeHint();1919 1920 QPoint pos = QPoint(0, btnEmoticon->height()); 1920 1921 pos = btnEmoticon->mapToGlobal(pos); -
trunk/qt-gui/src/usereventdlg.h
r5441 r5779 144 144 void SetConvoId(unsigned long n) { m_nConvoId = n; } 145 145 146 bool FindUserInConvo(c har *);146 bool FindUserInConvo(const char* id); 147 147 void AddEventTag(unsigned long n) { if (n) m_lnEventTag.push_back(n); } 148 148 void gotTyping(unsigned short);
