~renatofilho/address-book-app/fix-1375513

« back to all changes in this revision

Viewing changes to src/imports/ContactView/ContactView.qml

  • Committer: Renato Araujo Oliveira Filho
  • Date: 2014-09-18 18:56:15 UTC
  • mfrom: (296.6.2 fix-1368701)
  • Revision ID: renato.filho@canonical.com-20140918185615-vb6gqvktvrdiar1n
Changed avatar view visuals.
Move favorite action to avatar view area.

Show diffs side-by-side

added added

removed removed

Lines of Context:
92
92
        }
93
93
    }
94
94
 
95
 
    tools: ToolbarItems {
96
 
        ToolbarButton {
97
 
            action: Action {
98
 
                objectName: "favorite"
99
 
                text: i18n.tr("Favorite")
100
 
                iconName: root.contact && root.contact.favorite.favorite ? "starred" : "non-starred"
101
 
                onTriggered: {
102
 
                    root.contact.favorite.favorite = !root.contact.favorite.favorite
103
 
                    root.contact.save()
104
 
                }
105
 
            }
106
 
        }
107
 
        ToolbarButton {
108
 
            action: Action {
109
 
                objectName: "share"
110
 
                text: i18n.tr("Share")
111
 
                iconName: "share"
112
 
                onTriggered: {
113
 
                    pageStack.push(Qt.resolvedUrl("../ContactShare/ContactSharePage.qml"),
114
 
                                   { contactModel: root.model, contacts: [root.contact] })
115
 
                }
116
 
            }
117
 
        }
118
 
        ToolbarButton {
119
 
            action: Action {
120
 
                objectName: "edit"
121
 
                text: i18n.tr("Edit")
122
 
                iconName: "edit"
123
 
                onTriggered: {
124
 
                    pageStack.push(Qt.resolvedUrl("../ContactEdit/ContactEditor.qml"),
125
 
                                   { model: root.model, contact: root.contact})
126
 
                }
127
 
            }
128
 
        }
129
 
    }
 
95
    head.actions: [
 
96
        Action {
 
97
            objectName: "share"
 
98
            text: i18n.tr("Share")
 
99
            iconName: "share"
 
100
            onTriggered: {
 
101
                pageStack.push(Qt.resolvedUrl("../ContactShare/ContactSharePage.qml"),
 
102
                               { contactModel: root.model, contacts: [root.contact] })
 
103
            }
 
104
        },
 
105
        Action {
 
106
            objectName: "edit"
 
107
            text: i18n.tr("Edit")
 
108
            iconName: "edit"
 
109
            onTriggered: {
 
110
                pageStack.push(Qt.resolvedUrl("../ContactEdit/ContactEditor.qml"),
 
111
                               { model: root.model, contact: root.contact})
 
112
            }
 
113
        }
 
114
    ]
130
115
 
131
116
    // This will load the contact information when the app was launched with
132
117
    // the URI: addressbook:///contact?id=<id>