This commit ensures that the selector is visible in all location bars
if and only if the Places Panel is hidden. It fixes a regression caused
by commit 6a98d83312.
BUG: 337389
FIXED-IN: 4.14.0
REVIEW: 119238
Instead of always opening a new tab with the home url and closing it again when directory/file urls are passed on,
we now use the given directories/files directly to open new tabs on startup.
Makes the code easier and we can reuse openDirectories/openFiles in future (if needed).
REVIEW: 118966
The signal activeViewUrlChanged in DolphinTabPage is currently unused, but we need it later when
we implement the tab widget and tab bar.
DolphinTabPage has saveState/restoreState which are using a QByteArray instead of the KConfigGroup to
be more generic.
REVIEW: 118964
This commit removes the icon tinting for the selected item in Compact
and Details View, and extends the selection rectangle such that it
includes the icon area as well. The icon tinting can be disturbing, and
having a selection rectangle that only includes the text can look a bit
strange, especially in the Places Panel.
BUG: 304643
REVIEW: 119018
FIXED-IN: 4.14.0
In the Places Panel, there is always exactly one selected item, which is
equal to the current item. Since the selected item is highlighted by
drawing its background in a different color, it is not really necessary
to highlight additionally that it is the current item.
This is achieved by removing the calls to
KItemListWidget::setCurrent(true) from KItemListView. The "current"
information in the widget is only used for deciding if the "current item
highlighting", like an underline in Oxygen, should be drawn.
The motivation for this change is that I have seem some complaints about
the "current item" highlighting, which can be even more distracting with
non-Oxygen styles.
REVIEW: 119019
tabs menu related code from DolphinMainWindow in a new class.
The DolphinRecentTabsMenu remembers the tab configuration if a
tab has been closed.
REVIEW: 118805
When emitting the itemsChanged signal in KFileItemModel::setRoles,
use the changed roles in the argument of the signal.
A warning message which was related to this issue was removed in
7a83252e0d
REVIEW: 118815
The message
"TODO: Emitting itemsChanged() with no information what has changed!"
is not helpful for the user.
The implementation of the TODO will be done in master, see
https://git.reviewboard.kde.org/r/118815/
CCBUG: 336174
This removes the remaining unchecked accesses to the clipboard mime
data after commit 7828b057da. According
to a bug report, it can be a null pointer on Wayland.
BUG: 335053
REVIEW: 118649
By separating the width and height info, we can save some unnecessary
overhead in terms of memory and CPU cycles, and make the calculation of
the height of a row (or the width of a column in Compact View) a bit
simpler.
To achieve this, this patch extends the concept of "logical rows"
(which are actually columns in Compact View) to "logical width" and
"logical height" (which is the actual height and width, respectively, in
Compact View). The distinction between rows/columns and "logical"
rows/columns may be a bit confusing, but the confusion is already in the
current code, and I hope that it will be mitigated a bit by prefixing
the corresponding variables with "logical".
REVIEW: 118454
When opening the URL "man:", there are multiple items with the same
name (for example, _exit is shown twice here). When opening a new tab,
the kioslave reports some items as deleted (I have not quite understood
why). The problem is that it reports some of the duplicate items twice
in the list of deleted items. This confused KFileItemModel and
corrupted the internal data structures, and finally, caused a crash.
The fix is to remove all duplicates from
KItemRangeList::fromSortedContainer(const Container& container).
New unit tests included.
BUG: 335672
REVIEW: 118507
FIXED-IN: 4.13.2
of "m_selectionToggle->contains(pos)" in
KItemListWidget::setHoverPosition(const QPointF& pos).
This wrong check was accidentally introduced by
commit 24326d4473
BUG: 299328
REVIEW: 118320
FIXED-IN: 4.13.2
The old code would watch the free space on a mount point, i.e.,
determine the free space again, in 10-second intervals, only until the
view became invisible once (even if it was invisible only for a very
short moment, i.e., while splitting the view).
This commit ensures that the mount point is watched again as soon as
the corresponding view becomes visible again.
Moreover, the object that watches the free space for a mount point is
shared among all views that show URLs that belong to this mount point.
To achieve this, there is a central cache which can be used to obtain
an existing MountPointObserver for a certain path. If necessary, a new
MountPointObserver is created and added to the cache.
The MountPointObserver is removed from the cache and destroyed only if
no views use it any more, and no new users appear until the next update
(which happens every 10 seconds). This prevents that the free space is
measured repeatedly when changing the current directory on the same
mount point.
Many thanks to Emmanuel Pescosta for the initial ideas to factor out
the "free space" code and to establish a central storage for the
"observer" objects, and for providing many good suggestions how to
improve the code!
BUG: 327708
REVIEW: 118208
FIXED-IN: 4.14.0
If the "Places" are updated outside the current Dolphin process,
PlacesItemModel::updateBookmarks() is called, which invokes
PlacesItem::setBookmark(const KBookmark& bookmark) for each item. This
commit ensures that the correct translation is used for system
bookmarks like "Root", "Network", etc.
Without this patch, all Places entries in the remaining Dolphin windows
would switch to US English if one of multiple windows is closed.
See http://lists.kde.org/?t=139660468400004&r=1&w=2 for details.
BUG: 334999
REVIEW: 118207
FIXED-IN: 4.13.2
Before this patch, KDirLister would continue listing any children of
collapsed folders, even though the children themselves were removed
from the model. This could lead to new items being inserted as
top-level items at some later point, because no parent could be found
for them. This inconsistent model state could lead to a crash later on.
Many thanks to Martin Koller for helping to debug this problem!
BUG: 332102
REVIEW: 118055
FIXED-IN: 4.13.2
Before this patch, any (direct or indirect) children that might have
been in m_pendingItemsToInsert, i.e., that were not inserted into the
model yet because KDirLister had not finished listing the directory
yet, would be added to the model later without a proper parent. This
could cause a crash later on.
CCBUG: 332102
FIXED-IN: 4.13.2
Updating this action is only required if the clipboard contents change,
or if the "is writable" state of the current location changes. In all
other cases, an update of this action should be prevented because it
can be very expensive if many files are in the clipboard.
In particular, the update when the selection changes could make
changing the current item in the view very slow.
BUG: 333903
REVIEW: 117782
FIXED-IN: 4.13.1
In addition to the current long text for previous and next toolbar
buttons ("Activate Previous/Next Tab"), this commit adds shorter icon
texts for them to be used only on the toolbar ("Previous/Next Tab").
BUG: 332629
REVIEW: 117794
FIXED-IN: 4.14.0
Instead of just emitting the slotItemMiddleClicked signal in
PlacesPanel::slotItemContextMenuRequested we now use triggerItem with
Qt::MiddleButton, which does set up the storage first and emit
the slotItemMiddleClicked signal afterwards.
BUG: 311226
FIXED-IN: 4.13.1
REVIEW: 117755
If a range of items has been selected by Shift-clicking or by pressing
Shift+Arrow, then each of them is added individually to the selection
before the items are re-sorted.
Before this commit, the first and the last item in the range were
moved, and all items between them were selected, even though these were
not necessarily the items which had been selected before the
re-sorting.
BUG: 333457
REVIEW: 117603
FIXED-IN: 4.13.1
when multiple tabs are opened. Disable them again
when there is only one remaining tab.
Additionally set the default state to disabled.
BUG: 332628
FIXED-IN: 4.13.1
REVIEW: 117778
In the current version we only call endRetrieval when
beginRetrieval was successfully in UpdateItemStatesThread::run().
This causes some problems with version control plugins (like Dropbox plugin),
which have to do cleanups in endRetrieval.
Now we always call endRetrieval after beginRetrieval when updating the version states.
FIXED-IN: 4.13.1
REVIEW: 117753
Instead of emitting the directoryLoadingCompleted signal (via slotCompleted) in
KFileItemModel::setShowHiddenFiles directly, we now call
dispatchPendingItemsToInsert instead.
@Frank: Thanks for your help!
FIXED-IN: 4.13.1
BUG: 332159
REVIEW: 117021
The icons of items which are "cut" are shown faded in the view. The
"is cut" state of the widget representing an item is updated if the
clipboard contents change. Before this commit, if the sort order was
changed however, then each widget kept the "is cut" state of the item
which had been shown previously at its position.
The solution is to update the "is cut" state also if any of the
widget's data change.
BUG: 332792
REVIEW: 117451
FIXED-IN: 4.12.5
Before this patch, the destructor of KDirectoryContentsCounter might
delete the worker object, which lives in another thread, while one of
its methods was still being executed. This could cause a crash. Only if
the destroyed KDirectoryContentsCounter was the last one, the worker
thread was stopped, and the destructor waited until all workers are
done.
BUG: 332767
FIXED-IN: 4.13.0
REVIEW: 117209