Commit graph

194 commits

Author SHA1 Message Date
Frank Reininghaus 487215f0c4 When navigating back/forward in the DolphinPart inside Konqueror, remember
1. the current item,
2. the scroll position of the view, and
3. the expansion state of the details view.

Before 3. can be implemented in Dolphin itself, some changes in
KUrlNavigator are required.

This fix will be in KDE 4.4.

BUG: 193549
BUG: 198073
BUG: 213137

svn path=/trunk/KDE/kdebase/apps/; revision=1049164
2009-11-14 15:51:47 +00:00
Frank Reininghaus 499e8723f4 Do not zoom the icons if the user presses Control and the left mouse
button while using the mouse wheel. The user is probably trying to
scroll the view during a rubberband selection in that case.

Also simplify the code a bit by handling the icon zooming in
DolphinView::eventFilter().

BUG: 190703

svn path=/trunk/KDE/kdebase/apps/; revision=1040021
2009-10-25 10:41:15 +00:00
Peter Penz fda626e074 Fixed minor regression introduced with the column view refactoring: When switching the view mode in a folder showing previews, the previews get lost after switching.
The KFilePreviewGenerator initialized in the ViewExtensionsFactory wants a valid icon size to accept previews. Fixed + Q_ASSERT added to prevent such a mistake in future.

svn path=/trunk/KDE/kdebase/apps/; revision=1022453
2009-09-11 19:50:40 +00:00
Frank Reininghaus e725c334fb Fix selection in the Details view in the following use case:
1. Ctrl-click item 1.
2. Enter the first letter of item 2, such that
   it will be selected and the new current item.
3. Shift-click item 3.

With this commit, all items between 2 and 3 will be selected, as
expected, and not all items between 1 and 3.

BUG: 201459

svn path=/trunk/KDE/kdebase/apps/; revision=1021267
2009-09-08 17:52:52 +00:00
Peter Penz ef68f84a6e Restore "open folders automatically when dragging items above it" (it had been temporary deactivated because of the column view refactoring).
svn path=/trunk/KDE/kdebase/apps/; revision=1017531
2009-08-30 20:49:34 +00:00
Peter Penz 60d28ca5c9 centralize namefilter handling
svn path=/trunk/KDE/kdebase/apps/; revision=1017117
2009-08-29 18:35:57 +00:00
Peter Penz a5473c0cf2 - restore functionality that selections are kept when changing the view mode
- some minor cleanups

svn path=/trunk/KDE/kdebase/apps/; revision=1016955
2009-08-29 12:51:04 +00:00
Peter Penz b1536a4342 move the DolphinFileItemDelegate creation into ViewExtensionsFactory
svn path=/trunk/KDE/kdebase/apps/; revision=1016949
2009-08-29 12:16:02 +00:00
Peter Penz 95f0ba76ae move handling of SelectionManager and AutoScroller to ViewExtensionsFactory
svn path=/trunk/KDE/kdebase/apps/; revision=1016927
2009-08-29 11:36:22 +00:00
Peter Penz 69686ffbba - The view implementations don't need to keep the Extensions Factory as member.
- Created basic documentation for Extensions Factory.

svn path=/trunk/KDE/kdebase/apps/; revision=1016898
2009-08-29 09:51:02 +00:00
Peter Penz c05395ef9a Move code for initializing and handling view extensions to the new class ViewExtensionsFactory. Beside making DolphinView less complex this will allow the column view to share the view extension code instead of (partly) duplicating it as it has been done before.
Currently only the tooltips- and filepreview-handling have been moved into ViewExtensionsFactory, a further cleanup will be done later.

svn path=/trunk/KDE/kdebase/apps/; revision=1016893
2009-08-29 09:42:21 +00:00
Peter Penz e1c74b05fd Restore filtering of items. The DolphinView just tells the controller about the filter, the views (1:1 iconView + detailView, 1:n columnView) connect to the filter-changed signal and apply it to their proxy model.
svn path=/trunk/KDE/kdebase/apps/; revision=1016782
2009-08-28 21:53:18 +00:00
Peter Penz 41c14c5f8e I wanted to this for KDE 4.1 already, but well...
Columview refactoring: Get rid of "isColumnView()" special cases in DolphinView and the interface code duplications due to delegating non-QAbstractItemView interfaces to the column view. This reduces the code size + complexity a lot and will make future maintainance of the columnview and DolphinView a lot easier.

