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
c83280ba
Commit
c83280ba
authored
Jul 10, 2013
by
Dan Pascu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow Ctrl+Delete/Backspace to hangup sessions because KDE steals Ctrl+Esc
parent
48ffc6ad
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
8 deletions
+12
-8
sessions.py
blink/sessions.py
+12
-8
No files found.
blink/sessions.py
View file @
c83280ba
...
...
@@ -1266,6 +1266,13 @@ class ContextMenuActions(object):
pass
# workaround class because passing context to the QShortcut constructor segfaults (fixed upstreams on 09-Apr-2013) -Dan
class
QShortcut
(
QShortcut
):
def
__init__
(
self
,
key
,
parent
,
member
=
None
,
ambiguousMember
=
None
,
context
=
Qt
.
WindowShortcut
):
super
(
QShortcut
,
self
)
.
__init__
(
key
,
parent
,
member
,
ambiguousMember
)
self
.
setContext
(
context
)
class
SessionListView
(
QListView
):
def
__init__
(
self
,
parent
=
None
):
super
(
SessionListView
,
self
)
.
__init__
(
parent
)
...
...
@@ -1275,14 +1282,11 @@ class SessionListView(QListView):
self
.
dragged_session
=
None
self
.
_pressed_position
=
None
self
.
_pressed_index
=
None
self
.
_hangup_shortcut
=
QShortcut
(
self
)
self
.
_hangup_shortcut
.
setKey
(
'CTRL+ESC'
)
self
.
_hangup_shortcut
.
setContext
(
Qt
.
ApplicationShortcut
)
self
.
_hangup_shortcut
.
activated
.
connect
(
self
.
_SH_HangupShortcutActivated
)
self
.
_hold_shortcut
=
QShortcut
(
self
)
self
.
_hold_shortcut
.
setKey
(
'CTRL+SPACE'
)
self
.
_hold_shortcut
.
setContext
(
Qt
.
ApplicationShortcut
)
self
.
_hold_shortcut
.
activated
.
connect
(
self
.
_SH_HoldShortcutActivated
)
self
.
_hangup_shortcuts
=
[]
self
.
_hangup_shortcuts
.
append
(
QShortcut
(
'Ctrl+Esc'
,
self
,
member
=
self
.
_SH_HangupShortcutActivated
,
context
=
Qt
.
ApplicationShortcut
))
self
.
_hangup_shortcuts
.
append
(
QShortcut
(
'Ctrl+Delete'
,
self
,
member
=
self
.
_SH_HangupShortcutActivated
,
context
=
Qt
.
ApplicationShortcut
))
self
.
_hangup_shortcuts
.
append
(
QShortcut
(
'Ctrl+Backspace'
,
self
,
member
=
self
.
_SH_HangupShortcutActivated
,
context
=
Qt
.
ApplicationShortcut
))
self
.
_hold_shortcut
=
QShortcut
(
'Ctrl+Space'
,
self
,
member
=
self
.
_SH_HoldShortcutActivated
,
context
=
Qt
.
ApplicationShortcut
)
def
setModel
(
self
,
model
):
selection_model
=
self
.
selectionModel
()
or
Null
...
...
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