Skip to content

Commit 3728696

Browse files
committed
Add a back button to the action bar
1 parent 6612912 commit 3728696

File tree

4 files changed

+32
-17
lines changed

4 files changed

+32
-17
lines changed

po/io.papyros.files.pot

+14-10
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: \n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2015-02-20 21:37-0600\n"
11+
"POT-Creation-Date: 2015-02-20 22:12-0600\n"
1212
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1414
"Language-Team: LANGUAGE <[email protected]>\n"
@@ -17,14 +17,22 @@ msgstr ""
1717
"Content-Type: text/plain; charset=CHARSET\n"
1818
"Content-Transfer-Encoding: 8bit\n"
1919

20-
#: ../src/app/qml/backend/FolderModel.qml:142
20+
#: ../build/po/io.papyros.files.desktop.in.in.h:1
21+
#: io.papyros.files.desktop.in.in.h:1
22+
msgid "Files"
23+
msgstr ""
24+
25+
#: ../build/src/app/qml/backend/FolderModel.qml:143
26+
#: ../src/app/qml/backend/FolderModel.qml:143
2127
msgid "Home"
2228
msgstr ""
2329

24-
#: ../src/app/qml/backend/FolderModel.qml:144
30+
#: ../build/src/app/qml/backend/FolderModel.qml:145
31+
#: ../src/app/qml/backend/FolderModel.qml:145
2532
msgid "Device"
2633
msgstr ""
2734

35+
#: ../build/src/app/qml/components/FolderListView.qml:150
2836
#: ../src/app/qml/components/FolderListView.qml:150
2937
msgid "No files"
3038
msgstr ""
@@ -33,15 +41,15 @@ msgstr ""
3341
msgid "path or url may not exist or cannot be read"
3442
msgstr ""
3543

36-
#: ../src/plugin/folderlistmodel/dirmodel.cpp:591
44+
#: ../src/plugin/folderlistmodel/dirmodel.cpp:597
3745
msgid "Rename error"
3846
msgstr ""
3947

40-
#: ../src/plugin/folderlistmodel/dirmodel.cpp:616
48+
#: ../src/plugin/folderlistmodel/dirmodel.cpp:622
4149
msgid "Error creating new folder"
4250
msgstr ""
4351

44-
#: ../src/plugin/folderlistmodel/dirmodel.cpp:1258
52+
#: ../src/plugin/folderlistmodel/dirmodel.cpp:1264
4553
msgid "items"
4654
msgstr ""
4755

@@ -133,7 +141,3 @@ msgstr ""
133141
#: ../src/plugin/folderlistmodel/filesystemaction.cpp:1507
134142
msgid "Could not remove the trash info file"
135143
msgstr ""
136-
137-
#: io.papyros.files.desktop.in.in.h:1
138-
msgid "Files"
139-
msgstr ""

src/app/qml/FolderPage.qml

+10
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,16 @@ Page {
2525
id: folderPage
2626

2727
title: folderModel.title
28+
actionBar.elevation: 0
29+
30+
backAction: Action {
31+
iconName: "navigation/arrow_back"
32+
name: "Back"
33+
enabled: folderModel.canGoBack
34+
visible: true
35+
36+
onTriggered: folderModel.goBack()
37+
}
2838

2939
actions: [
3040
Action {

src/app/qml/backend/FolderModel.qml

+2-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ Object {
2828
property string title: pathTitle(path)
2929
property string folder: pathName(path)
3030

31-
property bool busy: model.awaitingResults
31+
property alias busy: __model.awaitingResults
32+
property alias canGoBack: __model.canGoBack
3233

3334
property bool showHiddenFiles
3435
property string sortingMethod: "Name" // or "Date"

src/app/qml/components/FolderListView.qml

+6-6
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,17 @@ import Material.ListItems 0.1 as ListItem
2424
Item {
2525
id: folderListView
2626

27-
Rectangle {
27+
clip: true
28+
29+
View {
2830
id: header
2931

3032
visible: listView.count > 0
3133

3234
z: 1
33-
color: Theme.backgroundColor
35+
backgroundColor: Theme.backgroundColor
36+
elevation: 1
37+
fullWidth: true
3438

3539
anchors {
3640
left: parent.left
@@ -40,10 +44,6 @@ Item {
4044

4145
height: units.dp(48)
4246

43-
ThinDivider {
44-
anchors.bottom: parent.bottom
45-
}
46-
4747
RowLayout {
4848
anchors {
4949
left: parent.left

0 commit comments

Comments
 (0)