Currently there are some regressions in the column view, but this will be fixed during the next 14 days.

svn path=/trunk/KDE/kdebase/apps/; revision=1016776
2009-08-28 21:04:15 +00:00
Peter Penz dcf397ae51 allow to change the order of columns in the details view
BUG: 164696

svn path=/trunk/KDE/kdebase/apps/; revision=1015987
2009-08-26 18:23:31 +00:00
Peter Penz d84909dc36 * Use the term "version control" instead of "revision control" to be consistent with the naming in kdevplatform.
* Renamed VersionControlPlugin to KVersionControlPlugin so that the interface can be moved out of Dolphin.

svn path=/trunk/KDE/kdebase/apps/; revision=1011058
2009-08-13 20:48:58 +00:00
Peter Penz fa4680cb38 Enable Dolphin to show the revision states of files that are under revision control systems like SVN, Git, CVS, ... The current code is an early draft and it is planned that all plugins (SVN, Git, CVS, ...) are maintained outside Dolphin. If the API is stable enough, a discussion will be done at kfm-devel@kde.org regarding the location of the plugins (the current implementation of SubversionPlugin is only temporary located in Dolphin for testing purposes).
RevisionControlObserver is implemented in a way that no recognizable slowdown is given for directories that are not under revision control.

CCBUG: 192158

svn path=/trunk/KDE/kdebase/apps/; revision=995351
2009-07-12 14:00:45 +00:00
Peter Penz c1a086da25 Fixed issue that the scroll position is reset if the focus of the itemview changes.
BUG: 197951

svn path=/trunk/KDE/kdebase/apps/; revision=989236
2009-06-29 19:32:39 +00:00
Peter Penz 6e74522422 don't clear the selection if a toggle has been pressed
BUG: 181123

svn path=/trunk/KDE/kdebase/apps/; revision=979750
2009-06-10 14:09:14 +00:00
Peter Penz beeb81194c Stupid me: The inconsistent behavior between QListView::scrollTo() and QTreeView::scrollTo() has been fixed in Qt 4.5 :-) I should have tested this _before_ committing the huge patch for bug 185191... So:
* Remove the workaround in DolphinIconsView::scrollTo() to bypass an issue in Qt 4.4 (-> fixed in Qt 4.5)
* Revert the "use the DolphinController"-parts of commit 930754 and just use QAbstractItemView::scrollTo() instead.

CCBUG: 185191

svn path=/trunk/KDE/kdebase/apps/; revision=930777
2009-02-24 08:25:01 +00:00
Peter Penz 7b6ace6466 After renaming an item the view should be scrolled in a way to still have a fully visible renamed item. The implementation required a lot of more code changes as such a fix should require: QAbstractItemView::scrollTo() cannot be used directly (inconsistent default behavior in QListView and QTreeView, a special case for the column view), so the communication has to be done with the DolphinController...
BUG: 185191

svn path=/trunk/KDE/kdebase/apps/; revision=930754
2009-02-24 08:09:35 +00:00
Peter Penz 2f47863c68 - allow the view implementations to attach custom actions to the context menu
- let the "details view" show the "[x] Expandable Folders" action in the context menu

CCMAIL: faure@kde.org

svn path=/trunk/KDE/kdebase/apps/; revision=924867
2009-02-11 20:45:12 +00:00
Shaun Reich 5e20f374e3 SVN_SILENT: Added a comment.
svn path=/trunk/KDE/kdebase/apps/; revision=921970
2009-02-06 02:39:31 +00:00
Peter Penz 6c75649664 Check whether the global single-click/double-click setting has been changed during runtime and assure that the behavior of the view is adjusted.
CCMAIL: predator106@gmail.com
BUG: 175635
BUG: 175280

