From 260fa1b83be3f3094ba912ed67e5447d196dd632 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sat, 17 Oct 2015 13:40:11 +0300 Subject: [PATCH] Implement the set default location menu item The item already snuck in in an earlier commit so might as well implement it too. --- remote/qml/pages/BrowsePage.qml | 12 +++++++++++- remote/rpm/harbour-xinema-remote.spec | 1 + 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/remote/qml/pages/BrowsePage.qml b/remote/qml/pages/BrowsePage.qml index d1b74e6..a4e1ac2 100644 --- a/remote/qml/pages/BrowsePage.qml +++ b/remote/qml/pages/BrowsePage.qml @@ -1,5 +1,6 @@ import QtQuick 2.0 import Sailfish.Silica 1.0 +import org.nemomobile.configuration 1.0 import fi.mikkosoft.xinema 0.1 Page @@ -35,6 +36,8 @@ Page MenuItem { text: "Set as default location" + + onClicked: defaultLocation.value = browseDirectory.directory } MenuItem @@ -92,7 +95,7 @@ Page Component.onCompleted: { if(xinemaControl.connected) - browseDirectory.directory = "/"; + browseDirectory.directory = defaultLocation.value; } StreamControl @@ -109,5 +112,12 @@ Page } } } + + ConfigurationValue + { + id: defaultLocation + key: "/fi/mikkosoft/xinema-remote/defaultLocation" + defaultValue: "/" + } } diff --git a/remote/rpm/harbour-xinema-remote.spec b/remote/rpm/harbour-xinema-remote.spec index 4dabbb4..49b3f16 100644 --- a/remote/rpm/harbour-xinema-remote.spec +++ b/remote/rpm/harbour-xinema-remote.spec @@ -4,6 +4,7 @@ Version: 0.1 Release: 1 Group: Qt/Qt License: GPL +Requires: nemo-qml-plugin-configuration-qt5 %description %{summary}. -- 2.45.2