[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: extragear/network/ktorrent
From: Joris Guisson <joris.guisson () gmail ! com>
Date: 2005-11-30 19:19:53
Message-ID: 1133378393.501182.20735.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 484439 by guisson:
Torrrents can now be saved from searchwidget
BUG: 115077
M +3 -0 ChangeLog
M +16 -11 ktorrent.kdevelop
M +6 -3 plugins/search/htmlpart.cpp
M +1 -0 plugins/search/htmlpart.h
M +16 -0 plugins/search/searchwidget.cpp
M +1 -0 plugins/search/searchwidget.h
--- trunk/extragear/network/ktorrent/ChangeLog #484438:484439
@@ -26,7 +26,9 @@
- Added new choking algorithm
- Allow to send a custom IP to the tracker (116115)
- No more duplicate torrents (117324)
+- Torrents can now be save from searchwidget (115077)
+
- Fixed BUG:
-114103
-113155
@@ -41,3 +43,4 @@
-108930
-116115
-117324
+ -115077
--- trunk/extragear/network/ktorrent/ktorrent.kdevelop #484438:484439
@@ -14,13 +14,13 @@
</keywords>
<projectdirectory>.</projectdirectory>
<absoluteprojectpath>false</absoluteprojectpath>
- <description/>
+ <description></description>
<ignoreparts/>
<versioncontrol>kdevsubversion</versioncontrol>
</general>
<kdevautoproject>
<general>
- <activetarget>plugins/partfileimport/ktpartfileimportplugin.la</activetarget>
+ <activetarget>apps/ktorrent/ktorrent</activetarget>
<useconfiguration>debug</useconfiguration>
<useactivetarget>true</useactivetarget>
</general>
@@ -143,14 +143,14 @@
<general>
<dbgshell>libtool</dbgshell>
<programargs>--nofork --debug</programargs>
- <gdbpath/>
+ <gdbpath></gdbpath>
<breakonloadinglibs>true</breakonloadinglibs>
<separatetty>false</separatetty>
<floatingtoolbar>false</floatingtoolbar>
<runappinappdirectory>true</runappinappdirectory>
- <configGdbScript/>
- <runShellScript/>
- <runGdbScript/>
+ <configGdbScript></configGdbScript>
+ <runShellScript></runShellScript>
+ <runGdbScript></runGdbScript>
</general>
<display>
<staticmembers>false</staticmembers>
@@ -212,14 +212,14 @@
</substmap>
<kdevcppsupport>
<references>
+ <pcs>KDElibs</pcs>
<pcs>Qt</pcs>
- <pcs>KDElibs</pcs>
</references>
<codecompletion>
<includeGlobalFunctions>true</includeGlobalFunctions>
<includeTypes>true</includeTypes>
<includeEnums>true</includeEnums>
- <includeTypedefs>false</includeTypedefs>
+ <includeTypedefs>true</includeTypedefs>
<automaticCodeCompletion>true</automaticCodeCompletion>
<automaticArgumentsHint>true</automaticArgumentsHint>
<automaticHeaderCompletion>true</automaticHeaderCompletion>
@@ -228,7 +228,7 @@
<headerCompletionDelay>250</headerCompletionDelay>
</codecompletion>
<creategettersetter>
- <prefixGet/>
+ <prefixGet></prefixGet>
<prefixSet>set</prefixSet>
<prefixVariable>m_,_</prefixVariable>
<parameterName>theValue</parameterName>
@@ -238,11 +238,16 @@
<designerintegration>
<qtdesigner/>
</designerintegration>
+ <qt>
+ <used>true</used>
+ <version>3</version>
+ <root></root>
+ </qt>
</kdevcppsupport>
<kdevvisualadvance>
<emulator>VisualBoyAdvance</emulator>
- <binary/>
- <addOptions/>
+ <binary></binary>
+ <addOptions></addOptions>
<terminal>false</terminal>
<fullscreen>false</fullscreen>
<graphicFilter>-f0</graphicFilter>
--- trunk/extragear/network/ktorrent/plugins/search/htmlpart.cpp #484438:484439
@@ -161,13 +161,16 @@
if (is_bencoded_data || mime_type == "application/x-bittorrent" ||
curr_url.prettyURL().endsWith(".torrent"))
{
- int ret = KMessageBox::questionYesNo(0,
- i18n("Do you want to download the torrent?"),
+ int ret = KMessageBox::questionYesNoCancel(0,
+ i18n("Do you want to download or save the torrent?"),
i18n("Download Torrent"),
- KGuiItem(i18n("to download", "Download"),"down"),KStdGuiItem::cancel());
+ KGuiItem(i18n("to download", "Download"),"down"),
+ KStdGuiItem::save());
if (ret == KMessageBox::Yes)
openTorrent(curr_url);
+ else if (ret == KMessageBox::No)
+ saveTorrent(curr_url);
}
else
{
--- trunk/extragear/network/ktorrent/plugins/search/htmlpart.h #484438:484439
@@ -57,6 +57,7 @@
signals:
void backAvailable(bool yes);
void openTorrent(const KURL & url);
+ void saveTorrent(const KURL & url);
void searchFinished();
private:
--- trunk/extragear/network/ktorrent/plugins/search/searchwidget.cpp #484438:484439
@@ -36,6 +36,7 @@
#include <kparts/partmanager.h>
#include <kio/netaccess.h>
#include <kmessagebox.h>
+#include <kfiledialog.h>
#include <util/log.h>
#include <torrent/globals.h>
#include <interfaces/guiinterface.h>
@@ -96,6 +97,8 @@
connect(html_part,SIGNAL(popupMenu(const QString&, const QPoint& )),
this,SLOT(showPopupMenu(const QString&, const QPoint& )));
connect(html_part,SIGNAL(searchFinished()),this,SLOT(onFinished()));
+ connect(html_part,SIGNAL(saveTorrent(const KURL& )),
+ this,SLOT(onSaveTorrent(const KURL& )));
KParts::PartManager* pman = html_part->partManager();
connect(pman,SIGNAL(partAdded(KParts::Part*)),this,SLOT(onFrameAdded(KParts::Part* )));
@@ -237,6 +240,19 @@
openTorrent(url);
}
+ void SearchWidget::onSaveTorrent(const KURL & url)
+ {
+ KFileDialog fdlg(QString::null,"*.torrent | " + i18n("torrent files"),this,0,true);
+ fdlg.setSelection(url.fileName());
+ fdlg.setOperationMode(KFileDialog::Saving);
+ if (fdlg.exec() == QDialog::Accepted)
+ {
+ KURL save_url = fdlg.selectedURL();
+ if (!KIO::NetAccess::copy(url,save_url,this))
+ KMessageBox::error(this,KIO::NetAccess::lastErrorString());
+ }
+ }
+
void SearchWidget::showPopupMenu(const QString & url,const QPoint & p)
{
right_click_menu->popup(p);
--- trunk/extragear/network/ktorrent/plugins/search/searchwidget.h #484438:484439
@@ -74,6 +74,7 @@
void onURLHover(const QString & url);
void onFinished();
void onOpenTorrent(const KURL & url);
+ void onSaveTorrent(const KURL & url);
void showPopupMenu(const QString & s,const QPoint & p);
void onBackAvailable(bool available);
void onFrameAdded(KParts::Part* p);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic