[prev in list] [next in list] [prev in thread] [next in thread]
List: kopete-devel
Subject: Re: [Kopete-devel] Showstoppers for 0.4 [v7] [IMPORTANT]
From: Hendrik vom Lehn <hennevl () hennevl ! de>
Date: 2002-05-29 21:15:05
[Download RAW message or body]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Wednesday 29 May 2002 21:53, Hendrik vom Lehn wrote:
> I think this is an good idea and I'll do it.
I finished it and I think it's working, but i don't get rid with these .ui
files. So there isn't any configuration entry yet.
In the Kopeterc there is an entry SendServer:
0 = Never
1 = Always
2 = Auto
Could somenone please create that configuration entrys and test it?
I attached the patch, because I don't want to commit sth half before the
release ;)
Hendrik
- --
Programmer: The device for converting coffee into software.
PGP Key-Id: 0xE50580F2
PGP Key: http://about.hennevl.de/public.key.txt
PGP Fingerprint: 2208 3E90 3FFE D02E 1CC7 9CD6 FAE1 39B5 E505 80F2
Homepage: www.hennevl.de
Email: hennevl@hennevl.de
Icq: 74681583
Jabber: hennevl@jabber.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE89WDF+uE5teUFgPIRAvg9AJ9fQcZk8X6BHx25HUt3QDI70VhZ0wCdFr52
t7A0MQVhfz/Pp6s7HWcBC0o=
=qwpi
-----END PGP SIGNATURE-----
["icq-server.patch" (text/x-diff)]
Index: icq/icqcontact.cpp
===================================================================
RCS file: /home/kde/kdenonbeta/kopete/protocols/icq/icqcontact.cpp,v
retrieving revision 1.71
diff -u -p -r1.71 icqcontact.cpp
--- icq/icqcontact.cpp 2002/05/26 13:14:05 1.71
+++ icq/icqcontact.cpp 2002/05/29 21:11:33
@@ -113,6 +113,10 @@ ICQContact::ICQContact(kxContactStruct c
theContacts.append(this);
mMsgManager = 0L;
+
+ if (mProtocol->prefs()->sendServer() == 1)
+ mProtocol->kxContacts->setAlwaysServer(mUIN, true, true);
+
}
KopeteMessageManager* ICQContact::msgManager()
@@ -242,32 +246,44 @@ void ICQContact::slotSendToServerError(i
/* note: seq is Sequence number */
void ICQContact::slotSendToClientError(int seq)
{
- kxSend *sendMessage;
- KopeteMessage origMessage;
- sendMessage = m_pendingSend[ seq ];
- origMessage = m_pendingSendMessages[ seq ];
+ if ( mProtocol->prefs()->sendServer() == 0 )
+ {
+ kxSend *sendMessage;
+ KopeteMessage origMessage;
+ sendMessage = m_pendingSend[ seq ];
+ origMessage = m_pendingSendMessages[ seq ];
+
+ kdDebug() << "ICQMessage::slotSendToClientError()" << endl;
+ kdDebug() << "ICQMessage::slotSendOk() Received client error from " << mUIN << \
" seq: "<< seq << endl; +
+ if ( KMessageBox::warningContinueCancel(
+ kopeteapp->mainWindow(),
+ i18n(
+ "<qt>There was an error sending the message directly to the client." \
+ " Usually this is a result of of the client having an old client." \
+ " Kopete can send the message through the server which may fix most problems" \
+ " sending messages. Would you like to send the message through the server?</qt>"
+ ),
+ i18n("Error Sending Message")) == KMessageBox::Continue)
+ {
+ kdDebug() << "ICQMessage::slotSendOk() Triying again using server " << mUIN << " \
seq: "<< seq << endl; + mProtocol->kxContacts->setAlwaysServer(mUIN, true, true);
+ sendMessage->sendToServer();
+ //slotSendMsg( origMessage );
+ /* msgManager()->checkServer(true); *sigh* */
+ }
+ //m_pendingSend.remove(seq);
+ //m_pendingSendMessages.remove(seq);
- kdDebug() << "ICQMessage::slotSendToClientError()" << endl;
- kdDebug() << "ICQMessage::slotSendOk() Received client error from " << mUIN << " \
seq: "<< seq << endl;
-
- if ( KMessageBox::warningContinueCancel(
- kopeteapp->mainWindow(),
- i18n(
- "<qt>There was an error sending the message directly to the client." \
- " Usually this is a result of of the client having an old client." \
- " Kopete can send the message through the server which may fix most problems" \
- " sending messages. Would you like to send the message through the server?</qt>"
- ),
- i18n("Error Sending Message")) == KMessageBox::Continue)
+ }
+ else
{
- kdDebug() << "ICQMessage::slotSendOk() Triying again using server " << mUIN << " \
seq: "<< seq << endl; + kxSend *sendMessage;
+ sendMessage = m_pendingSend[ seq ];
+ kdDebug() << "ICQMessage::slotSendOk() Triying again using server " << mUIN \
<< " seq: "<< seq << endl; mProtocol->kxContacts->setAlwaysServer(mUIN, true, true);
sendMessage->sendToServer();
- //slotSendMsg( origMessage );
- /* msgManager()->checkServer(true); *sigh* */
}
- //m_pendingSend.remove(seq);
- //m_pendingSendMessages.remove(seq);
}
ICQContact::~ICQContact()
Index: icq/icqpreferences.cpp
===================================================================
RCS file: /home/kde/kdenonbeta/kopete/protocols/icq/icqpreferences.cpp,v
retrieving revision 1.27
diff -u -p -r1.27 icqpreferences.cpp
--- icq/icqpreferences.cpp 2002/05/17 21:02:48 1.27
+++ icq/icqpreferences.cpp 2002/05/29 21:11:33
@@ -83,6 +83,7 @@ void ICQPreferences::load()
mAutoConnect = cfg->readBoolEntry ( "AutoConnect", false );
mAutoConnectStatus = cfg->readNumEntry ( "AutoConnectStatus", 0 );
mLogAll = cfg->readBoolEntry ( "LogAll", true );
+ mSendServer = cfg->readNumEntry ( "SendServer", 2);
// mShowOffline = cfg->readBoolEntry ( "ShowOfflineContacts", false );
Index: icq/icqpreferences.h
===================================================================
RCS file: /home/kde/kdenonbeta/kopete/protocols/icq/icqpreferences.h,v
retrieving revision 1.14
diff -u -p -r1.14 icqpreferences.h
--- icq/icqpreferences.h 2002/04/10 23:40:35 1.14
+++ icq/icqpreferences.h 2002/05/29 21:11:33
@@ -49,6 +49,7 @@ class ICQPreferences : public ConfigModu
uint serverPort() const { return mServerPort; }
bool autoConnect() const { return mAutoConnect; }
bool logAll() const { return mLogAll; }
+ int sendServer() { return mSendServer; }
bool notifyMessages() const { return mNotify; }
// bool showOffline() const { return mShowOffline; }
bool webAware() const { return mWebAware; }
@@ -109,6 +110,7 @@ class ICQPreferences : public ConfigModu
uint mServerPort;
bool mAutoConnect;
bool mLogAll;
+ int mSendServer;
bool mNotify;
bool mWebAware;
bool mHideIP;
_______________________________________________
Kopete-devel mailing list
Kopete-devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/kopete-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic