2
* Copyright (C) 2014-2015 Canonical, Ltd.
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation; version 3.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
13
* You should have received a copy of the GNU General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
18
import Ubuntu.Components 1.1
19
import QtQuick.Layouts 1.1
20
import Ubuntu.Components.Popups 1.0
25
property Page targetPage
29
text: i18n.tr("Cancel")
30
objectName: "cancelButton"
32
onTriggered: DOC_VIEWER.contentPickingCanceled()
37
text: targetPage.useGridView ? i18n.tr("Switch to single column list") : i18n.tr("Switch to grid")
38
iconName: targetPage.useGridView ? "view-list-symbolic" : "view-grid-symbolic"
39
onTriggered: targetPage.useGridView = !targetPage.useGridView
41
visible: folderModel.count !== 0
46
objectName: "pickButton"
47
enabled: viewLoader.item.selectedItems.count > 0
54
var items = documentPage.view.item.selectedItems;
56
for (var i=0; i < items.count; i++) {
57
urlList.push(items.get(i).model.path);
60
DOC_VIEWER.returnPickedContent(urlList);