X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=remote%2Fqml%2Fpages%2FBrowsePage.qml;h=2a3a123363f5c8f781bc250fcdfcddb3170110d1;hb=afa557f5c0b0debaaaf6c4c777ccc2ba10965c50;hp=d1b74e606b7f1b34983c78be4532b27692adeece;hpb=9df8ccc2820a4ffa8e9f34810ad715d58aef3fe8;p=xinema.git diff --git a/remote/qml/pages/BrowsePage.qml b/remote/qml/pages/BrowsePage.qml index d1b74e6..2a3a123 100644 --- a/remote/qml/pages/BrowsePage.qml +++ b/remote/qml/pages/BrowsePage.qml @@ -1,6 +1,8 @@ import QtQuick 2.0 import Sailfish.Silica 1.0 +import org.nemomobile.configuration 1.0 import fi.mikkosoft.xinema 0.1 +import "../components" Page { @@ -35,6 +37,8 @@ Page MenuItem { text: "Set as default location" + + onClicked: defaultLocation.value = browseDirectory.directory } MenuItem @@ -92,7 +96,7 @@ Page Component.onCompleted: { if(xinemaControl.connected) - browseDirectory.directory = "/"; + browseDirectory.directory = defaultLocation.value; } StreamControl @@ -101,7 +105,7 @@ Page control: xinemaControl onPlaybackStateChanged: { - if(playbackState==StreamControl.Playing) + if(playbackState==StreamControl.Playing && pageContainer.currentPage==page) { if(pageContainer.busy) pageContainer.completeAnimation(); @@ -109,5 +113,12 @@ Page } } } + + ConfigurationValue + { + id: defaultLocation + key: "/fi/mikkosoft/xinema-remote/defaultLocation" + defaultValue: "/" + } }