svn path=/trunk/KDE/kdebase/apps/; revision=920754
2009-02-03 18:40:59 +00:00
Peter Penz 341f8456f0 Allow to enable/disable the "Expandable Folders" setting of the details-view by the context menu of the header.
CCMAIL: faure@kde.org

svn path=/trunk/KDE/kdebase/apps/; revision=919035
2009-01-31 11:36:44 +00:00
Simon Paul St James 5b8a817a73 In rare circumstances (a very narrow viewport is a necessary, but not sufficient, condition) DolphinDetailsView::resizeColumns() is called with an empty model so that sizeHintForColumn(...) returns -1 and so the name column ultimately has width -1. Detect and prevent this.
svn path=/trunk/KDE/kdebase/apps/; revision=915781
2009-01-23 18:55:08 +00:00
Peter Penz 307285e963 Group classes into folders, Dolphin is too big in the meantime for having a flat directory hierarchy. dolphin/src/CMakeLists.txt will be cleaned up later.
svn path=/trunk/KDE/kdebase/apps/; revision=911065
2009-01-14 19:26:23 +00:00
Peter Penz 2872b35f4b Fixed issue that in combination with the "automatically open folders during drag operations" the details view is not drawn correctly in the following case: Drag an item in the icons view to a folder which uses the details view.
Thanks to Simon St. James for the patch!

CCBUG: 178630

svn path=/trunk/KDE/kdebase/apps/; revision=905627
2009-01-04 18:26:43 +00:00
Peter Penz 74f73dd2af SVN_SILENT: minor coding style cleanups
svn path=/trunk/KDE/kdebase/apps/; revision=905620
2009-01-04 18:14:26 +00:00
Simon Paul St James e896fc8e11 contentsPos turned out to be a little broken - it would always return (0,0), except in a very unusual set of circumstances where it returned ... "different" values, causing very odd behaviour with the elastic band :) Remove it.
svn path=/trunk/KDE/kdebase/apps/; revision=904995
2009-01-03 16:00:21 +00:00
Peter Penz 46483d7c08 SVN_SILENT: minor coding style cleanups
svn path=/trunk/KDE/kdebase/apps/; revision=903414
2008-12-30 14:29:58 +00:00
Peter Penz 7fbc814147 only jump automatically to the current index, if the autoscrolling is not active
svn path=/trunk/KDE/kdebase/apps/; revision=896481
2008-12-13 15:39:09 +00:00
Peter Penz d0c97573d4 Especially when using the details view in combination with the split functionality, the size of the name column can get too small. Do an optimized resizing in this case (at least for up to 200 items, otherwise the performance penalty is too big).
svn path=/trunk/KDE/kdebase/apps/; revision=896446
2008-12-13 15:15:04 +00:00
Peter Penz 99271699f3 Handling the key events for autoscrolling in DolphinViewAutoscroller does not work good enough (e. g. when letters are pressed, the current index might change too). Revert to Frank Reininhaus' original patch to fix this issue :-)
CCMAIL: frank78ac@googlemail.com

