summaryrefslogtreecommitdiffstats
path: root/tdenewstuff/downloaddialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tdenewstuff/downloaddialog.cpp')
-rw-r--r--tdenewstuff/downloaddialog.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/tdenewstuff/downloaddialog.cpp b/tdenewstuff/downloaddialog.cpp
index 9744275e4..0eaa0e685 100644
--- a/tdenewstuff/downloaddialog.cpp
+++ b/tdenewstuff/downloaddialog.cpp
@@ -46,6 +46,7 @@
#include <tqtimer.h> // hack
#define OPENDESKTOP_REDIRECT_URL "opendesktop.org/content/download.php?content="
+#define OPENDESKTOP_REDIRECT_TEXT "If the download does not start in 3 seconds:</span><span class=\"defaulttext\">&nbsp;<a href=\""
using namespace KNS;
@@ -609,7 +610,7 @@ void DownloadDialog::slotInstallPhase2()
}
else
{
- m_s = new TDENewStuffGeneric(e->type(), this);
+ m_s = new TDENewStuffGeneric(m_filter, this);
m_entry = e;
KURL source = e->payload();
KURL dest = KURL(m_s->downloadDestination(e));
@@ -650,6 +651,12 @@ void DownloadDialog::slotJobResult( TDEIO::Job *job )
realURL = e->payload().protocol() + "://opendesktop.org" + realURL;
e->setPayload(realURL);
}
+ else if ((pos = mJobData.find(OPENDESKTOP_REDIRECT_TEXT)) > 0) {
+ pos = pos + strlen(OPENDESKTOP_REDIRECT_TEXT);
+ TQString realURL = mJobData.mid(pos);
+ realURL = realURL.mid(0, realURL.find("\">"));
+ e->setPayload(realURL);
+ }
}
slotInstallPhase2();