Commit graph

7 commits

Author SHA1 Message Date
Ivan Sorokin
97d08a5b2f Implement sane behavior of space key in torrent content list. Closes #140.
Definitions:

Selection in QTreeView consist of two things:

   currentIndex -- is a (dotted) cell where user clicked last time. Note
                   that it is a cell
   selectedIndexes -- is a set of cells (blue) of current selection.

Checkboxes in torrent content lists are belong to COL_NAME column.

Problem:

The problem is that spacebar toggled checkbox only in currentIndex
index. This has two consequences:

  1. It is impossible to toggle checkboxes on multiple rows
     simultaneously.
  2. If currentIndex is not in COL_NAME column a space key doesn't work
     at all. This problem is amplifyed by the fact that SelectionBehavior
     is set to SelectRows. So visually it is impossible to tell which
     column does it belong to. For end user it looks like "space doesn't
     work sometimes".

This patch addresses the problem by implementing TorrentContentTreeView
derived from QTreeView and overridding keyPressEvent(QKeyEvent*).

The code of TorrentContentTreeView::keyPressEvent is written under
inspiration from QAbstractItemView::keyPressEvent and
QItemDelegate::editorEvent.
2014-11-16 17:19:04 +03:00
sledgehammer999
fce950b788 Allow to resize the columns in Add New Torrent dialog. Closes #1207 #676 2014-01-02 19:44:23 +02:00
sledgehammer999
17c122e5ad Don't show the progress bar in AddNewTorrent dialog when not necessary. 2013-09-01 16:59:23 +03:00
Nick Tiskov
c8cc727aea Add progress indicator for metadata retrieval 2013-08-28 19:14:52 +04:00
Nick Tiskov
8e7ef66011 Translations fixes
Do not translate strings, which should not be translated
Remove unnecessary/unused strings.
2013-07-03 15:44:30 +04:00
Christophe Dumez
e50ab2639e Remove a translatable strings 2012-07-01 20:29:05 +03:00
Christophe Dumez
c502edf9e1 Brand new torrent addition dialog 2012-05-15 19:57:31 +03:00