]> git.tdb.fi Git - xinema.git/commitdiff
Implement the set default location menu item
authorMikko Rasa <tdb@tdb.fi>
Sat, 17 Oct 2015 10:40:11 +0000 (13:40 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sat, 17 Oct 2015 10:53:32 +0000 (13:53 +0300)
The item already snuck in in an earlier commit so might as well implement
it too.

remote/qml/pages/BrowsePage.qml
remote/rpm/harbour-xinema-remote.spec

index d1b74e606b7f1b34983c78be4532b27692adeece..a4e1ac2ec452a68af3c633f6a6624f558d67b05c 100644 (file)
@@ -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: "/"
+       }
 }
 
index 4dabbb4e08b909b32af1e4821cfa9c63aef20bad..49b3f16cc893431d7feaf18e5ad4b5400b433dd2 100644 (file)
@@ -4,6 +4,7 @@ Version: 0.1
 Release: 1
 Group: Qt/Qt
 License: GPL
+Requires: nemo-qml-plugin-configuration-qt5
 
 %description
 %{summary}.