tAdd 'About' page - sailfish-safe - Sailfish frontend for safe(1)
 (HTM) git clone git://git.z3bra.org/sailfish-safe.git
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 61be1c7d2bf6521fc0ba0fc77bf397c5d490b86f
 (DIR) parent c85aa1be3d4ce78afe44e3fa8761336828bfaa06
 (HTM) Author: Daniel Vrátil <dvratil@kde.org>
       Date:   Mon,  4 Feb 2019 01:06:36 +0100
       
       Add 'About' page
       
       Diffstat:
         M harbour-passilic.pro                |       4 +++-
         A qml/components/GlobalPullDownMenu.… |      27 +++++++++++++++++++++++++++
         A qml/images/icon.png                 |       0 
         A qml/pages/AboutPage.qml             |      80 +++++++++++++++++++++++++++++++
         M qml/pages/PasswordListPage.qml      |       3 +++
         M rpm/harbour-passilic.spec           |       2 +-
         M src/main.cpp                        |       5 +++++
       
       7 files changed, 119 insertions(+), 2 deletions(-)
       ---
 (DIR) diff --git a/harbour-passilic.pro b/harbour-passilic.pro
       t@@ -39,12 +39,14 @@ DISTFILES += \
            qml/cover/CoverPage.qml \
            qml/pages/PasswordListPage.qml \
            qml/pages/PassphraseRequester.qml \
       +    qml/components/GlobalPullDownMenu.qml \
            rpm/harbour-passilic.changes.in \
            rpm/harbour-passilic.changes.run.in \
            rpm/harbour-passilic.spec \
            rpm/harbour-passilic.yaml \
            translations/*.ts \
       -    harbour-passilic.desktop
       +    harbour-passilic.desktop \
       +    qml/pages/AboutPage.qml
        
        SAILFISHAPP_ICONS = 86x86 108x108 128x128 172x172
        
 (DIR) diff --git a/qml/components/GlobalPullDownMenu.qml b/qml/components/GlobalPullDownMenu.qml
       t@@ -0,0 +1,27 @@
       +/*
       + *   Copyright (C) 2019  Daniel Vrátil <dvratil@kde.org>
       + *
       + *   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 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.
       + *
       + *   You should have received a copy of the GNU General Public License
       + *   along with this program.  If not, see <https://www.gnu.org/licenses/>.
       + */
       +
       +import QtQuick 2.2
       +import QtQml.Models 2.2
       +import Sailfish.Silica 1.0
       +
       +PullDownMenu {
       +    MenuItem {
       +        text: qsTr("About")
       +        onClicked: app.pageStack.push(Qt.resolvedUrl("../pages/AboutPage.qml"))
       +    }
       +}
 (DIR) diff --git a/qml/images/icon.png b/qml/images/icon.png
       Binary files differ.
 (DIR) diff --git a/qml/pages/AboutPage.qml b/qml/pages/AboutPage.qml
       t@@ -0,0 +1,80 @@
       +/*
       + *   Copyright (C) 2019  Daniel Vrátil <dvratil@kde.org>
       + *
       + *   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 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.
       + *
       + *   You should have received a copy of the GNU General Public License
       + *   along with this program.  If not, see <https://www.gnu.org/licenses/>.
       + */
       +
       +import QtQuick 2.2
       +import QtQml.Models 2.2
       +import Sailfish.Silica 1.0
       +
       +Page {
       +
       +    Column {
       +        anchors {
       +            fill: parent
       +            leftMargin: Theme.horizontalPageMargin
       +            rightMargin: Theme.horizontalPageMargin
       +        }
       +
       +        spacing: Theme.paddingMedium
       +
       +
       +        PageHeader {
       +            title: qsTr("About")
       +        }
       +
       +        Row {
       +            spacing: Theme.paddingLarge
       +
       +            Image {
       +                anchors {
       +                    verticalCenter: parent.verticalCenter
       +                }
       +
       +                id: icon
       +                source: "../images/icon.png"
       +            }
       +
       +            Column {
       +                spacing: Theme.paddingMedium
       +
       +                Label {
       +                    text: qsTr("Passilic")
       +                    font.pixelSize: Theme.fontSizeExtraLarge
       +                }
       +
       +                Label {
       +                    text: qsTr("Version %1").arg(Qt.application.version)
       +                    font.pixelSize: Theme.fontSizeSmall
       +                }
       +
       +                Label {
       +                    text: qsTr("Author: Daniel Vrátil")
       +                    font.pixelSize: Theme.fontSizeSmall
       +                }
       +            }
       +        }
       +
       +        Label {
       +            text: qsTr("Homepage: <a href=\"%1\">Github</a>").arg("https://github.com/danvratil/harbour-passilic")
       +            font.pixelSize: Theme.fontSizeSmall
       +        }
       +
       +        Label {
       +            text: qsTr("License: GPLv3")
       +            font.pixelSize: Theme.fontSizeSmall
       +        }
       +    }
       +}
 (DIR) diff --git a/qml/pages/PasswordListPage.qml b/qml/pages/PasswordListPage.qml
       t@@ -19,6 +19,7 @@ import QtQuick 2.2
        import QtQml.Models 2.2
        import Sailfish.Silica 1.0
        import harbour.passilic 1.0
       +import "../components"
        
        Page {
            id: passwordListPage
       t@@ -43,6 +44,8 @@ Page {
                    title: passwordListPage.currentPath === "" ? qsTr("Passilic") : passwordListPage.currentPath
                }
        
       +        GlobalPullDownMenu {}
       +
                model: DelegateModel {
                    id: delegateModel
        
 (DIR) diff --git a/rpm/harbour-passilic.spec b/rpm/harbour-passilic.spec
       t@@ -39,7 +39,7 @@ after 45 seconds.
        %build
        
        %qtc_qmake5 
       -%qtc_make %{?_smp_mflags}
       +%qtc_make %{?_smp_mflags} DEFINES+=-DPASSILIC_VERSION=\\\"%{version}\\\"
        
        %install
        rm -rf %{buildroot}
 (DIR) diff --git a/src/main.cpp b/src/main.cpp
       t@@ -35,6 +35,11 @@ void addImageProvider(QQmlEngine *engine, const QString &id)
        int main(int argc, char *argv[])
        {
            QScopedPointer<QGuiApplication> app(SailfishApp::application(argc, argv));
       +    app->setApplicationDisplayName(QObject::tr("Passilic"));
       +    app->setApplicationName(QStringLiteral("passilic"));
       +    app->setApplicationVersion(PASSILIC_VERSION);
       +    app->setOrganizationName(QObject::tr("Daniel Vrátil"));
       +
            QScopedPointer<QQuickView> view(SailfishApp::createView());
        
            qmlRegisterType<PasswordsModel>("harbour.passilic", 1, 0, "PasswordsModel");