Update the anchor item when items are added or removed
If items are added or removed in the model, not only the
current item, but also the anchor item, which is the
starting point for any selections via Shift+Click or
Shift+Key, needs to be updated.
BUG: 262638
FIXED-IN: 4.8.0
Peter Penz [Tue, 2 Aug 2011 17:47:06 +0000 (19:47 +0200)]
Improve performance for creating previews
The overall time for creating previews is faster the more items
are passed to KIO::previewJob() in parallel instead of passing
e.g. only 100 items once and start several KIO::previewJobs
sequentially.
However in the worst case KIO::previewJob() might
block the application for several seconds if the
MIME-type of the passed KFileItems are unknown and e.g. 10000 items
are forwarded.
So KFileItemModelRolesUpdater will now take care to resolve as many
MIME-types as possible until a timeout is reached and will only pass
those items to KIO::previewJob().
For huge image folders, where the MIME-type can be determined very
fast, this means that the overall time for creating previews will
decrease without blocking the application. For "worst case" directories
where resolving the MIME-type can get very expensive this approach
assures no blocking of the user-interface although the overall time
until all previews are generated might slightly increase.
Peter Penz [Sat, 30 Jul 2011 18:13:09 +0000 (20:13 +0200)]
Merged very early alpha-version of Dolphin 2.0
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.
The commit fff7573ebb910712ad97951bf1762e6a7bb0bdc7 introduced a
regression concerning restoration of saved Dolphin sessions. The
main window numbers which can be passed to KMainWindow::restore()
start with 1, and not with 0.
PreviewSettingsPage: update JPG preview plugin settings if needed
In KDE <= 4.6, the 'jpegrotatedthumbnail' plugin was used to provide
thumbnails for JPG images which are rotated correctly. In KDE 4.7, this
is done by the usual 'jpegthumbnail' plugin if it is configured
accordingly. The update of the settings is done in KFilePreviewGenerator.
However, if Konqueror is run in web browsing mode and the settings dialog
is opened, KFilePreviewGenerator does not have a chance to do the update.
To make sure that the correct plugins are shown in the settings, this
commit adds a plugin update to PreviewSettingsPage.
The old code that just removed the 'jpegrotatedthumbnail' plugin without
enabling the 'jpegthumbnail' plugin is removed.
Burkhard Lück [Mon, 13 Jun 2011 06:26:07 +0000 (08:26 +0200)]
Add missing actions to report bug + switch language to Help menu in dolphin whithout menubar
Using Dolphin in default mode in master/4.7 whithout menubar the user has no actions to report a bug or switch language.
Add these missing actions the Help menu launched from the toolbar button Configure and control Dolphin.
REVIEW: 101597
The timeout for the selectionChanged signal is increased in
DolphinViewTest_AllViewModes::verifySelectedItemsCount().
I hope that this will fix a part of the failures seen in
http://my.cdash.org/testDetails.php?test=6350150&build=196639
1. Fix possible test failure if hidden files are shown initially.
2. Fix possible test failure if a .directory file is created in
the test directory. I think that this fixes the test failure from
http://my.cdash.org/testDetails.php?test=6350151&build=196639
Matthias Fuchs [Wed, 1 Jun 2011 22:56:54 +0000 (00:56 +0200)]
Keeps the selection after showing/hiding hidden files.
Still only files that are shown will be selected, thus selecting hidden files and then hiding hidden files will deselect those.
BUG:177215
REVIEW:101487
Sebastian Trueg [Sat, 28 May 2011 19:23:05 +0000 (21:23 +0200)]
Improved query creation. There is absolutely no point in using a
regular expression in addition to the query created by the query
parser. All it does is majorly slowing down the query execution.
Sebastian Dörner [Wed, 25 May 2011 21:14:14 +0000 (22:14 +0100)]
Don't let hidden terminals prevent unmounting
Previous state: When the terminal is hidden, the cwd is not updated
anymore. If it was on a removable device when hiding, the hidden
terminal might prevent unmounting this device.
This patch fixes that bug by changing the cwd to "/" when hiding the panel.
Fix DolphinView regression in 4.6: Keep renamed items visible
Commit 78669f2a57ecfb547019383deadf4aeac7d20070 introduced a regression
in DolphinView which disabled the automatic scrolling after a rename
operation to keep the renamed item visible. This commit reverts a part
of that change to re-enable the feature.
CCBUG: 273600
FIXED-IN: 4.6.4
(cherry picked from commit 54f34a941f85efa659392a06b14fee86f1420bf5)
Peter Penz [Wed, 20 Apr 2011 18:03:51 +0000 (20:03 +0200)]
Improve usability of Search Panel
If the Search Panel is shown outside the context of the "Find" mode it
will be always enabled and does a global search. Only if the user is in
the "Find" mode and the searching is restricted to the current directory
the Search Panel might get disabled if the current directory is not
indexed. This solves the major usability issue that it was not clear
for the users whether a global or restricted search is done.
Peter Penz [Fri, 15 Apr 2011 18:35:25 +0000 (20:35 +0200)]
Details view: Fix jumping column-widths
If the view has a width where a horizontal scrollbar is required to
show all columns, an endless loop might get triggered that results in a
periodic jumping of the column-widths.
Improve stability of unit tests when running them with Valgrind
I noticed unexpected unit test failures when running the tests with
Valgrind. The reason was that test execution was slowed down a lot,
such that that TestBase::waitForFinishedPathLoading() did not receive
the view's signal within the default timeout of 2 seconds, and that
this failure was not detected in every test -> the tests failed later
on because not all expected items had been loaded yet.
To fix this, I changed two things:
1. Added an assert in TestBase::waitForFinishedPathLoading() that checks
if the signal has been received. Continuing does not make much sense if
that is not the case.
2. Increased the default timeout to 20 seconds. The reason why there is
a finite timeout at all is that I didn't want to waste too much time on
machines where the file kioslave seems to have problems loading a
directory (I've seen corresponding test logs at cdash.org). However, with
the first change I mentioned above, the waiting time is lost only once
(due to the assert) rather than every time a directory is loaded
-> I think that the timeout increase does not lead to an increased waste
of time on such machines.
Peter Penz [Tue, 12 Apr 2011 18:01:31 +0000 (20:01 +0200)]
Let each DolphinMainWindow run in a custom process
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.
When navigating in Dolphin it attempts to keep any open Terminal (F4)
in sync by changing the directory in the shell. It does this by
sending a "^C; cd $DIRECTORY" however shells under FreeBSD treat "^C"
as a literal string and not SIGINT. Fix this by sending SIGINT to the
shell instead of "^C".
It appears Linux does not exhibit this behaviour.
Patch originally written by David Naylor, from the KDE-FreeBSD team.
Verify that the current item and the scroll position of the view do not
change if previews are turned off. Actually, the bug was in
KFilePreviewGenerator, but it's easier to test this here.
Peter Penz [Sun, 10 Apr 2011 16:32:53 +0000 (18:32 +0200)]
Readd KFind shortcut for the Dolphin KPart
When the searching has been integrated into Dolphin the "Find File..."
entry had been removed from the Tools menu. Readd it into the Dolphin
KPart so that it is still available for Konqueror.
Do not reload the DolphinView in the tests' initView() members
Rather than reloading the view after it is initilised, we just wait
until the view emits its finishedPathLoading() signal. This saves some
time when running the tests (at least on my system).
Add function TestBase::waitForFinishedPathLoading()
Many tests have to wait until this signal is received from the
DolphinView, so it is convenient to have a function that wraps
the QTest::kWaitForSignal() call.
This commit changes mainly two things:
1. The functionality related to the handling of temporary files and
folders is moved to a new class TestDir.
2. The setup of a temporary folder and of DolphinView instances is
now done in each unit test function. A benefit of this change is that
there are no unwanted interactions between different unit test functions
any more. Moreover, different test functions could now share a test
folder more easily.
Additionally, the reference arguments of all functions are changed to
pointers for consistency.
Peter Penz [Tue, 29 Mar 2011 16:35:50 +0000 (18:35 +0200)]
Readd the "go home" action
It got accidently lost during the menu-button changes. Also the
clearStatusBar() calls have been removed as this is handled in the
DolphinViewContainer internally since a long time already.
Peter Penz [Sun, 27 Mar 2011 17:27:27 +0000 (19:27 +0200)]
DolphinContextMenu: Show "Show menubar" entry if necessary
If the user has hidden the menubar and the toolbar there is no way to
get back the menu (at least not without knowing the Ctrl+M shortcut).
Show an entry in the context-menu to bring back the menubar.
Peter Penz [Sat, 26 Mar 2011 22:22:21 +0000 (23:22 +0100)]
Provide toolbar-menu when the menubar is hidden
Use a similar default UI like in Rekonq and other browsers: Hide the
menubar and add access to all actions by a button in the toolbar.
Of course it is still possible to show the menubar so that the same UI
is given like before.
Sebastian Dörner [Wed, 23 Mar 2011 23:45:14 +0000 (00:45 +0100)]
Make cursor keys always trigger a statusbar update
When the selection is changed using the cursor keys, the statusbar
should be updated. Until now, this didn't actually happen directly after
an operation ending in a OperationCompletedMessage, because the
OperationCompletedMessage was protected.
This patch changes the behaviour to only protect ErrorMessages in the
ViewContainer. When an OperationCompletedMessage was issued very
recently, it keeps being protected by DolphinStatusbar itself.
Statusbar updates in the ViewContainer are only triggered by
a) user actions (move keyboard focus, enter something in the filter bar)
b) finished filed jobs
In case a), the update is desired, also overriding
OperationCompletedMessages.
In case b), the OperationCompletedMessage issued by the file command is
issues so shortly before the call to updateStatusBar, that the
DolphinStatusBar skips the message anyway (see
DolphinStatusBar::setMessage).
Peter Penz [Tue, 22 Mar 2011 17:43:12 +0000 (18:43 +0100)]
Tooltip improvements
- Use the default style for drawing the tooltip background
- Get rid of the workaround to keep only one KFileMetaDataWidget instance. This is not required anymore as internally in KFileMetaDataWidget a process is used to get the metadata instead of a thread.
Peter Penz [Sat, 12 Mar 2011 17:45:59 +0000 (18:45 +0100)]
Details view optimization
Constructing a KColorScheme object is very expensive because of a number
of tint computations. When scrolling a big list more than 30 % of the
time was spent here. Instead, we can precompute and store the inactive
text color. (see https://git.reviewboard.kde.org/r/100826/)
Peter Penz [Thu, 10 Mar 2011 22:26:16 +0000 (23:26 +0100)]
Hide search-mode buttons in the read-only mode
When a searching has been triggered externally (e.g. by clicking on a tag) the search-mode settings like "From here"... are ignored and should not be shown at all. The current patch is only a quick workaround until a clean layout will be provided for this case.
Peter Penz [Thu, 10 Mar 2011 22:17:55 +0000 (23:17 +0100)]
Add search modes for the Search Panel
The search panel must get a hint whether clicking on the facets should result in searching everywhere or from the current folder. It is not sufficient to check the search-settings of the "Find:"-box, as when the "Find:"-box is invisible there is no hint for the user what kind of searching is done and the setting must be ignored.
Peter Penz [Thu, 10 Mar 2011 18:55:00 +0000 (19:55 +0100)]
Fix some search issues
- Always merge the query from the "Find:"-field with the current facet-query. This assures that the facet-query never gets overwritten if the user changes the "Find:"-field.
- Always trigger a searching if the text of the "Find:"-field has been cleared.
Still a lot of usability issues are left, but this is at least a first step...