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
1=== modified file 'src/app/qml/components/NotebooksDelegate.qml'
2--- src/app/qml/components/NotebooksDelegate.qml 2014-05-12 17:17:07 +0000
3+++ src/app/qml/components/NotebooksDelegate.qml 2014-08-29 15:24:03 +0000
4@@ -20,6 +20,7 @@
5 import QtQuick.Layouts 1.0
6 import Ubuntu.Components 0.1
7 import Ubuntu.Components.ListItems 0.1
8+import Evernote 0.1
9
10 Empty {
11 id: root
12@@ -58,11 +59,40 @@
13 Layout.fillWidth: true
14
15 Label {
16+ id: notebookTitleLabel
17 objectName: 'notebookTitleLabel'
18 text: model.name
19 color: root.notebookColor
20 fontSize: "large"
21- }
22+
23+ MouseArea {
24+ onPressAndHold: {
25+ notebookTitleLabel.visible = false;
26+ notebookTitleTextField.forceActiveFocus();
27+ }
28+ anchors.fill: parent
29+ propagateComposedEvents: true
30+ }
31+ }
32+
33+ TextField {
34+ id: notebookTitleTextField
35+ text: model.name
36+ color: root.notebookColor
37+ visible: !notebookTitleLabel.visible
38+
39+ InverseMouseArea {
40+ onClicked: {
41+ if (notebookTitleTextField.text) {
42+ notebooks.notebook(index).name = notebookTitleTextField.text;
43+ NotesStore.saveNotebook(notebooks.notebook(index).guid);
44+ notebookTitleLabel.visible = true;
45+ }
46+ }
47+ anchors.fill: parent
48+ }
49+ }
50+
51 Label {
52 objectName: 'notebookLastUpdatedLabel'
53 text: i18n.tr("Last edited %1").arg(model.lastUpdatedString)

Subscribers

People subscribed via source and target branches