Git commit dbc392d35152b2e9db9560b66ce6f12a94d913df by Elvis Angelaccio, on behalf of Maarten De Meyer. Committed on 25/10/2015 at 14:30. Pushed by elvisangelaccio into branch 'master'.
Add opendestination command line option REVIEW: 114317 M +8 -0 app/main.cpp M +8 -0 doc/man-ark.1.docbook http://commits.kde.org/ark/dbc392d35152b2e9db9560b66ce6f12a94d913df diff --git a/app/main.cpp b/app/main.cpp index f0e3bef..d22d881 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -136,6 +136,9 @@ int main(int argc, char **argv) i18n("Destination folder to extract to. Defaults to current path if not specified."), QStringLiteral("directory"))); + parser.addOption(QCommandLineOption(QStringList() << QStringLiteral("O") << QStringLiteral("opendestination"), + i18n("Open destination folder after extraction."))); + parser.addOption(QCommandLineOption(QStringList() << QStringLiteral("c") << QStringLiteral("add"), i18n("Query the user for an archive filename and add specified files to it. Quit when finished."))); @@ -253,6 +256,11 @@ int main(int argc, char **argv) batchJob->setDestinationFolder(parser.value(QStringLiteral("destination"))); } + if (parser.isSet(QStringLiteral("opendestination"))) { + qCDebug(ARK) << "Setting opendestination"; + batchJob->setOpenDestinationAfterExtraction(true); + } + if (parser.isSet(QStringLiteral("dialog"))) { qCDebug(ARK) << "Opening extraction dialog"; if (!batchJob->showExtractDialog()) { diff --git a/doc/man-ark.1.docbook b/doc/man-ark.1.docbook index d9d1c70..5ca972a 100644 --- a/doc/man-ark.1.docbook +++ b/doc/man-ark.1.docbook @@ -40,6 +40,7 @@ <group choice="opt"><option>-b</option></group> <group choice="opt"><option>-a</option></group> <group choice="opt"><option>-e</option></group> +<group choice="opt"><option>-O</option></group> <group choice="opt"><option>-c</option></group> <group choice="opt"><option>-f</option> <replaceable> suffix</replaceable></group> @@ -162,6 +163,13 @@ a subfolder by the name of the archive will be created.</para> </listitem> </varlistentry> +<varlistentry> +<term><option>-O, --opendestination</option></term> +<listitem> +<para>Open the destination folder when the extraction is complete.</para> +</listitem> +</varlistentry> + </variablelist> </refsect2> </refsect1> _______________________________________________ kde-doc-english mailing list [email protected] https://mail.kde.org/mailman/listinfo/kde-doc-english
