Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vmj-qt
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
vmj-qt
Commits
4d801019
Commit
4d801019
authored
Mar 25, 2014
by
Dan Pascu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow opening outgoing transfers as well
parent
ed7aaf8d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
2 deletions
+17
-2
filetransferwindow.py
blink/filetransferwindow.py
+4
-1
sessions.py
blink/sessions.py
+13
-1
No files found.
blink/filetransferwindow.py
View file @
4d801019
...
...
@@ -83,11 +83,14 @@ class FileTransferWindow(base_class, ui_class):
if
index
.
isValid
():
item
=
index
.
data
(
Qt
.
UserRole
)
if
item
.
ended
:
if
item
.
direction
==
'incoming'
and
item
.
ended
and
not
item
.
failed
:
if
not
item
.
failed
:
menu
.
addAction
(
self
.
actions
.
open_file
)
menu
.
addAction
(
self
.
actions
.
open_file_folder
)
menu
.
addAction
(
self
.
actions
.
remove_entry
)
else
:
if
item
.
direction
==
'outgoing'
:
menu
.
addAction
(
self
.
actions
.
open_file
)
menu
.
addAction
(
self
.
actions
.
open_file_folder
)
menu
.
addAction
(
self
.
actions
.
cancel_transfer
)
menu
.
addSeparator
()
menu
.
addAction
(
self
.
actions
.
open_downloads_folder
)
...
...
blink/sessions.py
View file @
4d801019
...
...
@@ -3931,7 +3931,19 @@ class FileTransferDelegate(QStyledItemDelegate):
def
editorEvent
(
self
,
event
,
model
,
option
,
index
):
if
event
.
type
()
==
QEvent
.
MouseButtonDblClick
and
event
.
button
()
==
Qt
.
LeftButton
and
event
.
modifiers
()
==
Qt
.
NoModifier
:
item
=
index
.
data
(
Qt
.
UserRole
)
if
item
.
direction
==
'incoming'
and
item
.
ended
and
not
item
.
failed
and
os
.
path
.
isfile
(
item
.
filename
):
if
item
.
ended
and
not
item
.
failed
:
QDesktopServices
.
openUrl
(
QUrl
.
fromLocalFile
(
item
.
filename
))
return
True
elif
item
.
direction
==
'outgoing'
and
not
item
.
ended
:
item
=
index
.
data
(
Qt
.
UserRole
)
indicator
=
item
.
widget
.
state_indicator
margin
=
indicator
.
margin
()
indicator_rect
=
indicator
.
contentsRect
()
.
adjusted
(
margin
,
margin
,
-
margin
,
-
margin
)
size
=
min
(
indicator_rect
.
width
(),
indicator_rect
.
height
())
rect
=
QRect
(
0
,
0
,
size
,
size
)
rect
.
moveCenter
(
indicator
.
geometry
()
.
center
())
rect
.
translate
(
option
.
rect
.
topLeft
())
if
not
rect
.
contains
(
event
.
pos
()):
QDesktopServices
.
openUrl
(
QUrl
.
fromLocalFile
(
item
.
filename
))
return
True
elif
event
.
type
()
==
QEvent
.
MouseButtonRelease
and
event
.
button
()
==
Qt
.
LeftButton
and
event
.
modifiers
()
==
Qt
.
NoModifier
:
...
...
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