mirror of
https://github.com/transmission/transmission
synced 2025-03-16 08:49:47 +00:00
(trunk qt) #3738 "make file download flag and priority setting settable via the keyboard" -- done.
This commit is contained in:
parent
fcedf6def5
commit
889e2c0ca0
1 changed files with 19 additions and 0 deletions
|
@ -695,6 +695,25 @@ FileTreeView :: eventFilter( QObject * o, QEvent * event )
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// handle using the keyboard to toggle the
|
||||||
|
// wanted/unwanted state or the file priority
|
||||||
|
else if( event->type() == QEvent::KeyPress )
|
||||||
|
{
|
||||||
|
switch( dynamic_cast<QKeyEvent*>(event)->key() )
|
||||||
|
{
|
||||||
|
case Qt::Key_Space:
|
||||||
|
foreach( QModelIndex i, selectionModel()->selectedRows(COL_WANTED) )
|
||||||
|
clicked( i );
|
||||||
|
return false;
|
||||||
|
|
||||||
|
case Qt::Key_Enter:
|
||||||
|
case Qt::Key_Return:
|
||||||
|
foreach( QModelIndex i, selectionModel()->selectedRows(COL_PRIORITY) )
|
||||||
|
clicked( i );
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue