summaryrefslogtreecommitdiff
path: root/app/qml
diff options
context:
space:
mode:
authorTomasz Sterna <tomek@xiaoka.com>2015-01-03 19:30:15 +0100
committerTomasz Sterna <tomek@xiaoka.com>2015-01-03 19:30:15 +0100
commiteac37967cc535a3ac43a712b52b4bf73b96ec19c (patch)
tree8088389694620e8d8eba8e15bd9bfdd7de46e462 /app/qml
parent516dc948a8f180520352175e79f0139dde9b8d1f (diff)
Support for watch apps, not installed on phoneRELEASE_0.13.js1
Needed to show app name instead of "unknown app" on the app management screen.
Diffstat (limited to 'app/qml')
-rw-r--r--app/qml/pages/InstallAppDialog.qml4
-rw-r--r--app/qml/pages/WatchPage.qml11
2 files changed, 9 insertions, 6 deletions
diff --git a/app/qml/pages/InstallAppDialog.qml b/app/qml/pages/InstallAppDialog.qml
index fa96c28..1510c57 100644
--- a/app/qml/pages/InstallAppDialog.qml
+++ b/app/qml/pages/InstallAppDialog.qml
@@ -24,6 +24,8 @@ Dialog {
id: appDelegate
contentHeight: Theme.itemSizeSmall
+ visible: modelData.isLocal
+
property string uuid: modelData.uuid
property bool alreadyInstalled: pebbled.isAppInstalled(uuid)
@@ -41,7 +43,7 @@ Dialog {
Image {
id: appImage
anchors.centerIn: parent
- source: "image://pebble-app-icon/" + uuid;
+ source: appDelegate.visible ? "image://pebble-app-icon/" + uuid : ""
scale: 2
}
}
diff --git a/app/qml/pages/WatchPage.qml b/app/qml/pages/WatchPage.qml
index 43c2b99..b36280f 100644
--- a/app/qml/pages/WatchPage.qml
+++ b/app/qml/pages/WatchPage.qml
@@ -101,6 +101,7 @@ Page {
property bool isEmptySlot: modelData === ""
property var appInfo: pebbled.appInfoByUuid(modelData)
property bool isKnownApp: appInfo.hasOwnProperty("uuid")
+ property bool isLocalApp: appInfo.hasOwnProperty("isLocal") && appInfo.isLocal
property bool busy: false
function configure() {
@@ -155,9 +156,9 @@ Page {
Image {
id: slotImage
anchors.centerIn: parent
- source: isKnownApp ? "image://pebble-app-icon/" + modelData : ""
+ source: isLocalApp ? "image://pebble-app-icon/" + modelData : ""
scale: 2
- visible: !isEmptySlot && isKnownApp && !slotBusy.running
+ visible: !isEmptySlot && isLocalApp && !slotBusy.running
}
Rectangle {
@@ -170,7 +171,7 @@ Page {
color: slotDelegate.highlighted ? Theme.highlightColor : Theme.primaryColor
}
color: "transparent"
- visible: isEmptySlot && !slotBusy.running
+ visible: (isEmptySlot || !isLocalApp) && !slotBusy.running
}
BusyIndicator {
@@ -189,7 +190,7 @@ Page {
rightMargin: Theme.paddingLarge
verticalCenter: parent.verticalCenter
}
- text: isEmptySlot ? qsTr("(empty slot)") : (isKnownApp ? appInfo.longName : qsTr("(slot in use by unknown app)"))
+ text: isEmptySlot ? qsTr("(empty slot)") : (isKnownApp ? (isLocalApp ? appInfo.longName : appInfo.shortName) : qsTr("(slot in use by unknown app)"))
color: slotDelegate.highlighted ? Theme.highlightColor : Theme.primaryColor
onTextChanged: slotDelegate.busy = false;
}
@@ -204,7 +205,7 @@ Page {
}
MenuItem {
text: qsTr("Configure...")
- visible: !isEmptySlot && isKnownApp
+ visible: !isEmptySlot && isLocalApp
onClicked: configure();
}
MenuItem {