~mzanetti/reminders-app/contenthub-import

« back to all changes in this revision

Viewing changes to src/app/qml/reminders.qml

  • Committer: Michael Zanetti
  • Date: 2015-06-22 08:35:12 UTC
  • Revision ID: michael.zanetti@canonical.com-20150622083512-zjn4hrvvag87my24
fix nitpicks from review

Show diffs side-by-side

added added

removed removed

Lines of Context:
102
102
    Connections {
103
103
        target: ContentHub
104
104
        onImportRequested: {
105
 
            importTransfer = transfer
 
105
            importTransfer = transfer;
106
106
            var popup = PopupUtils.open(importQuestionComponent);
107
107
            popup.accepted.connect(function(createNew) {
108
 
                PopupUtils.close(popup)
 
108
                PopupUtils.close(popup);
109
109
                if (createNew) {
110
 
                    var note = NotesStore.createNote(i18n.tr("Untitled"))
 
110
                    var note = NotesStore.createNote(i18n.tr("Untitled"));
111
111
                    handleImportTransfer(note);
112
112
                }
113
113
            })
114
114
 
115
115
            popup.rejected.connect(function() {
116
 
                PopupUtils.close(popup)
 
116
                PopupUtils.close(popup);
117
117
                importTransfer = null;
118
118
            })
119
 
 
120
119
        }
121
120
    }
122
121
 
520
519
        }
521
520
    }
522
521
 
523
 
 
524
522
    PageStack {
525
523
        id: pagestack
526
524
        anchors.rightMargin: root.narrowMode ? 0 : root.width - units.gu(40)
745
743
            title: importTransfer.items.length > 1 ?
746
744
                       i18n.tr("Importing %1 items").arg(importTransfer.items.length)
747
745
                     : i18n.tr("Importing 1 item")
748
 
            text: i18n.tr("Do you want to create a new note for this item or do you want to attach it to an existing note?")
 
746
            text: importTransfer.items.length > 1 ?
 
747
                      i18n.tr("Do you want to create a new note for those items or do you want to attach them to an existing note?")
 
748
                    : i18n.tr("Do you want to create a new note for this item or do you want to attach it to an existing note?")
749
749
 
750
750
            signal accepted(bool createNew);
751
751
            signal rejected();