Commit graph

19034 commits

Author SHA1 Message Date
Erik Hahn cd9e50ae4f Files passed as arguments: Ignore unsupported files
With this patch, Dolphin ignores all files passed to it that it can't

Also, archives are now opened inside Dolphin so it can be used as an
archive manager at least for local files. If the user tries to open a
remote archive Dolphin still opens it externally; I have observed that
if it receives one as an argument, it will display a pseudo-folder that
contains only said archive. So having it set as the archive handler is
still broken, but in a less annoying way.

CCBUG: 318683
REVIEW: 113191
FIXED-IN: 4.11.3
2013-10-13 10:48:00 +02:00
Dawit Alemayehu 6f45a12136 Moved all the extension code into dolphinpart_ext.*
REVIEW: 113132
2013-10-12 13:33:42 -04:00
Albert Astals Cid d6f614dc8d Merge remote-tracking branch 'origin/KDE/4.11' 2013-10-10 12:13:28 +02:00
Ömer Fadıl Usta c5b668c8f3 Missing response for "Authentication failure" in kdepasswd
REVIEW: 110108
2013-10-10 12:11:39 +02:00
Emmanuel Pescosta 4873685ebd Use the icon size from KItemListStyleOption for the width and height of the
expansion area instead of KIconLoad::SizeSmall.

BUG: 325543
REVIEW: 113169
FIXED-IN: 4.12
2013-10-09 19:52:53 +02:00
l10n daemon script ea78f8f44a SVN_SILENT made messages (.desktop file) 2013-10-09 06:49:57 +00:00
l10n daemon script cbb2d014d4 SVN_SILENT made messages (.desktop file) 2013-10-09 04:07:56 +00:00
Frank Reininghaus 7327e466af Merge remote-tracking branch 'origin/KDE/4.11' 2013-10-07 09:31:45 +02:00
Frank Reininghaus 84b40da88d Make the code that removes items from KFileItemModel more robust
When we remove items from the model, we called the function
KFileItemModel::removeItems(const KFileItemList&, RemoveItemsBehavior).
This function then looked up the indexes of the items using the hash
m_items. This is wasteful in the situations when the indexes of the
removed items are known in advance (like when an expanded folder is
collapsed in Details View), and it can cause trouble if one item is
contained in the model multiple times (can happen when searching, and a
file both matches the search and is a child of a folder that matches
the search). Even if expanding folders in the search results list might
not be particularly useful most of the time, it makes sense to make the
model more robust to prevent crashes and other unexpected behavior in
such situations.

This patch makes the following changes to achieve that goal:

* Change the argument of removeItems() from KFileItemList to
  KItemRangeList. To make this work, the "look the indexes up in
  m_items" code is moved from that function to slotItemsDeleted(). In
  the other places where removeItems() is called, the indexes are
  calculated directly (which is not more difficult than determining the
  removed items as a KFileItemList, if one considers that we needed the
  function childItems(KFileItem) for that, which is not needed any more
  with this patch).

* Also removeFilteredChildren() takes a KItemRangeList now. Rather than
  putting the parent KFileItems into a QSet for O(1) lookup (which
  prevents O(N^2) worst case behavior for the entire function), it uses
  a QSet<ItemData*> now, which should even be more efficient (hashing a
  pointer is cheaper than hashing a KFileItem/KUrl).

BUG: 324371
BUG: 325359
FIXED-IN: 4.12.0
REVIEW: 113070
2013-10-07 09:26:51 +02:00
Frank Reininghaus 7f8dca1b80 Reload the view if a previously unmounted device is mounted again
The problem was that DolphinViewContainer::setUrl(newUrl) was ignored
if newUrl is equal to the URL which is shown in the view already.

The new approach is to reload the view in that method if it is empty, to
make sure that we do not miss that a previously unmounted device has
been re-mounted.

Thanks to Grigoriadis Grigoris for analyzing the root cause of this
issue!

