mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-03 07:03:39 +00:00
[#2499|GTKUI] Add key shortcuts for changing queue position
- Ctrl+Alt+[Shift]+{Up|Down}
This commit is contained in:
parent
03ca4cfa46
commit
32d5392776
@ -35,6 +35,11 @@
|
|||||||
torrent's status tab.
|
torrent's status tab.
|
||||||
* #2093: Make torrent opening compatible with all unicode paths.
|
* #2093: Make torrent opening compatible with all unicode paths.
|
||||||
* #1084: Fix magnet association button on Windows
|
* #1084: Fix magnet association button on Windows
|
||||||
|
* Add keyboard shortcuts for changing queue position:
|
||||||
|
- Up: Ctrl+Alt+Up
|
||||||
|
- Down: Ctrl+Alt+Down
|
||||||
|
- Top: Ctrl+Alt+Shift+Up
|
||||||
|
- Bottom: Ctrl+Alt+Shift+Down
|
||||||
|
|
||||||
==== WebUI ====
|
==== WebUI ====
|
||||||
* Server (deluge-web) now daemonizes by default, use -d or --do-not-daemonize to disable.
|
* Server (deluge-web) now daemonizes by default, use -d or --do-not-daemonize to disable.
|
||||||
|
@ -15,7 +15,7 @@ from locale import strcoll
|
|||||||
|
|
||||||
from gobject import TYPE_UINT64, idle_add
|
from gobject import TYPE_UINT64, idle_add
|
||||||
from gtk import ENTRY_ICON_SECONDARY
|
from gtk import ENTRY_ICON_SECONDARY
|
||||||
from gtk.gdk import SHIFT_MASK, keyval_name
|
from gtk.gdk import CONTROL_MASK, MOD1_MASK, SHIFT_MASK, keyval_name
|
||||||
from twisted.internet import reactor
|
from twisted.internet import reactor
|
||||||
|
|
||||||
import deluge.component as component
|
import deluge.component as component
|
||||||
@ -26,6 +26,8 @@ from deluge.ui.gtkui.removetorrentdialog import RemoveTorrentDialog
|
|||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
CTRL_ALT_MASK = CONTROL_MASK | MOD1_MASK
|
||||||
|
|
||||||
|
|
||||||
def str_nocase_sort(model, iter1, iter2, data):
|
def str_nocase_sort(model, iter1, iter2, data):
|
||||||
"""
|
"""
|
||||||
@ -721,6 +723,34 @@ class TorrentView(ListView, component.Component):
|
|||||||
if func:
|
if func:
|
||||||
return func(event)
|
return func(event)
|
||||||
|
|
||||||
|
def keypress_up(self, event):
|
||||||
|
"""Handle any Up arrow keypresses"""
|
||||||
|
log.debug('keypress_up')
|
||||||
|
torrents = self.get_selected_torrents()
|
||||||
|
if not torrents:
|
||||||
|
return
|
||||||
|
|
||||||
|
# Move queue position up with Ctrl+Alt or Ctrl+Alt+Shift
|
||||||
|
if event.get_state() & CTRL_ALT_MASK:
|
||||||
|
if event.get_state() & SHIFT_MASK:
|
||||||
|
client.core.queue_top(torrents)
|
||||||
|
else:
|
||||||
|
client.core.queue_up(torrents)
|
||||||
|
|
||||||
|
def keypress_down(self, event):
|
||||||
|
"""Handle any Down arrow keypresses"""
|
||||||
|
log.debug('keypress_down')
|
||||||
|
torrents = self.get_selected_torrents()
|
||||||
|
if not torrents:
|
||||||
|
return
|
||||||
|
|
||||||
|
# Move queue position down with Ctrl+Alt or Ctrl+Alt+Shift
|
||||||
|
if event.get_state() & CTRL_ALT_MASK:
|
||||||
|
if event.get_state() & SHIFT_MASK:
|
||||||
|
client.core.queue_bottom(torrents)
|
||||||
|
else:
|
||||||
|
client.core.queue_down(torrents)
|
||||||
|
|
||||||
def keypress_delete(self, event):
|
def keypress_delete(self, event):
|
||||||
log.debug('keypress_delete')
|
log.debug('keypress_delete')
|
||||||
torrents = self.get_selected_torrents()
|
torrents = self.get_selected_torrents()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user