[Konversation-devel] [Bug 113028] There should be a "Send file" menu entry on the query chat window

ismail cartman donmez ismail at uludag.org.tr
Wed Sep 21 21:33:38 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=113028         
ismail uludag org tr changed:

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



------- Additional Comments From ismail uludag org tr  2005-09-21 21:33 -------
SVN commit 462700 by cartman:

Add "Send file" menu to chat window popup menu. Patch by Jean-Remy Falleri <jr dot falleri at laposte dot net>
FEATURE:113028



 M  +12 -0     query.cpp  


--- trunk/extragear/network/konversation/src/query.cpp #462699:462700
 @ -25,6 +25,7  @
 #include <kstandarddirs.h>
 #include <kdebug.h>
 #include <kmessagebox.h>
+#include <kiconloader.h>
 
 #include "channel.h"
 #include "query.h"
 @ -35,9 +36,11  @
 #include "ircviewbox.h"
 #include "common.h"
 
+const int POPUP_SEND=0xfd;
 const int POPUP_WHOIS =0xfe;
 const int POPUP_IGNORE=0xff;
 
+
 Query::Query(QWidget* parent) : ChatWindow(parent)
 {
     // don't setName here! It will break logfiles!
 @ -73,7 +76,12  @
     QPopupMenu* popup=textView->getPopup();
     popup->insertItem(i18n("Whois"),POPUP_WHOIS); // TODO: let the ircview give the id back rather than specifying it ourselves?
     popup->insertItem(i18n("Ignore"),POPUP_IGNORE);
+    if (kapp->authorize("allow_downloading"))
+    {
+        popup->insertItem(SmallIcon("2rightarrow"),i18n("Send &File..."),POPUP_SEND);
+    }
 
+
     // This box holds the input line
     QHBox* inputBox=new QHBox(this, "input_log_box");
     inputBox->setSpacing(spacing());
 @ -283,6 +291,10  @
 
         if(rc==KMessageBox::Yes) closeYourself();
     }
+    else if (id=POPUP_SEND)
+    {
+         sendQueryText(Preferences::commandChar()+"DCC SEND "+getName());
+    }
     else
         kdDebug() << "Query::popup(): Popup id " << id << " does not belong to me!" << endl;
 }


More information about the Konversation-devel mailing list