diff --git a/kerfuffle/CMakeLists.txt b/kerfuffle/CMakeLists.txt
--- a/kerfuffle/CMakeLists.txt
+++ b/kerfuffle/CMakeLists.txt
@@ -5,6 +5,7 @@
archive_kerfuffle.cpp
archiveinterface.cpp
extractionsettingspage.cpp
+ generalsettingspage.cpp
previewsettingspage.cpp
settingspage.cpp
jobs.cpp
@@ -30,6 +31,7 @@
createdialog.ui
extractiondialog.ui
extractionsettings.ui
+ generalsettings.ui
previewsettings.ui
propertiesdialog.ui
compressionoptionswidget.ui
diff --git a/kerfuffle/ark.kcfg b/kerfuffle/ark.kcfg
--- a/kerfuffle/ark.kcfg
+++ b/kerfuffle/ark.kcfg
@@ -4,6 +4,12 @@
xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0
http://www.kde.org/standards/kcfg/1.0/kcfg.xsd" >
+
+
+
+ true
+
+
diff --git a/kerfuffle/compressionoptionswidget.cpp b/kerfuffle/compressionoptionswidget.cpp
--- a/kerfuffle/compressionoptionswidget.cpp
+++ b/kerfuffle/compressionoptionswidget.cpp
@@ -29,6 +29,7 @@
#include "ark_debug.h"
#include "archiveformat.h"
#include "pluginmanager.h"
+#include "settings.h"
#include
#include
@@ -292,7 +293,7 @@
}
// AES encryption is not supported by unzip, warn the users if they are creating a zip.
- warningMsgWidget->setVisible(value != QLatin1String("ZipCrypto"));
+ warningMsgWidget->setVisible(value != QLatin1String("ZipCrypto") && ArkSettings::showEncryptionWarning());
}
}
diff --git a/kerfuffle/generalsettings.ui b/kerfuffle/generalsettings.ui
new file mode 100644
--- /dev/null
+++ b/kerfuffle/generalsettings.ui
@@ -0,0 +1,41 @@
+
+
+ GeneralSettings
+
+
+
+ 0
+ 0
+ 547
+ 487
+
+
+
+
+
+
+ Show a warning when creating zip archives with AES encryption
+
+
+ true
+
+
+
+
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+
+
+
+
+
diff --git a/kerfuffle/generalsettingspage.h b/kerfuffle/generalsettingspage.h
new file mode 100644
--- /dev/null
+++ b/kerfuffle/generalsettingspage.h
@@ -0,0 +1,45 @@
+/*
+ * ark -- archiver for the KDE project
+ *
+ * Copyright (C) 2016 Elvis Angelaccio
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES ( INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION ) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * ( INCLUDING NEGLIGENCE OR OTHERWISE ) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef GENERALSETTINGSPAGE_H
+#define GENERALSETTINGSPAGE_H
+
+#include "settingspage.h"
+#include "ui_generalsettings.h"
+
+namespace Kerfuffle
+{
+class KERFUFFLE_EXPORT GeneralSettingsPage : public SettingsPage, public Ui::GeneralSettings
+{
+ Q_OBJECT
+
+public:
+ explicit GeneralSettingsPage(QWidget *parent = 0, const QString &name = QString(), const QString &iconName = QString());
+};
+}
+
+#endif
diff --git a/kerfuffle/generalsettingspage.cpp b/kerfuffle/generalsettingspage.cpp
new file mode 100644
--- /dev/null
+++ b/kerfuffle/generalsettingspage.cpp
@@ -0,0 +1,38 @@
+/*
+ * ark -- archiver for the KDE project
+ *
+ * Copyright (C) 2016 Elvis Angelaccio
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES ( INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION ) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * ( INCLUDING NEGLIGENCE OR OTHERWISE ) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "generalsettingspage.h"
+
+namespace Kerfuffle
+{
+GeneralSettingsPage::GeneralSettingsPage(QWidget *parent, const QString &name, const QString &iconName)
+ : SettingsPage(parent, name, iconName)
+{
+ setupUi(this);
+}
+}
+
diff --git a/part/part.cpp b/part/part.cpp
--- a/part/part.cpp
+++ b/part/part.cpp
@@ -33,6 +33,7 @@
#include "dnddbusinterfaceadaptor.h"
#include "infopanel.h"
#include "jobtracker.h"
+#include "generalsettingspage.h"
#include "kerfuffle/extractiondialog.h"
#include "kerfuffle/extractionsettingspage.h"
#include "kerfuffle/jobs.h"
@@ -741,6 +742,7 @@
QList Part::settingsPages(QWidget *parent) const
{
QList pages;
+ pages.append(new GeneralSettingsPage(parent, i18nc("@title:tab", "General Settings"), QStringLiteral("go-home")));
pages.append(new ExtractionSettingsPage(parent, i18nc("@title:tab", "Extraction Settings"), QStringLiteral("archive-extract")));
pages.append(new PreviewSettingsPage(parent, i18nc("@title:tab", "Preview Settings"), QStringLiteral("document-preview-archive")));