Merge lp:~verzegnassi-stefano/ubuntu-docviewer-app/fix-1523106 into lp:ubuntu-docviewer-app

Proposed by Stefano Verzegnassi
Status: Merged
Approved by: Stefano Verzegnassi
Approved revision: 246
Merged at revision: 253
Proposed branch: lp:~verzegnassi-stefano/ubuntu-docviewer-app/fix-1523106
Merge into: lp:ubuntu-docviewer-app
Diff against target: 203 lines (+50/-20)
5 files modified
po/com.ubuntu.docviewer.pot (+20/-16)
src/app/qml/common/DetailsPage.qml (+7/-1)
src/app/qml/common/SubtitledListItem.qml (+11/-3)
src/plugin/file-qml-plugin/docviewerutils.cpp (+10/-0)
src/plugin/file-qml-plugin/docviewerutils.h (+2/-0)
To merge this branch: bzr merge lp:~verzegnassi-stefano/ubuntu-docviewer-app/fix-1523106
Reviewer Review Type Date Requested Status
Alan Pope 🍺🐧🐱 πŸ¦„ (community) Approve
Jenkins Bot continuous-integration Approve
Review via email: mp+281375@code.launchpad.net

Commit message

[DetailsPage] Split file name and file path into two separate fields. Allow multiline subtext.

Description of the change

[DetailsPage] Split file name and file path into two separate fields. Allow multiline subtext.

Screenshot at: https://imgur.com/IEgfKOW

To post a comment you must log in.
Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Alan Pope 🍺🐧🐱 πŸ¦„ (popey) wrote :

Great improvement. Works well on the small screen devices.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'po/com.ubuntu.docviewer.pot'
2--- po/com.ubuntu.docviewer.pot 2015-12-26 18:33:55 +0000
3+++ po/com.ubuntu.docviewer.pot 2015-12-27 12:11:36 +0000
4@@ -8,7 +8,7 @@
5 msgstr ""
6 "Project-Id-Version: \n"
7 "Report-Msgid-Bugs-To: \n"
8-"POT-Creation-Date: 2015-12-26 19:31+0100\n"
9+"POT-Creation-Date: 2015-12-27 13:06+0100\n"
10 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
11 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12 "Language-Team: LANGUAGE <LL@li.org>\n"
13@@ -40,30 +40,34 @@
14 "The path must exist prior to running ubuntu-docviewer-app"
15 msgstr ""
16
17-#: ../src/app/qml/common/DetailsPage.qml:25
18+#: ../src/app/qml/common/DetailsPage.qml:26
19 #: ../src/app/qml/loView/LOViewDefaultHeader.qml:107
20 #: ../src/app/qml/pdfView/PdfViewDefaultHeader.qml:83
21 #: ../src/app/qml/textView/TextViewDefaultHeader.qml:69
22 msgid "Details"
23 msgstr ""
24
25-#: ../src/app/qml/common/DetailsPage.qml:36
26+#: ../src/app/qml/common/DetailsPage.qml:42
27+msgid "File"
28+msgstr ""
29+
30+#: ../src/app/qml/common/DetailsPage.qml:47
31 msgid "Location"
32 msgstr ""
33
34-#: ../src/app/qml/common/DetailsPage.qml:41
35+#: ../src/app/qml/common/DetailsPage.qml:52
36 msgid "Size"
37 msgstr ""
38
39-#: ../src/app/qml/common/DetailsPage.qml:46
40+#: ../src/app/qml/common/DetailsPage.qml:57
41 msgid "Created"
42 msgstr ""
43
44-#: ../src/app/qml/common/DetailsPage.qml:51
45+#: ../src/app/qml/common/DetailsPage.qml:62
46 msgid "Last modified"
47 msgstr ""
48
49-#: ../src/app/qml/common/DetailsPage.qml:58
50+#: ../src/app/qml/common/DetailsPage.qml:69
51 msgid "MIME type"
52 msgstr ""
53
54@@ -72,18 +76,18 @@
55 msgstr ""
56
57 #: ../src/app/qml/common/ErrorDialog.qml:26
58-#: ../src/app/qml/common/PickImportedDialog.qml:53
59+#: ../src/app/qml/common/PickImportedDialog.qml:54
60 #: ../src/app/qml/common/RejectedImportDialog.qml:38
61 #: ../src/app/qml/documentPage/DocumentPageSelectionModeHeader.qml:31
62 #: ../src/app/qml/documentPage/SortSettingsDialog.qml:53
63 msgid "Close"
64 msgstr ""
65
66-#: ../src/app/qml/common/PickImportedDialog.qml:28
67+#: ../src/app/qml/common/PickImportedDialog.qml:29
68 msgid "Multiple documents imported"
69 msgstr ""
70
71-#: ../src/app/qml/common/PickImportedDialog.qml:29
72+#: ../src/app/qml/common/PickImportedDialog.qml:30
73 msgid "Choose which one to open:"
74 msgstr ""
75
76@@ -305,7 +309,7 @@
77 msgstr ""
78
79 #: ../src/app/qml/loView/LOViewDefaultHeader.qml:51
80-#: ../src/app/qml/textView/TextView.qml:42
81+#: ../src/app/qml/textView/TextView.qml:43
82 msgid "Loading..."
83 msgstr ""
84
85@@ -362,15 +366,15 @@
86 msgid "GO!"
87 msgstr ""
88
89-#: ../src/app/qml/loView/LOViewPage.qml:128
90+#: ../src/app/qml/loView/LOViewPage.qml:129
91 msgid "LibreOffice binaries not found."
92 msgstr ""
93
94-#: ../src/app/qml/loView/LOViewPage.qml:131
95+#: ../src/app/qml/loView/LOViewPage.qml:132
96 msgid "Error while loading LibreOffice."
97 msgstr ""
98
99-#: ../src/app/qml/loView/LOViewPage.qml:134
100+#: ../src/app/qml/loView/LOViewPage.qml:135
101 msgid ""
102 "Document not loaded.\n"
103 "The requested document may be corrupt or protected by a password."
104@@ -389,7 +393,7 @@
105
106 #. TRANSLATORS: "Contents" refers to the "Table of Contents" of a PDF document.
107 #: ../src/app/qml/pdfView/PdfContentsPage.qml:30
108-#: ../src/app/qml/pdfView/PdfView.qml:37
109+#: ../src/app/qml/pdfView/PdfView.qml:38
110 msgid "Contents"
111 msgstr ""
112
113@@ -399,7 +403,7 @@
114
115 #. TRANSLATORS: the first argument (%1) refers to the page currently shown on the screen,
116 #. while the second one (%2) refers to the total pages count.
117-#: ../src/app/qml/pdfView/PdfView.qml:34
118+#: ../src/app/qml/pdfView/PdfView.qml:35
119 #, qt-format
120 msgid "Page %1 of %2"
121 msgstr ""
122
123=== modified file 'src/app/qml/common/DetailsPage.qml'
124--- src/app/qml/common/DetailsPage.qml 2015-12-26 18:45:32 +0000
125+++ src/app/qml/common/DetailsPage.qml 2015-12-27 12:11:36 +0000
126@@ -16,6 +16,7 @@
127
128 import QtQuick 2.4
129 import Ubuntu.Components 1.3
130+import DocumentViewer 1.0
131
132 import "utils.js" as Utils
133
134@@ -38,8 +39,13 @@
135 anchors.horizontalCenter: parent.horizontalCenter
136
137 SubtitledListItem {
138+ text: i18n.tr("File")
139+ subText: DocumentViewer.getFileNameFromPath(file.path)
140+ }
141+
142+ SubtitledListItem {
143 text: i18n.tr("Location")
144- subText: file.path
145+ subText: DocumentViewer.getCanonicalPath(file.path)
146 }
147
148 SubtitledListItem {
149
150=== modified file 'src/app/qml/common/SubtitledListItem.qml'
151--- src/app/qml/common/SubtitledListItem.qml 2015-10-23 14:00:16 +0000
152+++ src/app/qml/common/SubtitledListItem.qml 2015-12-27 12:11:36 +0000
153@@ -27,8 +27,16 @@
154 ListItemLayout {
155 id: listItemLayout
156
157- title.text: listItemSubtitled.text
158- title.color: UbuntuColors.midAubergine
159- subtitle.text: listItemSubtitled.subText
160+ title {
161+ text: listItemSubtitled.text
162+ color: UbuntuColors.midAubergine
163+ }
164+
165+ subtitle {
166+ text: listItemSubtitled.subText
167+ wrapMode: Text.WrapAtWordBoundaryOrAnywhere
168+ elide: Text.ElideRight
169+ maximumLineCount: 20
170+ }
171 }
172 }
173
174=== modified file 'src/plugin/file-qml-plugin/docviewerutils.cpp'
175--- src/plugin/file-qml-plugin/docviewerutils.cpp 2015-12-26 18:27:13 +0000
176+++ src/plugin/file-qml-plugin/docviewerutils.cpp 2015-12-27 12:11:36 +0000
177@@ -172,3 +172,13 @@
178 {
179 return QFileInfo(filePath).completeBaseName();
180 }
181+
182+QString DocviewerUtils::getFileNameFromPath(const QString &filePath)
183+{
184+ return QFileInfo(filePath).fileName();
185+}
186+
187+QString DocviewerUtils::getCanonicalPath(const QString &filePath)
188+{
189+ return QFileInfo(filePath).canonicalPath();
190+}
191
192=== modified file 'src/plugin/file-qml-plugin/docviewerutils.h'
193--- src/plugin/file-qml-plugin/docviewerutils.h 2015-12-26 18:27:13 +0000
194+++ src/plugin/file-qml-plugin/docviewerutils.h 2015-12-27 12:11:36 +0000
195@@ -38,6 +38,8 @@
196 Q_INVOKABLE static QString checkIfFileAlreadyImported(const QString &filePath, const QStringList &storageLocationList);
197
198 Q_INVOKABLE static QString getFileBaseNameFromPath(const QString &filePath);
199+ Q_INVOKABLE static QString getFileNameFromPath(const QString &filePath);
200+ Q_INVOKABLE static QString getCanonicalPath(const QString &filePath);
201 };
202
203 #endif // DOCVIEWERUTILS_H

Subscribers

People subscribed via source and target branches