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

List:       kopete-devel
Subject:    Re: [kopete-devel] Allow plugins to change status bar text. Event
From:       Marc Cramdal <bruno.virlet () gmail ! com>
Date:       2005-01-09 17:50:51
Message-ID: 200501091849.31157.marc.cramdal () gmail ! com
[Download RAW message or body]

On Sunday 09 January 2005 17:04, Olivier Goffart wrote:
> > Patch need to be finalized, even for kopete/ and libkopete/ (doxygen
> > comments).
>
> With a correct documentation, that's nice for me. (for the kopete and
> libkopete code)

Here is the final patch (only for kopete/ and libkopete/)
Commit ?

(Is there a way to apply a patch to CVS instead of cvs commit ?)

Marc

["statusbar-docandindentfixed.diff" (text/x-diff)]

? libkopete/compat/Makefile
? libkopete/compat/Makefile.in
Index: kopete/chatwindow/chatview.h
===================================================================
RCS file: /home/kde/kdenetwork/kopete/kopete/chatwindow/chatview.h,v
retrieving revision 1.62
diff -u -p -r1.62 chatview.h
--- kopete/chatwindow/chatview.h	24 Dec 2004 00:00:06 -0000	1.62
+++ kopete/chatwindow/chatview.h	9 Jan 2005 17:41:14 -0000
@@ -74,12 +74,6 @@ public:
 	void saveOptions();
 
 	/**
-	 * Sets the text to be displayed on the status label
-	 * @param text The text to be displayed
-	 */
-	void setStatusText( const QString &text );
-
-	/**
 	 * Tells this view it is the active view
 	 */
 	void setActive( bool value );
@@ -246,6 +240,12 @@ public slots:
 	 */
 	void remoteTyping( const Kopete::Contact *contact, bool typing );
 
+	/**
+	 * Sets the text to be displayed on the status label
+	 * @param text The text to be displayed
+	 */
+	void setStatusText( const QString &text );
+    
 	/** Reimplemented from KopeteView **/
 	virtual void messageSentSuccessfully();
 
Index: kopete/chatwindow/kopeteviewmanager.cpp
===================================================================
RCS file: /home/kde/kdenetwork/kopete/kopete/chatwindow/kopeteviewmanager.cpp,v
retrieving revision 1.41
diff -u -p -r1.41 kopeteviewmanager.cpp
--- kopete/chatwindow/kopeteviewmanager.cpp	7 Nov 2004 21:49:04 -0000	1.41
+++ kopete/chatwindow/kopeteviewmanager.cpp	9 Jan 2005 17:41:14 -0000
@@ -131,6 +131,7 @@ KopeteView *KopeteViewManager::view( Kop
 
 			connect (newViewWidget, SIGNAL( typing(bool) ), manager, SLOT( typing(bool) ) );
 			connect (manager, SIGNAL( remoteTyping( const Kopete::Contact *, bool) ), \
newViewWidget, SLOT( remoteTyping(const Kopete::Contact *, bool) ) ); +			connect \
(manager, SIGNAL( eventNotification( const QString& ) ), newViewWidget, SLOT( \
setStatusText( const QString& ) ) );  }
 		else
 		{
Index: libkopete/kopetemessagemanager.cpp
===================================================================
RCS file: /home/kde/kdenetwork/kopete/libkopete/kopetemessagemanager.cpp,v
retrieving revision 1.221
diff -u -p -r1.221 kopetemessagemanager.cpp
--- libkopete/kopetemessagemanager.cpp	23 Nov 2004 09:27:26 -0000	1.221
+++ libkopete/kopetemessagemanager.cpp	9 Jan 2005 17:41:14 -0000
@@ -387,6 +387,11 @@ void Kopete::ChatSession::typing( bool t
 	emit myselfTyping( t );
 }
 
+void Kopete::ChatSession::receivedEventNotification( const QString& \
notificationText) +{
+	emit eventNotification( notificationText );
+}
+
 void Kopete::ChatSession::setCanBeDeleted ( bool b )
 {
 	d->mCanBeDeleted = b;
Index: libkopete/kopetemessagemanager.h
===================================================================
RCS file: /home/kde/kdenetwork/kopete/libkopete/kopetemessagemanager.h,v
retrieving revision 1.104
diff -u -p -r1.104 kopetemessagemanager.h
--- libkopete/kopetemessagemanager.h	23 Nov 2004 09:27:26 -0000	1.104
+++ libkopete/kopetemessagemanager.h	9 Jan 2005 17:41:14 -0000
@@ -242,6 +242,12 @@ signals:
 	 */
 	void remoteTyping( const Kopete::Contact *contact, bool isTyping );
 
+	/**
+	 * Signals that a an event has to be displayed in the statusbar.
+	 * The chatwindow connects to this signal to update the statusbar.
+	 */
+	void eventNotification( const QString& notificationText);
+    
 public slots:
 	/**
 	 * @brief Got a typing notification from a user
@@ -256,6 +262,12 @@ public slots:
 	void receivedTypingMsg( const QString &contactId, bool isTyping = true );
 
 	/**
+	 * @brief Got an event notification from a user.
+	 * It will emit the signal eventNotification()
+	 */
+	void receivedEventNotification(  const QString& notificationText );
+     
+	/**
 	 * Show a message to the chatwindow, or append it to the queue.
 	 * This is the function protocols HAVE TO call for both incoming and outgoing \
                messages
 	 * if the message must be showed in the chatwindow



_______________________________________________
kopete-devel mailing list
kopete-devel@kde.org
https://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