Hi!
Now the countdown only starts if the user manually changed status to
away/na/etc. but not when just editing the away message (with "set auto
response").
Index: plugins/qt-gui/src/awaymsgdlg.cpp
===================================================================
RCS file: /cvsroot/licq/qt-gui/src/awaymsgdlg.cpp,v
retrieving revision 1.56
diff -u -r1.56 awaymsgdlg.cpp
--- plugins/qt-gui/src/awaymsgdlg.cpp 9 May 2005 23:41:59 -0000 1.56
+++ plugins/qt-gui/src/awaymsgdlg.cpp 10 May 2005 19:10:31 -0000
@@ -105,12 +105,19 @@
l->addSpacing(20);
l->addWidget(btnOk);
l->addWidget(btnCancel);
+
+ m_autocloseCounter = -1;
+ installEventFilter(this);
+ mleAwayMsg->installEventFilter(this);
+ connect(mleAwayMsg, SIGNAL(clicked(int, int)), SLOT(slot_autocloseStop()));
+ connect(mnuSelect, SIGNAL(aboutToShow()), SLOT(slot_autocloseStop()));
+ connect(btnHints, SIGNAL(clicked()), SLOT(slot_autocloseStop()));
}
// -----------------------------------------------------------------------------
-void AwayMsgDlg::SelectAutoResponse(unsigned short _status)
+void AwayMsgDlg::SelectAutoResponse(unsigned short _status, bool autoclose)
{
if((_status & 0xFF) == ICQ_STATUS_ONLINE || _status == ICQ_STATUS_OFFLINE)
_status = (_status & 0xFF00) | ICQ_STATUS_AWAY;
@@ -156,14 +163,10 @@
mleAwayMsg->setFocus();
QTimer::singleShot(0, mleAwayMsg, SLOT(selectAll()));
- installEventFilter(this);
- mleAwayMsg->installEventFilter(this);
- connect(mleAwayMsg, SIGNAL(clicked(int, int)),
- this, SLOT(slot_autocloseStop()));
- connect(mnuSelect, SIGNAL(aboutToShow()),
- this, SLOT(slot_autocloseStop()));
- m_autocloseCounter = 9;
- slot_autocloseTick();
+ if (autoclose) {
+ m_autocloseCounter = 9;
+ slot_autocloseTick();
+ }
if (!isVisible())
{
Index: plugins/qt-gui/src/awaymsgdlg.h
===================================================================
RCS file: /cvsroot/licq/qt-gui/src/awaymsgdlg.h,v
retrieving revision 1.26
diff -u -r1.26 awaymsgdlg.h
--- plugins/qt-gui/src/awaymsgdlg.h 9 May 2005 14:26:11 -0000 1.26
+++ plugins/qt-gui/src/awaymsgdlg.h 10 May 2005 19:10:32 -0000
@@ -13,7 +13,7 @@
public:
AwayMsgDlg(QWidget *parent = 0);
~AwayMsgDlg();
- void SelectAutoResponse(unsigned short status);
+ void SelectAutoResponse(unsigned short status, bool autoclose = false);
protected:
MLEditWrap *mleAwayMsg;
Index: plugins/qt-gui/src/mainwin.cpp
===================================================================
RCS file: /cvsroot/licq/qt-gui/src/mainwin.cpp,v
retrieving revision 1.360
diff -u -r1.360 mainwin.cpp
--- plugins/qt-gui/src/mainwin.cpp 3 May 2005 08:52:01 -0000 1.360
+++ plugins/qt-gui/src/mainwin.cpp 10 May 2005 19:10:43 -0000
@@ -2208,7 +2208,7 @@
}
-void CMainWindow::showAwayMsgDlg(unsigned short nStatus)
+void CMainWindow::showAwayMsgDlg(unsigned short nStatus, bool autoclose)
{
if(awayMsgDlg == NULL) {
awayMsgDlg = new AwayMsgDlg();
@@ -2218,7 +2218,7 @@
else
awayMsgDlg->raise();
- awayMsgDlg->SelectAutoResponse(nStatus);
+ awayMsgDlg->SelectAutoResponse(nStatus, autoclose);
}
@@ -2248,7 +2248,7 @@
nRealID |= ICQ_STATUS_NA;
if (nRealID != ICQ_STATUS_OFFLINE && (nRealID & 0xFF) != ICQ_STATUS_ONLINE)
- showAwayMsgDlg(nRealID);
+ showAwayMsgDlg(nRealID, true);
changeStatus(nRealID, nPPID);
}
@@ -2257,7 +2257,7 @@
void CMainWindow::changeStatusManual(int id)
{
if (id != ICQ_STATUS_OFFLINE && (id & 0xFF) != ICQ_STATUS_ONLINE)
- showAwayMsgDlg(id);
+ showAwayMsgDlg(id, true);
changeStatus(id);
}
Index: plugins/qt-gui/src/mainwin.h
===================================================================
RCS file: /cvsroot/licq/qt-gui/src/mainwin.h,v
retrieving revision 1.142
diff -u -r1.142 mainwin.h
--- plugins/qt-gui/src/mainwin.h 3 May 2005 08:52:01 -0000 1.142
+++ plugins/qt-gui/src/mainwin.h 10 May 2005 19:10:44 -0000
@@ -348,7 +348,7 @@
void showPluginDlg();
void showGPGKeyManager();
void slot_AwayMsgDlg();
- void showAwayMsgDlg(unsigned short status);
+ void showAwayMsgDlg(unsigned short status, bool autoclose = false);
void showOptionsDlg(int);
void popupOptionsDlg() { emit showOptionsDlg(0); };
void showAuthUserDlg();
ciao
J�rg