Bug 113028 - There should be a "Send file" menu entry on the query chat window
Summary: There should be a "Send file" menu entry on the query chat window
Status: RESOLVED FIXED
Alias: None
Product: konversation
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR wishlist
Target Milestone: ---
Assignee: Konversation Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-21 21:22 UTC by Jean-Rémy Falleri
Modified: 2005-09-21 21:33 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Patch to add the Send file entry (1.38 KB, patch)
2005-09-21 21:24 UTC, Jean-Rémy Falleri
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jean-Rémy Falleri 2005-09-21 21:22:32 UTC
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.
Comment 1 Jean-Rémy Falleri 2005-09-21 21:24:37 UTC
Created attachment 12648 [details]
Patch to add the Send file entry
Comment 2 Jean-Rémy Falleri 2005-09-21 21:27:20 UTC
Of course i meant the popup query chat window :)
Comment 3 Ismail Donmez 2005-09-21 21:32:41 UTC
Thank you for your patch. I am committing right now!
Comment 4 Ismail Donmez 2005-09-21 21:33:37 UTC
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;
 }