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

List:       kde-commits
Subject:    kdeextragear-2/konversation/konversation
From:       Peter Simonsson <psn () linux ! se>
Date:       2005-02-18 23:10:23
Message-ID: 20050218231023.7C2581D608 () office ! kde ! org
[Download RAW message or body]

CVS commit by psn: 

* Add support for highlights to osd
* Reword some options


  M +2 -1      chatwindow.cpp   1.113
  M +1 -1      chatwindowappearance_preferences.ui   1.13
  M +1 -1      highlight_preferences.ui   1.7
  M +5 -0      ircview.cpp   1.231
  M +5 -0      ircview.h   1.60
  M +13 -0     notificationhandler.cpp   1.10
  M +4 -3      notificationhandler.h   1.9


--- kdeextragear-2/konversation/konversation/chatwindow.cpp  #1.112:1.113
@@ -218,5 +218,6 @@ void ChatWindow::setIdentity(const Ident
 void ChatWindow::setTextView(IRCView* newView)
 {
-  textView=newView;
+  textView = newView;
+  textView->setChatWin(this);
   connect(textView,SIGNAL (textToLog(const QString&)),this,SLOT (logText(const \
QString&)) );  }

--- kdeextragear-2/konversation/konversation/chatwindowappearance_preferences.ui  \
#1.12:1.13 @@ -153,5 +153,5 @@
                     </property>
                     <property name="text">
-                        <string>Show nickname bo&amp;x in channel and status \
window</string> +                        <string>Show bo&amp;x to change own \
nickname</string>  </property>
                 </widget>

--- kdeextragear-2/konversation/konversation/highlight_preferences.ui  #1.6:1.7
@@ -33,5 +33,5 @@
             </property>
             <property name="text">
-                <string>Alwa&amp;ys highlight my current nick:</string>
+                <string>Alwa&amp;ys highlight own current nick:</string>
             </property>
         </widget>

--- kdeextragear-2/konversation/konversation/ircview.cpp  #1.230:1.231
@@ -58,4 +58,5 @@
 #include "images.h"
 #include "emoticon.h"
+#include "notificationhandler.h"
 
 IRCView::IRCView(QWidget* parent,Server* newServer) : KTextBrowser(parent)
@@ -68,4 +69,5 @@ IRCView::IRCView(QWidget* parent,Server*
   m_currentNick=QString::null;
   m_isOnNick=false;
+  m_chatWin = 0;
 
   setAutoFormatting(QTextEdit::AutoNone);
@@ -450,4 +452,5 @@ QString IRCView::filter(const QString& l
         }
 
+        konvApp->notificationHandler()->highlight(m_chatWin, whoSent, line);
         autoTextToSend = highlight->getAutoText();
       }
@@ -1081,3 +1084,5 @@ QString IRCView::timeStamp()
 }
 
+void IRCView::setChatWin(ChatWindow* chatWin) { m_chatWin = chatWin; }
+
 #include "ircview.moc"

--- kdeextragear-2/konversation/konversation/ircview.h  #1.59:1.60
@@ -34,4 +34,5 @@ class KPopupMenu;
 
 class Server;
+class ChatWindow;
 
 class IRCView : public KTextBrowser
@@ -61,4 +62,6 @@ class IRCView : public KTextBrowser
     };
 
+    void setChatWin(ChatWindow* chatWin);
+
   signals:
     // Notify container of new text and highlight state
@@ -162,4 +165,6 @@ class IRCView : public KTextBrowser
     QPoint pressPosition;
     int popupId;
+
+    ChatWindow* m_chatWin;
 };
 

--- kdeextragear-2/konversation/konversation/notificationhandler.cpp  #1.9:1.10
@@ -268,4 +268,17 @@ void NotificationHandler::dccChat(ChatWi
 }
 
+void NotificationHandler::highlight(ChatWindow* chatWin, const QString& fromNick, \
const QString& message) +{
+  if(!chatWin || !chatWin->notificationsEnabled()) {
+    return;
+  }
+
+  if(KonversationApplication::preferences.getOSDShowOwnNick())
+  {
+    KonversationApplication* konvApp = static_cast<KonversationApplication*>(kapp);
+    konvApp->osd->showOSD(i18n("[HighLight] (%1) <%2> \
%3").arg(chatWin->getName()).arg(fromNick).arg(message)); +  }
+}
+
 }
 

--- kdeextragear-2/konversation/konversation/notificationhandler.h  #1.8:1.9
@@ -42,4 +42,5 @@ class NotificationHandler : public QObje
     void kick(ChatWindow* chatWin, const QString& channel,const QString& nick);
     void dccChat(ChatWindow* chatWin, const QString& nick);
+    void highlight(ChatWindow* chatWin, const QString& fromNick, const QString& \
message);  
   protected:


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

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