Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/desktop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCamila Ayres <smayres@gmail.com>2018-08-02 23:32:56 +0300
committerGitHub <noreply@github.com>2018-08-02 23:32:56 +0300
commite0f49971f99f80d6cd4b0cfb36ee8499cc0e5a85 (patch)
treeac8d2547210334342411fd54f9aeb5554fd5cea9
parent30fc87daea9233515783fdb17d304cae8d570bbc (diff)
parentc4d7f97e00e673b92d4cdac9662037b6a6db3a67 (diff)
Merge pull request #525 from nextcloud/feature/132/about_dialogv2.5.0-beta1
Add legal notice button to about dialog
-rw-r--r--src/gui/CMakeLists.txt2
-rw-r--r--src/gui/generalsettings.cpp24
-rw-r--r--src/gui/generalsettings.h1
-rw-r--r--src/gui/generalsettings.ui76
-rw-r--r--src/gui/legalnotice.cpp44
-rw-r--r--src/gui/legalnotice.h45
-rw-r--r--src/gui/legalnotice.ui68
-rw-r--r--src/libsync/theme.cpp9
8 files changed, 227 insertions, 42 deletions
diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt
index eaa6a22b7..7fcd24c63 100644
--- a/src/gui/CMakeLists.txt
+++ b/src/gui/CMakeLists.txt
@@ -20,6 +20,7 @@ set(client_UI_SRCS
folderwizardsourcepage.ui
folderwizardtargetpage.ui
generalsettings.ui
+ legalnotice.ui
ignorelisteditor.ui
networksettings.ui
activitywidget.ui
@@ -56,6 +57,7 @@ set(client_SRCS
folderwatcher.cpp
folderwizard.cpp
generalsettings.cpp
+ legalnotice.cpp
ignorelisteditor.cpp
lockwatcher.cpp
logbrowser.cpp
diff --git a/src/gui/generalsettings.cpp b/src/gui/generalsettings.cpp
index 419b5214b..4f9ec0d4c 100644
--- a/src/gui/generalsettings.cpp
+++ b/src/gui/generalsettings.cpp
@@ -29,6 +29,8 @@
#include "config.h"
+#include "legalnotice.h"
+
#include <QNetworkProxy>
#include <QDir>
#include <QScopedValueRollback>
@@ -53,14 +55,13 @@ GeneralSettings::GeneralSettings(QWidget *parent)
// setup about section
QString about = Theme::instance()->about();
- if (about.isEmpty()) {
- _ui->aboutGroupBox->hide();
- } else {
- _ui->aboutLabel->setTextInteractionFlags(Qt::TextSelectableByMouse | Qt::TextBrowserInteraction);
- _ui->aboutLabel->setText(about);
- _ui->aboutLabel->setWordWrap(true);
- _ui->aboutLabel->setOpenExternalLinks(true);
- }
+ _ui->aboutLabel->setTextInteractionFlags(Qt::TextSelectableByMouse | Qt::TextBrowserInteraction);
+ _ui->aboutLabel->setText(about);
+ _ui->aboutLabel->setWordWrap(true);
+ _ui->aboutLabel->setOpenExternalLinks(true);
+
+ // About legal notice
+ connect(_ui->legalNoticeButton, &QPushButton::clicked, this, &GeneralSettings::slotShowLegalNotice);
loadMiscSettings();
slotUpdateInfo();
@@ -192,4 +193,11 @@ void GeneralSettings::slotIgnoreFilesEditor()
}
}
+void GeneralSettings::slotShowLegalNotice()
+{
+ auto notice = new LegalNotice();
+ notice->exec();
+ delete notice;
+}
+
} // namespace OCC
diff --git a/src/gui/generalsettings.h b/src/gui/generalsettings.h
index 74c6520f2..b73c2f13c 100644
--- a/src/gui/generalsettings.h
+++ b/src/gui/generalsettings.h
@@ -47,6 +47,7 @@ private slots:
void slotUpdateInfo();
void slotIgnoreFilesEditor();
void loadMiscSettings();
+ void slotShowLegalNotice();
private:
Ui::GeneralSettings *_ui;
diff --git a/src/gui/generalsettings.ui b/src/gui/generalsettings.ui
index abfdb92a9..34aa03510 100644
--- a/src/gui/generalsettings.ui
+++ b/src/gui/generalsettings.ui
@@ -14,6 +14,52 @@
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
+ <item row="2" column="0">
+ <widget class="QGroupBox" name="aboutGroupBox">
+ <property name="title">
+ <string>About</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_3">
+ <item>
+ <widget class="QLabel" name="aboutLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>About</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_6">
+ <item>
+ <widget class="QPushButton" name="legalNoticeButton">
+ <property name="text">
+ <string>Legal notice</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </item>
<item row="0" column="0">
<widget class="QGroupBox" name="generalGroupBox">
<property name="title">
@@ -47,28 +93,6 @@
</layout>
</widget>
</item>
- <item row="2" column="0">
- <widget class="QGroupBox" name="aboutGroupBox">
- <property name="title">
- <string>About</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_3">
- <item>
- <widget class="QLabel" name="aboutLabel">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>About</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
<item row="3" column="0">
<widget class="QGroupBox" name="updatesGroupBox">
<property name="title">
@@ -270,12 +294,12 @@
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
- <x>225</x>
- <y>231</y>
+ <x>247</x>
+ <y>188</y>
</hint>
<hint type="destinationlabel">
- <x>587</x>
- <y>230</y>
+ <x>497</x>
+ <y>190</y>
</hint>
</hints>
</connection>
diff --git a/src/gui/legalnotice.cpp b/src/gui/legalnotice.cpp
new file mode 100644
index 000000000..4dbcc0666
--- /dev/null
+++ b/src/gui/legalnotice.cpp
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) by Roeland Jago Douma <roeland@famdouma.nl>
+ *
+ * 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 2 of the License, 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.
+ */
+
+#include "legalnotice.h"
+#include "ui_legalnotice.h"
+
+namespace OCC {
+
+
+LegalNotice::LegalNotice(QDialog *parent)
+ : QDialog(parent)
+ , _ui(new Ui::LegalNotice)
+{
+ _ui->setupUi(this);
+
+ QString notice = tr("<p>Copyright 2017-2018 Nextcloud GmbH<br />"
+ "Copyright 2012-2018 ownCloud GmbH</p>");
+
+ notice += tr("<p>Licensed under the GNU General Public License (GPL) Version 2.0 or any later version.</p>");
+
+ _ui->notice->setTextInteractionFlags(Qt::TextSelectableByMouse | Qt::TextBrowserInteraction);
+ _ui->notice->setText(notice);
+ _ui->notice->setWordWrap(true);
+
+ connect(_ui->closeButton, &QPushButton::clicked, this, &LegalNotice::accept);
+}
+
+LegalNotice::~LegalNotice()
+{
+ delete _ui;
+}
+
+}
diff --git a/src/gui/legalnotice.h b/src/gui/legalnotice.h
new file mode 100644
index 000000000..ba776a088
--- /dev/null
+++ b/src/gui/legalnotice.h
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) by Roeland Jago Douma <roeland@famdouma.nl>
+ *
+ * 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 2 of the License, 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.
+ */
+
+#ifndef LEGALNOTICE_H
+#define LEGALNOTICE_H
+
+#include <QDialog>
+
+namespace OCC {
+class IgnoreListEditor;
+class SyncLogDialog;
+
+namespace Ui {
+ class LegalNotice;
+}
+
+/**
+ * @brief The LegalNotice class
+ * @ingroup gui
+ */
+class LegalNotice : public QDialog
+{
+ Q_OBJECT
+
+public:
+ explicit LegalNotice(QDialog *parent = 0);
+ ~LegalNotice();
+
+private:
+ Ui::LegalNotice *_ui;
+};
+
+} // namespace OCC
+#endif // LEGALNOTICE_H
diff --git a/src/gui/legalnotice.ui b/src/gui/legalnotice.ui
new file mode 100644
index 000000000..be3c67ba6
--- /dev/null
+++ b/src/gui/legalnotice.ui
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>OCC::LegalNotice</class>
+ <widget class="QDialog" name="OCC::LegalNotice">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>291</width>
+ <height>260</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Dialog</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QLabel" name="header">
+ <property name="font">
+ <font>
+ <family>Arabic Newspaper</family>
+ <pointsize>11</pointsize>
+ </font>
+ </property>
+ <property name="text">
+ <string>Legal notice</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="notice">
+ <property name="text">
+ <string>TextLabel</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="closeButton">
+ <property name="text">
+ <string>Close</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/libsync/theme.cpp b/src/libsync/theme.cpp
index a533f7e81..70a1d8b3b 100644
--- a/src/libsync/theme.cpp
+++ b/src/libsync/theme.cpp
@@ -338,14 +338,7 @@ QString Theme::about() const
.arg("http://" MIRALL_STRINGIFY(APPLICATION_DOMAIN))
.arg(MIRALL_STRINGIFY(APPLICATION_DOMAIN));
- devString += tr("<p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, "
- "Olivier Goffart, Markus Götz and others.</small></p>");
-
- devString += tr("<p>This release was supplied by the Nextcloud GmbH<br />"
- "Copyright 2017-2018 Nextcloud GmbH<br />"
- "Copyright 2012-2018 ownCloud GmbH</p>");
-
- devString += tr("<p>Licensed under the GNU General Public License (GPL) Version 2.0 or any later version.</p>");
+ devString += tr("<p>This release was supplied by the Nextcloud GmbH</p>");
devString += gitSHA1();