[Konversation-devel] [Bug 111234] konversation hangs on command /list

Peter Simonsson psn at linux.se
Sun Aug 21 23:57:08 CEST 2005


------- 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=111234         
psn linux se changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From psn linux se  2005-08-21 23:57 -------
SVN commit 451824 by psn:

* Make /list open the channel list panel
* Fix notice to handle IDENTIFY-MSG correctly

BUG:111234


 M  +5 -0      channellistpanel.cpp  
 M  +5 -3      channellistpanel.h  
 M  +5 -0      inputfilter.cpp  
 M  +24 -9     konversationmainwindow.cpp  
 M  +1 -1      konversationmainwindow.h  
 M  +14 -0     outputfilter.cpp  
 M  +3 -1      server.cpp  
 M  +2 -1      server.h  


--- trunk/extragear/network/konversation/src/channellistpanel.cpp #451823:451824
 @ -509,4 +509,9  @
     emit updateInfo(info);
 }
 
+void ChannelListPanel::setFilter(const QString& filter)
+{
+    filterInput->setText(filter);
+}
+
 #include "channellistpanel.moc"
--- trunk/extragear/network/konversation/src/channellistpanel.h #451823:451824
 @ -33,14 +33,14  @
 {
     Q_OBJECT
 
-        public:
+    public:
         ChannelListPanel(QWidget* parent);
         ~ChannelListPanel();
 
         virtual bool closeYourself();
         virtual void emitUpdateInfo();
 
-        signals:
+    signals:
         void refreshChannelList();
         void joinChannel(const QString& channelName);
         void adjustMinValue(int num);
 @ -52,9 +52,11  @
         void addToChannelList(const QString& channel,int users,const QString& topic);
 
         virtual void appendInputText(const QString&);
+        void setFilter(const QString& filter);
 
+        void applyFilterClicked();
+
     protected slots:
-        void applyFilterClicked();
         void refreshList();
         void updateDisplay();                     // will be called by a timer to update regularly
         void saveList();
--- trunk/extragear/network/konversation/src/inputfilter.cpp #451823:451824
 @ -372,6 +372,11  @
     {
         if(!isIgnore(prefix,Ignore::Notice))
         {
+            if(server->identifyMsg())
+            {
+                trailing = trailing.mid(1);
+            }
+
             // Channel notice?
             if(isAChannel(parameterList[0]))
             {
--- trunk/extragear/network/konversation/src/konversationmainwindow.cpp #451823:451824
 @ -657,28 +657,43  @
     konsolePanel->deleteLater();
 }
 
-void KonversationMainWindow::openChannelList()
+void KonversationMainWindow::openChannelList(const QString& filter, bool getList)
 {
     if(frontServer)
     {
-        ChannelListPanel* panel=frontServer->getChannelListPanel();
+        ChannelListPanel* panel = frontServer->getChannelListPanel();
+
         if(panel)
         {
             getViewContainer()->showPage(panel);
         }
         else
         {
-            int ret = KMessageBox::warningContinueCancel(this,i18n("Using this function may result in a lot "
-                "of network traffic. If your connection is not fast "
-                "enough, it is possible that your client will be "
-                "disconnected by the server."), i18n("Channel List Warning"),
-                KStdGuiItem::cont(), "ChannelListWarning");
+            int ret = KMessageBox::Continue;
 
-            if(ret == KMessageBox::Continue)
+            if(filter.isEmpty())
             {
-                frontServer->addChannelListPanel();
+                ret = KMessageBox::warningContinueCancel(this,i18n("Using this function may result in a lot "
+                      "of network traffic. If your connection is not fast "
+                      "enough, it is possible that your client will be "
+                      "disconnected by the server."), i18n("Channel List Warning"),
+                      KStdGuiItem::cont(), "ChannelListWarning");
             }
+
+            if(ret != KMessageBox::Continue)
+            {
+                return;
+            }
+
+            panel = frontServer->addChannelListPanel();
         }
+
+        panel->setFilter(filter);
+
+        if(getList)
+        {
+            panel->applyFilterClicked();
+        }
     }
     else
     {
--- trunk/extragear/network/konversation/src/konversationmainwindow.h #451823:451824
 @ -115,6 +115,7  @
         void addUrlCatcher();
         void addDccChat(const QString& myNick,const QString& nick,const QString& numericalIp,const QStringList& arguments,bool listen);
         void insertRememberLine();
+        void openChannelList(const QString& filter = QString::null, bool getList = false);
 
         void resetLag();
         void updateLag(Server* lagServer,int msec);
 @ -140,7 +141,6  @
         void openPreferences();
         void openKeyBindings();
         void openQuickConnectDialog();
-        void openChannelList();
         void openNotify();
         void openLogfile();
         void openNicksOnlinePanel();
--- trunk/extragear/network/konversation/src/outputfilter.cpp #451823:451824
 @ -1,3 +1,5  @
+// -*- mode: c++; c-file-style: "bsd"; c-basic-offset: 4; tabs-width: 4; indent-tabs-mode: nil -*-
+
 /*
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
 @ -177,6 +179,7  @
             else if(command == "ignore")  result = parseIgnore(parameter);
             else if(command == "quote")   result = parseQuote(parameter);
             else if(command == "say")     result = parseSay(parameter);
+            else if(command == "list")    result = parseList(parameter);
 
             else if(command == "names")   result = parseNames(parameter);
             else if(command == "raw")     result = parseRaw(parameter);
 @ -1455,6 +1458,17  @
         return result;
     }
 
+    OutputFilterResult OutputFilter::parseList(const QString& parameter)
+    {
+        OutputFilterResult result;
+
+        m_server->getMainWindow()->openChannelList(parameter, true);
+
+        return result;
+    }
 }
 
 #include "outputfilter.moc"
+
+// kate: space-indent on; tab-width 4; indent-width 4; mixed-indent off; replace-tabs on;
+// vim: set et sw=4 ts=4 cino=l1,cs,U1:
--- trunk/extragear/network/konversation/src/server.cpp #451823:451824
 @ -3035,7 +3035,7  @
     }
 }
 
-void Server::addChannelListPanel()
+ChannelListPanel* Server::addChannelListPanel()
 {
     if(!channelListPanel)
     {
 @ -3045,6 +3045,8  @
         connect(channelListPanel, SIGNAL(joinChannel(const QString&)), this, SLOT(sendJoinCommand(const QString&)));
         connect(this, SIGNAL(serverOnline(bool)), channelListPanel, SLOT(serverOnline(bool)));
     }
+
+    return channelListPanel;
 }
 
 void Server::addToChannelList(const QString& channel, int users, const QString& topic)
--- trunk/extragear/network/konversation/src/server.h #451823:451824
 @ -343,6 +343,8  @
 
         bool identifyMsg() const { return m_identifyMsg; }
 
+        ChannelListPanel* addChannelListPanel();
+
     signals:
         void nicknameChanged(const QString&);
         void serverLag(Server* server,int msec);  /// will be connected to KonversationMainWindow::updateLag()
 @ -416,7 +418,6  @
         void requestUserhost(const QString& nicks);
         void addRawLog(bool show);
         void closeRawLog();
-        void addChannelListPanel();
         void addToChannelList(const QString& channel, int users, const QString& topic);
         void closeChannelListPanel();
         void updateChannelQuickButtons();


More information about the Konversation-devel mailing list