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

List:       kde-commits
Subject:    playground/network/aki/libaki
From:       Keith Allan Rusler <xzekecomax () gmail ! com>
Date:       2009-04-18 20:29:51
Message-ID: 1240086591.597006.20396.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 955916 by karusler:

Added colour to the messages

 M  +12 -3     chatview.cpp  
 M  +1 -1      serverwidget.cpp  


--- trunk/playground/network/aki/libaki/chatview.cpp #955915:955916
@@ -20,6 +20,8 @@
 */
 
 #include "chatview.h"
+#include "settings.h"
+#include <KLocale>
 #include <KToolInvocation>
 #include <QColor>
 #include <QPalette>
@@ -43,17 +45,24 @@
 
 void
 ChatView::addChannelCreationTime(const QString &user, const QString &time) {
-    append(QString("--> This channel was created on %1 by %2").arg(time).arg(user));
+    Q_UNUSED(user);
+    QString colour = i18n("<span style=\"{color: %1}\">*** This channel was"
+                          " created on %2</span>", QColor("purple").name(),
+                          time);
+    append(colour);
 }
 
 void
 ChatView::addMotd(const QString &message) {
-    append(QString("[MOTD] %1").arg(message));
+    append(QString("<span style=\"{color: %1;}\">[MOTD] %2</spam>")
+           .arg(AppSettings::normalColor().name()).arg(message));
 }
 
 void
 ChatView::addNoticeAuth(const QString &message) {
-    append(QString("[NOTICE] %1").arg(message));
+    QString colour = i18n("<span style=\"{color: %1}\">[NOTICE] %2</span>",
+                          AppSettings::noticeColor().name(), message);
+    append(colour);
 }
 
 KUrl
--- trunk/playground/network/aki/libaki/serverwidget.cpp #955915:955916
@@ -48,7 +48,7 @@
     Socket *socket = new Socket("irc.freenode.net", this);
     socket->setAddress("irc.freenode.net");
     QStringList chans;
-    chans << "#aki-testing" << "#aki";
+    chans << "#aki-testing";
     socket->setChannelList(chans);
     socket->setCodec("UTF-8");
     socket->setIdentity("aki");

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

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