Victor Thompson has proposed merging lp:~vthompson/ubuntu-weather-app/reboot-locationspage-empty-state into lp:ubuntu-weather-app/reboot.
Commit message: * Rename EmptyStateComponent to HomePageEmptyStateComponent * Add a LocationsPageEmptyStateComponent Requested reviews: Ubuntu Weather Developers (ubuntu-weather-dev) For more details, see: https://code.launchpad.net/~vthompson/ubuntu-weather-app/reboot-locationspage-empty-state/+merge/266350 * Rename EmptyStateComponent to HomePageEmptyStateComponent * Add a LocationsPageEmptyStateComponent -- Your team Ubuntu Weather Developers is requested to review the proposed merge of lp:~vthompson/ubuntu-weather-app/reboot-locationspage-empty-state into lp:ubuntu-weather-app/reboot.
=== renamed file 'app/components/EmptyStateComponent.qml' => 'app/components/HomePageEmptyStateComponent.qml' === added file 'app/components/LocationsPageEmptyStateComponent.qml' --- app/components/LocationsPageEmptyStateComponent.qml 1970-01-01 00:00:00 +0000 +++ app/components/LocationsPageEmptyStateComponent.qml 2015-07-30 04:13:16 +0000 @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2015 Canonical Ltd + * + * This file is part of Ubuntu Weather App + * + * Ubuntu Weather App is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 3 as + * published by the Free Software Foundation. + * + * Ubuntu Weather App is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +import QtQuick 2.4 +import Ubuntu.Components 1.2 +import "../components" + + +Item { + anchors { + fill: parent + margins: units.gu(2) + } + + Label { + id: emptyStateLabel + anchors { + centerIn: parent + } + horizontalAlignment: Text.AlignHCenter + text: i18n.tr("No locations found. Tap the plus icon to search for one.") + width: parent.width - units.gu(4) + wrapMode: Text.WordWrap + } +} === modified file 'app/ui/HomePage.qml' --- app/ui/HomePage.qml 2015-07-29 21:34:56 +0000 +++ app/ui/HomePage.qml 2015-07-30 04:13:16 +0000 @@ -192,7 +192,7 @@ fill: parent } asynchronous: true - source: "../components/EmptyStateComponent.qml" + source: "../components/HomePageEmptyStateComponent.qml" visible: status === Loader.Ready && active } } === modified file 'app/ui/LocationsPage.qml' --- app/ui/LocationsPage.qml 2015-07-29 21:34:07 +0000 +++ app/ui/LocationsPage.qml 2015-07-30 04:13:16 +0000 @@ -247,6 +247,16 @@ } } + Loader { + active: (locationsList === null || locationsList.length === 0) && mainPageStack.depth === 2 + anchors { + fill: parent + } + asynchronous: true + source: "../components/LocationsPageEmptyStateComponent.qml" + visible: status === Loader.Ready && active + } + function populateLocationsModel() { currentLocationModel.clear() locationsModel.clear() === modified file 'debian/changelog' --- debian/changelog 2015-07-29 22:23:40 +0000 +++ debian/changelog 2015-07-30 04:13:16 +0000 @@ -7,6 +7,8 @@ * Add chance of rain * Add conditions text to day delegate. * Default to OWM if the key file for TWC is blank. + * Rename EmptyStateComponent to HomePageEmptyStateComponent + * Add a LocationsPageEmptyStateComponent [ Andrew Hayzen ] * Add mocked locations for autopilot and add a test using the data === modified file 'po/com.ubuntu.weather.pot' --- po/com.ubuntu.weather.pot 2015-07-29 20:34:57 +0000 +++ po/com.ubuntu.weather.pot 2015-07-30 04:13:16 +0000 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: ubuntu-weather-app\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-07-29 21:25+0100\n" +"POT-Creation-Date: 2015-07-29 23:09-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <[email protected]>\n" @@ -46,15 +46,15 @@ msgid "Sunset" msgstr "" -#: ../app/components/EmptyStateComponent.qml:51 +#: ../app/components/HomePageEmptyStateComponent.qml:51 msgid "Searching for current location..." msgstr "" -#: ../app/components/EmptyStateComponent.qml:52 +#: ../app/components/HomePageEmptyStateComponent.qml:52 msgid "Cannot determine your location" msgstr "" -#: ../app/components/EmptyStateComponent.qml:62 +#: ../app/components/HomePageEmptyStateComponent.qml:62 msgid "Manually add a location by swiping up from the bottom of the display" msgstr "" @@ -66,6 +66,10 @@ msgid "Remove" msgstr "" +#: ../app/components/LocationsPageEmptyStateComponent.qml:36 +msgid "No locations found. Tap the plus icon to search for one." +msgstr "" + #: ../app/components/MultiSelectHeadState.qml:27 msgid "Select All" msgstr "" @@ -110,11 +114,11 @@ msgid "OK" msgstr "" -#: ../app/ui/HomePage.qml:31 ../app/ui/LocationsPage.qml:30 +#: ../app/ui/HomePage.qml:31 ../app/ui/LocationsPage.qml:31 msgid "Locations" msgstr "" -#: ../app/ui/LocationsPage.qml:104 +#: ../app/ui/LocationsPage.qml:105 msgid "Current Location" msgstr ""
-- Mailing list: https://launchpad.net/~ubuntu-touch-coreapps-reviewers Post to : [email protected] Unsubscribe : https://launchpad.net/~ubuntu-touch-coreapps-reviewers More help : https://help.launchpad.net/ListHelp

