~ubuntu-branches/ubuntu/utopic/gallery-app/utopic-proposed

« back to all changes in this revision

Viewing changes to rc/qml/PickerScreen.qml

  • Committer: Package Import Robot
  • Author(s): Ubuntu daily release, Bill Filler, Arthur Mello, Ugo Riboni
  • Date: 2014-09-06 21:09:12 UTC
  • mfrom: (1.1.75)
  • Revision ID: package-import@ubuntu.com-20140906210912-0deb9spr36jegxsb
Tags: 0.0.67+14.10.20140906-0ubuntu1
[ Bill Filler ]
* Mark strings for translation

[ Arthur Mello ]
* Make gallery-app uses the new header (LP: #1289160)

[ Ugo Riboni ]
* Move the new album strings to QML to make them translatable. Remove
  some dead code. (LP: #1364310)

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
 */
16
16
 
17
17
import QtQuick 2.0
18
 
import Ubuntu.Components 0.1
 
18
import Ubuntu.Components 1.1
19
19
import Gallery 1.0
20
20
import "Components"
21
21
import "OrganicView"
29
29
    id: pickerMainView
30
30
    objectName: "pickerMainView"
31
31
 
 
32
    useDeprecatedToolbar: false
 
33
 
32
34
    /// Model of all media
33
35
    property MediaCollectionModel mediaLibrary: MediaCollectionModel {
34
36
        monitored: true
58
60
                id: eventSelectView
59
61
                objectName: "eventSelectView"
60
62
 
61
 
                tools: pickTools
 
63
                head.actions: pickActions
 
64
 
62
65
                selection: pickerMainView.selection
63
66
                model: EventCollectionModel {
64
67
                    mediaTypeFilter: APP.mediaTypeFilter
80
83
                id: photosOverview
81
84
                objectName: "photosPage"
82
85
 
83
 
                tools: pickTools
 
86
                head.actions: pickActions
84
87
 
85
88
                Image {
86
89
                    anchors.fill: parent
97
100
        }
98
101
    }
99
102
 
100
 
    property ToolbarItems pickTools: ToolbarItems {
101
 
        Button {
102
 
            anchors.verticalCenter: parent.verticalCenter
 
103
    property list<Action> pickActions: [
 
104
        Action {
103
105
            text: i18n.tr("Pick")
104
106
            objectName: "pickButton"
105
 
            color: Gallery.HIGHLIGHT_BUTTON_COLOR
106
 
            width: units.gu(16)
107
107
            enabled: pickerMainView.selection.selectedCount > 0
108
 
            onClicked: {
 
108
            iconName: "ok"
 
109
            onTriggered: {
109
110
                if (!enabled)
110
111
                    return;
111
112
 
112
113
                APP.returnPickedContent(mediaLibrary.selectedMedias);
113
114
            }
114
 
        }
115
 
 
116
 
        back: Button {
117
 
            anchors.verticalCenter: parent.verticalCenter
 
115
        },
 
116
        Action {
118
117
            text: i18n.tr("Cancel")
119
118
            objectName: "cancelButton"
120
 
            width: units.gu(10)
121
 
            onClicked: {
122
 
                APP.contentPickingCanceled()
123
 
            }
 
119
            iconName: "close"
 
120
            onTriggered: APP.contentPickingCanceled()
124
121
        }
125
 
        opened: true
126
 
        locked: true
127
 
    }
 
122
    ]
128
123
}