diff options
| author | Tomasz Sterna <tomek@xiaoka.com> | 2015-01-03 19:30:15 +0100 |
|---|---|---|
| committer | Tomasz Sterna <tomek@xiaoka.com> | 2015-01-03 19:30:15 +0100 |
| commit | eac37967cc535a3ac43a712b52b4bf73b96ec19c (patch) | |
| tree | 8088389694620e8d8eba8e15bd9bfdd7de46e462 /app | |
| parent | 516dc948a8f180520352175e79f0139dde9b8d1f (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')
| -rw-r--r-- | app/pebbledinterface.cpp | 4 | ||||
| -rw-r--r-- | app/qml/pages/InstallAppDialog.qml | 4 | ||||
| -rw-r--r-- | app/qml/pages/WatchPage.qml | 11 | ||||
| -rw-r--r-- | app/translations/pebble-es.ts | 12 | ||||
| -rw-r--r-- | app/translations/pebble.ts | 12 |
5 files changed, 25 insertions, 18 deletions
diff --git a/app/pebbledinterface.cpp b/app/pebbledinterface.cpp index c978dd0..cc9a617 100644 --- a/app/pebbledinterface.cpp +++ b/app/pebbledinterface.cpp @@ -294,8 +294,12 @@ void PebbledInterface::refreshAllApps() QVariantMap m; m.insert("uuid", uuid.toString()); + m.insert("isLocal", orig.value("local")); m.insert("shortName", orig.value("short-name")); m.insert("longName", orig.value("long-name")); + m.insert("companyName", orig.value("company-name")); + m.insert("versionLabel", orig.value("version-label")); + m.insert("isWatchface", orig.value("is-watchface")); QByteArray pngIcon = orig.value("menu-icon").toByteArray(); if (!pngIcon.isEmpty()) { 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 { diff --git a/app/translations/pebble-es.ts b/app/translations/pebble-es.ts index 0316ecb..9be8be2 100644 --- a/app/translations/pebble-es.ts +++ b/app/translations/pebble-es.ts @@ -221,32 +221,32 @@ Si esto tarda mucho, comprueba que el reloj esté emparejado correctamente.</tra <translation>Aplicaciones instaladas</translation> </message> <message> - <location filename="../qml/pages/WatchPage.qml" line="120"/> + <location filename="../qml/pages/WatchPage.qml" line="121"/> <source>Uninstalling</source> <translation>Desinstalando</translation> </message> <message> - <location filename="../qml/pages/WatchPage.qml" line="192"/> + <location filename="../qml/pages/WatchPage.qml" line="193"/> <source>(empty slot)</source> <translation>(hueco libre)</translation> </message> <message> - <location filename="../qml/pages/WatchPage.qml" line="192"/> + <location filename="../qml/pages/WatchPage.qml" line="193"/> <source>(slot in use by unknown app)</source> <translation>(hueco en uso)</translation> </message> <message> - <location filename="../qml/pages/WatchPage.qml" line="201"/> + <location filename="../qml/pages/WatchPage.qml" line="202"/> <source>Install app...</source> <translation>Instalar app...</translation> </message> <message> - <location filename="../qml/pages/WatchPage.qml" line="206"/> + <location filename="../qml/pages/WatchPage.qml" line="207"/> <source>Configure...</source> <translation>Configurar...</translation> </message> <message> - <location filename="../qml/pages/WatchPage.qml" line="211"/> + <location filename="../qml/pages/WatchPage.qml" line="212"/> <source>Uninstall</source> <translation>Desinstalar</translation> </message> diff --git a/app/translations/pebble.ts b/app/translations/pebble.ts index 7a78d9d..0f953bc 100644 --- a/app/translations/pebble.ts +++ b/app/translations/pebble.ts @@ -220,32 +220,32 @@ If it can't be found please check it's available and paired in Bluetoo <translation type="unfinished"></translation> </message> <message> - <location filename="../qml/pages/WatchPage.qml" line="120"/> + <location filename="../qml/pages/WatchPage.qml" line="121"/> <source>Uninstalling</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../qml/pages/WatchPage.qml" line="192"/> + <location filename="../qml/pages/WatchPage.qml" line="193"/> <source>(empty slot)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../qml/pages/WatchPage.qml" line="192"/> + <location filename="../qml/pages/WatchPage.qml" line="193"/> <source>(slot in use by unknown app)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../qml/pages/WatchPage.qml" line="201"/> + <location filename="../qml/pages/WatchPage.qml" line="202"/> <source>Install app...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../qml/pages/WatchPage.qml" line="206"/> + <location filename="../qml/pages/WatchPage.qml" line="207"/> <source>Configure...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../qml/pages/WatchPage.qml" line="211"/> + <location filename="../qml/pages/WatchPage.qml" line="212"/> <source>Uninstall</source> <translation type="unfinished"></translation> </message> |
