Version: 0.19 #3031 (using KDE KDE 3.4.90) Installed from: Debian testing/unstable Packages I think it would be very useful to have a "Send file" menu entry in the query chat window, because often, when you are talking in private with a friend, you have to send him a file and it's a pain to switch to the channel window to do it.
Created attachment 12648 [details] Patch to add the Send file entry
Of course i meant the popup query chat window :)
Thank you for your patch. I am committing right now!
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; }