Modified: branches/newapi/qt-gui/src/usereventdlg.cpp
URL: http://svn.licq.org/viewvc/licq/branches/newapi/qt-gui/src/usereventdlg.cpp?rev=4979&r1=4978&r2=4979&view=diff
==============================================================================
--- branches/newapi/qt-gui/src/usereventdlg.cpp (original)
+++ branches/newapi/qt-gui/src/usereventdlg.cpp Tue Jun 26 06:35:20 2007
@@ -1,20 +1,22 @@
// -*- c-basic-offset: 2 -*-
/*
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-*/
+ * This file is part of Licq, an instant messaging client for UNIX.
+ * Copyright (C) 2000-2006 Licq developers
+ *
+ * Licq is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Licq is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Licq; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
// written by Graham Roff <gra...@licq.org>
// contributions by Dirk A. Mueller <di...@licq.org>
@@ -54,9 +56,9 @@
#include <kapp.h>
#include <kfiledialog.h>
#include <kcolordialog.h>
-#if KDE_VERSION >= 320
+#if KDE_IS_VERSION(3, 2, 0)
#include <kwin.h>
-#endif // KDE_VERSION
+#endif // KDE_IS_VERSION
#else
#include <qfiledialog.h>
#include <qcolordialog.h>
@@ -183,6 +185,7 @@
// restore prefered encoding
codec = UserCodec::codecForICQUser(u);
+ gotTyping(u->GetTyping());
gUserManager.DropUser(u);
}
@@ -240,25 +243,21 @@
: QWidget(parent, name, WDestructiveClose)
{
this->mainwin = mainwin;
-#if QT_VERSION >= 300
QBoxLayout *lay = new QVBoxLayout(this);
tabw = new CETabWidget(this);
lay->addWidget(tabw);
connect(tabw, SIGNAL(currentChanged(QWidget *)),
this, SLOT(slot_currentChanged(QWidget *)));
-#endif
+ connect(tabw, SIGNAL(middleClick(QWidget*)), this, SLOT(removeTab(QWidget*)));
}
UserEventTabDlg::~UserEventTabDlg()
{
-#if QT_VERSION >= 300
emit signal_done();
-#endif
}
void UserEventTabDlg::addTab(UserEventCommon *tab, int index)
{
-#if QT_VERSION >= 300
QString label;
ICQUser *u = gUserManager.FetchUser(tab->Id(), tab->PPID(), LOCK_W);
if (u == NULL) return;
@@ -269,12 +268,10 @@
updateTabLabel(u);
gUserManager.DropUser(u);
tabw->showPage(tab);
-#endif
}
void UserEventTabDlg::removeTab(QWidget *tab)
{
-#if QT_VERSION >= 300
if (tabw->count() > 1)
{
tabw->removePage(tab);
@@ -284,47 +281,34 @@
}
else
close();
-#endif
}
void UserEventTabDlg::selectTab(QWidget *tab)
{
-#if QT_VERSION >= 300
tabw->showPage(tab);
updateTitle(tab);
-#endif
}
void UserEventTabDlg::replaceTab(QWidget *oldTab,
UserEventCommon *newTab)
{
-#if QT_VERSION >= 300
addTab(newTab, tabw->indexOf(oldTab));
removeTab(oldTab);
-#endif
}
bool UserEventTabDlg::tabIsSelected(QWidget *tab)
{
-#if QT_VERSION >= 300
if (tabw->currentPageIndex() == tabw->indexOf(tab))
return true;
else
return false;
-#else
- return false; //should never be used with QT < 3!
-#endif
}
bool UserEventTabDlg::tabExists(QWidget *tab)
{
-#if QT_VERSION >= 300
if (tabw->indexOf(tab) != -1)
return true;
else return false;
-#else
- return false; //should never be used with QT < 3!
-#endif
}
void UserEventTabDlg::updateConvoLabel(UserEventCommon *tab)
@@ -350,7 +334,6 @@
void UserEventTabDlg::updateTabLabel(ICQUser *u)
{
-#if QT_VERSION >= 300
for (int index = 0; index < tabw->count(); index++)
{
UserEventCommon *tab = static_cast<UserEventCommon*>(tabw->page(index));
@@ -413,23 +396,20 @@
return;
}
}
-#endif
}
void UserEventTabDlg::gotTyping(ICQUser *u, int nConvoId)
{
-#if QT_VERSION >= 300
for (int index = 0; index < tabw->count(); index++)
{
UserEventCommon *tab = static_cast<UserEventCommon*>(tabw->page(index));
if ( ((u->PPID() == MSN_PPID && tab->PPID() == u->PPID()) &&
- tab->FindUserInConvo(u->IdString()) && tab->ConvoId() == nConvoId) ||
+ tab->FindUserInConvo(u->IdString()) && tab->ConvoId() == (unsigned long)(nConvoId)) ||
(tab->FindUserInConvo(u->IdString()) && tab->PPID() == u->PPID()))
{
tab->gotTyping(u->GetTyping());
}
}
-#endif
}
/*! This slot should get called when the current tab has
@@ -444,24 +424,19 @@
void UserEventTabDlg::updateTitle(QWidget *tab)
{
-#if QT_VERSION >= 300
if (tab->caption())
setCaption(tab->caption());
if (!tabw->tabIconSet(tab).isNull() &&
!tabw->tabIconSet(tab).pixmap().isNull())
setIcon(tabw->tabIconSet(tab).pixmap());
-
-#endif
}
void UserEventTabDlg::clearEvents(QWidget *tab)
{
-#if QT_VERSION >= 300
if (!isActiveWindow()) return;
UserSendCommon *e = static_cast<UserSendCommon*>(tab);
QTimer::singleShot(e->clearDelay, e, SLOT(slot_ClearNewEvents()));
-#endif
}
void UserEventTabDlg::flashTaskbar(bool _bFlash)
@@ -480,21 +455,15 @@
void UserEventTabDlg::moveLeft()
{
-#if QT_VERSION >= 300
tabw->setPreviousPage();
-#endif
}
void UserEventTabDlg::moveRight()
{
-#if QT_VERSION >= 300
tabw->setNextPage();
-#endif
-}
-
-#ifdef USE_KDE
-#if KDE_VERSION >= 320
-
+}
+
+#if defined(USE_KDE) && KDE_IS_VERSION(3, 2, 0)
/* KDE 3.2 handles app-icon updates differently, since KDE 3.2 a simple setIcon() call
does no longer update the icon in kicker anymore :(
So we do it the "kde-way" here */
@@ -502,9 +471,7 @@
{
KWin::setIcons(winId(), icon, icon);
}
-
-#endif // KDE_VERSION
-#endif // USE_KDE
+#endif
void UserEventTabDlg::setMsgWinSticky()
{
@@ -598,11 +565,11 @@
tmp = tmp + lastname;
if (!tmp.isEmpty()) tmp = " (" + tmp + ")";
m_sBaseTitle = QString::fromUtf8(u->GetAlias()) + tmp;
-#if QT_VERSION >= 300
+
if (mainwin->userEventTabDlg &&
mainwin->userEventTabDlg->tabIsSelected(this))
mainwin->userEventTabDlg->setCaption(m_sBaseTitle);
-#endif
+
setCaption(m_sBaseTitle);
setIconText(u->GetAlias());
}
@@ -787,11 +754,9 @@
msgView = new MsgView(splRead);
mlvRead = new MLView(splRead, "mlvRead");
-#if QT_VERSION < 300
- mlvRead->setFormatQuoted(true);
-#else
+
connect(mlvRead, SIGNAL(viewurl(QWidget*, QString)), mainwin, SLOT(slot_viewurl(QWidget *, QString)));
-#endif
+
splRead->setResizeMode(msgView, QSplitter::FollowSizeHint);
splRead->setResizeMode(mlvRead, QSplitter::Stretch);
@@ -983,14 +948,12 @@
m_messageText = QString::fromUtf8(m->Text());
else
m_messageText = codec->toUnicode(m->Text());
-#if QT_VERSION < 300
- mlvRead->setText(m_messageText);
-#else
+
// Looks like there's no other way to set color in Qt 3's RichText control
QString colorAttr;
colorAttr.sprintf(QString::fromLatin1("#%02x%02x%02x"), m->Color()->ForeRed(), m->Color()->ForeGreen(), m->Color()->ForeBlue());
mlvRead->setText("<font color=\"" + colorAttr + "\">" + MLView::toRichText(m_messageText, true) + "</font>");
-#endif
+
mlvRead->setCursorPosition(0, 0);
if (m->Direction() == D_RECEIVER && (m->Command() == ICQ_CMDxTCP_START || m->Command() == ICQ_CMDxRCV_SYSxMSGxONLINE || m->Command() == ICQ_CMDxRCV_SYSxMSGxOFFLINE))
@@ -1512,7 +1475,7 @@
QAccel *a = new QAccel( this );
a->connectItem(a->insertItem(Key_Escape), this, SLOT(slot_cancelSend()));
-#if QT_VERSION >= 300
+
if (mainwin->userEventTabDlg &&
parent == mainwin->userEventTabDlg)
{
@@ -1525,7 +1488,6 @@
a->connectItem(a->insertItem(CTRL + Key_Tab),
mainwin->userEventTabDlg, SLOT(moveRight()));
}
-#endif
QGroupBox *box = new QGroupBox(this);
top_lay->addWidget(box);
@@ -1673,6 +1635,8 @@
}
if (tmp != "")
mleHistory->append(tmp);
+
+ mleHistory->GotoEnd();
}
}
@@ -1767,9 +1731,8 @@
}
gUserManager.DropUser(u);
-#if QT_VERSION >= 300
+
connect(mleHistory, SIGNAL(viewurl(QWidget*, QString)), mainwin, SLOT(slot_viewurl(QWidget *, QString)));
-#endif
connect (mainwin, SIGNAL(signal_sentevent(ICQEvent *)), mleHistory, SLOT(addMsg(ICQEvent *)));
//splView->setResizeMode(mleHistory, QSplitter::FollowSizeHint);
}
@@ -1797,6 +1760,9 @@
connect (mleSend, SIGNAL(signal_CtrlEnterPressed()), btnSend, SIGNAL(clicked()));
connect(mleSend, SIGNAL(textChanged()), this, SLOT(slot_textChanged()));
connect(this, SIGNAL(updateUser(CICQSignal*)), mainwin, SLOT(slot_updatedUser(CICQSignal*)));
+ // Do not connect this before the check box gets set automatically. If the user is offline
+ // the send through server flag gets set, and then that setting gets saved to disk.
+ connect(chkSendServer, SIGNAL(toggled(bool)), this, SLOT(slot_sendServerToggled(bool)));
}
UserSendCommon::~UserSendCommon()
@@ -1835,9 +1801,17 @@
if (mainwin->m_bMsgChatView)
{
+ ICQUser *u = gUserManager.FetchUser(szId, m_nPPID, LOCK_R);
+ QString userName;
+ if (u)
+ userName = QString::fromUtf8(u->GetAlias());
+ else
+ userName = szId;
+ gUserManager.DropUser(u);
+
QString strMsg = QString("%1 has joined the conversation.")
- .arg(szId);
- mleHistory->addNotice(QTime::currentTime().toString(), strMsg);
+ .arg(userName);
+ mleHistory->addNotice(QDateTime::currentDateTime(), strMsg);
}
if (!FindUserInConvo(const_cast<char *>(szId)))
@@ -1856,18 +1830,24 @@
mainwin->userEventTabDlg->updateConvoLabel(this);
}
-void UserSendCommon::convoLeave(const char *szId, unsigned long _nConvoId)
+void UserSendCommon::convoLeave(const char *szId, unsigned long /* _nConvoId */)
{
if (szId == 0) return;
if (mainwin->m_bMsgChatView)
{
+ ICQUser *u = gUserManager.FetchUser(szId, m_nPPID, LOCK_R);
+ QString userName;
+ if (u)
+ userName = QString::fromUtf8(u->GetAlias());
+ else
+ userName = szId;
+
QString strMsg = QString("%1 has left the conversation.")
- .arg(szId);
- mleHistory->addNotice(QTime::currentTime().toString(), strMsg);
+ .arg(userName);
+ mleHistory->addNotice(QDateTime::currentDateTime(), strMsg);
// Remove the typing notification if active
- ICQUser *u = gUserManager.FetchUser(szId, m_nPPID, LOCK_W);
if (u && u->GetTyping() == ICQ_TYPING_ACTIVE)
{
u->SetTyping(ICQ_TYPING_INACTIVEx0);
@@ -1902,7 +1882,6 @@
}
}
-#if QT_VERSION >= 300
//-----UserSendCommon::windowActivationChange--------------------------------
void UserSendCommon::windowActivationChange(bool oldActive)
{
@@ -1910,16 +1889,14 @@
QTimer::singleShot(clearDelay, this, SLOT(slot_ClearNewEvents()));
QWidget::windowActivationChange(oldActive);
}
-#endif
//-----UserSendCommon::slot_resettitle---------------------------------------
void UserSendCommon::slot_resettitle()
{
-#if QT_VERSION >= 300
if (mainwin->userEventTabDlg &&
mainwin->userEventTabDlg->tabIsSelected(this))
mainwin->userEventTabDlg->setCaption(m_sBaseTitle);
-#endif
+
setCaption(m_sBaseTitle);
}
@@ -1997,7 +1974,8 @@
void UserSendCommon::slot_textChanged()
{
- if (mleSend->text().isEmpty()) return;
+ if (mleSend == NULL || mleSend->text().isEmpty())
+ return;
strTempMsg = mleSend->text();
server->ProtoTypingNotification(m_lUsers.front().c_str(), m_nPPID, true, m_nConvoId);
@@ -2007,6 +1985,12 @@
void UserSendCommon::slot_textChanged_timeout()
{
+ if (mleSend == NULL)
+ {
+ tmrSendTyping->stop();
+ return;
+ }
+
QString str = mleSend->text();
if (str != strTempMsg)
@@ -2023,6 +2007,17 @@
connect(mleSend, SIGNAL(textChanged()), this, SLOT(slot_textChanged()));
server->ProtoTypingNotification(m_lUsers.front().c_str(), m_nPPID, false, m_nConvoId);
}
+}
+
+void UserSendCommon::slot_sendServerToggled(bool sendServer)
+{
+ // When the "Send through server" checkbox is toggled, we will save the setting
+ // to disk, so it will be persistent.
+
+ ICQUser *u = gUserManager.FetchUser(m_szId, m_nPPID, LOCK_W);
+ if (u)
+ u->SetSendServer(sendServer);
+ gUserManager.DropUser(u);
}
//-----UserSendCommon::slot_SetBackgroundColor-------------------------------
@@ -2054,12 +2049,10 @@
{
u = gUserManager.FetchUser((*it).c_str(), m_nPPID, LOCK_W);
if (mainwin->m_bMsgChatView
-#if QT_VERSION >= 300
&& isActiveWindow() && (!mainwin->userEventTabDlg ||
(mainwin->userEventTabDlg &&
(!mainwin->userEventTabDlg->tabExists(this) ||
mainwin->userEventTabDlg->tabIsSelected(this))))
-#endif
)
{
if (u != NULL && u->NewMessages() > 0)
@@ -2089,10 +2082,10 @@
if (isType(id)) return;
UserSendCommon* e = NULL;
QWidget *parent = NULL;
-#if QT_VERSION >= 300
+
if (mainwin->userEventTabDlg && mainwin->userEventTabDlg->tabExists(this))
parent = mainwin->userEventTabDlg;
-#endif
+
switch(id)
{
@@ -2150,10 +2143,8 @@
QTimer::singleShot(10, e, SLOT(show()));
QTimer::singleShot(100, this, SLOT(close()));
}
-#if QT_VERSION >= 300
else
mainwin->userEventTabDlg->replaceTab(this, e);
-#endif
}
}
@@ -2167,12 +2158,11 @@
if (b)
{
chkMass->setChecked(true);
-#if QT_VERSION >= 300
+
if (mainwin->userEventTabDlg &&
mainwin->userEventTabDlg->tabIsSelected(this))
tmpWidgetWidth = mainwin->userEventTabDlg->width();
else
-#endif
tmpWidgetWidth = width();
if (grpMR == NULL)
{
@@ -2201,7 +2191,6 @@
// resize the widget to it's origin width.
// This is a workaround and not perfect, but resize() does not
// work as expected. Maybe we find a better solution for this in future.
-#if QT_VERSION >= 300
if (mainwin->userEventTabDlg &&
mainwin->userEventTabDlg->tabIsSelected(this))
{
@@ -2216,7 +2205,6 @@
mainwin->userEventTabDlg->setMaximumSize(tmpMaxSize);
}
else
-#endif
{
QSize tmpMaxSize = maximumSize();
if (tmpWidgetWidth == 0)
@@ -2262,16 +2250,19 @@
m_sProgressMsg += via_server ? tr("via server") : tr("direct");
m_sProgressMsg += "...";
QString title = m_sBaseTitle + " [" + m_sProgressMsg + "]";
-#if QT_VERSION >= 300
+
if (mainwin->userEventTabDlg &&
mainwin->userEventTabDlg->tabIsSelected(this))
mainwin->userEventTabDlg->setCaption(title);
-#endif
+
setCaption(title);
setCursor(waitCursor);
btnSend->setText(tr("&Cancel"));
btnClose->setEnabled(false);
- mleSend->setEnabled(false);
+
+ if (mleSend != NULL)
+ mleSend->setEnabled(false);
+
disconnect(btnSend, SIGNAL(clicked()), this, SLOT(sendButton()));
connect(btnSend, SIGNAL(clicked()), this, SLOT(slot_cancelSend()));
@@ -2296,11 +2287,11 @@
if (e == NULL)
{
QString title = m_sBaseTitle + " [" + m_sProgressMsg + tr("error") + "]";
-#if QT_VERSION >= 300
+
if (mainwin->userEventTabDlg &&
mainwin->userEventTabDlg->tabIsSelected(this))
mainwin->userEventTabDlg->setCaption(title);
-#endif
+
setCaption(title);
return;
@@ -2345,17 +2336,20 @@
break;
}
title = m_sBaseTitle + " [" + m_sProgressMsg + result + "]";
-#if QT_VERSION >= 300
+
if (mainwin->userEventTabDlg &&
mainwin->userEventTabDlg->tabIsSelected(this))
mainwin->userEventTabDlg->setCaption(title);
-#endif
+
setCaption(title);
setCursor(arrowCursor);
btnSend->setText(tr("&Send"));
btnClose->setEnabled(true);
- mleSend->setEnabled(true);
+
+ if (mleSend != NULL)
+ mleSend->setEnabled(true);
+
disconnect(btnSend, SIGNAL(clicked()), this, SLOT(slot_cancelSend()));
connect(btnSend, SIGNAL(clicked()), this, SLOT(sendButton()));
@@ -2365,6 +2359,9 @@
if (m_lnEventTag.size() == 0)
disconnect (sigman, SIGNAL(signal_doneUserFcn(ICQEvent *)), this, SLOT(sendDone_common(ICQEvent *)));
+
+ if (mleSend != NULL)
+ mleSend->setFocus();
if (e->Result() != EVENT_ACKED)
{
@@ -2594,6 +2591,8 @@
//-----UserSendCommon::slot_close--------------------------------------------
void UserSendCommon::slot_close()
{
+ server->ProtoTypingNotification(m_lUsers.front().c_str(), m_nPPID, false, m_nConvoId);
+
if (mainwin->m_bMsgChatView)
{
// the window is at the front, if the timer has not expired and we close
@@ -2604,12 +2603,10 @@
if (mleSend)
mainwin->m_bCheckSpellingEnabled = mleSend->checkSpellingEnabled();
-#if QT_VERSION >= 300
if (mainwin->userEventTabDlg &&
mainwin->userEventTabDlg->tabExists(this))
mainwin->userEventTabDlg->removeTab(this);
else
-#endif
close();
}
@@ -2623,11 +2620,10 @@
if (!icqEventTag)
return slot_close(); // if we're not sending atm, let ESC close the window
-#if QT_VERSION >= 300
if (mainwin->userEventTabDlg &&
mainwin->userEventTabDlg->tabIsSelected(this))
mainwin->userEventTabDlg->setCaption(m_sBaseTitle);
-#endif
+
server->CancelEvent(icqEventTag);
}
@@ -2720,11 +2716,11 @@
mleSend->setFocus ();
m_sBaseTitle += tr(" - Message");
-#if QT_VERSION >= 300
+
if (mainwin->userEventTabDlg &&
mainwin->userEventTabDlg->tabIsSelected(this))
mainwin->userEventTabDlg->setCaption(m_sBaseTitle);
-#endif
+
setCaption(m_sBaseTitle);
cmbSendType->setCurrentItem(UC_MESSAGE);
}
@@ -2840,7 +2836,7 @@
//-----UserSendMsgEvent::sendDone--------------------------------------------
-bool UserSendMsgEvent::sendDone(ICQEvent *e)
+bool UserSendMsgEvent::sendDone(ICQEvent* /* e */)
{
mleSend->setText(QString::null);
@@ -2885,11 +2881,11 @@
edtItem->installEventFilter(this);
m_sBaseTitle += tr(" - URL");
-#if QT_VERSION >= 300
+
if (mainwin->userEventTabDlg &&
mainwin->userEventTabDlg->tabIsSelected(this))
mainwin->userEventTabDlg->setCaption(m_sBaseTitle);
-#endif
+
setCaption(m_sBaseTitle);
cmbSendType->setCurrentItem(UC_URL);
}
@@ -3018,11 +3014,11 @@
h_lay->addWidget(btnEdit);
m_sBaseTitle += tr(" - File Transfer");
-#if QT_VERSION >= 300
+
if (mainwin->userEventTabDlg &&
mainwin->userEventTabDlg->tabIsSelected(this))
mainwin->userEventTabDlg->setCaption(m_sBaseTitle);
-#endif
+
setCaption(m_sBaseTitle);
cmbSendType->setCurrentItem(UC_FILE);
}
@@ -3212,11 +3208,11 @@
h_lay->addWidget(btnBrowse);
m_sBaseTitle += tr(" - Chat Request");
-#if QT_VERSION >= 300
+
if (mainwin->userEventTabDlg &&
mainwin->userEventTabDlg->tabIsSelected(this))
mainwin->userEventTabDlg->setCaption(m_sBaseTitle);
-#endif
+
setCaption(m_sBaseTitle);
cmbSendType->setCurrentItem(UC_CHAT);
}
@@ -3342,11 +3338,11 @@
lay->addWidget(lstContacts);
m_sBaseTitle += tr(" - Contact List");
-#if QT_VERSION >= 300
+
if (mainwin->userEventTabDlg &&
mainwin->userEventTabDlg->tabIsSelected(this))
mainwin->userEventTabDlg->setCaption(m_sBaseTitle);
-#endif
+
setCaption(m_sBaseTitle);
cmbSendType->setCurrentItem(UC_CONTACT);
}
@@ -3361,7 +3357,6 @@
{
// Take care of typing notification now
tmrSendTyping->stop();
- connect(mleSend, SIGNAL(textChanged()), this, SLOT(slot_textChanged()));
server->ProtoTypingNotification(m_lUsers.front().c_str(), m_nPPID, false, m_nConvoId);
CMMUserViewItem *i = static_cast<CMMUserViewItem*>(lstContacts->firstChild());
@@ -3477,11 +3472,11 @@
}
m_sBaseTitle += tr(" - SMS");
-#if QT_VERSION >= 300
+
if (mainwin->userEventTabDlg &&
mainwin->userEventTabDlg->tabIsSelected(this))
mainwin->userEventTabDlg->setCaption(m_sBaseTitle);
-#endif
+
setCaption(m_sBaseTitle);
cmbSendType->setCurrentItem(UC_SMS);
}
@@ -3533,7 +3528,7 @@
}
//-----UserSendSmsEvent::sendDone----------------------------------------------
-bool UserSendSmsEvent::sendDone(ICQEvent *e)
+bool UserSendSmsEvent::sendDone(ICQEvent* /* e */)
{
return true;
}
Modified: branches/newapi/qt-gui/src/usereventdlg.h
URL: http://svn.licq.org/viewvc/licq/branches/newapi/qt-gui/src/usereventdlg.h?rev=4979&r1=4978&r2=4979&view=diff
==============================================================================
--- branches/newapi/qt-gui/src/usereventdlg.h (original)
+++ branches/newapi/qt-gui/src/usereventdlg.h Tue Jun 26 06:35:20 2007
@@ -1,20 +1,22 @@
// -*- c-basic-offset: 2 -*-
/*
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-*/
+ * This file is part of Licq, an instant messaging client for UNIX.
+ * Copyright (C) 2000-2006 Licq developers
+ *
+ * Licq is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Licq is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Licq; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
#ifndef USEREVENTDLG_H
#define USEREVENTDLG_H
@@ -35,6 +37,12 @@
#include "licq_color.h"
#include "licq_filetransfer.h"
#include "licq_message.h"
+
+#ifdef USE_KDE
+#include <kdeversion.h>
+#else
+#define KDE_IS_VERSION(a, b, c) 0
+#endif
class QTabWidget;
class QBoxLayout;
@@ -86,7 +94,6 @@
~UserEventTabDlg();
void addTab(UserEventCommon *tab, int index = -1);
- void removeTab(QWidget *tab);
void selectTab(QWidget *tab);
void replaceTab(QWidget *oldTab, UserEventCommon *newTab);
bool tabIsSelected(QWidget *tab);
@@ -96,11 +103,9 @@
void gotTyping(ICQUser *u, int);
void changeMsgWinSticky(bool _bStick);
-#ifdef USE_KDE
-#if KDE_VERSION >= 320
+#if defined(USE_KDE) && KDE_IS_VERSION(3, 2, 0)
virtual void setIcon(const QPixmap &icon);
-#endif // KDE_VERSION
-#endif // USE_KDE
+#endif
private:
CETabWidget *tabw;
@@ -113,6 +118,7 @@
void slot_currentChanged(QWidget *tab);
void moveLeft();
void moveRight();
+ void removeTab(QWidget* tab);
protected slots:
void setMsgWinSticky();
@@ -262,10 +268,8 @@
void setText(const QString& txt);
void convoJoin(const char *, unsigned long _nConvoId);
void convoLeave(const char *, unsigned long _nConvoId);
-
-#if QT_VERSION >= 300
+
virtual void windowActivationChange(bool oldActive);
-#endif
int clearDelay;
signals:
@@ -311,6 +315,7 @@
void slot_ClearNewEvents();
void slot_textChanged();
void slot_textChanged_timeout();
+ void slot_sendServerToggled(bool);
public slots:
void changeEventType(int);
Modified: branches/newapi/qt-gui/src/userinfodlg.cpp
URL: http://svn.licq.org/viewvc/licq/branches/newapi/qt-gui/src/userinfodlg.cpp?rev=4979&r1=4978&r2=4979&view=diff
==============================================================================
--- branches/newapi/qt-gui/src/userinfodlg.cpp (original)
+++ branches/newapi/qt-gui/src/userinfodlg.cpp Tue Jun 26 06:35:20 2007
@@ -1,20 +1,22 @@
// -*- c-basic-offset: 2 -*-
/*
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-*/
+ * This file is part of Licq, an instant messaging client for UNIX.
+ * Copyright (C) 2000-2006 Licq developers
+ *
+ * Licq is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Licq is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Licq; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
// written by Graham Roff <gra...@licq.org>
// contributions by Dirk A. Mueller <di...@licq.org>
@@ -116,7 +118,7 @@
QBoxLayout *lay = new QVBoxLayout(this, 8);
- tabs = new QTabWidget(this);
+ tabs = new CETabWidget(this);
lay->addWidget(tabs, 2);
tabs->addTab(tabList[GeneralInfo].tab, tabList[GeneralInfo].label);
@@ -305,8 +307,8 @@
nfoStatus = new CInfoField(p, true);
lay->addWidget(nfoStatus, CR, 1);
lay->addWidget(new QLabel(tr("Timezone:"), p), CR, 3);
- nfoTime = new CInfoField(p, true);
- lay->addWidget(nfoTime, CR, 4);
+ tznZone = new CTimeZoneField(p);
+ lay->addWidget(tznZone, CR, 4);
lay->addWidget(new QLabel(tr("Name:"), p), ++CR, 0);
nfoFirstName = new CInfoField(p, false);
@@ -411,17 +413,13 @@
ip.append(QString(":%1").arg(u->PortStr(buf)));
}
nfoIp->setData(ip);
- if (u->GetTimezone() == TIMEZONE_UNKNOWN)
- nfoTime->setText(tr("Unknown"));
- else
- {
- nfoTime->setText(tr("GMT%1%1%1")
- .arg(u->GetTimezone() > 0 ? "-" : "+")
- .arg(abs(u->GetTimezone() / 2)).arg(u->GetTimezone() % 2 ? "30" : "00") );
- }
+ tznZone->setData(u->GetTimezone());
nfoStatus->setData(u->StatusStr());
if (m_bOwner)
{
+ // Owner timezone is not editable, it is taken from system timezone instead
+ tznZone->setEnabled(false);
+
const SCountry *c = GetCountryByCode(u->GetCountryCode());
if (c == NULL)
cmbCountry->setCurrentItem(0);
@@ -488,6 +486,7 @@
unsigned short i = cmbCountry->currentItem();
u->SetCountryCode(GetCountryByIndex(i)->nCode);
}
+ u->SetTimezone(tznZone->data());
u->SetEnableSave(true);
u->SaveGeneralInfo();
@@ -1180,10 +1179,7 @@
mlvAbout = new CHistoryWidget(p, "About");//EditWrap(true, p);
mlvAbout->setReadOnly(!m_bOwner);
mlvAbout->setTextFormat(RichText);
-#if QT_VERSION >= 300
connect(mlvAbout, SIGNAL(viewurl(QWidget*, QString)), mainwin, SLOT(slot_viewurl(QWidget *, QString)));
-#endif
-
}
void UserInfoDlg::SetAbout(ICQUser *u)
@@ -1726,11 +1722,10 @@
chkHistoryReverse->setFixedSize(chkHistoryReverse->sizeHint());
l->addWidget(chkHistoryReverse);
- mlvHistory = new CMessageViewWidget(m_szId, m_nPPID, mainwin, p, "history");
- mlvHistory->m_nMsgStyle = 4; /* STYLE_HISTORY */
-#if QT_VERSION >= 300
+ mlvHistory = new CMessageViewWidget(m_szId, m_nPPID, mainwin, p, "history", true);
+
connect(mlvHistory, SIGNAL(viewurl(QWidget*, QString)), mainwin, SLOT(slot_viewurl(QWidget *, QString)));
-#endif
+
lay->addWidget(mlvHistory, 1);
l = new QHBoxLayout(lay);
@@ -2028,7 +2023,18 @@
barFiltering->setTotalSteps(NUM_MSG_PER_HISTORY);
char* ftxt = qstrdup(codec->fromUnicode(lneFilter->text()));
int flen = strlen(ftxt);
-
+
+ QString ownerName;
+ ICQOwner *o = gUserManager.FetchOwner(m_nPPID, LOCK_R);
+ if (o != NULL)
+ {
+ // Don't use this codec to decode our conversation with the contact
+ // since we're using the contact's encoding, not ours.
+ QTextCodec *ownerCodec = UserCodec::codecForICQUser(o);
+ ownerName = ownerCodec->toUnicode(o->GetAlias());
+ gUserManager.DropOwner(m_nPPID);
+ }
+
mlvHistory->clear();
while (m_nHistoryShowing < (NUM_MSG_PER_HISTORY))
{
@@ -2041,33 +2047,15 @@
else
messageText = codec->toUnicode((*tempIter)->Text());
-#if QT_VERSION >= 300
mlvHistory->addMsg((*tempIter)->Direction(), false,
- EventDescription(*tempIter),
+ ((*tempIter)->SubCommand() == ICQ_CMDxSUB_MSG ? QString("") : (EventDescription(*tempIter) + " ")),
date,
(*tempIter)->IsDirect(),
(*tempIter)->IsMultiRec(),
(*tempIter)->IsUrgent(),
(*tempIter)->IsEncrypted(),
- contactName,
+ ((*tempIter)->Direction() == D_RECEIVER ? contactName : ownerName),
MLView::toRichText(messageText, true, bUseHTML));
-#else
- // See CHistoryWidget::paintCell for reference on those Qt 2-only
- // formatting escape codes.
- s.sprintf("%c%s\n%c%s [%c%c%c%c]\n\n%s\n\n",
- ((*tempIter)->Direction() == D_RECEIVER ? '\001' : '\002'),
- ((*tempIter)->Direction() == D_RECEIVER ? tr("%1 from %2") : tr("%1 to %2"))
- .arg(EventDescription(*tempIter)).arg(contactName).utf8().data(),
- ((*tempIter)->Direction() == D_RECEIVER ? '\001' : '\002'),
- date.toString().utf8().data(),
- (*tempIter)->IsDirect() ? 'D' : '-',
- (*tempIter)->IsMultiRec() ? 'M' : '-',
- (*tempIter)->IsUrgent() ? 'U' : '-',
- (*tempIter)->IsEncrypted() ? 'E' : '-',
- messageText.utf8().data()
- );
- tmp.append(s);
-#endif
m_nHistoryShowing++;
barFiltering->setProgress(m_nHistoryShowing);
}
@@ -2086,6 +2074,10 @@
break;
}
}
+
+ // History view is buffered so tell it write buffer to output now that all entries have been added
+ mlvHistory->updateContent();
+
delete [] ftxt;
if(lneFilter->text().isEmpty())
lblHistory->setText(tr("[<font color=\"%1\">Received</font>] "
@@ -2108,7 +2100,7 @@
if(!m_bHistoryReverse)
mlvHistory->GotoEnd();
else
- mlvHistory->setCursorPosition(0, 0);
+ mlvHistory->GotoHome();
barFiltering->reset();
}
Modified: branches/newapi/qt-gui/src/userinfodlg.h
URL: http://svn.licq.org/viewvc/licq/branches/newapi/qt-gui/src/userinfodlg.h?rev=4979&r1=4978&r2=4979&view=diff
==============================================================================
--- branches/newapi/qt-gui/src/userinfodlg.h (original)
+++ branches/newapi/qt-gui/src/userinfodlg.h Tue Jun 26 06:35:20 2007
@@ -1,20 +1,22 @@
// -*- c-basic-offset: 2 -*-
/*
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-*/
+ * This file is part of Licq, an instant messaging client for UNIX.
+ * Copyright (C) 2000-2006 Licq developers
+ *
+ * Licq is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Licq is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Licq; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
#ifndef USERINFODLG_H
#define USERINFODLG_H
@@ -101,10 +103,11 @@
CInfoField *nfoFirstName, *nfoLastName, *nfoEmailPrimary, *nfoEmailSecondary, *nfoEmailOld,
*nfoAlias, *nfoIp, *nfoUin, *nfoCity, *nfoState,
*nfoZipCode, *nfoAddress, *nfoCountry, *nfoFax, *nfoCellular,
- *nfoPhone, *nfoTime, *nfoStatus;
+ *nfoPhone, *nfoStatus;
QCheckBox *chkKeepAliasOnUpdate;
CEComboBox *cmbCountry;
QLabel *lblAuth, *lblICQHomepage;
+ CTimeZoneField *tznZone;
// More info
void CreateMoreInfo();
Modified: branches/newapi/qt-gui/src/userselectdlg.cpp
URL: http://svn.licq.org/viewvc/licq/branches/newapi/qt-gui/src/userselectdlg.cpp?rev=4979&r1=4978&r2=4979&view=diff
==============================================================================
--- branches/newapi/qt-gui/src/userselectdlg.cpp (original)
+++ branches/newapi/qt-gui/src/userselectdlg.cpp Tue Jun 26 06:35:20 2007
@@ -1,20 +1,22 @@
// -*- c-basic-offset: 2 -*-
/*
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-*/
+ * This file is part of Licq, an instant messaging client for UNIX.
+ * Copyright (C) 2003-2006 Licq developers
+ *
+ * Licq is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Licq is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Licq; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -71,7 +73,6 @@
lay->addStretch();
lay->addWidget(frmButtons);
- connect(cmbUser, SIGNAL(activated(const QString &)), SLOT(slot_cmbSelectUser(const QString &)));
connect(btnOk, SIGNAL(clicked()), SLOT(slot_ok()));
connect(btnCancel, SIGNAL(clicked()), SLOT(close()));
@@ -113,10 +114,5 @@
close();
}
-void UserSelectDlg::slot_cmbSelectUser(const QString &str)
-{
-}
-
-
#include "userselectdlg.moc"
Modified: branches/newapi/qt-gui/src/userselectdlg.h
URL: http://svn.licq.org/viewvc/licq/branches/newapi/qt-gui/src/userselectdlg.h?rev=4979&r1=4978&r2=4979&view=diff
==============================================================================
--- branches/newapi/qt-gui/src/userselectdlg.h (original)
+++ branches/newapi/qt-gui/src/userselectdlg.h Tue Jun 26 06:35:20 2007
@@ -1,3 +1,22 @@
+/*
+ * This file is part of Licq, an instant messaging client for UNIX.
+ * Copyright (C) 2003-2006 Licq developers
+ *
+ * Licq is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Licq is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Licq; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
#ifndef USERSELECTDLG_H
#define USERSELECTDLG_H
@@ -35,7 +54,6 @@
protected slots:
void slot_ok();
- void slot_cmbSelectUser(const QString &);
};
#endif
Modified: branches/newapi/qt-gui/src/utilitydlg.cpp
URL: http://svn.licq.org/viewvc/licq/branches/newapi/qt-gui/src/utilitydlg.cpp?rev=4979&r1=4978&r2=4979&view=diff
==============================================================================
--- branches/newapi/qt-gui/src/utilitydlg.cpp (original)
+++ branches/newapi/qt-gui/src/utilitydlg.cpp Tue Jun 26 06:35:20 2007
@@ -1,20 +1,22 @@
// -*- c-basic-offset: 2 -*-
/*
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-*/
+ * This file is part of Licq, an instant messaging client for UNIX.
+ * Copyright (C) 1999-2006 Licq developers
+ *
+ * Licq is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Licq is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Licq; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
#include <qcheckbox.h>
#include <qgroupbox.h>
Modified: branches/newapi/qt-gui/src/utilitydlg.h
URL: http://svn.licq.org/viewvc/licq/branches/newapi/qt-gui/src/utilitydlg.h?rev=4979&r1=4978&r2=4979&view=diff
==============================================================================
--- branches/newapi/qt-gui/src/utilitydlg.h (original)
+++ branches/newapi/qt-gui/src/utilitydlg.h Tue Jun 26 06:35:20 2007
@@ -1,3 +1,22 @@
+/*
+ * This file is part of Licq, an instant messaging client for UNIX.
+ * Copyright (C) 1999-2006 Licq developers
+ *
+ * Licq is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Licq is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Licq; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
#ifndef UTILITYDLG_H
#define UTILITYDLG_H
Modified: branches/newapi/qt-gui/src/wharf.cpp
URL: http://svn.licq.org/viewvc/licq/branches/newapi/qt-gui/src/wharf.cpp?rev=4979&r1=4978&r2=4979&view=diff
==============================================================================
--- branches/newapi/qt-gui/src/wharf.cpp (original)
+++ branches/newapi/qt-gui/src/wharf.cpp Tue Jun 26 06:35:20 2007
@@ -1,19 +1,22 @@
// -*- c-basic-offset: 2 -*-
/*
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
+ * This file is part of Licq, an instant messaging client for UNIX.
+ * Copyright (C) 1999-2006 Licq developers
+ *
+ * Licq is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Licq is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Licq; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
// written by Graham Roff <gra...@licq.org>
// KDE support by Dirk Mueller <di...@licq.org>
@@ -67,7 +70,7 @@
/*
Constructs a WharfIcon widget.
*/
-IconManager::IconManager(CMainWindow *_mainwin, QPopupMenu *_menu, QWidget *parent)
+IconManager::IconManager(CMainWindow *_mainwin, QPopupMenu *_menu, QWidget* /* parent */)
: QWidget(NULL, "LicqWharf", WType_TopLevel)
{
setCaption("LicqWharf");
@@ -691,13 +694,13 @@
repaint();
}
-void IconManager_KDEStyle::timerEvent(QTimerEvent* e)
+void IconManager_KDEStyle::timerEvent(QTimerEvent* /* e */)
{
m_timerToggle = !m_timerToggle;
repaint();
}
-void IconManager_KDEStyle::paintEvent( QPaintEvent *e)
+void IconManager_KDEStyle::paintEvent( QPaintEvent* /* e */)
{
QPainter p(this);
Modified: branches/newapi/qt-gui/src/wharf.h
URL: http://svn.licq.org/viewvc/licq/branches/newapi/qt-gui/src/wharf.h?rev=4979&r1=4978&r2=4979&view=diff
==============================================================================
--- branches/newapi/qt-gui/src/wharf.h (original)
+++ branches/newapi/qt-gui/src/wharf.h Tue Jun 26 06:35:20 2007
@@ -1,19 +1,22 @@
// -*- c-basic-offset: 2 -*-
/*
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
+ * This file is part of Licq, an instant messaging client for UNIX.
+ * Copyright (C) 1999-2006 Licq developers
+ *
+ * Licq is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Licq is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Licq; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
// written by Graham Roff <gra...@licq.org>
// KDE support by Dirk Mueller <di...@licq.org>
@@ -59,7 +62,7 @@
virtual ~IconManager();
// reimplement these two
virtual void SetDockIconStatus() {};
- virtual void SetDockIconMsg(unsigned short nNewMsg, unsigned short nSysMsg) {};
+ virtual void SetDockIconMsg(unsigned short, unsigned short) {};
protected:
CMainWindow *mainwin;
Modified: branches/newapi/qt-gui/src/wrap_kde_malloc.cpp
URL: http://svn.licq.org/viewvc/licq/branches/newapi/qt-gui/src/wrap_kde_malloc.cpp?rev=4979&r1=4978&r2=4979&view=diff
==============================================================================
--- branches/newapi/qt-gui/src/wrap_kde_malloc.cpp (original)
+++ branches/newapi/qt-gui/src/wrap_kde_malloc.cpp Tue Jun 26 06:35:20 2007
@@ -1,20 +1,22 @@
// -*- c-basic-offset: 2 -*-
/*
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-*/
+ * This file is part of Licq, an instant messaging client for UNIX.
+ * Copyright (C) 2002-2006 Licq developers
+ *
+ * Licq is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Licq is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Licq; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
/*
* This will use libc malloc instead of trying to use any other malloc.