Summary: | There should be a "Send file" menu entry on the query chat window | ||
---|---|---|---|
Product: | [Applications] konversation | Reporter: | Jean-Rémy Falleri <jr.falleri> |
Component: | general | Assignee: | Konversation Developers <konversation-devel> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Debian testing | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: | Patch to add the Send file entry |
Description
Jean-Rémy Falleri
2005-09-21 21:22:32 UTC
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; } |