[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdeextragear-2/konversation/konversation/linkaddressbook
From:       John Tapsell <john () geola ! co ! uk>
Date:       2004-08-29 18:25:08
Message-ID: 20040829182508.E59B21D62 () office ! kde ! org
[Download RAW message or body]

CVS commit by johnflux: 

Implemented kimiface dcop functions sendMessage, and it's friends.


  M +9 -2      addressbook.cpp   1.23


--- kdeextragear-2/konversation/konversation/linkaddressbook/addressbook.cpp  #1.22:1.23
@@ -174,8 +174,14 @@ QStringList Addressbook::protocols() {
  */
 void Addressbook::messageContact( const QString &uid, const QString& message ) {
-        if(uid.isEmpty() || message.isEmpty()) {
+        if(uid.isEmpty()) {
                 kdDebug() << "Addressbook::messageContact called with empty uid or message" << endl;
                 return;
         }
+        NickInfoPtr nickInfo = getNickInfo(addressBook->findByUid(uid), true);
+        if(!nickInfo) {
+                kdDebug() << "messageContact:  uid %1 not online\n" << endl;
+                return;
+        }
+        nickInfo->getServer()->dcopSay(nickInfo->getNickname(), message);
         
         
@@ -190,4 +196,5 @@ void Addressbook::messageNewContact( con
                 return;
         }
+        messageContact(contactId, QString::null);
 }
 
@@ -201,4 +208,5 @@ void Addressbook::chatWithContact( const
                 return;
         }
+        messageContact(uid, QString::null);
 }
 
@@ -236,5 +244,4 @@ void Addressbook::emitContactPresenceCha
                 return;
         }
-        Q_ASSERT(kapp);
         Q_ASSERT(kapp->dcopClient());
         emit contactPresenceChanged(uid, kapp->dcopClient()->appId(), presence);


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic