Since Dolphin 2.0, we have stored the selected items in a QSet<int>,
which is neither space-efficient nor particularly fast when inserting
many items which are in a consecutive range.
This commit replaces the QSet<int> by a new class "KItemSet", which
stores the items in a sorted list of ranges. For each range, we only
store the first index and the length of the range, so we need a lot
less memory for most common selection patterns, and we also save quite
a few CPU cycles in many situations, because adding an item to the
KItemSet will in many cases not need a memory allocation at all, and
it's particularly easy when inserting sorted items into the KItemSet in
a row.
KItemSet contains a minimal subset of QSet's API which makes it
suitable as a drop-in replacement for our needs. It also has iterators,
such that the items can be iterated through easily, also with foreach.
One advantage of KItemSet compared to QSet<int> is that the items are
always iterated through in ascending order.
REVIEW: 113488
This prevents that the GUI freezes if there are many files inside the
directory, or if the access to the directory is slow for some other
reason.
BUG: 318518
REVIEW: 111920
FIXED-IN: 4.12.0
Removed all signal-slot-connections related to DolphinNewFileMenu->errorMessage(QString)
in DolphinMainWindow and DolphinContextMenu and replaced it by a better solution.
Now we make use of the already existing DolphinNewFileMenuObserver singleton class to achieve a better
error handling, because every newly created DolphinContextMenu instance registers himself by DolphinNewFileMenuObserver
and we use this to connect the errorMessage(QString) signal of every DolphinContextMenu instance to the errorMessage(QString)
signal of the DolphinNewFileMenuObserver singleton class.
So we need only one connection from DolphinNewFileMenuObserver to DolphinMainWindow (or to DolphinPart) to
collect all error messages thrown by every DolphinNewFileMenu instance.
REVIEW: 112178
- Updated both the Dolphin KPart and context menu to use the new
DolphinRemoveAction class to manage "Delete/Move to Trash" actions.
See also https://git.reviewboard.kde.org/r/107509/.
REVIEW: 108802
To change the icon size in the Places Panel to, e.g., 60 pixels, add
the following lines to $KDEHOME/share/config/dolphinrc :
[PlacesPanel]
IconSize=60
A value of -1 means that the standard "Small" size should be used
(which has been the default before this commit).
It is planned to add an "Icon Size" submenu to the context menu of the
Places Panel in KDE 4.10, but we cannot do this in the 4.9 branch
because of the string freeze.
FIXED-IN: 4.9.2
BUG: 301959
Follow the suggestion from Vishesh Handa and copy the ResourceWatcher
code from kde-runtime instead of creating a dependency. This will of
course get removed again as soon as Nepomuk's resource watcher will
get a public API.
Related changes:
- Animate changed items for the details-view in case it is not expandable
- Remove the hardcoded "isHidden"-code in KStandardItemListWidget and
allow derived widgets to define themselves what means "hidden" within
their context.
The current code needs a lot of bugfixing, but lets make this in smaller
steps during the next days...
The places-entries for searching revealed some serious issues in
combination with the search-panel. Move the filtering away from
QDockWidget and bring it back below the search-bar.
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.
- 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
- Handle 'Context Menu' settings as part of the services
- Handle 'Version Control' settings as part of the services
- Move the confirmations-settings into own tab
- Use combobox for view-property settings
- A lot of minor spacing cleanups
Metadata like image-size, rating, comments, tags, ... can be shown
now in the view (e.g. as column in the Details mode).
Still open: The rating-information needs to be shown as stars.
In the context of this feature also the following bugs have been
fixed:
- Fix visual glitches in the header of the Details mode
- Improve the minimum column width calculation to respect also
the headling and not only the content
BUG: 296782
FIXED-IN: 4.9.0
If the user changed a column-width in the details-view, up to now
the width got reset when changing a directory or when restarting
Dolphin. Now the column-widths automatically get remembered for each
directory in case if the user has modified the width. The automatic
resizing is still turn on per default. The storing of the custom
column-width can easily be reset by right clicking on the header and
selecting "Automatic Column Widths" from the context-menu.
Some finetuning is still necessary (e.g. the "Adjust View Properties"
dialog currently is not aware about this setting) but this will
be fixed during the next weeks.
BUG: 264434
FIXED-IN: 4.9.0
Now KFileItemModel provides a way to access the available roles
including their translations. Note that the 3 roles "comments",
"rating" and "tags" have not been implemented yet in KFileItemModel
and turning them on does not work currently.
Currently Dolphin is only capable of showing a fixed number of
roles (e.g. name, size, date, owner, ...). Dolphin 2.1 should
support also other roles like rating, tags, comments or other
meta-information of images or audio-files.
To support this the sorting-type and additional-type from
DolphinView has been replaced by a role-type represented as
QByteArray.
The font settings have been ignored currently because of the transition to the new view-engine.
The patch is based on the work of Janardhan Reddy and has been extended by the helper class ViewModeSettings.
BUG: 288395
FIXED-IN: 4.8.0
The following functionality from Dolphin 1.x has
been ported to the new view-engine:
- Allow expanding/collapsing of items
- Automatically select the current item
- Context menu for items
Related improvements to the view-engine:
- Make the expanding/collapsing interface already accessible
in the base classes KItemModelBase and KItemListView. If
no expanding/collapsing is supported at all by derived models
(which is usually the default case) simply not reimplementing
those 3 methods is sufficient and it does not introduce an
additional complexity like in QAbstractItemModel/QModelIndex.
- Automatically handle the expanding/collapsing in KItemListController.
This also includes the key-handling, which is quite special for
expandable items.
- Don't let KItemListView automatically scroll to the current item
if the current item got changed. The automatic scrolling should
only be done if the current item has been changed by the user.
Hence this functionality has been moved to the KItemListController
which currently only triggers the automatic scrolling if the current
item has been changed by the keyboard (we might extend the usecases
later if required).
The folders panel has been adjusted to use the new view-engine.
A lot of things don't work yet, but are mostly minor issues that
should be fixable during the next 10 days.
- Use a custom header for KFileItems
- Cache the groups
- Allow enabling/disabling grouping dynamically
Currently there is a random crash in combination with the
groupheader-recycler, this will be fixed during the next
days.
Currently only a smoothscrolling was provided into the
scroll-direction, but not in case of the details-view where a
horizontal scrollbar might be shown too.
Some minor adjustments of the private KItemListSmoothScroller interface
will be done later...
- Add a DolphinFileItemListWidget that provides icon-overlays
and colored text for the version state (implementation is
missing yet)
- Allow KFileItemListWidget to have custom text colors
- Update interface of VersionControlObserver to work with
KFileItemModel instead of the old model-interface.
This is just a rough draft: The rubberband gets visible and an
automatic scrolling is done if the autoscroll-margins have been
reached. However currently no items get selected yet. Currently
the autoscrolling has a severe bug if the scrollbars are manually
changed before or after a rubberband selection.
Dolphin 2.0 will get a new view-engine with the
following improvements:
- Better performance
- Animated transitions
- No clipped filenames due to dynamic item-sizes
- Grouping support for all view-modes
- Non-rectangular selection areas
- Simplified code for better maintenance
More details will be provided in a blog-entry during
the next days.
Please note that the code is in a very
early alpha-stage and although the most tricky parts
have been implemented already very basic things like
drag and drop or selections have not been pushed yet.
Those things are rather trivial to implement but this
still will take some time.
A possible crash in one Dolphin window should not result in crashing
other Dolphin windows. Beside this it also prevents issues with
modal dialogs or notifications.
BUG: 269950
BUG: 206053
BUG: 196034
FIXED-IN: 4.7.0
Adjust the preview-settings to allow users to configure thumbnail-plugins. For consistency also the service-settings have been adjusted to use the ServiceModel and ServiceItemDelegate.
The filter-panel should be disabled if the current folder is not indexed at all. Also when triggering a "Find" the filter-panel should stay invisible per default when the current folder is not indexed.
CCBUG: 264969
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.
svn path=/trunk/KDE/kdebase/apps/; revision=1188049
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.
svn path=/trunk/KDE/kdebase/apps/; revision=1184152
- 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
BUG: 191938
FIXED-IN: 4.6.0
svn path=/trunk/KDE/kdebase/apps/; revision=1168586
- As additional columns in the details view
- As additional lines in the icons view
- As menu entries in the "Sort By" and "Additional Information" groups
- As popup menu entries in the details view header popup
- As checkable entries in the View Properties dialog
To prevent similar painful transitions in future, the class AdditionalInfoManager has been introduced. All parts in Dolphin that access/show/store additional information, use the AdditionalInfoManager now. If a new information entry will be added in KFileItemDelegate in future, only a small adjustment in AdditionalInfoManager will be required.
Still open currently:
- AdditionalInfoDialog does not use AdditionalInfoManager yet
- DolphinView::Sorting should be replaced by KFileItemDelegate::Information, so that the sorting can also be done in a generic way.
- The data for KFileItemDelegate::PathOrUrl is not determined
The open issues will get fixed during the next days.
Kudos to the brave warriors Sebastian and Frank, that tried to add a new information ;-)
CCMAIL: sebastian@trueg.de
CCMAIL: frank78ac@googlemail.com
svn path=/trunk/KDE/kdebase/apps/; revision=1126410
Most users won't use version control plugins at all and there is no need in wasting memory and performance. A user interface has been added in the "Services" settings for version control plugins. The user interface is only shown, if at least one plugin is available on the system.
svn path=/trunk/KDE/kdebase/apps/; revision=1111101
The ViewModeController offers a defined interface to control view mode implementations like icons view, details view and column view. The DolphinViewController allows those view mode implementations to control the parent DolphinView in a limited way.
svn path=/trunk/KDE/kdebase/apps/; revision=1109228
KNfoTranslator is marked as private class, as it is not clear yet whether it should be used by other classes like KFileMetaInfo.
svn path=/trunk/KDE/kdebase/apps/; revision=1098897
Beside the new translations the fix is based on several other fixes in kdelibs + strigi and cannot be backported to KDE SC 4.4.x.
As soon as the meta data widget has been moved to kdelibs, this meta data information will also be available in the properties dialog.
BUG: 193592
svn path=/trunk/KDE/kdebase/apps/; revision=1096472
- make "search files modified today" work
Thanks to Daniel Winter for the patch!
CCMAIL: dw@danielwinter.de
svn path=/trunk/KDE/kdebase/apps/; revision=1070440
* remember the search options when closing Dolphin, so that the user can adjust his "default search template"
svn path=/trunk/KDE/kdebase/apps/; revision=1052499
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
* Don't terminate the thread that receives the item states when changing a view. Instead let the thread get finished and ignore the result.
svn path=/trunk/KDE/kdebase/apps/; revision=1045674
TODO: fix the existing servicemenus (some install-scripts are broken, some do not provide a simple CLI-interface)
TODO: add support for single-desktop-file-servicemenus (for example the "open as root")
svn path=/trunk/KDE/kdebase/apps/; revision=1045663
dolphin(13505)/kdecore (KLibrary) kde4Factory: The library "/home/kde4peter/kde/lib/kde4/fileviewsvnplugin.so" does not offer a qt_plugin_instance function.
dolphin(13505)/kdecore (KLibrary) kde3Factory: The library "/home/kde4peter/kde/lib/kde4/fileviewsvnplugin.so" does not offer an "init_fileviewsvnplugin" function.
svn path=/trunk/KDE/kdebase/apps/; revision=1044902
Additionally the tooltip uses now KMetaDataWidget instead of using KMetaInfo. This assures that no blocking of the application will occur even if there is a buggy Strigi analyzer that ignores the maximum size-setting and might block the retrieving of the meta data.
BUG: 182941
BUG: 195878
svn path=/trunk/KDE/kdebase/apps/; revision=1044485
So now all adjustments from the review have been adapted to the Dolphin code. After KDE 4.4 has been released some refactoring will be done so that the open topics above are handled in a nice way.
svn path=/trunk/KDE/kdebase/apps/; revision=1041547
Currently the UI works quite well, but the creating of the query string has not been integrated yet.
svn path=/trunk/KDE/kdebase/apps/; revision=1039572
* Postpone the creation of the searchcompleter, until the editor gets focused. This improves the startup time of Dolphin (reading all available tags is an expensive operation).
svn path=/trunk/KDE/kdebase/apps/; revision=1036658
Still open: KServiceTypeTrader::query does not find the "FileViewVersionControlPlugin", I could not find the root cause for this yet (old cache?)
svn path=/trunk/KDE/kdebase/apps/; revision=1022921
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
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
* Renamed VersionControlPlugin to KVersionControlPlugin so that the interface can be moved out of Dolphin.
svn path=/trunk/KDE/kdebase/apps/; revision=1011058
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