BUG: 161385
FIXED-IN: 4.11.3
2013-10-07 09:17:48 +02:00
Frank Reininghaus c802f3d2e7 Include "Space" in the keyboard search string
Before this commit, we only added pressed keys to the search string if
they have no other meaning. This means that files containing a Space in
their name could not be searched because Ctrl+Space toggles the
selection state of the current item, and Space alone selects the
current item.

After this commit, Space is added to the search string if

(a) the key press did not have any other effect, i.e., if Ctrl was not
    pressed, and the current item is selected already, and
(b) a keyboard search has been started already (to prevent unexpected
    effects when pressing Space accidentally - I think that it's rather
    uncommon to have files whose names start with a Space - and to make
    the unit test simpler).

I modified the unit test of KItemListController, which did not test
keyboard search yet. This uncovered a small problem in
KItemListController::slotChangeCurrentItem() when NoSelection mode is
used. It's not really relevant for anything that is executed inside
Dolphin, but I still fixed it to make the unit test happy.

BUG: 324479
FIXED-IN: 4.11.3
REVIEW: 113071
2013-10-07 09:09:00 +02:00
Andrea Iacovitti ac823eabbc Merge remote-tracking branch 'origin/KDE/4.11' 2013-10-06 20:49:42 +02:00
Andrea Iacovitti 5d72d41c94 Pressing "reset" button results in a call to KProxyDialog::load(): make
sure showEnvValueCheckBox is unchecked before setting proxy environment
variables in the ui. It could have been previously checked by user.
2013-10-06 20:24:21 +02:00
Dawit Alemayehu 677d43bdb5 Merge remote-tracking branch 'origin/KDE/4.11' 2013-10-06 12:40:34 -04:00
Dawit Alemayehu cd67f0651b Make sure clicking reset works under every circumstance.
BUG: 318412
FIXED-IN: 4.11.3
2013-10-06 12:40:08 -04:00
Dawit Alemayehu 911849ac18 Merge remote-tracking branch 'origin/KDE/4.11' 2013-10-06 11:53:19 -04:00
Andrea Iacovitti 623adc32ca Use the correct variable, instead of the entire QStringList, to fill in
lineedit's text in autoDetectSystemProxy().
When saving for "System Proxy" configuration be sure to write the name
of environment variables and not their values in the configuration file.
Added missing signal connection for mUi.systemProxyRadioButton.
Connect slotChanged() to textEdited() signal, instead of textChanged(),
for systemProxy's lineedits: this avoid to emit changed() when
"Show the value of the envirnment variables" checkbox is clicked.

BUG: 304707
FIXED-IN: 4.11.3
REVIEW: 113129
2013-10-06 15:12:27 +02:00
l10n daemon script b3ce215ca2 SVN_SILENT made messages (.desktop file) 2013-10-06 04:10:57 +00:00
Frank Reininghaus d7446760f7 Save memory and time in KFileItemModel by lazy-loading the "ItemData"
To reduce unnecessary memory comsumption and CPU usage, we only fill the
QHash<QByteArray, QVariant> if the methods data(int) or setData(int) are
called for the corresponding index, or the data is necessary for sorting
the model.

According to my tests, this patch reduces the memory usage when loading
a folder with 100,000 items by 17% in Icons View, and by 26% in Details
View.

REVIEW: 112725
2013-10-02 19:08:39 +02:00
Frank Reininghaus d395680268 Merge remote-tracking branch 'origin/KDE/4.11' 2013-10-01 00:15:04 +02:00
Frank Reininghaus 54ba8cc85b Add unit test for the calculation of "name" groups with expanded items
This prevents a possible regression that would have happened with the
first version of https://git.reviewboard.kde.org/r/112725/

The problem was that isChildItem(int index) would return "false"
incorrectly when the QHash for that item was not initialized yet. The
grouping code would then try to read the "text" from the empty QHash,
which yielded an empty QString, and then accessing the first character
of that string caused a crash.
2013-10-01 00:09:25 +02:00
Emmanuel Pescosta bbbfeb28c5 Show the right version states for expanded items.
BUG: 267171
FIXED-IN: 4.11.3
REVIEW: 112980
2013-09-29 18:08:06 +02:00
Frank Reininghaus befa646f8f Make sure that removeExpandedItems() also removes filtered items
This fixes the problem that filtered child items in Details View may
reappear when switching the view mode and the clearing the filter.

BUG: 325344
REVIEW: 112962
FIXED-IN: 4.11.3
2013-09-29 15:45:14 +02:00
l10n daemon script 5751238b34 SVN_SILENT made messages (.desktop file) 2013-09-27 07:07:49 +00:00
l10n daemon script 9ef355c866 SVN_SILENT made messages (.desktop file) 2013-09-27 04:24:51 +00:00
Frank Reininghaus 7dde35ccb9 Move KItemRange to its own header
Also factor out the code that transforms a sorted list of ints to a
KItemRangeList. This removes some duplicated code from KFileItemModel.

Note that overriding operator<<() in KItemRangeList was necessary
because it's not a typedef for QList<KItemRange>, but a class derived
from that now, and some code fails to compile if the return type of
that function is QList<KItemRange> and not KItemRangeList.

REVIEW: 112728
2013-09-17 00:11:42 +02:00
Frank Reininghaus 161df20e32 Merge remote-tracking branch 'origin/KDE/4.11' 2013-09-14 15:11:17 +02:00
Frank Reininghaus bf2a0d6957 Make preview loading faster when scrolling
KFileItemListView notifies KFileItemModelRolesUpdater of changes of the
visible index range and the icon size with a delay, to prevent that
expensive operations are triggered repeatedly, and that scrolling feels
sluggish because the GUI thread is blocked by icon loading.

This patch ensures that the "long" delay of 300 ms is only used when
the zoom level is changed, and the "short" delay if only the visible
index range has changed.

Thanks to Christoph Feck for helping to analyze this problem!

BUG: 322093
FIXED-IN: 4.11.2
REVIEW: 112580
2013-09-14 14:59:50 +02:00
Kai Uwe Broulik 4c17ce2c3a Remove "Copy text" statusbar contextmenu entry
REVIEW: 112355
2013-09-12 18:45:41 +02:00
Emmanuel Pescosta 6566f757af Fix Bug 311099 - View the underscore when using Ctrl + PagDown
Take the style option vertical/horizontal margin into account
for the calculation of the new scroll offset.

Thanks to Frank for pointing out two other problems with "Page Up/Down" and providing
a better way to fix these problems. :)

BUG: 311099
FIXED-IN: 4.11.2
REVIEW: 112678
2013-09-12 13:58:29 +02:00
Frank Reininghaus 40a51264d1 Merge remote-tracking branch 'origin/KDE/4.11' 2013-09-09 21:43:29 +02:00
Frank Reininghaus be391bdac1 Always sort items correctly when the refreshItems() signal is received
When sorting by, e.g., "Size", and the name is used as a fallback
because there are multiple files with the same size, the refreshItems
signal that is received when a file's name is changed either with the
dialog or outside the current view did not cause the view to be resorted
after commit d70a481180. This patch fixes
it.

BUG: 324713
FIXED-IN: 4.11.2
REVIEW: 112561
2013-09-09 21:38:47 +02:00
Frank Reininghaus 62a8a987ad Merge remote-tracking branch 'origin/KDE/4.11'
The most recent commit from the KDE/4.11 branch (new unit test) had to
be modified slightly due to the changed signal emission when resorting
the model changes only the groups, and not the order of the items
(groupsChaged instead of itemsMoved).
2013-09-09 21:27:22 +02:00
Frank Reininghaus 6a5658d30b Test if the groups are updated correctly when items are refreshed
This unit test will hopefully prevent regressions in the future. It is
the first part of https://git.reviewboard.kde.org/r/112561/.
2013-09-09 21:13:38 +02:00
l10n daemon script 72b26bcce5 SVN_SILENT made messages (.desktop file) 2013-09-09 06:45:58 +00:00
l10n daemon script 8fc86dfcc1 SVN_SILENT made messages (.desktop file) 2013-09-09 04:05:28 +00:00
Burkhard Lück 2cd328e2b7 add info about plugins available in KHTML view only
(cherry picked from commit f9a141b753)
backport to 4.11.2
2013-09-08 10:34:50 +02:00
Frank Reininghaus 4fb9256d06 Make expandedParentsCount() work without accessing the data hash
The idea is that we no longer assume that the "expandedParentsCount"
for each item will be stored in the QHash. It is only accessed for
items which are expanded, and which are not top-level items (i.e.,
which have an expandedParentsCount > 1).

Some unit tests are added to improve the coverage of the affected code.

REVIEW: 112562
2013-09-07 18:06:53 +02:00
Emmanuel Pescosta f78bfeda18 Nothing special, just a little bit of code cleanup in KItemListViewLayouter::doLayout().
Make use of QSizeF::transpose() and simplify the m_itemInfos usage.

REVIEW: 112535
2013-09-05 17:03:04 +02:00
Emmanuel Pescosta 576481d114 Fix Bug 296970 - split view wrong behavior with search tab
Implemented setActive(bool active), isActive() and activated() signal
for DolphinSearchBox - similar to the KUrlNavigator implementation.

BUG: 296970
FIXED-IN: 4.11.2
REVIEW: 112534
2013-09-05 16:22:59 +02:00
l10n daemon script 0f935510ae SVN_SILENT made messages (.desktop file) 2013-09-05 03:56:40 +00:00
Frank Reininghaus a644cf9bb1 Merge remote-tracking branch 'origin/KDE/4.11' 2013-09-04 21:53:08 +02:00
Frank Reininghaus 81a6f33a87 Count the items inside directories in another thread
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
2013-09-04 21:50:16 +02:00
Frank Reininghaus 77fedd4844 Try to avoid calling the model's data method if only "text" is needed
Currently, KStandardItemListWidgetInformant::itemSizeHint() calls the
model's data(int) method for every single item, but the full data is
actually only needed for the size calculation in Compact View. In
Details View, no data is needed at all to determine the size required
for the item, and in Icons View, only the name is needed.

This patch makes it possible for subclasses of
KStandardItemListWidgetInformant to provide an alternative way to
obtain the "text", and implements this in the subclass
KFileItemListWidgetInformant.

The final goal is to achieve that the QHash which contains all data
for a file item is only created if it is really needed, e.g., because
the view needs access to the data for displaying the item on the
screen.

REVIEW: 112253
2013-09-04 21:37:01 +02:00
Bernd Buschinski 43a981481a Fix toplevel bookmarks not showing in toolbar
regression from d1963e23
2013-09-04 16:23:35 +02:00
l10n daemon script d85e92fc8c SVN_SILENT made messages (.desktop file) 2013-09-04 06:42:00 +00:00
Christoph Feck 91a2e523f1 Fix color role of services list
Fixes the color of non-selected items to make them
readable with every color scheme.

BUG: 286459
FIXED-IN: 4.11.2
REVIEW: 112483
2013-09-03 22:05:05 +02:00
Emmanuel Pescosta dd16a11dfd Replaced all KNewFileMenu usages in DolphinPart by DolphinNewFileMenu.
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
2013-08-28 18:46:45 +02:00
Frank Reininghaus a451281a46 Merge remote-tracking branch 'origin/KDE/4.11' 2013-08-25 19:17:25 +02:00
Burkhard Lück d789846014 Babelfish is dead, translation plugin uses google 2013-08-25 17:42:23 +02:00