Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
mobile Datovka
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
14
Issues
14
List
Boards
Labels
Service Desk
Milestones
Merge Requests
4
Merge Requests
4
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Datovka projects
mobile Datovka
Commits
71525d5c
Commit
71525d5c
authored
May 18, 2017
by
Karel Slaný
Committed by
Martin Straka
Jun 21, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replaced selectedFileName with selectedFileIndex in FileDialogue.
parent
bdcd0728
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
qml/dialogues/FileDialogue.qml
qml/dialogues/FileDialogue.qml
+9
-8
No files found.
qml/dialogues/FileDialogue.qml
View file @
71525d5c
...
...
@@ -33,7 +33,7 @@ Dialog {
focus
:
true
modal
:
true
title
:
""
standardButtons
:
(
selectedFile
Name
!=
""
)
?
(
Dialog
.
Ok
|
Dialog
.
Cancel
)
:
Dialog
.
Cancel
standardButtons
:
(
selectedFile
Index
!=
-
1
)
?
(
Dialog
.
Ok
|
Dialog
.
Cancel
)
:
Dialog
.
Cancel
/* Place the dialogue in the centre. */
x
:
parent
.
width
/
2
-
width
/
2
...
...
@@ -41,7 +41,7 @@ Dialog {
signal
finished
(
string
path
)
property
string
selectedFileName
:
""
property
int
selectedFileIndex
:
-
1
function
raise
()
{
folderModel
.
folder
=
standardLocationUrl
(
InteractionFilesystem
.
DESKTOP_LOCATION
)
...
...
@@ -152,7 +152,7 @@ Dialog {
folder
:
standardLocationUrl
(
InteractionFilesystem
.
DESKTOP_LOCATION
)
onFolderChanged
:
{
selectedFile
Name
=
""
selectedFile
Index
=
-
1
pathField
.
text
=
stripUrlPrefix
(
folder
)
}
}
...
...
@@ -161,7 +161,7 @@ Dialog {
id
:
fileDelegate
Rectangle
{
color
:
(
fileName
==
selectedFileName
)
?
datovkaPalette
.
highlight
:
"
#00000000
"
color
:
(
index
==
selectedFileIndex
)
?
datovkaPalette
.
highlight
:
"
#00000000
"
width
:
childrenRect
.
width
height
:
childrenRect
.
height
...
...
@@ -173,11 +173,12 @@ Dialog {
MouseArea
{
anchors.fill
:
parent
onClicked
:
{
/* Navigate to selected directory. */
if
(
fileIsDir
)
{
/* Navigate to selected directory. */
folderModel
.
folder
=
fileURL
}
else
{
selectedFileName
=
fileName
/* Select file. */
selectedFileIndex
=
index
}
}
}
...
...
@@ -190,8 +191,8 @@ Dialog {
}
onAccepted
:
{
if
(
selectedFile
Name
!=
""
)
{
finished
(
stripUrlPrefix
(
folderModel
.
folder
)
+
"
/
"
+
selectedFileName
)
if
(
selectedFile
Index
!=
-
1
)
{
finished
(
stripUrlPrefix
(
folderModel
.
folder
)
+
"
/
"
+
folderModel
.
get
(
selectedFileIndex
,
"
fileName
"
)
)
}
else
{
finished
(
""
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment