2
* Copyright (C) 2012-2015 Canonical Ltd
2
* Copyright (C) 2012 Canonical Ltd
4
4
* This program is free software: you can redistribute it and/or modify
5
5
* it under the terms of the GNU General Public License version 3 as
14
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
18
import Ubuntu.Components 1.3
19
import Ubuntu.Components.Popups 1.3
18
import Ubuntu.Components 0.1
19
import Ubuntu.Components.Popups 0.1
21
import Ubuntu.Content 1.3
21
import Ubuntu.Content 0.1
22
22
import "Components"
23
23
import "OrganicView"
105
property list<Action> overviewActions: [
107
objectName: "selectButton"
108
text: i18n.tr("Select")
110
enabled: selection !== null
111
onTriggered: selection.inSelectionMode = true;
114
objectName: "cameraButton"
115
text: i18n.tr("Camera")
116
visible: !APP.desktopMode
117
iconName: "camera-app-symbolic"
118
onTriggered: Qt.openUrlExternally("appid://com.ubuntu.camera/camera/current-user-version")
122
property list<Action> selectActions: [
125
objectName: "addButton"
129
enabled: selection.selectedCount > 0
130
onTriggered: __albumPicker = PopupUtils.open(Qt.resolvedUrl("Components/PopupAlbumPicker.qml"),
132
{contentHeight: organicEventView.__pickerContentHeight});
136
objectName: "deleteButton"
138
text: i18n.tr("Delete")
140
enabled: selection.selectedCount > 0
141
onTriggered: PopupUtils.open(deleteDialog, null);
144
objectName: "shareButton"
145
text: i18n.tr("Share")
147
enabled: selection.selectedMediaCount == 1
149
overview.pushPage(sharePicker)
150
sharePicker.visible = true;
155
property Action selectBackAction: Action {
156
text: i18n.tr("Cancel")
158
onTriggered: organicEventView.leaveSelectionMode();
105
property Item overviewTools: PhotosToolbarActions {
106
selection: organicEventView.selection
161
109
property int __pickerContentHeight: height - units.gu(20)
162
110
property PopupAlbumPicker __albumPicker
119
property Item selectionTools: SelectionToolbarAction {
120
selection: organicEventView.selection
123
organicEventView.leaveSelectionMode();
126
__albumPicker = PopupUtils.open(Qt.resolvedUrl("Components/PopupAlbumPicker.qml"),
128
{contentHeight: organicEventView.__pickerContentHeight});
131
PopupUtils.open(deleteDialog, null);
135
overview.pushPage(sharePicker);
136
sharePicker.visible = true;
171
140
property bool selectionMode: selection.inSelectionMode
173
head.actions: selectionMode ? selectActions : overviewActions
174
head.backAction: selectionMode ? selectBackAction : null
141
tools: selectionMode ? selectionTools : overviewTools
177
144
id: contentItemComp