ubuntu-touch-coreapps-reviewers team mailing list archive
-
ubuntu-touch-coreapps-reviewers team
-
Mailing list archive
-
Message #04915
[Merge] lp:~verzegnassi-stefano/ubuntu-docviewer-app/reboot-documentpage-add-share-option into lp:ubuntu-docviewer-app/reboot
Stefano Verzegnassi has proposed merging lp:~verzegnassi-stefano/ubuntu-docviewer-app/reboot-documentpage-add-share-option into lp:ubuntu-docviewer-app/reboot.
Commit message:
Added share option in documentsPage
Requested reviews:
Ubuntu Document Viewer Developers (ubuntu-docviewer-dev)
For more details, see:
https://code.launchpad.net/~verzegnassi-stefano/ubuntu-docviewer-app/reboot-documentpage-add-share-option/+merge/270851
Added share option in documentsPage
--
Your team Ubuntu Document Viewer Developers is requested to review the proposed merge of lp:~verzegnassi-stefano/ubuntu-docviewer-app/reboot-documentpage-add-share-option into lp:ubuntu-docviewer-app/reboot.
=== modified file 'po/com.ubuntu.docviewer.pot'
--- po/com.ubuntu.docviewer.pot 2015-08-04 16:01:37 +0000
+++ po/com.ubuntu.docviewer.pot 2015-09-11 15:50:50 +0000
@@ -8,7 +8,7 @@
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-07-12 21:23+0200\n"
+"POT-Creation-Date: 2015-09-09 19:15+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@xxxxxx>\n"
@@ -33,7 +33,7 @@
msgstr ""
#: ../src/app/docviewer-application.cpp:171
-#: /home/stefano/Progetti/docviewer/Libreoffice/build-lo-tiled-rendering-Desktop-Default/po/com.ubuntu.docviewer.desktop.in.in.h:1
+#: /tmp/build-reboot-UbuntuSDK_for_armhf_GCC_ubuntu_sdk_15_04_vivid-Default/po/com.ubuntu.docviewer.desktop.in.in.h:1
msgid "Document Viewer"
msgstr ""
@@ -149,89 +149,82 @@
msgid "%1 byte"
msgstr ""
-#: ../src/app/qml/documentPage/DeleteFileDialog.qml:28
+#: ../src/app/qml/documentPage/DeleteFileDialog.qml:36
msgid "Delete file"
msgstr ""
-#: ../src/app/qml/documentPage/DeleteFileDialog.qml:29
+#: ../src/app/qml/documentPage/DeleteFileDialog.qml:37
#, qt-format
msgid "Delete %1 file"
msgid_plural "Delete %1 files"
msgstr[0] ""
msgstr[1] ""
-#: ../src/app/qml/documentPage/DeleteFileDialog.qml:30
-#: ../src/app/qml/documentPage/DeleteFileDialog.qml:31
+#: ../src/app/qml/documentPage/DeleteFileDialog.qml:38
+#: ../src/app/qml/documentPage/DeleteFileDialog.qml:39
msgid "Are you sure you want to permanently delete this file?"
msgid_plural "Are you sure you want to permanently delete these files?"
msgstr[0] ""
msgstr[1] ""
-#: ../src/app/qml/documentPage/DeleteFileDialog.qml:36
+#: ../src/app/qml/documentPage/DeleteFileDialog.qml:44
#: ../src/app/qml/documentPage/DocumentPagePickModeHeader.qml:27
#: ../src/app/qml/loView/LOViewGotoDialog.qml:52
#: ../src/app/qml/pdfView/PdfViewGotoDialog.qml:52
msgid "Cancel"
msgstr ""
-#: ../src/app/qml/documentPage/DeleteFileDialog.qml:41
+#: ../src/app/qml/documentPage/DeleteFileDialog.qml:49
+#: ../src/app/qml/documentPage/DocumentDelegateActions.qml:25
#: ../src/app/qml/documentPage/DocumentPageSelectionModeHeader.qml:82
msgid "Delete"
msgstr ""
+#: ../src/app/qml/documentPage/DocumentDelegateActions.qml:43
+msgid "Share"
+msgstr ""
+
#: ../src/app/qml/documentPage/DocumentEmptyState.qml:24
msgid "No document found"
msgstr ""
-#: ../src/app/qml/documentPage/DocumentEmptyState.qml:28
+#: ../src/app/qml/documentPage/DocumentEmptyState.qml:25
msgid ""
"Connect your device to any computer and simply drag files to the Documents "
-"folder."
+"folder or insert removable media with documents."
msgstr ""
#. TRANSLATORS: %1 refers to a time formatted as Locale.ShortFormat (e.g. hh:mm). It depends on system settings.
#. http://qt-project.org/doc/qt-4.8/qlocale.html#FormatType-enum
-#: ../src/app/qml/documentPage/DocumentGridDelegate.qml:35
+#: ../src/app/qml/documentPage/DocumentGridDelegate.qml:32
+#: ../src/app/qml/documentPage/DocumentListDelegate.qml:37
#, qt-format
msgid "Today, %1"
msgstr ""
#. TRANSLATORS: %1 refers to a time formatted as Locale.ShortFormat (e.g. hh:mm). It depends on system settings.
#. http://qt-project.org/doc/qt-4.8/qlocale.html#FormatType-enum
-#: ../src/app/qml/documentPage/DocumentGridDelegate.qml:40
+#: ../src/app/qml/documentPage/DocumentGridDelegate.qml:37
+#: ../src/app/qml/documentPage/DocumentListDelegate.qml:42
#, qt-format
msgid "Yesterday, %1"
msgstr ""
#. TRANSLATORS: this is a datetime formatting string,
#. see http://qt-project.org/doc/qt-5/qml-qtqml-date.html#details for valid expressions.
-#: ../src/app/qml/documentPage/DocumentGridDelegate.qml:45
+#: ../src/app/qml/documentPage/DocumentGridDelegate.qml:42
#: ../src/app/qml/documentPage/DocumentListDelegate.qml:58
msgid "dddd, hh:mm"
msgstr ""
#. TRANSLATORS: this is a datetime formatting string,
#. see http://qt-project.org/doc/qt-5/qml-qtqml-date.html#details for valid expressions.
-#: ../src/app/qml/documentPage/DocumentGridDelegate.qml:49
+#: ../src/app/qml/documentPage/DocumentGridDelegate.qml:46
#: ../src/app/qml/documentPage/DocumentListDelegate.qml:47
#: ../src/app/qml/documentPage/DocumentListDelegate.qml:63
msgid "dd-MM-yyyy hh:mm"
msgstr ""
-#. TRANSLATORS: this is a datetime formatting string, and the
-#. singlequote is an escape character.
-#. See http://qt-project.org/doc/qt-5/qml-qtqml-date.html#details for valid expressions.
-#: ../src/app/qml/documentPage/DocumentListDelegate.qml:36
-msgid "'Today', hh:mm"
-msgstr ""
-
-#. TRANSLATORS: this is a datetime formatting string, and the
-#. singlequote is an escape character.
-#. See http://qt-project.org/doc/qt-5/qml-qtqml-date.html#details for valid expressions.
-#: ../src/app/qml/documentPage/DocumentListDelegate.qml:42
-msgid "'Yesterday', hh:mm"
-msgstr ""
-
#: ../src/app/qml/documentPage/DocumentListView.qml:157
msgid "Today"
msgstr ""
@@ -306,6 +299,10 @@
"Please ensure that your query is not misspelled and/or try a different query."
msgstr ""
+#: ../src/app/qml/documentPage/SharePage.qml:23
+msgid "Share to"
+msgstr ""
+
#: ../src/app/qml/documentPage/SortSettingsDialog.qml:26
msgid "Sorting settings"
msgstr ""
@@ -414,6 +411,6 @@
msgid "Open"
msgstr ""
-#: /home/stefano/Progetti/docviewer/Libreoffice/build-lo-tiled-rendering-Desktop-Default/po/com.ubuntu.docviewer.desktop.in.in.h:2
+#: /tmp/build-reboot-UbuntuSDK_for_armhf_GCC_ubuntu_sdk_15_04_vivid-Default/po/com.ubuntu.docviewer.desktop.in.in.h:2
msgid "documents;viewer;pdf;reader;"
msgstr ""
=== modified file 'src/app/qml/documentPage/DocumentDelegateActions.qml'
--- src/app/qml/documentPage/DocumentDelegateActions.qml 2015-07-01 16:05:59 +0000
+++ src/app/qml/documentPage/DocumentDelegateActions.qml 2015-09-11 15:50:50 +0000
@@ -37,5 +37,13 @@
}
]
- property list<Action> trailingActions
+ property list<Action> trailingActions: [
+ Action {
+ iconName: "share"
+ text: i18n.tr("Share")
+ onTriggered: {
+ pageStack.push(Qt.resolvedUrl("./SharePage.qml"), { fileUrl: model.path })
+ }
+ }
+ ]
}
=== modified file 'src/app/qml/documentPage/DocumentEmptyState.qml'
--- src/app/qml/documentPage/DocumentEmptyState.qml 2015-02-26 20:16:32 +0000
+++ src/app/qml/documentPage/DocumentEmptyState.qml 2015-09-11 15:50:50 +0000
@@ -22,10 +22,7 @@
EmptyState {
title: i18n.tr("No document found")
-
- // TODO: Add "or insert removable media with documents." to subTitle when
- // the support for SD card will be implemented.
- subTitle: i18n.tr("Connect your device to any computer and simply drag files to the Documents folder.")
+ subTitle: i18n.tr("Connect your device to any computer and simply drag files to the Documents folder or insert removable media with documents.")
iconName: "edit-copy"
anchors.centerIn: parent
=== added file 'src/app/qml/documentPage/SharePage.qml'
--- src/app/qml/documentPage/SharePage.qml 1970-01-01 00:00:00 +0000
+++ src/app/qml/documentPage/SharePage.qml 2015-09-11 15:50:50 +0000
@@ -0,0 +1,56 @@
+/*
+ Copyright (C) 2015 Stefano Verzegnassi
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License 3 as published by
+ the Free Software Foundation.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see http://www.gnu.org/licenses/.
+*/
+
+import QtQuick 2.3
+import Ubuntu.Components 1.1
+import Ubuntu.Content 1.1
+
+Page {
+ id: sharePage
+ title: i18n.tr("Share to")
+
+ property url fileUrl
+ property var activeTransfer
+
+ ContentPeerPicker {
+ id: picker
+
+ contentType: ContentType.Documents
+ handler: ContentHandler.Share
+ showTitle: false
+
+ onPeerSelected: {
+ activeTransfer = peer.request();
+ activeTransfer.items = [ resultComponent.createObject(sharePage, { "url": fileUrl }) ];
+ activeTransfer.state = ContentTransfer.Charged;
+ pageStack.pop();
+ }
+
+ onCancelPressed: {
+ pageStack.pop();
+ }
+ }
+
+ ContentTransferHint {
+ anchors.fill: parent
+ activeTransfer: sharePage.activeTransfer
+ }
+
+ Component {
+ id: resultComponent
+ ContentItem {}
+ }
+}
Follow ups