[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdeutils/ark
From: Raphael Kubo da Costa <kubito () gmail ! com>
Date: 2011-07-18 22:50:14
Message-ID: 20110718225014.7708EAC86A () svn ! kde ! org
[Download RAW message or body]
SVN commit 1242115 by rkcosta:
Specify when the extraction dialog's settings should be followed.
On ExtractJob's side, we make the extraction options it received
publicly accessible.
On Part's side, we set a "FollowExtractionDialogSettings" option to
true only when the extraction dialog was used to extract files, and
only actually follow these settings (for now, open the destination
directory and/or quit Ark after the extraction) when that option is
set.
Forwardport of r1242113.
CCBUG: 188857
M +5 -0 kerfuffle/jobs.cpp
M +1 -0 kerfuffle/jobs.h
M +10 -1 part/part.cpp
--- trunk/KDE/kdeutils/ark/kerfuffle/jobs.cpp #1242114:1242115
@@ -269,6 +269,11 @@
return m_destinationDir;
}
+ExtractionOptions ExtractJob::extractionOptions() const
+{
+ return m_options;
+}
+
AddJob::AddJob(const QStringList& files, const CompressionOptions& options , \
ReadWriteArchiveInterface *interface, QObject *parent) : Job(interface, parent)
, m_files(files)
--- trunk/KDE/kdeutils/ark/kerfuffle/jobs.h #1242114:1242115
@@ -120,6 +120,7 @@
ExtractJob(const QVariantList& files, const QString& destinationDir, \
ExtractionOptions options, ReadOnlyArchiveInterface *interface, QObject *parent = 0); \
QString destinationDirectory() const;
+ ExtractionOptions extractionOptions() const;
public slots:
virtual void doWork();
--- trunk/KDE/kdeutils/ark/part/part.cpp #1242114:1242115
@@ -627,6 +627,8 @@
options[QLatin1String("PreservePaths")] = true;
}
+ options[QLatin1String("FollowExtractionDialogSettings")] = true;
+
const QString destinationDirectory = \
dialog.data()->destinationDirectory().pathOrUrl();
ExtractJob *job = m_model->extractFiles(files, destinationDirectory, \
options); registerJob(job);
@@ -690,10 +692,17 @@
if (job->error()) {
KMessageBox::error(widget(), job->errorString());
} else {
- if (ArkSettings::openDestinationFolderAfterExtraction()) {
ExtractJob *extractJob = qobject_cast<ExtractJob*>(job);
Q_ASSERT(extractJob);
+ const bool followExtractionDialogSettings =
+ extractJob->extractionOptions().value(QLatin1String("FollowExtractionDialogSettings"), \
false).toBool(); + if (!followExtractionDialogSettings) {
+ return;
+ }
+
+ if (ArkSettings::openDestinationFolderAfterExtraction()) {
+
KUrl destinationDirectory(extractJob->destinationDirectory());
destinationDirectory.cleanPath();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic