┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/kitemlistcontroller.cpp
AgeCommit message (Collapse)Author
2013-10-07Include "Space" in the keyboard search stringFrank Reininghaus
Before this commit, we only added pressed keys to the search string if they have no other meaning. This means that files containing a Space in their name could not be searched because Ctrl+Space toggles the selection state of the current item, and Space alone selects the current item. After this commit, Space is added to the search string if (a) the key press did not have any other effect, i.e., if Ctrl was not pressed, and the current item is selected already, and (b) a keyboard search has been started already (to prevent unexpected effects when pressing Space accidentally - I think that it's rather uncommon to have files whose names start with a Space - and to make the unit test simpler). I modified the unit test of KItemListController, which did not test keyboard search yet. This uncovered a small problem in KItemListController::slotChangeCurrentItem() when NoSelection mode is used. It's not really relevant for anything that is executed inside Dolphin, but I still fixed it to make the unit test happy. BUG: 324479 FIXED-IN: 4.11.3 REVIEW: 113071
2013-06-20Hide the "drop" indicator when an item is not hovered any moreFrank Reininghaus
This fixes the problem that the drop indicator might still be shown after the drag&drop operation in the Places Panel is finished. REVIEW: 111037
2013-05-13Dolphin Places: Make it easier to drag and drop itemsVishesh Handa
When doing a drop, a check is performed to see if it is within x pixels from the top or x pixel from the bottom of the rect. If it is, then the drop is considered a drop between items. This x was fixed to qMax( 4, myStyleOption.padding ) which would generally be 4. This is fine for some cases, but when the rectangle size increases then this 4 pixels is not enough. Hence this 'x' is now being set to 30% of the rectangle height. By default the rectangle height is 20 pixels, so x is now 6 instead of 4 in the default case, which does make it slightly easier. Also, this in-between-items check is only performed when moving from one item to another. This is not good since if you enter the item and the bottom, the indicator is shown, and then as to start moving it up it stops showing, and then it should start showing again as you approach the top edge. Modified the code to run the check on every mouse drag event even if the hovered item has not changed. Both these changes combined make it much easier to drag and drop items. REVIEW: 110342
2013-02-05Apply changes of the KGlobalSettings::singleClick() setting immediatelyAniket Anvit
Fixes a regression introduced by commit 7a364cbf489af25e123d18713523151a3a53f814. Patch reviewed and pushed by Frank Reininghaus. BUG: 313342 FIXED-IN: 4.10.1
2012-10-03Merge branch '4.9'Dawit Alemayehu
2012-09-28Redo the fix for CTRL+Tab not working when using Dolphin's filemanagement partDawit Alemayehu
in Konqueror. The original fix, commit 4f7ed2b, prevents drag and drop from working correctly. CCBUG: 302329 REVIEW: 106569
2012-09-25Fixes Bug 305783 - dragging a file over a directory #c4Emmanuel Pescosta
does not expand the dir => Bug discovered: When you drag a item onto a folder-view-item and then move it away instantly before the autoactivation event is triggered (After 750ms), the folder will be opened anyway. BUG: 305783 REVIEW: 106381 FIXED-IN: 4.9.2 (cherry picked from commit 9ab8bcd6aa3ce5d96ee380d5f22d77c2f0a38881)
2012-09-22Merge branch for accessibilityAmandeep Singh
2012-09-21Merge branch 'KDE/4.9'Luca Beltrame
Conflicts: konq-plugins/dirfilter/dirfilterplugin.cpp konq-plugins/dirfilter/dirfilterplugin.h
2012-09-20Restore old behavior: Navigating by double-clicking in folder panel ↵Emmanuel Pescosta
(Double-Click - show folder content and expand folder) BUG: 295573 REVIEW: 106497 FIXED-IN: 4.9.2
2012-09-19Fixes Bug 293200 - Drag&drop files in dolphin doesnt preserve originEmmanuel Pescosta
Patch 106381 Comment #3: When "Open folders during drag operations" is enabled, two things happen, both in the DolphinView and in the Folders Panel: 1) When hovering a folder that can be expanded (this is the case for folders with sub-folders in the Folders Panel and in the DolphinView if in Details View mode), toggle its "expanded" state. 2) When hovering a folder that can not be expanded (i.e., a folder without sub-folders or any folder in Icons or Compact View), open this folder in the DolphinView via the KItemListController's itemActivated(int) signal. The bug described in bug 293200 comment 3 is that 1) is always wanted, but 2) is not wanted for the Folders Panel. BUG: 293200 FIXED-IN: 4.9.2
2012-09-12Fixes Bug 305783 - dragging a file over a directory #c4Emmanuel Pescosta
does not expand the dir => Bug discovered: When you drag a item onto a folder-view-item and then move it away instantly before the autoactivation event is triggered (After 750ms), the folder will be opened anyway. BUG: 305783 REVIEW: 106381
2012-08-14Minor fixes to accessible interfacesAmandeep Singh
2012-08-14Focus-tracking for widgets in Dolphin View now works.Amandeep Singh
Added the calls to updateAccessibility, for DragDrop & Focus scenarios
2012-07-12Re-implement dropping of files on folders in the Places Panel.Frank Reininghaus
This resolves a regression caused by the Places Panel rewrite. There is a small glitch left when reordering items (dragging below the last or above the first item only shows the drop indicator when first dragging out of the item and then back), but I prefer not to fix this glitch right now because this would require a more intrusive change, and I do not want to risk regressions because is not much time left to fix them before 4.9.0 is released. Thanks to Peter Penz for providing some advice about this issue. BUG: 302557 FIXED-IN: 4.9.0 (cherry picked from commit f4c960025167b7c7e04e1290ac9d9fee03a9b62d)
2012-07-12Re-implement dropping of files on folders in the Places Panel.Frank Reininghaus
This resolves a regression caused by the Places Panel rewrite. There is a small glitch left when reordering items (dragging below the last or above the first item only shows the drop indicator when first dragging out of the item and then back), but I prefer not to fix this glitch right now because this would require a more intrusive change, and I do not want to risk regressions because is not much time left to fix them before 4.9.0 is released. Thanks to Peter Penz for providing some advice about this issue. CCBUG: 302557
2012-06-12Drag-pixmap fixesPeter Penz
- Don't use the selection-tinted icon when dragging a single item - Decrease the vertical gap for the hotspot - Prevent drawing tree-lines when dragging items for the Places Panel CCBUG: 301624
2012-06-03Ctrl+Shift+click should have the same effect as Shift+clickFrank Reininghaus
This makes Dolphin 2.0's behaviour consistent with Dolphin 1.x. BUG: 300788 FIXED-IN: 4.9.0
2012-05-30Improve arrow key navigation in Details View with expanded foldersFrank Reininghaus
If the current folder is collapsed, pressing the left arrow key now moves the focus to the parent folder. CCBUG: 300582 (cherry picked from commit 93daadae28f7e3b5cffd7b713a2a287e4fa62ccd)
2012-05-26Further preperations for drag & drop support in the places panelPeter Penz
2012-05-21Places Panel: Show drop indicatorPeter Penz
The dropping itself has not been implemented yet.
2012-05-18Enable basic drag and drop support for the Places PanelPeter Penz
The dropping has not been implemented yet, however in the context of this step the creating of the drag-pixmap is now forwarded to the item-widgets. This allows creating some optimized dragging-pixmaps e.g. for the details-view, where only the name and icon should be provided as drag-pixmap.
2012-04-30Fix crash when closing Dolphin during generating previewsPeter Penz
BUG: 299108 FIXED-IN: 4.9.0
2012-04-25When the current item is removed, make -1 the current index temporarilyFrank Reininghaus
This fixes two problems: 1. KItemListKeyboardSearchManger can cancel the current search when a new folder is opened (note that this action removes the current item from the view). 2. The view can underline the new current item (which is the item that used to be below the removed item). Note that this did not work before because the view did not receive a currentChanged() signal in this case and therefore did not update the "current item" status of the new current item. CCBUG: 297488 CCBUG: 298782 REVIEW: 104709 (cherry picked from commit 68ce395a192362969783615e50a8004d3029eb7e)
2012-04-25When Esc is pressed, clear the selection and cancel the keyboard searchFrank Reininghaus
This patch restores the Dolphin 1.x behaviour that Esc clears the selection (Dolphin 2.0 did not have an easy way to clear the selection using the keyboard so far). Moreover, Esc now also cancels the current keyboard search. This fixes the problem that the only way to cancel the search is to wait until the timeout has expired. CCBUG: 298742 CCBUG: 297458 (cherry picked from commit d3b1312d3edc615b03fb17c1a5fa62ccb61cdabd)
2012-04-21Prepare view-engine for non-KFileItem usecasePeter Penz
Up to now the view-engine only provided a model-implementation that supports file-items. The view-engine always had been designed to be able to work with any kind of model, so now a KStandardItemModel is available. The plan is to convert the places panel to the new view-engine. It should be no problem to fix this until the feature freeze - in the worst case the places-panel code could be reverted while still keeping the KStandardItemModel changes.
2012-04-11KItemViews: Internal directory restructurationPeter Penz
- Move all private headers from the kitemviews-directory into the 'private' subdirectory. - Get rid of DolphinDirLister and just use a directory-lister internally in KFileItemModel. - Minor interface-cleanups for signals
2012-04-07Fix drag & drop cursor issuePeter Penz
When dragging a file within the same Dolphin window and the Ctrl, Shift or Alt-key is pressed the shape of the cursor was not changed to indicate the copy/move/link-operation. BUG: 293850 FIXED-IN: 4.8.3
2012-03-19Let additional mouse buttons trigger history navigationPeter Penz
Thanks to Sebastian Dörner for the patch! REVIEW: 101335 BUG: 181823 FIXED-IN: 4.9
2012-03-09Prevent endless scrolling of list when dragging itemsPeter Penz
BUG: 295584 FIXED-IN: 4.8.2
2012-02-23Whitespace cleanups and documentation fixesPeter Penz
2012-02-01First version of a unit test for KItemListControllerFrank Reininghaus
At the moment, only key press events are tested, and the current item and selection after the event are verified. Moreover, this commit makes sure that KItemListController::keyPressEvent() really does not select anything if the selection mode is NoSelection. (cherry picked from commit 7457f4868cf0bc83e8a90ce5693292378f3d07c4)
2012-01-31Fix keyboard navigation issue when Home or End are pressedFrank Reininghaus
The problem was that m_keyboardAnchorIndex and m_keyboardAnchorPos were not updated when Home or End are pressed. This causes the following unexpected behavior in Icons View: Press Home, then Right, then Down, then Home, finally Down. One would expect that the first item in the second row is the current item then, but before this commit, it was the second one because the controller still remembered that the second column was active before Home was pressed. (cherry picked from commit 999234a94ae41cfb4f2167d2779b562ebf8127ce)
2012-01-28Assure to mark an item as unhovered on a drag-leave eventPeter Penz
BUG: 292501 FIXED-IN: 4.8.1
2012-01-23Make sure that Control+click toggles the selection stateFrank Reininghaus
This commit fixes a regression caused by the recent commit 9f711b5f2e1d1fd856cd6b033e6adb96f9b46d8a. CCBUG: 292250 (cherry picked from commit 84a9cc4bf6e9decc4c102102c4b04162369eb0fe)
2012-01-18Make PageUp/PageDown work in Dolphin's new view engineFrank Reininghaus
BUG: 288748 FIXED-IN: 4.8.0 REVIEW: 103721 (cherry picked from commit e56a363aa6106477fa1577cb0b1bc2a6389910c8)
2012-01-16If an item is clicked to trigger it, clear the rest of the selectionFrank Reininghaus
Note that the clearing is not done on mouse press, but on mouse release. The reason is that there are situations when multiple items are selected and pressing the mouse on one of them should not clear the selection (e.g., drag and drop of multiple items). BUG: 290854 REVIEW: 103703 FIXED-IN: 4.8.0 (cherry picked from commit 9f711b5f2e1d1fd856cd6b033e6adb96f9b46d8a)
2012-01-12Fix selection issue when expanding a treePeter Penz
The selection anchor must be reset when changing the current item to the root of the tree. BUG: 290832 FIXED-IN: 4.8.0
2012-01-10Fix issue that shift + drag does not move filesPeter Penz
BUG: 291103 FIXED-IN: 4.8.0
2012-01-05Folders Panel: Activate folders on single-clickPeter Penz
Even if double-click is used as default setting, the folders panel should open folders with a single-click. BUG: 289971 FIXED-IN: 4.8.0
2011-12-27Fix issue that dragging pictures/videos to Google-Search/YouTube failsPeter Penz
BUG: 289917 BUG: 278236 FIXED-IN: 4.8.0
2011-12-26Minor cleanup: Rename m_keyboardAnchorXPos to m_keyboardAnchorPosPeter Penz
2011-12-26Fix keyboard issues when groups are enabledPeter Penz
When groups are enabled in Dolphin the key-up and key-down keys did not behave consistent in comparison to traditional views or like done in editors. CCBUG: 261995 CCBUG: 262038
2011-12-23The key "space" should select the current itemPeter Penz
Also in case if only one item is shown the navigation-keys should trigger a selection of the current item. This works now consistent within all view-modes (there have been been behavior differences in Dolphin 1.7 depending on the used mode). BUG: 289589 FIXED-IN: 4.8.0
2011-12-18Hide tooltips when dragging itemsPeter Penz
2011-12-15Start an anchored selection when clicking a selection markerFrank Reininghaus
BUG:200782 FIXED-IN:4.8.0
2011-12-11Scroll the view when the current item has been changedPeter Penz
We need now explicitly to scroll to the item when the current item has been changed, as this is not done automatically in the scope of KItemListView. BUG: 288745 FIXED-IN: 4.8.0
2011-12-07Enable "menu key" functionalityPeter Penz
Bring back the functionality that a context-menu is opened if the "menu key" has been pressed. In opposite to Dolphin 1.7 the context-menu is shown above the selected item and not on the (probably unrelated) mouse position. A new method KItemListView::itemContextRect() has been introduced: The method is now also used as reference for tooltips which fixes the issue that tooltips had a wrong horizontal alignment in the details-view. BUG: 288366 FIXED-IN: 4.8.0
2011-12-06Selection and current item fixesPeter Penz
- Remember selection + current item when switching view-modes - Fix the current item indicator alignment for selections - Set the item as current item when the selection toggle has been clicked
2011-12-04Clear the selection in MousePressEvent() rather than MouseReleaseEvent()Frank Reininghaus
This fixes the problem that clicking an unselected item in order to drag it would result in dragging all previously selected items as well. With this commit, previously selected items are unselected when a new item is clicked. The reason why clearing the selection was moved to MouseReleaseEvent() in commit b583dd6d4d3a03e3af2ec8d370132b84935ff871 was that clicking one of several selected items should not result in unselecting the other items (to make sure that dragging multiple items is possible). However, this can also be assured by just checking in MousePressEvent() if the clicked item has been selected already and not clearing the previous selection in that case. This applies equally to the case that a context menu is requested when several items are selected.