svn path=/trunk/KDE/kdebase/apps/; revision=896362
2008-12-13 14:08:07 +00:00
Peter Penz 85aec92f81 SVN_SILENT: removed trailing spaces
svn path=/trunk/KDE/kdebase/apps/; revision=895978
2008-12-12 06:55:26 +00:00
Peter Penz b60da9b67a as the detailsview and columnview can also have icon sizes up to 256 x 256 pixels, the steps when using the scrollwheel must be adjusted dynamically
svn path=/trunk/KDE/kdebase/apps/; revision=895825
2008-12-11 20:27:05 +00:00
Peter Penz 53bdec9b58 Fixed serious usability issue: QAbstractItemView::setAutoScroll() is not usable when trying to select items outside the visible view area (reported to Qt Software with bug ID #214542) -> implemented custom auto scrolling algorithm.
BUG: 165531

svn path=/trunk/KDE/kdebase/apps/; revision=893546
2008-12-06 20:06:04 +00:00
Peter Penz dcbf1a1178 Opening a tab with the middle mouse button should always be done with one click, even if double click has been activated.
BUG: 162986

svn path=/trunk/KDE/kdebase/apps/; revision=888007
2008-11-23 12:28:10 +00:00
Peter Penz e54e382a89 * fixed issue that the autoresizing of columns is applied when adding/removing columns
* assure that QTreeView::resizeEvent() is called before applying the autoresizing for having an updated state

BUG: 175603

svn path=/trunk/KDE/kdebase/apps/; revision=886690
2008-11-19 20:52:30 +00:00
Jordi Polo a49fe38e3e typo
svn path=/trunk/KDE/kdebase/apps/; revision=883287
2008-11-12 15:22:25 +00:00
Peter Penz a7838db28e * implement the DragAndDropHelper as singleton derived from QObject, so that emitting of signals is possible
* show an information message in the statusbar, if items are dragged into the same directory

TODO: although the signal seems to get connected correctly, the slot DolphinMainWindow::showInformationMessage() is not invoked when the signal is emitted -> will debug this later, it is important that the new string is added before the message freeze

svn path=/trunk/KDE/kdebase/apps/; revision=881627
2008-11-08 16:22:30 +00:00
Simon Paul St James d5bc6cfa74 If the elastic band ventures beyond the logical top-left of the view (NOTE: not the viewport), then startIndex will likely be invalid, resulting in broken selection behaviour. Prevent this.
CCMAIL: peter.penz@gmx.at

svn path=/trunk/KDE/kdebase/apps/; revision=880585
2008-11-05 21:54:05 +00:00
Peter Penz 4eaced49cd assure that the autoresizing still works in combination with the "automatically expand folders during drag operations" feature
svn path=/trunk/KDE/kdebase/apps/; revision=879152
2008-11-02 14:29:27 +00:00
Pino Toscano 651ebed54b initialise in the correct order
svn path=/trunk/KDE/kdebase/apps/; revision=878498
2008-11-01 12:47:33 +00:00
Simon Paul St James dea4444c4a Be better behaved in the presence of scroll events in the middle of an elastic band selection by storing the last selection elastic band in view (rather than viewport) coordinates.
svn path=/trunk/KDE/kdebase/apps/; revision=878316
2008-10-31 21:45:51 +00:00
Simon Paul St James 76376eb22d Yet more corner cases in commitToggleIndexRange - include them, and refactor to make things a bit more logical.
svn path=/trunk/KDE/kdebase/apps/; revision=877164
2008-10-28 19:47:31 +00:00
Simon Paul St James 6e41855512 If ignoreOldInfo, we should manually clear oldSelectionRect - an obscure bug where it is no longer possible to use rubber band selection(!) occurs otherwise!
svn path=/trunk/KDE/kdebase/apps/; revision=877160
2008-10-28 19:42:40 +00:00
Simon Paul St James 1984e18ad1 Use nameColumnRect rather than duplicating code (change the local variable of the same name to prevent clashes!)
Use KFileItem::text() instead of KFileItem::name() there, too.

svn path=/trunk/KDE/kdebase/apps/; revision=877159
2008-10-28 19:40:51 +00:00
Simon Paul St James a124b15cfe Sometimes, the penultimate item in the bounds would get deselected when it shouldn't - this is because lastIndex is always included in the toggle range, even if it needn't be toggled. Fixed now - hopefully, there are no more "elastic band selection" bugs, now :)
svn path=/trunk/KDE/kdebase/apps/; revision=876724
2008-10-27 21:49:16 +00:00
Simon Paul St James ad647bd0a0 Restore behaviour (I don't have an old version to check against, though!) - if CTRL is pressed when initiating elastic band, respect the item selection at that time while dragging the band.
CCMAIL : peter.penz@gmx.at

svn path=/trunk/KDE/kdebase/apps/; revision=876690
2008-10-27 20:55:54 +00:00
Simon Paul St James 75480d07cd Essential validity check that fell through the cracks when setSelectionRecursive was removed.
svn path=/trunk/KDE/kdebase/apps/; revision=876682
2008-10-27 20:32:29 +00:00