Merge lp:~rpadovani/reminders-app/editNotebooksName into lp:reminders-app

Proposed by Riccardo Padovani
Status: Merged
Approved by: Alan Pope 🍺🐧🐱 πŸ¦„
Approved revision: 223
Merged at revision: 237
Proposed branch: lp:~rpadovani/reminders-app/editNotebooksName
Merge into: lp:reminders-app
Prerequisite: lp:~mzanetti/reminders-app/save-notebook
Diff against target: 53 lines (+31/-1)
1 file modified
src/app/qml/components/NotebooksDelegate.qml (+31/-1)
To merge this branch: bzr merge lp:~rpadovani/reminders-app/editNotebooksName
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Michael Zanetti (community) Approve
Review via email: mp+231124@code.launchpad.net

Commit message

Implemented fronted to change notebooks name

Description of the change

Implemented frontend to change notebooks name: long click on a name to change it, as discussed in previous meeting.

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Michael Zanetti (mzanetti) wrote :

working!

review: Approve
Revision history for this message
Michael Zanetti (mzanetti) wrote :

oops... revoking approval... found an issue:

44 + notebookTitleLabel.text = notebookTitleTextField.text;
45 + notebookTitleLabel.visible = true;

this is not good. you're breaking the binding with this. Why is this needed at all?

review: Needs Information
Revision history for this message
Michael Zanetti (mzanetti) wrote :

yep. now we're good

review: Approve
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/app/qml/components/NotebooksDelegate.qml'
--- src/app/qml/components/NotebooksDelegate.qml 2014-05-12 17:17:07 +0000
+++ src/app/qml/components/NotebooksDelegate.qml 2014-08-29 15:24:03 +0000
@@ -20,6 +20,7 @@
20import QtQuick.Layouts 1.020import QtQuick.Layouts 1.0
21import Ubuntu.Components 0.121import Ubuntu.Components 0.1
22import Ubuntu.Components.ListItems 0.122import Ubuntu.Components.ListItems 0.1
23import Evernote 0.1
2324
24Empty {25Empty {
25 id: root26 id: root
@@ -58,11 +59,40 @@
58 Layout.fillWidth: true59 Layout.fillWidth: true
5960
60 Label {61 Label {
62 id: notebookTitleLabel
61 objectName: 'notebookTitleLabel'63 objectName: 'notebookTitleLabel'
62 text: model.name64 text: model.name
63 color: root.notebookColor65 color: root.notebookColor
64 fontSize: "large"66 fontSize: "large"
65 }67
68 MouseArea {
69 onPressAndHold: {
70 notebookTitleLabel.visible = false;
71 notebookTitleTextField.forceActiveFocus();
72 }
73 anchors.fill: parent
74 propagateComposedEvents: true
75 }
76 }
77
78 TextField {
79 id: notebookTitleTextField
80 text: model.name
81 color: root.notebookColor
82 visible: !notebookTitleLabel.visible
83
84 InverseMouseArea {
85 onClicked: {
86 if (notebookTitleTextField.text) {
87 notebooks.notebook(index).name = notebookTitleTextField.text;
88 NotesStore.saveNotebook(notebooks.notebook(index).guid);
89 notebookTitleLabel.visible = true;
90 }
91 }
92 anchors.fill: parent
93 }
94 }
95
66 Label {96 Label {
67 objectName: 'notebookLastUpdatedLabel'97 objectName: 'notebookLastUpdatedLabel'
68 text: i18n.tr("Last edited %1").arg(model.lastUpdatedString)98 text: i18n.tr("Last edited %1").arg(model.lastUpdatedString)

Subscribers

People subscribed via source and target branches