diff --git a/src/app/qml/NewStuffStuff.qml b/src/app/qml/NewStuffStuff.qml deleted file mode 100644 index ed704e6..0000000 --- a/src/app/qml/NewStuffStuff.qml +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (C) 2015 Dan Leinir Turthra Jensen - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) version 3, or any - * later version accepted by the membership of KDE e.V. (or its - * successor approved by the membership of KDE e.V.), which shall - * act as a proxy defined in Section 6 of version 3 of the license. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see . - * - */ - -import QtQuick 2.2 -import org.kde.newstuff 1.0 as NewStuff - -NewStuff.NewStuffList { - configFile: peruseConfig.newstuffLocation; - onMessage: console.log("KNS Message: " + message); - onIdleMessage: console.log("KNS Idle: " + message); - onBusyMessage: console.log("KNS Busy: " + message); - onErrorMessage: console.log("KNS Error: " + message); -} diff --git a/src/app/qml/Store.qml b/src/app/qml/Store.qml index 0240c00..23252f3 100644 --- a/src/app/qml/Store.qml +++ b/src/app/qml/Store.qml @@ -1,66 +1,54 @@ /* * Copyright (C) 2015 Dan Leinir Turthra Jensen * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) version 3, or any * later version accepted by the membership of KDE e.V. (or its * successor approved by the membership of KDE e.V.), which shall * act as a proxy defined in Section 6 of version 3 of the license. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see . * */ import QtQuick 2.2 import QtQuick.Layouts 1.1 import QtQuick.Controls 1.4 as QtControls import QtQuick.Dialogs 1.0 import org.kde.kirigami 2.1 as Kirigami +import org.kde.newstuff 1.0 as NewStuff import org.kde.peruse 0.1 as Peruse -import "listcomponents" as ListComponents /** - * @brief This holds the NewStuffStuff to get new comics from the KDE store. + * @brief This holds the NewStuff list, for getting new books from the KDE store. */ Kirigami.ScrollablePage { id: root; property string categoryName: "storePage"; title: i18nc("title of the book store page", "Book Store"); - flickable: newStuffLoader.item; - - Loader { - id: newStuffLoader; - source: "NewStuffStuff.qml"; - Binding { - target: newStuffLoader.item - property: "width" - value: root.width - } - Binding { - target: newStuffLoader.item - property: "height" - value: root.height - } - Connections { - target: newStuffLoader.item; - onDownloadedItemClicked: { - if(Array.isArray(installedFiles) && installedFiles.length > 0) { - applicationWindow().showBook(installedFiles[0], 0); - } - else if(installedFiles.length > 0) { - applicationWindow().showBook(installedFiles, 0); - } + NewStuff.NewStuffList { + configFile: peruseConfig.newstuffLocation; + onMessage: console.log("KNS Message: " + message); + onIdleMessage: console.log("KNS Idle: " + message); + onBusyMessage: console.log("KNS Busy: " + message); + onErrorMessage: console.log("KNS Error: " + message); + onDownloadedItemClicked: { + if(Array.isArray(installedFiles) && installedFiles.length > 0) { + applicationWindow().showBook(installedFiles[0], 0); + } + else if(installedFiles.length > 0) { + applicationWindow().showBook(installedFiles, 0); } } } } diff --git a/src/app/resources.qrc b/src/app/resources.qrc index 25143fa..68351cc 100644 --- a/src/app/resources.qrc +++ b/src/app/resources.qrc @@ -1,31 +1,30 @@ qml/About.qml qml/Book.qml qml/BookDetails.qml qml/Bookshelf.qml qml/Main.qml qml/MobileMain.qml - qml/NewStuffStuff.qml qml/PeruseContextDrawer.qml qml/PeruseMain.qml qml/SearchBox.qml qml/Settings.qml qml/Store.qml qml/WelcomePage.qml qml/FileFinder.qml qml/listcomponents/BookTile.qml qml/listcomponents/BookTileTall.qml qml/listcomponents/CategoryTile.qml qml/listcomponents/CategoryTileTall.qml qml/listcomponents/ListPageHeader.qml qml/listcomponents/Section.qml qml/viewers/cbr.qml qml/viewers/folderofimages.qml qml/viewers/ImageBrowser.qml qml/viewers/okular.qml qml/viewers/ViewerBase.qml qml/viewers/helpers/HolyRectangle.qml