------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=119390
ogoffart kde org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
------- Additional Comments From ogoffart kde org 2006-03-11 11:40 -------
SVN commit 517518 by ogoffart:
Fix Bug 119390: recieving a nudge says it comes from me
Identify which contact sent the nudge
BUG: 119390
M +14 -7 msnchatsession.cpp
M +1 -1 msnchatsession.h
M +1 -1 msnswitchboardsocket.cpp
M +1 -1 msnswitchboardsocket.h
--- branches/kopete/0.12/kopete/protocols/msn/msnchatsession.cpp #517517:517518
@ -188,8 +188,8 @
this, SLOT( slotAcknowledgement(unsigned int, bool) ) );
connect( m_chatService, SIGNAL( invitation( const QString&, const
QString& ) ),
this, SLOT( slotInvitation( const QString&, const QString& ) )
);
- connect( m_chatService, SIGNAL( nudgeReceived() ),
- this, SLOT( slotNudgeReceived() ) );
+ connect( m_chatService, SIGNAL( nudgeReceived(const QString&) ),
+ this, SLOT( slotNudgeReceived(const QString&) ) );
connect( m_chatService, SIGNAL( errorMessage(int, const QString& ) ),
static_cast<MSNAccount *>(myself()->account()), SLOT(
slotErrorMessageReceived(int, const QString& ) ) );
if(!m_timeoutTimer)
@ -638,16 +638,23 @
void MSNChatSession::slotSendNudge()
{
if(m_chatService)
+ {
m_chatService->sendNudge();
+ Kopete::Message msg = Kopete::Message( myself(), members() ,
i18n ( "has sent a nudge" ), Kopete::Message::Outbound,
+
Kopete::Message::PlainText, QString(), Kopete::Message::TypeAction );
+ appendMessage( msg );
+
+ }
}
-void MSNChatSession::slotNudgeReceived()
+void MSNChatSession::slotNudgeReceived(const QString& handle)
{
- // FIXME: When nudge is the first received message, you can't see your
own message you send before the others send you a message.
- // Ok, this is only with chat window style which use "Parse All
Message" flag.
- QString nudgeBody = i18n( "You have received a nudge." );
- Kopete::Message msg = Kopete::Message(myself(), members(), nudgeBody,
Kopete::Message::Internal, Kopete::Message::PlainText );
+ Kopete::Contact *c = account()->contacts()[ handle ] ;
+ if(!c)
+ c=members().getFirst();
+ Kopete::Message msg = Kopete::Message(c, myself(), i18n ( "has sent you
a nudge" ), Kopete::Message::Inbound,
+
Kopete::Message::PlainText, QString(), Kopete::Message::TypeAction );
appendMessage( msg );
// Emit the nudge/buzz notification (configured by user).
emitNudgeNotification();
--- branches/kopete/0.12/kopete/protocols/msn/msnchatsession.h #517517:517518
@ -93,7 +93,7 @
void slotWebcamReceive();
void slotWebcamSend();
- void slotNudgeReceived();
+ void slotNudgeReceived(const QString& handle);
private:
--- branches/kopete/0.12/kopete/protocols/msn/msnswitchboardsocket.cpp
#517517:517518
@ -264,7 +264,7 @
if( dataCastId == 1 )
{
kdDebug(14140) << k_funcinfo << "Received a
nudge !" << endl;
- emit nudgeReceived();
+ emit nudgeReceived(m_msgHandle);
}
}
}
--- branches/kopete/0.12/kopete/protocols/msn/msnswitchboardsocket.h
#517517:517518
@ -152,7 +152,7 @
void msgAcknowledgement(unsigned int, bool);
void userJoined(const QString& handle , const QString &publicName ,
bool IRO);
void userLeft(const QString& handle , const QString &reason);
- void nudgeReceived();
+ void nudgeReceived(const QString &handle);
void switchBoardClosed( );
void invitation(const QString& handle, const QString& msg);
_______________________________________________
kopete-devel mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kopete-devel