From c02f3dd4d021baa7898215e3d83f5b5f98762a90 Mon Sep 17 00:00:00 2001 From: scripty Date: Wed, 3 Jun 2009 14:54:49 +0000 Subject: SVN_SILENT made messages (.desktop file) git-svn-id: svn+ssh://svn.kde.org/home/kde/trunk/playground/network/rekonq@977204 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- data/rekonq.desktop | 1 + 1 file changed, 1 insertion(+) diff --git a/data/rekonq.desktop b/data/rekonq.desktop index 6411c493..cfb4dde0 100644 --- a/data/rekonq.desktop +++ b/data/rekonq.desktop @@ -3,6 +3,7 @@ Name=rekonq Name[sv]=Rekonq GenericName=Webkit KDE Browser GenericName[et]=KDE Webkiti veebibrauser +GenericName[km]=កម្មវិធី​រុករក​ Webkit KDE GenericName[pt]=Navegador Web com WebKit GenericName[pt_BR]=Navegador Webkit do KDE GenericName[sv]=Webkit webbläsare för KDE -- cgit v1.2.1 From 8182aad42727cf3f192efca3e20f2ff44ef3f207 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sun, 7 Jun 2009 01:57:53 +0200 Subject: removed (again) unuseful download classes --- src/download.cpp | 225 ------------------------------------------------------- 1 file changed, 225 deletions(-) delete mode 100644 src/download.cpp diff --git a/src/download.cpp b/src/download.cpp deleted file mode 100644 index 84b9c5a3..00000000 --- a/src/download.cpp +++ /dev/null @@ -1,225 +0,0 @@ -/* ============================================================ -* -* This file is a part of the rekonq project -* -* Copyright (C) 2007 Lukas Appelhans -* Copyright (C) 2008-2009 by Andrea Diamantini -* Copyright (C) 2009 by Paweł Prażak -* Copyright (C) 2009 by Domrachev Alexandr -* -* -* This program is free software; you can redistribute it -* and/or modify it under the terms of the GNU General -* Public License as published by the Free Software Foundation; -* either version 3, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* ============================================================ */ - - -// Self Includes -#include "download.h" -#include "download.moc" - -// KDE Includes -#include -#include -#include -#include -#include -#include - -// Qt Includes -#include -#include - -// Local Includes -#include "application.h" -#include "mainwindow.h" - - -DownloadManager::DownloadManager() - : QObject() -{ -} - - -DownloadManager::~DownloadManager() -{ - foreach(Download *download, m_downloads) - { - // cancel all unfinished downloads - download->cancel(); - delete download; - } -} - - -void DownloadManager::newDownload(const KUrl &srcUrl, const KUrl &destUrl) -{ - KUrl destination = destUrl; - Download::DownloadType type; - - KSharedPtr mimeType = KMimeType::findByPath(srcUrl.prettyUrl()); - - QString typeText = KMimeType::extractKnownExtension(srcUrl.fileName()); - typeText += " (" + mimeType->name() + ')'; - - int answer = KMessageBox::questionYesNoCancel( - NULL, - i18n("Download '%1'?\n""Type: %2", srcUrl.prettyUrl(), typeText), - i18n("Download '%1'...", srcUrl.fileName()), - KStandardGuiItem::save(), - KStandardGuiItem::open(), - KStandardGuiItem::cancel() - ); - - switch (answer) - { - case KMessageBox::Cancel: - return; - break; - - case KMessageBox::Yes: // ----- SAVE - // if destination is empty than ask for download path (if showOpenSaveDownloadDialog setting enabled) - if (destination.isEmpty()) - { - destination = downloadDestination(srcUrl.fileName()); - } - type = Download::Save; - break; - - case KMessageBox::No: // ----- OPEN - // Download file to tmp dir - destination.setDirectory(KStandardDirs::locateLocal("tmp", "", true)); - destination.addPath(srcUrl.fileName()); - type = Download::Open; - break; - - default: - // impossible - break; - }; - - // if user canceled download than abort - if (destination.isEmpty()) - return; - - Download *download = new Download(srcUrl, destination, type); - connect(download, SIGNAL(downloadFinished(int)), this, SLOT(slotDownloadFinished(int))); - m_downloads.append(download); -} - - -const QList &DownloadManager::downloads() const -{ - return m_downloads; -} - - -KUrl DownloadManager::downloadDestination(const QString &filename) -{ - KUrl destination = ReKonfig::downloadDir(); - if (destination.isEmpty()) - destination = KGlobalSettings::downloadPath(); - destination.addPath(filename); - - if (!ReKonfig::downloadToDefaultDir()) - { - destination = KFileDialog::getSaveUrl(destination); - // if user canceled the download return empty url - if (destination.isEmpty()) - return KUrl(); - } - return destination; -} - - -void DownloadManager::slotDownloadFinished(int errorCode) -{ - Q_UNUSED(errorCode) - - // if sender exists and list contains it - (open and) delete it - Download *download = qobject_cast(sender()); - if (download && m_downloads.contains(download)) - { - if (download->type() == Download::Open) - { - KSharedPtr mimeType = KMimeType::findByPath(download->destUrl().prettyUrl()); - KRun::runUrl(download->destUrl(), mimeType->name(), NULL, true); - } - disconnect(download, SIGNAL(downloadFinished(int)), this, SLOT(slotDownloadFinished(int))); - int index = m_downloads.indexOf(download); - delete m_downloads.takeAt(index); - return; - } - kWarning() << "Could not find download or invalid sender. Sender:" << sender(); -} - - -//---- - -#include -#include -#include - - -Download::Download(const KUrl &srcUrl, const KUrl &destUrl, DownloadType type) - : QObject() - , m_srcUrl(srcUrl) - , m_destUrl(destUrl) - , m_type(type) -{ - Q_ASSERT(!m_srcUrl.isEmpty()); - Q_ASSERT(!m_destUrl.isEmpty()); - kDebug() << "DownloadFile: " << m_srcUrl.url() << " to dest: " << m_destUrl.url(); - - m_copyJob = KIO::file_copy(m_srcUrl, m_destUrl); - connect(m_copyJob, SIGNAL(result(KJob *)), SLOT(slotResult(KJob *))); -} - - -Download::~Download() -{ -} - - -void Download::cancel() -{ - bool result = m_copyJob->kill(KJob::EmitResult); - Q_ASSERT(result); -} - - -void Download::slotResult(KJob *job) -{ - switch (job->error()) - { - case 0: //The download has finished - { - kDebug() << "Downloading successfully finished: " << m_destUrl.url(); - break; - } - case KIO::ERR_FILE_ALREADY_EXIST: - { - kWarning() << "ERROR - File already exists"; - break; - } - case KIO::ERR_USER_CANCELED: - { - kWarning() << "ERROR - User canceled the downlaod"; - break; - } - default: - kWarning() << "We are sorry to say you, that there were errors while downloading :("; - break; - } - - // inform the world - emit downloadFinished(job->error()); -} - -- cgit v1.2.1 From ef5aa55b876f6b4e75015bbb3d1b0d29b9c48dfb Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sun, 7 Jun 2009 01:58:31 +0200 Subject: updating rekonq version --- CMakeLists.txt | 2 +- src/main.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 718b6b89..1a5a1b79 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,7 +9,7 @@ PROJECT( rekonq ) # rekonq info SET(REKONQ_MAJOR_VERSION "0") SET(REKONQ_MINOR_VERSION "1") -SET(REKONQ_PATCH_VERSION "2") +SET(REKONQ_PATCH_VERSION "3") SET(REKONQ_VERSION_STR "${REKONQ_MAJOR_VERSION}.${REKONQ_MINOR_VERSION}.${REKONQ_PATCH_VERSION}" diff --git a/src/main.cpp b/src/main.cpp index f4b2daff..ef724a68 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -31,7 +31,7 @@ static const char description[] = I18N_NOOP("WebKit based Web Browser for KDE"); -static const char version[] = "0.1.2"; +static const char version[] = "0.1.3"; int main(int argc, char **argv) -- cgit v1.2.1