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
If the split-view is used and/or the Folders Panel is activated
it might happen that the "unknown"-icon of an item is shown instead
of the correct icon. The root-cause is that one model might already
have been resolved the MIME-type of a KFileItem while the other
model has not updated the icon yet. As KFileItems are shared the
check whether the MIME-type has been resolved is wrong. As at that
stage it is assured anyhow that the MIME-type is known just
applying the icon-name in any case won't slow down the performance.
The size of the icon boundaries should be as minimal as possible.
The patch for fixing the zooming-issues with the selection resulted
into a minor regression where the icon boundaries might be too large.
This patch remembers the original size of the pixmap to be able
to scale m_iconRect.
- 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
Currently when switching the view-modes an animation of the items
is done, where the position and size is adjusted for the new
view-mode.
Although this might look nice initially I'd consider this as a
kind of animation that is distracting and hence it has been
turned off.
m_lastSetUrlStatJob gets a dangling pointer if we don't have a
Nepomuk URL.
Thanks to Frank Reininghaus for the analysis and the hint!
BUG: 287075
FIXED-IN: 4.8.0
When the selection changes during the Information Panel is
invisible, it still should get applied so that when making the
Information Panel visible again a valid selection is shown.
Thanks to A. Janardhan Reddy for the patch!
(Additionally the obsolete check for an empty selection has
been removed, as this cannot happen anymore with the new view
engine)
BUG: 281452
FIXED-IN: 4.8.0
Dropping items into the Places panel has been temporary deactivated because
of switching to the new view-engine -> reactivate it again
BUG: 204359
FIXED-IN: 4.8.0
The maximum scroll offset must be the maximum y-range of the last
row, not only the maximum of the last item.
Thanks to Frank Reininghaus for analysing the root-cause and
for providing the initial patch!
BUG: 287211
FIXED-IN: 4.8.0
When KFileItems get removed from the model it is temporary possible
that the pending items are still part of the KFileItemModelRolesUpdater
while they have already been removed from the model (this happens
in the context during the signal itemsRemoved() gets emitted).
BUG: 287642
When filtering items it was possible that the current index got
an invalid value which resulted in accessing the URL of a
null-KFileItem.
There is still one (general) open issue in KFileItemModelRolesUpdater
(crash #2) where a KFileItem that is already null gets read.
It is not really related to filtering but can be triggered
quite easy when filtering huge directories with enabled previews.
CCBUG: 287642
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 b583dd6d4d 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.
The filtering of items has not been implemented yet in
the KFileItemModel of the new view-engine. The patch brings back
this functionality again, but some minor issues are open:
- When filtering trees expanded directories should only get
hidden if no child is visible
- Regular expressions are not supported yet (they have not been
supported in Dolphin 1.x but it is now quite simple to implement).
- When filtering previews and removing the filter it might be
possible that the preview is not shown (is most probably an
an already existing bug in KFileItemModelRolesUpdater).
BUG: 287642
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).
When navigating back or forward in history, DolphinView tells the
KFileItemModel about the expanded URLs which should be restored before
the folder is entered. In this case, the algorithm in the new function
KFileItemModel::setExpanded(const QSet<KUrl>&) does not work. To fix
this, the old function
KFileItemModel::restoreExpandedUrls(const QSet<KUrl>&) is restored.
Unit test included.
The KAction instance of the panels is added to the menu instance
now instead of the QDock-actions. It is assured that the state
between the actions gets synchronized. Now it's possible for
the user to apply custom shortcuts and the shortcuts are also
shown in the menu as expected.
CCMAIL: lueck@hube-lueck.de
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.
The new view-engine currently does not support inline-renaming
and because of more important pending issues this cannot be
implemented for the 4.8 release of KDE applications.
The plan for 4.9 is to implement inline-renaming again and
to make it "so good" (tm) that it is always turned on (-> there is
no need anymore for an option to disable it ;-)
CCBUG: 286893
Use a queued connection to prevent that the menu
gets hidden during it is still open. Thanks to
Christoph Feck for the hint!
Frank and I could not reproduce the issue in our
environments even when following the steps from
bug 278366, however Christoph's hint sounds sane
and let's hope it works (leaves a bad gut feeling
to "fix" bugs without being able to verify them).
CCBUG: 286822
CCBUG: 278366
FIXED-IN: 4.7.4
Don't use a custom drawing code for showing the hover-indication
or selection of the text.
- The default style for items is used.
- Merge icon-rectangle and text-rectangle if possible.
- Fix background and minor focus-issues