Add a second Dolphin unit test (for a regression in DolphinDetailsView
which has been fixed recently). This commit also adds a new class
TestHelper which provides some funtionality that most Dolphin unit
tests will need. I hope that this makes implementing additional tests
as easy as possible :-)
Add a first unit test for Dolphin, which verifies that the fix for one
of the problems related to Dolphin's modifications to QTreeView works
as it should.
This is only a small start, but I hope that we can cover at least the
basic functionality of DolphinView, the three item views and possibly
a couple of other classes with a rather stable API soon.
David Faure [Fri, 15 Oct 2010 00:15:13 +0000 (00:15 +0000)]
Enable dropping of raw data, like one could do in KDE3. It's actually working fine with text data for instance,
only image data is still an issue due to bugs in Qt. This will be in KDE 4.6.
CCBUG: 159337
Peter Penz [Wed, 13 Oct 2010 15:25:58 +0000 (15:25 +0000)]
The &-shortcut from another action is not set until the action has been shown at least once. To bypass this issue in the context-menu when pressing SHIFT, the text and &-shortcut is applied manually.
Peter Penz [Sun, 10 Oct 2010 17:11:55 +0000 (17:11 +0000)]
Update the statusbar also during loading the items, not only after the loading has been completed. This fixes the issue that no current item-count is shown when doing a search.
Peter Penz [Sat, 9 Oct 2010 18:46:58 +0000 (18:46 +0000)]
* Increase the column-width automatically in case where the name of the file does not fit into the available width
* When scrolling to the active column, do it with a small delay so that temporary activations of a column don't result in jittering
Peter Penz [Sat, 9 Oct 2010 11:29:45 +0000 (11:29 +0000)]
Use DolphinTreeView as implementation for the columns instead of QListView. This assures a consistent hover- and selection-behavior with the icons-view and details-view.
Peter Penz [Sat, 9 Oct 2010 09:45:56 +0000 (09:45 +0000)]
Move the generic hover- and selection-adjustments from DolphinsDetailsView into the new base class DolphinTreeView.
Background info: QTreeView does not respect the width of a cell for the hover-feedback and the selections. This has been adjusted in DolphinDetailsView already, but the required code for this is quite large. This made it tricky to maintain the really Dolphin-specific parts in DolphinDetailsView.
Peter Penz [Fri, 8 Oct 2010 19:10:53 +0000 (19:10 +0000)]
Move the changing of the cursor-shape from the extensions-factory and the selection-toggle to the selection-manager. Beside simplifying the code this also solves some corner-cases where the shape has not been restored correctly.
Peter Penz [Thu, 7 Oct 2010 18:25:47 +0000 (18:25 +0000)]
Use the actions "new_tab" and "new_window" for the viewport-contextmenu instead of "open_in_new_tab" and "open_in_new_window", as the current selection should get ignored.
Peter Penz [Thu, 7 Oct 2010 18:13:55 +0000 (18:13 +0000)]
Reset the file-item when the viewport is entered and files are selected. Otherwise the information of the file-item will be shown instead of the selection.
Peter Penz [Wed, 6 Oct 2010 14:42:48 +0000 (14:42 +0000)]
Apply the cursor asynchronously. This fixes the issue that a pointing-hand cursor is shown if the selection-toggle and the item are hovered at the same time.
Prevent that icons overlap in Details View when zooming.
The problem was that a maximum size was assigned to KFileItemDelegate
for displaying items without considering that icon zooming may change
the item height.
Peter Penz [Tue, 5 Oct 2010 16:38:00 +0000 (16:38 +0000)]
Fix minor regression resulted by the previous commit: The m_newName-member may only get updated after the OK-button has been pressed, otherwise renaming a single file fails.
Peter Penz [Tue, 5 Oct 2010 16:30:03 +0000 (16:30 +0000)]
- Integrate the patch from Matthias Fuchs from http://reviewboard.kde.org/r/5496 to allow having leading zeros when renaming files: E.g. Using the name "A ###.jpg" results in the filenames "A 001.jpg", "A 002.jpg"... The patch could be simplified a little bit by guaranting only one connective sequence of #'s.
- Move the renaming code into the RenameDialog
David Faure [Mon, 4 Oct 2010 22:55:09 +0000 (22:55 +0000)]
Make executable the Type=Application .desktop files we install,
so that they can be used even from a KDE running in another prefix (http://markmail.org/message/4p3krovtnzwx35zd)
Use KStringHandler::preProcessWrap() when calculating the width of a
file name in DolphinFileItemDelegate. This makes sure that zero width
spaces (which prevent kerning) are added at the same places where
KFileItemDelegate adds them when actually rendering the name. Fixes
the problem that file names are elided and partly replaced by "..."
even though there is enough space for the full name.
Peter Penz [Wed, 22 Sep 2010 20:24:49 +0000 (20:24 +0000)]
If the context-menu is opened for a file shown as search result, offer the actions "Open Parent Folder in New Window" and "Open Parent Folder in New Tab"
Peter Penz [Wed, 22 Sep 2010 19:12:09 +0000 (19:12 +0000)]
Add a small invisible margin to the selection toggle in case the item-height is nearly equal to the toggle-height. This prevents an accidental execution of application in the details-view with the default icon-size.
Peter Penz [Wed, 22 Sep 2010 18:10:45 +0000 (18:10 +0000)]
If 'remember view-properties' is selected, store the .directory files only if the directory is part of the home-path. Otherwise use the mirror in ~/.kde/share/apps/dolphin/view_properties to store the .directory file. This prevents conflicting view-properties if several users have write-access to a common directory.
Peter Penz [Wed, 22 Sep 2010 17:28:26 +0000 (17:28 +0000)]
Fix issue, that the details-view has no size and date column in the following case:
- Use icons-view as default view
- Create a new directory
- Change view-properties of directory to show e.g. the owner
- Switch to the details-view
Peter Penz [Tue, 21 Sep 2010 19:03:04 +0000 (19:03 +0000)]
It was a bad idea to store the enabled additional-information as bit-values: With the current setup only up to 8 additional informations are possible. This restriction is bypassed now:
- Backward compatibility for old .directorry files is provided
- A version-information has been added for possible future changes
- As "side-effect" it also allows to have a details-view with only one column (#238140)
Peter Penz [Tue, 21 Sep 2010 16:18:20 +0000 (16:18 +0000)]
Use K_GLOBAL_STATIC for the previously committed workaround to bypass a X11-issue in combination with KModifierKeyInfo. Thanks to David Faure for the hint.
Peter Penz [Mon, 20 Sep 2010 19:52:40 +0000 (19:52 +0000)]
Workaround for a X11-issue in combination with KModifierKeyInfo: When constructing KModifierKeyInfo in the constructor of the context menu, the user interface might freeze. Thanks to Mark Gaiser for clarifying this with the KModifierKeyInfo maintainer and testing the workaround!
Peter Penz [Fri, 17 Sep 2010 22:23:11 +0000 (22:23 +0000)]
- Fix issue, that the 'Move To Trash'-action or 'Delete'-action from the File menu get invisible
- Use KFileItemListProperties to check whether all selected URLs are local
- Coding style cleanups
Mark Gaiser [Fri, 17 Sep 2010 19:47:01 +0000 (19:47 +0000)]
When you view the context menu of a file/folder and shift is pressed (and the delete action line is not enabled in the settings) then the
"Move to trash (del)" action gets replaced by the "Delete (shift del)" action and replaced back to "Move to trash (del)" when you release
shift.
Peter Penz [Fri, 17 Sep 2010 14:42:57 +0000 (14:42 +0000)]
Show location in window title for non-local URLs. Thanks to Mark Gaiser for the patch and David Faure for the review on http://reviewboard.kde.org/r/5178.
Peter Penz [Sat, 4 Sep 2010 15:31:01 +0000 (15:31 +0000)]
Never ignore the view-properties if "Use common view properties for all folders" has been set, otherwise the view-properties switch when searching files won't work. Originally this flag has been introduced when working with a split view, however I consider the behavior to always respect the view-properties when changing a folder more consistent anyway.
Peter Penz [Sat, 4 Sep 2010 15:14:53 +0000 (15:14 +0000)]
When searching for files, as default view the details view is used showing the path of the search result. The view still can be adjusted by the user of course.
David Faure [Mon, 30 Aug 2010 08:56:19 +0000 (08:56 +0000)]
Move dolphin's statusbar message-label (the one with support for errors and a close button) to libkonq
so that it can be used in konqueror as well. Fix its sizeHint. Reviewed by Peter Penz.
Peter Penz [Fri, 27 Aug 2010 05:26:27 +0000 (05:26 +0000)]
Context-menu cleanups:
- KNewMenu has been deprecated by KNewFileMenu. Reflect this in the names of related Dolphin classes.
- Provide context-sensitive actions also when a context-menu is opened on the viewport
Peter Penz [Thu, 19 Aug 2010 17:30:36 +0000 (17:30 +0000)]
Set the toggle invisible, if a mouse button has been pressed outside the toggle boundaries. This e.g. assures, that the toggle gets invisible during dragging items.
Peter Penz [Thu, 19 Aug 2010 15:01:52 +0000 (15:01 +0000)]
Fix crash in column view because of a dangling pointer to a selection model. Thanks a lot to Frank Reininghaus for finding a way how to reproduce the issue and analyzing the root cause. Keeping the selection model as part of the DolphinView is not required anymore at all, as the restoring of selected items is done by m_selectedItems in the meantime.