ubuntu-touch-coreapps-reviewers team mailing list archive
-
ubuntu-touch-coreapps-reviewers team
-
Mailing list archive
-
Message #06946
[Merge] lp:~verzegnassi-stefano/ubuntu-docviewer-app/fix-1523106 into lp:ubuntu-docviewer-app
Stefano Verzegnassi has proposed merging lp:~verzegnassi-stefano/ubuntu-docviewer-app/fix-1523106 into lp:ubuntu-docviewer-app.
Commit message:
[DetailsPage] Split file name and file path into two separate fields. Allow multiline subtext.
Requested reviews:
Ubuntu Document Viewer Developers (ubuntu-docviewer-dev)
Related bugs:
Bug #1523106 in Ubuntu Document Viewer App: "Sometimes it's not possible to see a filename of a document"
https://bugs.launchpad.net/ubuntu-docviewer-app/+bug/1523106
For more details, see:
https://code.launchpad.net/~verzegnassi-stefano/ubuntu-docviewer-app/fix-1523106/+merge/281375
[DetailsPage] Split file name and file path into two separate fields. Allow multiline subtext.
Screenshot at: https://imgur.com/IEgfKOW
--
Your team Ubuntu Document Viewer Developers is requested to review the proposed merge of lp:~verzegnassi-stefano/ubuntu-docviewer-app/fix-1523106 into lp:ubuntu-docviewer-app.
=== modified file 'po/com.ubuntu.docviewer.pot'
--- po/com.ubuntu.docviewer.pot 2015-12-26 18:33:55 +0000
+++ po/com.ubuntu.docviewer.pot 2015-12-27 12:11:36 +0000
@@ -8,7 +8,7 @@
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-12-26 19:31+0100\n"
+"POT-Creation-Date: 2015-12-27 13:06+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@xxxxxx>\n"
@@ -40,30 +40,34 @@
"The path must exist prior to running ubuntu-docviewer-app"
msgstr ""
-#: ../src/app/qml/common/DetailsPage.qml:25
+#: ../src/app/qml/common/DetailsPage.qml:26
#: ../src/app/qml/loView/LOViewDefaultHeader.qml:107
#: ../src/app/qml/pdfView/PdfViewDefaultHeader.qml:83
#: ../src/app/qml/textView/TextViewDefaultHeader.qml:69
msgid "Details"
msgstr ""
-#: ../src/app/qml/common/DetailsPage.qml:36
+#: ../src/app/qml/common/DetailsPage.qml:42
+msgid "File"
+msgstr ""
+
+#: ../src/app/qml/common/DetailsPage.qml:47
msgid "Location"
msgstr ""
-#: ../src/app/qml/common/DetailsPage.qml:41
+#: ../src/app/qml/common/DetailsPage.qml:52
msgid "Size"
msgstr ""
-#: ../src/app/qml/common/DetailsPage.qml:46
+#: ../src/app/qml/common/DetailsPage.qml:57
msgid "Created"
msgstr ""
-#: ../src/app/qml/common/DetailsPage.qml:51
+#: ../src/app/qml/common/DetailsPage.qml:62
msgid "Last modified"
msgstr ""
-#: ../src/app/qml/common/DetailsPage.qml:58
+#: ../src/app/qml/common/DetailsPage.qml:69
msgid "MIME type"
msgstr ""
@@ -72,18 +76,18 @@
msgstr ""
#: ../src/app/qml/common/ErrorDialog.qml:26
-#: ../src/app/qml/common/PickImportedDialog.qml:53
+#: ../src/app/qml/common/PickImportedDialog.qml:54
#: ../src/app/qml/common/RejectedImportDialog.qml:38
#: ../src/app/qml/documentPage/DocumentPageSelectionModeHeader.qml:31
#: ../src/app/qml/documentPage/SortSettingsDialog.qml:53
msgid "Close"
msgstr ""
-#: ../src/app/qml/common/PickImportedDialog.qml:28
+#: ../src/app/qml/common/PickImportedDialog.qml:29
msgid "Multiple documents imported"
msgstr ""
-#: ../src/app/qml/common/PickImportedDialog.qml:29
+#: ../src/app/qml/common/PickImportedDialog.qml:30
msgid "Choose which one to open:"
msgstr ""
@@ -305,7 +309,7 @@
msgstr ""
#: ../src/app/qml/loView/LOViewDefaultHeader.qml:51
-#: ../src/app/qml/textView/TextView.qml:42
+#: ../src/app/qml/textView/TextView.qml:43
msgid "Loading..."
msgstr ""
@@ -362,15 +366,15 @@
msgid "GO!"
msgstr ""
-#: ../src/app/qml/loView/LOViewPage.qml:128
+#: ../src/app/qml/loView/LOViewPage.qml:129
msgid "LibreOffice binaries not found."
msgstr ""
-#: ../src/app/qml/loView/LOViewPage.qml:131
+#: ../src/app/qml/loView/LOViewPage.qml:132
msgid "Error while loading LibreOffice."
msgstr ""
-#: ../src/app/qml/loView/LOViewPage.qml:134
+#: ../src/app/qml/loView/LOViewPage.qml:135
msgid ""
"Document not loaded.\n"
"The requested document may be corrupt or protected by a password."
@@ -389,7 +393,7 @@
#. TRANSLATORS: "Contents" refers to the "Table of Contents" of a PDF document.
#: ../src/app/qml/pdfView/PdfContentsPage.qml:30
-#: ../src/app/qml/pdfView/PdfView.qml:37
+#: ../src/app/qml/pdfView/PdfView.qml:38
msgid "Contents"
msgstr ""
@@ -399,7 +403,7 @@
#. TRANSLATORS: the first argument (%1) refers to the page currently shown on the screen,
#. while the second one (%2) refers to the total pages count.
-#: ../src/app/qml/pdfView/PdfView.qml:34
+#: ../src/app/qml/pdfView/PdfView.qml:35
#, qt-format
msgid "Page %1 of %2"
msgstr ""
=== modified file 'src/app/qml/common/DetailsPage.qml'
--- src/app/qml/common/DetailsPage.qml 2015-12-26 18:45:32 +0000
+++ src/app/qml/common/DetailsPage.qml 2015-12-27 12:11:36 +0000
@@ -16,6 +16,7 @@
import QtQuick 2.4
import Ubuntu.Components 1.3
+import DocumentViewer 1.0
import "utils.js" as Utils
@@ -38,8 +39,13 @@
anchors.horizontalCenter: parent.horizontalCenter
SubtitledListItem {
+ text: i18n.tr("File")
+ subText: DocumentViewer.getFileNameFromPath(file.path)
+ }
+
+ SubtitledListItem {
text: i18n.tr("Location")
- subText: file.path
+ subText: DocumentViewer.getCanonicalPath(file.path)
}
SubtitledListItem {
=== modified file 'src/app/qml/common/SubtitledListItem.qml'
--- src/app/qml/common/SubtitledListItem.qml 2015-10-23 14:00:16 +0000
+++ src/app/qml/common/SubtitledListItem.qml 2015-12-27 12:11:36 +0000
@@ -27,8 +27,16 @@
ListItemLayout {
id: listItemLayout
- title.text: listItemSubtitled.text
- title.color: UbuntuColors.midAubergine
- subtitle.text: listItemSubtitled.subText
+ title {
+ text: listItemSubtitled.text
+ color: UbuntuColors.midAubergine
+ }
+
+ subtitle {
+ text: listItemSubtitled.subText
+ wrapMode: Text.WrapAtWordBoundaryOrAnywhere
+ elide: Text.ElideRight
+ maximumLineCount: 20
+ }
}
}
=== modified file 'src/plugin/file-qml-plugin/docviewerutils.cpp'
--- src/plugin/file-qml-plugin/docviewerutils.cpp 2015-12-26 18:27:13 +0000
+++ src/plugin/file-qml-plugin/docviewerutils.cpp 2015-12-27 12:11:36 +0000
@@ -172,3 +172,13 @@
{
return QFileInfo(filePath).completeBaseName();
}
+
+QString DocviewerUtils::getFileNameFromPath(const QString &filePath)
+{
+ return QFileInfo(filePath).fileName();
+}
+
+QString DocviewerUtils::getCanonicalPath(const QString &filePath)
+{
+ return QFileInfo(filePath).canonicalPath();
+}
=== modified file 'src/plugin/file-qml-plugin/docviewerutils.h'
--- src/plugin/file-qml-plugin/docviewerutils.h 2015-12-26 18:27:13 +0000
+++ src/plugin/file-qml-plugin/docviewerutils.h 2015-12-27 12:11:36 +0000
@@ -38,6 +38,8 @@
Q_INVOKABLE static QString checkIfFileAlreadyImported(const QString &filePath, const QStringList &storageLocationList);
Q_INVOKABLE static QString getFileBaseNameFromPath(const QString &filePath);
+ Q_INVOKABLE static QString getFileNameFromPath(const QString &filePath);
+ Q_INVOKABLE static QString getCanonicalPath(const QString &filePath);
};
#endif // DOCVIEWERUTILS_H
Follow ups