From cc1952786f991bf5d584bbbffb554b0c40cec401 Mon Sep 17 00:00:00 2001 From: David Llewellyn-Jones Date: Sat, 14 Jul 2018 20:13:44 +0100 Subject: [PATCH] Rename AddJourney to JourneyEdit This fits better with the overall naming scheme and makes sense given the dialog is used more often for editing than for adding. --- harbour-pedalo.pro | 4 +- qml/pages/{AddJourney.qml => JourneyEdit.qml} | 12 +++--- qml/pages/JourneyList.qml | 4 +- qml/pages/MainPage.qml | 4 +- translations/harbour-pedalo-de.ts | 40 +++++++++---------- translations/harbour-pedalo.ts | 36 ++++++++--------- 6 files changed, 50 insertions(+), 50 deletions(-) rename qml/pages/{AddJourney.qml => JourneyEdit.qml} (95%) diff --git a/harbour-pedalo.pro b/harbour-pedalo.pro index 1ec2ced..647d3bb 100644 --- a/harbour-pedalo.pro +++ b/harbour-pedalo.pro @@ -41,12 +41,12 @@ DISTFILES += qml/harbour-pedalo.qml \ translations/*.ts \ harbour-pedalo.desktop \ qml/pages/MainPage.qml \ - qml/pages/AddJourney.qml \ qml/pages/Stats.qml \ qml/pages/JourneyList.qml \ qml/pages/About.qml \ qml/pages/DurationEditDialog.qml \ - qml/components/InfoRow.qml + qml/components/InfoRow.qml \ + qml/pages/JourneyEdit.qml SAILFISHAPP_ICONS = 86x86 108x108 128x128 172x172 diff --git a/qml/pages/AddJourney.qml b/qml/pages/JourneyEdit.qml similarity index 95% rename from qml/pages/AddJourney.qml rename to qml/pages/JourneyEdit.qml index a9124ae..1f61b39 100644 --- a/qml/pages/AddJourney.qml +++ b/qml/pages/JourneyEdit.qml @@ -2,7 +2,7 @@ import QtQuick 2.0 import Sailfish.Silica 1.0 Dialog { - id: addJourneyDialog + id: journeyEditDialog canAccept: true property string title: "Add journey" property var start: new Date() @@ -29,19 +29,19 @@ Dialog { allowedOrientations: Orientation.All SilicaFlickable { - id: addJourneyView + id: journeyEditView anchors.fill: parent - contentHeight: addJourneyColumn.implicitHeight + contentHeight: journeyEditColumn.implicitHeight VerticalScrollDecorator {} Column { - id: addJourneyColumn + id: journeyEditColumn spacing: Theme.paddingMedium width: parent.width DialogHeader { - title: addJourneyDialog.title + title: journeyEditDialog.title } ValueButton { @@ -123,7 +123,7 @@ Dialog { text: overtakenby >= 0 ? "" + overtakenby : "" horizontalAlignment: TextInput.AlignLeft EnterKey.iconSource: "image://theme/icon-m-enter-next" - EnterKey.onClicked: addJourneyDialog.accept() + EnterKey.onClicked: journeyEditDialog.accept() } } } diff --git a/qml/pages/JourneyList.qml b/qml/pages/JourneyList.qml index 8831f40..8ecc9b8 100644 --- a/qml/pages/JourneyList.qml +++ b/qml/pages/JourneyList.qml @@ -39,14 +39,14 @@ Page { color: delegate.highlighted ? Theme.highlightColor : Theme.primaryColor } } - onClicked: pageStack.push(Qt.resolvedUrl("AddJourney.qml"), {title: "Edit journey", index: index, start: journeymodel.epochToDateTime(start), duration: duration, overtook: overtook, overtakenby: overtakenby}) + onClicked: pageStack.push(Qt.resolvedUrl("JourneyEdit.qml"), {title: "Edit journey", index: index, start: journeymodel.epochToDateTime(start), duration: duration, overtook: overtook, overtakenby: overtakenby}) Component { id: journeyMenuComponent ContextMenu { MenuItem { text: qsTr("Edit") - onClicked: pageStack.push(Qt.resolvedUrl("AddJourney.qml"), {title: "Edit journey", index: index, start: journeymodel.epochToDateTime(start), duration: duration, overtook: overtook, overtakenby: overtakenby}) + onClicked: pageStack.push(Qt.resolvedUrl("JourneyEdit.qml"), {title: "Edit journey", index: index, start: journeymodel.epochToDateTime(start), duration: duration, overtook: overtook, overtakenby: overtakenby}) } MenuItem { text: qsTr("Delete") diff --git a/qml/pages/MainPage.qml b/qml/pages/MainPage.qml index 03d86a2..0de4dc4 100644 --- a/qml/pages/MainPage.qml +++ b/qml/pages/MainPage.qml @@ -42,7 +42,7 @@ Page { text: currentStatus.cycling ? qsTr("Finish") : qsTr("Start a journey") onClicked: { if (currentStatus.cycling) { - var dialog = pageStack.push(Qt.resolvedUrl("AddJourney.qml"), {title: "Finish journey", start: journeymodel.epochToDateTime(currentStatus.startTime), duration: currentStatus.getDuration()}) + var dialog = pageStack.push(Qt.resolvedUrl("JourneyEdit.qml"), {title: "Finish journey", start: journeymodel.epochToDateTime(currentStatus.startTime), duration: currentStatus.getDuration()}) dialog.accepted.connect(function() { currentStatus.cycling = false @@ -61,7 +61,7 @@ Page { Button { anchors.horizontalCenter: parent.horizontalCenter text: qsTr("Enter journey") - onClicked: pageStack.push(Qt.resolvedUrl("AddJourney.qml")) + onClicked: pageStack.push(Qt.resolvedUrl("JourneyEdit.qml")) } SectionHeader { diff --git a/translations/harbour-pedalo-de.ts b/translations/harbour-pedalo-de.ts index bb23457..3ea663f 100644 --- a/translations/harbour-pedalo-de.ts +++ b/translations/harbour-pedalo-de.ts @@ -13,49 +13,49 @@ - AddJourney + CoverPage - Start time - + My Cover + Mein Cover + + + DurationEditDialog - End time + LTR - Duration + h + "Hour abbrevation. Should be short form if possible." - Cycles which you overtook + min + "Minute abbrevation. Should be short form if possible." + + + JourneyEdit - Cycles which overtook you + Start time - - - CoverPage - My Cover - Mein Cover + End time + - - - DurationEditDialog - LTR + Duration - h - "Hour abbrevation. Should be short form if possible." + Cycles which you overtook - min - "Minute abbrevation. Should be short form if possible." + Cycles which overtook you diff --git a/translations/harbour-pedalo.ts b/translations/harbour-pedalo.ts index e580051..42cc67b 100644 --- a/translations/harbour-pedalo.ts +++ b/translations/harbour-pedalo.ts @@ -13,49 +13,49 @@ - AddJourney + CoverPage - Start time + My Cover + + + DurationEditDialog - End time + LTR - Duration + h + "Hour abbrevation. Should be short form if possible." - Cycles which you overtook + min + "Minute abbrevation. Should be short form if possible." + + + JourneyEdit - Cycles which overtook you + Start time - - - CoverPage - My Cover + End time - - - DurationEditDialog - LTR + Duration - h - "Hour abbrevation. Should be short form if possible." + Cycles which you overtook - min - "Minute abbrevation. Should be short form if possible." + Cycles which overtook you -- 2.25.1