Commit graph

6430 commits

Author SHA1 Message Date
Heiko Becker 61b2e2fd5e GIT_SILENT Update Appstream for new release 2021-04-14 17:06:44 +02:00
Heiko Becker 2084814781 GIT_SILENT Update Appstream for new release
(cherry picked from commit 61b2e2fd5e)
2021-04-14 17:06:44 +02:00
Méven Car 46e987d034 Remove dead variable 2021-04-09 07:43:06 +02:00
Laurent Montel e831efc3b2 Not necessary to forward class if we include file 2021-04-08 21:40:59 +02:00
Méven Car 522000ad8d Merge branch 'release/21.04' 2021-04-08 07:09:22 +02:00
Michael Lang ba8158e2fa Add option to hide entire status bar 2021-04-07 09:05:51 +00:00
David Faure 2200e3c06d Fix deprecated method calls when using KIO >= 5.82 2021-04-06 15:12:20 +02:00
Méven Car 0429e5330e KFileItemModel: DetailsModeSettings::directorySizeCount forces m_sortDirsFirst
Before this patch when !m_sortDirsFirst and DetailsModeSettings::directorySizeCount() == true, the ordering of folders before files would be affected by the sortOrder. I.e descending order would put the folders after the files.
2021-04-05 14:27:47 +02:00
Martin T. H. Sandsmark f334a736b9 Check the version of the plugins before trying to load them 2021-04-05 10:38:48 +00:00
Tobias Fella 30371aedc8 Port the VCS plugin system to KPluginLoader
The loader looks for the plugins in ${QT_PLUGIN_PATH}/dolphin/vcs.
The old method of loading the plugins is kept around for now, to support
external, legacy plugins.
2021-04-05 10:37:28 +00:00
Elvis Angelaccio d97782809a appstream: fix homepage url 2021-04-05 11:02:18 +02:00
Elvis Angelaccio c0e3a5afb2 appstream: fix homepage url 2021-04-05 11:01:37 +02:00
l10n daemon script b1ae7860ac GIT_SILENT made messages (after extraction) 2021-04-01 01:40:02 +00:00
l10n daemon script 69881f93b6 GIT_SILENT made messages (after extraction) 2021-04-01 00:20:15 +00:00
Nate Graham 5c3e9ac90f Merge branch 'release/21.04' 2021-03-31 10:17:58 -06:00
Nate Graham b9139c5e1c Fix crash calling openDirectories() in various cases
This can cause a crash when called with a single url and split view, or
when the last URL is not shown, because the iterator gets mutated in
the loop, so we need to make sure it hasn't gone out of bounds. This
check was erroneously removed in 1755380208
and needs to be brought back.
2021-03-31 09:19:33 -06:00
Nicolas Fella 9e8e58147e Port away from KInit
KInit is planned to go away

https://phabricator.kde.org/T14298
2021-03-28 17:11:36 +02:00
l10n daemon script 38e83eacf8 GIT_SILENT made messages (after extraction) 2021-03-28 08:45:07 +02:00
Nate Graham 6f134975ae Merge branch 'release/21.04' 2021-03-27 13:04:05 -06:00
Nate Graham 1755380208 Don't re-open already-open URLs when using session-restore feature
If Dolphin would be asked to open a location that is already open, don't
open it again in a new tab; instead switch to that view. Supports tabs
and split view.

BUG: 434911
FIXED-IN: 21.04
2021-03-26 19:38:47 -06:00
l10n daemon script fc2624960a GIT_SILENT made messages (after extraction) 2021-03-16 03:29:56 +01:00
Nate Graham a32373e587 Allow selecting filename in information panel
BUG: 434329
FIXED-IN: 21.04
2021-03-15 09:43:46 -06:00
l10n daemon script 8988fc01d0 GIT_SILENT made messages (after extraction) 2021-03-15 09:34:17 +01:00
Elvis Angelaccio ffb80cb00d Enable test mode in all test 2021-03-13 17:18:53 +01:00
Méven Car ae429d1674 KFileModel: Let Sort dir first affect size sorting
BUG: 433207
2021-03-07 22:45:09 +00:00
Laurent Montel a440ff1acb Remove not implement methods 2021-03-07 20:41:15 +01:00
l10n daemon script 35ec23ac1b GIT_SILENT made messages (after extraction) 2021-02-25 02:45:20 +01:00
Heiko Becker ae1aeadef7 GIT_SILENT Update Appstream for new release
(cherry picked from commit 7fbe747427)
2021-02-25 00:12:43 +01:00
Méven Car 5e5f236d00 KFileItemModelRolesUpdater: Avoid refreshing items when we receive their content count
It concerns the detail view.

It can cause multiple preview to be generated for the same file.
This is visible for directories whose icons use a random value for their inner files thumbnails.

Only the view needs to be updated for this model change.
2021-02-20 18:37:00 +00:00
David Lerch 0811bf4a2b Use only enabled preview plugins in InformationPanelContent and ToolTipManager. 2021-02-19 23:07:54 +01:00
Alexander Lohnau d691aa96f2 Do not run benchmark test automatically
Same reasoning as https://invent.kde.org/frameworks/kio/-/merge_requests/301 and
the commit series.
2021-02-18 20:08:05 +00:00
Stefan Brüns ba041233e8 Apply 1 suggestion(s) to 1 file(s) 2021-02-17 15:21:41 +00:00
Stefan Brüns 492cfb73a3 [FileItemRolesUpdater] Use STL-style iterator instead of iterating a copy
QSet<T>::erase(it) is the save way of erasing from a QSet while iterating
it. This saves creating a copy of the QSet, lookup of a node by value in
`QSet<T>::remove(item)`, and repeated rehashing caused by `remove`.
2021-02-15 17:40:17 +01:00
Stefan Brüns 7c0b5c08cc [FileItemRolesUpdater] Reserve space in two temporary lists
Reserve sufficient space to avoid reallocation later. Overallocating
actually requires less memory than growing and copying it, and it
is freed immediately after anyway.
2021-02-15 17:34:01 +01:00
Stefan Brüns 68704c2a28 [FileItemRolesUpdater] Fix reservation size
The code below always adds the visible range, up to 5 pages before and
after the visible range (each capped to ResolveAllItemsLimit/2) and
the very first and last page (each up to m_maximumVisibleItems).

Use this number to avoid growing the list later.
2021-02-15 17:24:15 +01:00
Stefan Brüns b4676b71c6 [FileItemRolesUpdater] Fix calculation of requested indexes
In case the last and/or first page (a page being n=m_maximumVisibleItems
items) overlapped the already inserted items, one item for each range
would be inserted a second time, e.g. for the first page and last page:

`beginExtendedVisibleRange == 0` => `endFirstPage := 0` => `0 <= 0` is
inserted again.

`count == 100; endExtendedVisibleRange == 99; m_maximumVisibleItems == 20`
=> `beginLastPage := 99` => `99 < 100` is inserted again.
2021-02-15 17:24:01 +01:00
Kai Uwe Broulik b351afb9e1 [Status Bar] Hide zoomLabel also in menu handler 2021-02-14 23:07:46 +00:00
Méven Car 61a4ae4d3f Remove a missing emit KEYWORD
NO_CHANGELOG
2021-02-14 15:21:22 +01:00
l10n daemon script 39f5f1b530 GIT_SILENT made messages (after extraction) 2021-02-11 03:02:42 +01:00
Nicolas Fella 7c48344d0e Port away from deprecated KToolInvocation::invokeTerminal 2021-02-10 23:08:06 +00:00
Felix Ernst 998d71e5a7 Remove item move animation on view resize
This commit removes an animation that happens when the view is
resized. Before this commit, whenever the geometry of the view
changed, the items in the view drifted towards their new position
in the layout after a 300 ms delay. It would look like the items
are slow to find their position.

This commit simply moves them to their new position in an instant
which will abort any ongoing move animations.
2021-02-10 15:16:42 +01:00
Nicolas Fella f65b0899c3 Build with QT_NO_KEYWORDS 2021-02-09 20:39:50 +00:00
Nicolas Fella 3184c2707f Port to QRecursiveMutex
QMutex::Recursive is deprecated
2021-02-09 00:54:45 +01:00
Nicolas Fella b68abb7d27 Add missing includes 2021-02-09 00:40:54 +01:00
Ahmad Samir dd9405bf2f Port away from deprecated KIO signals
Use KDirLister::listingDirCompleted(const QUrl &) instead of
completed(const QUrl &).
2021-02-08 21:38:34 +00:00
Felix Ernst a825e1bd74 Avoid KJob::exec() in DolphinView
This commit replaces an error-prone usage of KIO::StatJob::exec() in
DolphinView with the recommended KIO::StatJob::start().

The containing method DolphinView::statusBarText() is changed to be a
method without return value: requestStatusBarText()
The new status bar text is instead returned through a new
setStatusBarText() signal that will be emitted asynchronously if
necessary.

The calling code that deals with status bar text is refactored to
correctly work despite the new asynchronicity. The helper method
calculateItemCount() is moved into requestStatusBarText() and some
other code from requestStatusBarText() is moved into a new helper
method emitStatusBarText().

The documentation of KIO::KJob::exec() explains why it should be
avoided. A reproducible crash is the reason for this commit.
2021-02-08 21:32:10 +00:00
l10n daemon script 7eae6bba5f GIT_SILENT made messages (after extraction) 2021-02-08 02:48:28 +01:00
Heiko Becker 24f04d75e1 GIT_SILENT Update Appstream for new release
(cherry picked from commit 0f6b39d0cd)
2021-01-29 21:04:28 +01:00
Nate Graham c161b895ff Merge branch 'release/20.12' 2021-01-25 10:25:51 -07:00
Harald Sitter 5ed12ed44a don't crash when building without baloo
show_information_panel is only created when building with baloo. only
access it when built with baloo, otherwise always report the panel as
off.

this fixes a nullptr deref because action() would return a nullptr since
show_information_panel isn't a thing in all build configurations

(full disclosure: I can't reproduce the crash, nor did I build without
baloo)

BUG: 431730
2021-01-25 10:12:53 +01:00
Nate Graham be73a01f48 Make zoom slider and free space bar a little smaller by default
This makes more room for the new explanatory label for the zoom slider.
The zoom slider in particular was huge, and probably would have stood to
be reduced in width anyway even if we didn't add an explanaory label.
2021-01-23 23:15:56 +00:00
Nate Graham 0ba739c47e Add explanatory label to status bar's icon size slider
Right now the slider has no label. Let's add one so it's clear what it
does.

BUG: 429255
FIXED-IN: 21.04
2021-01-23 23:15:56 +00:00
Laurent Montel 8236e95c76 Autogenerate categories file 2021-01-23 09:23:41 +01:00
l10n daemon script aac6a5245f SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2021-01-21 07:07:06 +01:00
Norbert Preining 33270dd442 Show button to open knetattach inline with URL nav on remove:// view
This is a backport of b1cadeba93

  From b1cadeba93 Mon Sep 17 00:00:00 2001
  From: Nate Graham <nate@kde.org>
  Date: Tue, 15 Dec 2020 23:03:00 -0700
  Subject: [PATCH] Show button to open knetattach inline with URL nav on
   Remote:// view

  In conjunction with
  https://invent.kde.org/frameworks/kio/-/merge_requests/260,
  the net result is to hide the knetattach launcher in the view, and show
  it inline with Dolphin's URL navigator toolbar when viewing the
  remote:// view, just like how we add an "Empty Trash" button when
  viewing trash://.

The backport ensures that even with frameworks << 5.78 only one network
button is shown.

BUG: 431626
2021-01-19 07:48:36 +09:00
l10n daemon script 25bfe6149e GIT_SILENT made messages (after extraction) 2021-01-18 03:04:46 +01:00
Kai Uwe Broulik 2e79e21c3f [DolphinView] Fix "Folder is empty" label showing prematurely
Don't show the label while still loading. Since there is no property in
`KDirLister` a dedicated `m_loading` is added for this purpose.

Also, I removed the explicit update on `urlChanged` as the view
probably won't change until the lister starts loading.

BUG: 430085
2021-01-17 13:32:56 +00:00
l10n daemon script 6945a54004 GIT_SILENT made messages (after extraction) 2021-01-17 02:49:13 +01:00
Elvis Angelaccio de8ea90ca7 Merge branch 'release/20.12' 2021-01-16 19:28:59 +01:00
Ilia Kats a6d095fa04 fix folder size calculation on FUSE and network file systems
KFileItem::isSlow uses hardcoded logic that returns true if the
filesystem is Smb or Nfs. However,
KFileSystemType::determineFileSystemTypeImpl on Linux returns Nfs also
if the file system in question is a FUSE file system, which includes
NTFS, sshfs, and others.

BUG: 430778
BUG: 431106
2021-01-16 19:20:11 +01:00
The Imp 764861af51 Change copy location shortcut in dolphin so as to not conflict with Konsole panel
BUG: 426461
FIXED-IN: 20.12.2
2021-01-16 19:15:20 +01:00
Ilia Kats 3b4dae3556 fix folder size calculation on FUSE and network file systems
KFileItem::isSlow uses hardcoded logic that returns true if the
filesystem is Smb or Nfs. However,
KFileSystemType::determineFileSystemTypeImpl on Linux returns Nfs also
if the file system in question is a FUSE file system, which includes
NTFS, sshfs, and others.

BUG: 430778
BUG: 431106
2021-01-15 20:41:24 +00:00
Antonio Rojas 4683c03be6 Don't show "Add network folder" button if knetattach is not available
knetattach is part of plasma-desktop, so it doesn't necessarily have to be installed.
In that case, instead of showing a button that doesn't do anything, don't show it at all.
2021-01-15 18:02:03 +01:00
l10n daemon script 9fde9035a8 GIT_SILENT made messages (after extraction) 2021-01-15 02:57:54 +01:00
l10n daemon script 9b55f5d0f9 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2021-01-14 07:07:18 +01:00
l10n daemon script 138c5017d9 GIT_SILENT made messages (after extraction) 2021-01-12 02:59:22 +01:00
Stefan Brüns cade3eb302 [BalooRolesProvider] Use Property IDs instead of string matching
Instantiating KFileMetaDataInfo for each file and property, even when
the role is not used, is somewhat expensive and unnecessary. Use the
numeric Property ID to map it to a role, and only instantiate the used
PropertyInfo's.

Remove the properties provided by KFM::UserMetaData from the map, as
these will newer match.
2021-01-11 12:28:38 +01:00
Stefan Brüns dcdf4b01c8 [BalooRolesProvider] Reduce number of XAttr reads
Typically most of the extended attributes are not set for a file. Instead
of trying to fetch each attribute individually check which attributes
exist first.
2021-01-11 12:28:38 +01:00
Stefan Brüns fa60438376 [BalooRolesProvider] Remove explicit default constructor calls 2021-01-11 12:28:38 +01:00
Stefan Brüns 7d716fd9bd [BalooRolesProvider] Remove unused roleForProperty method 2021-01-11 12:28:38 +01:00
Stefan Brüns 09b6c99325 [BalooRolesProvider] Simplify single tag case
When the list contains just one value, return it instead of trying to
sort the list with a QCollator.
2021-01-11 12:28:33 +01:00
Stefan Brüns 34f74e4226 [BalooRolesProvider] Move static tagsFromValues to anonymous namespace 2021-01-11 12:27:11 +01:00
Stefan Brüns 4c31ec3789 [BalooRolesProvider] Remove unused includes 2021-01-11 12:27:11 +01:00
l10n daemon script a344998ae9 GIT_SILENT made messages (after extraction) 2021-01-11 02:57:22 +01:00
Anthony Fieroni a73e81bf6a Open new tab placement option
Signed-off-by: Anthony Fieroni <bvbfan@abv.bg>
2021-01-10 21:54:45 +00:00
Kai Uwe Broulik eb4b0fb480 Emit "itemMiddleClicked" when Ctrl-clicking a view in single selection mode
When Ctrl can't cause a change in selection, so instead emit `itemMiddleClicked`.
This way one can Ctrl-click a Place or folder in Folders panel to open it in
a new tab, similar to what web browsers.
2021-01-10 10:50:41 +01:00
l10n daemon script 6dd67f6f63 GIT_SILENT made messages (after extraction) 2021-01-10 02:57:47 +01:00
Nate Graham b1cadeba93 Show button to open knetattach inline with URL nav on Remote:// view
In conjunction with
https://invent.kde.org/frameworks/kio/-/merge_requests/260,
the net result is to hide the knetattach launcher in the view, and show
it inline with Dolphin's URL navigator toolbar when viewing the
remote:// view, just like how we add an "Empty Trash" button when
viewing trash://.

CCBUG: 430211
2021-01-09 18:32:52 +00:00
l10n daemon script e9f5525696 GIT_SILENT made messages (after extraction) 2021-01-09 02:59:47 +01:00
l10n daemon script d05d8efcf7 GIT_SILENT made messages (after extraction) 2021-01-08 03:00:30 +01:00
Felix Ernst 0cee94ce82 Fix location bar being wrongly aligned on first startup
When starting Dolphin the very first time, the spacing in front of the
location bar is wrong. This commit fixes this by completely updating
all cached geometry every time adjustSpacing() is called. Because this
happens once on a timer 100 ms after every url change, it will happen
once shortly after the window is shown. At that point all geometry is
where it should be and spacing calculation works as expected.

The ViewContainer geometry retrieval is refactored into a small nested
helper class in DolphinNavigatorsWidgetAction by the name
ViewGeometriesHelper.

Previously the logic of that class was divided between DolphinTabPage
and DolphinNavigatorsWidgetAction.

BUG: 429447
FIXED-IN: 21.04.0
2021-01-06 01:38:45 +00:00
Martin T. H. Sandsmark a993a5979d fix crashing on launch 2021-01-05 17:08:17 +00:00
l10n daemon script 49e8b67b71 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2021-01-05 06:38:36 +01:00
l10n daemon script 8c4d4b9a12 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2021-01-04 06:42:11 +01:00
Elvis Angelaccio f8d1b494db Revert "ContextMenu: Allow plugins submenus to react to Shift modifiers"
This reverts commit ce3c243525.

The apidox of setParentWidget says:

    Set the parent widget for any dialogs being shown.
    This should normally be your mainwindow, not a popup menu, so that it still exists even after the popup is closed
    (e.g. error message from KRun) and so that QAction::setStatusTip can find a statusbar, too.

CCBUG: 425997
2021-01-02 19:22:10 +01:00
Felix Ernst f01a61b76c Animate split view mode toggling
Have the secondary ViewContainer slide into/out of view when split view mode is switched on or off by the user.

This should help users understand what split view mode is about. Without the animation it might seem like the only thing the button does is creating a weird vertical line in the middle of the view or something. With the animation it should be clear that the second view is a separate entity that was added. The closing animation will help users understand which of the ViewContainers was just closed.
2021-01-02 17:48:52 +00:00
Christoph Feck 35104c052f GIT_SILENT Update Appstream for new release 2021-01-02 14:42:54 +01:00
Christoph Feck d3c5bb6e9b GIT_SILENT Update Appstream for new release
(cherry picked from commit 35104c052f)
2021-01-02 14:42:54 +01:00
l10n daemon script 65ad995a8e GIT_SILENT made messages (after extraction) 2021-01-02 09:05:17 +01:00
l10n daemon script 4fc0e0da33 GIT_SILENT made messages (after extraction) 2021-01-02 02:46:01 +01:00
l10n daemon script 030e7857c2 GIT_SILENT made messages (after extraction) 2021-01-01 02:49:09 +01:00
l10n daemon script fc56fb60c1 GIT_SILENT made messages (after extraction) 2020-12-31 08:27:23 +01:00
Piotr Henryk Dabrowski a19469d83d use 'compass' instead of 'bookmarks' icon in Show Places Panel button
'bookmark' icon is already used for Bookmarks Menu
2020-12-30 00:05:49 +01:00
Piotr Henryk Dabrowski 741072272f update KParts' ReadOnlyPart::localFilePath in DolphinPart::openUrl() 2020-12-29 16:06:40 +01:00
l10n daemon script 66ba66b5a0 GIT_SILENT made messages (after extraction) 2020-12-29 02:37:52 +01:00
Duong Do Minh Chau 48af912b83 Add const 2020-12-28 20:18:31 +00:00
Chau Duong 6df591368e Apply Elvis suggestions 2020-12-28 20:18:31 +00:00
Duong Do Minh Chau 238eb86db7 Share actions with main window to avoid duplicating icon name and text 2020-12-28 20:18:31 +00:00
Duong Do Minh Chau 9a0552d51d Remove context menu settings KCM 2020-12-28 20:18:31 +00:00
Duong Do Minh Chau a512176b4b Add options to hide some context menu entries
This commit add options to hide the following context menu entries:
- Add to Places
- Copy Location
- Duplicate Here
- Open in New Tab and Open in New Tabs
- Open in New Window
- Sort By
- View Mode

The Services settings page is renamed to Context Menu

ShowCopyMoveMenu option is moved from GeneralSettings to ContextMenuSettings

BUG: 314594
2020-12-28 20:18:31 +00:00
Eike Hein b339ac1b5f Use a faster way to determine kio-stash isn't installed
Summary:
Dolphin needs to figure out whether or not kio-stash is installed
to set the enabled state of a UI action.

When KProtocolInfo::isKnownProtocol can't find a protocol it gets
worried its protocol cache might be out of date, so it rebuilds it
(doing plenty of disk I/O) and looks again. kio-stash is currently
not yet installed on many systems, so this means most Dolphin
startups out there.

This patch switches to using QDBusConnectionInterface::isServiceRegistered
instead to determine whether the stash notifier daemon is running,
which should be faster than doing disk I/O.

Reviewers: davidedmundson, elvisangelaccio, shortstheory

Subscribers: emmanuelp, alexeymin, ngraham, #dolphin

Differential Revision: https://phabricator.kde.org/D9094
2020-12-28 17:59:14 +01:00
Nate Graham b14f98de19 Make it more obvious that you can connect to servers on remote:/ page
Right now it is not super obvious how you connect to a remote server
in Dolphin when you already know the URL. Users will go to the
"Network" item in the Places panel, but from there it is not totally
clear. The "Add Network Folder" icon in the view opens a complicated
wizard and it's also a bit of an odd UX to have it living in the view as
opposed to being a toolbar button.

Old hands and developers know that the URL navigator is, well, a URL
navigator, and as such, it accepts arbitrary URLs from any view.
However this may not be obvious to other more casual users, for
two reasons:
1. The URL navigator is in breadcrumbs view nearly all of the time and
   by default, so may users may not know that it can accept text at all
2. Even when it's displaying URLs, they are almost always local paths,
   so users may not make the connection that it can accept remote URLs
   rather that just local paths

To improve the discoverability of this feature, this commit makes the
following change:

When the view is displaying the remote:/ ioslave (i.e. the "Networks"
place), the URL navigator is put into URL entry mode and given some
placeholder text that hints at what it can do. It reverts to breadcrumbs
mode when you leave.

BUG: 414670
FIXED-IN: 21.04
2020-12-27 17:38:55 +00:00
Méven Car 88d3f92dff Apply sugestions 2020-12-27 17:18:40 +00:00
Méven Car f6a465c911 Review feedback 2020-12-27 17:18:40 +00:00
Méven Car c1739d5c4d Version Control plugin: allow plugins to return repository root
Currently plugins `fileName()` only return path file extension.

This changes allows plugins to return the absolute file path to their repository root.

CCBUG: 430024
2020-12-27 17:18:40 +00:00
Nate Graham c6cdf4126a Fix typo
GIT_SILENT
2020-12-27 08:25:04 -07:00
l10n daemon script 3c85f4ce3d GIT_SILENT made messages (after extraction) 2020-12-24 02:40:02 +01:00
Méven Car f0d03c7dd7 Details View: display dates as relative Short dates
CCBUG: 340982
2020-12-24 00:11:21 +00:00
Nate Graham 9abe299c77 Merge branch 'release/20.12' 2020-12-23 11:40:09 -07:00
Eduard Manta 303740c68a Fix vertical scroll with horizontal component not being recognized properly
BUG: 430532

a scroll that includes an horizontal component != 0 might still be a vertical scroll
2020-12-23 17:17:19 +01:00
l10n daemon script 7f44b11a5e GIT_SILENT made messages (after extraction) 2020-12-23 02:43:39 +01:00
l10n daemon script ac796744ff GIT_SILENT made messages (after extraction) 2020-12-22 02:41:00 +01:00
Derek Christ 87bb0ca10b Allow non-local startup location
Only local directories were supported to be set as the starting location
of Dolphin. This commit fixes this by using an KIO::StatJob to determine
if the path is actually pointing to a directory or a file regardless if
it is a local or a remote path.

Additionaly a hard-coded exception for urls with the scheme "timeline"
was removed because with the new fix it is now obsolete.

BUG: 428885
2020-12-21 21:28:50 +00:00
l10n daemon script ecd5c7d678 GIT_SILENT made messages (after extraction) 2020-12-21 02:47:25 +01:00
Elvis Angelaccio 125c7aba09 DolphinContextMenu: drop wrong assert
`m_context` can also be `SearchContext` or `TimelineContext`, so this
assert has been wrong since 8b0c12a59c.
2020-12-19 18:25:07 +01:00
Carl Schwan b049f41d7b Improve AppStream description 2020-12-19 16:30:48 +01:00
Nate Graham 59f00343c9 Merge branch 'release/20.12' 2020-12-18 12:22:21 -07:00
Chris Holland ef09315404 Fix crash when device with capacitybar is dragged
BUG: 430441
2020-12-17 19:10:40 -05:00
Ilia Kats acc42f9189 fix display of folder sizes for empty folders
also fixes 1 byte error in size calculation for all folders
2020-12-17 13:04:01 +01:00
Ahmad Samir d74853ef85 Merge branch 'release/20.12' 2020-12-16 23:53:57 +02:00
Ahmad Samir c03b43b4a1 Use setShowOpenOrExecuteDialog(true) with OpenUrlJob
It makes more sense for a file manager to always ask the user:
 - whether to execute binaries
 - whether to open an executable script as text or execute it

The openOrExecute dialog from KIOWidgets has a "don't ask again" checkbox,
and that setting is also accessible from Dolphin's settings dialog.

See the discussion at https://bugs.kde.org/show_bug.cgi?id=429839#c10
2020-12-16 23:51:06 +02:00
Elvis Angelaccio 1b192c67f9 Merge branch 'release/20.12' 2020-12-15 23:28:15 +01:00
Elvis Angelaccio aeea98837d DolphinContextMenu: drop wrong assert
`m_context` can also be `SearchContext` or `TimelineContext`, so this
assert has been wrong since 8b0c12a59c.
2020-12-15 22:56:06 +01:00
Anthony Fieroni c95d7fae79 Fix access url navigator while creating new tab in filename search view
BUG: 429628
BUG: 430434

Signed-off-by: Anthony Fieroni <bvbfan@abv.bg>
2020-12-15 21:44:10 +00:00
David Faure 42cd439af8 Merge remote-tracking branch 'origin/release/20.12' 2020-12-15 18:48:11 +01:00
David Faure da636bf513 Fix KIO warning when URL is empty 2020-12-15 18:45:20 +01:00
Alexander Lohnau 20370b4c9f Do not create instance of GeneralSettings just to access static members 2020-12-11 20:06:51 +01:00
l10n daemon script 784586672d GIT_SILENT made messages (after extraction) 2020-12-10 02:44:34 +01:00
Laurent Montel d2f044b32d operator+/- is disabled for QFlags in qt6 2020-12-09 07:55:44 +01:00
Méven Car ce3c243525 ContextMenu: Allow plugins submenus to react to Shift modifiers
In 9e4642d435 support was added for the
NewFileMenu.
This adds support for the Plugins submenu provided they relay their
parentWidget to their own menus.

BUG: 425997
2020-12-07 22:13:29 +00:00
Alexander Lohnau a4a7b5e8af servicemenuinstaller: Remove file if it already exists
This is the case when you update an entry.
2020-12-07 22:10:37 +00:00
Friedrich W. H. Kossebau ac97d98866 dolphinpart: fix broken part icon name 2020-12-07 22:09:58 +00:00
Friedrich W. H. Kossebau 9826d81034 dolphinpart: port to new KPluginMetaData-based KParts API 2020-12-07 22:09:58 +00:00
Friedrich W. H. Kossebau 07b7f76f7c dolphinpart: add JSON metadata to plugin, install into kf5/parts subdir 2020-12-07 22:09:58 +00:00
l10n daemon script 476fe42624 GIT_SILENT made messages (after extraction) 2020-12-06 08:14:05 +01:00
l10n daemon script 3c6f1e6881 GIT_SILENT made messages (after extraction) 2020-12-06 02:38:12 +01:00
Elvis Angelaccio 2274db954a Merge branch 'release/20.12' 2020-12-05 19:24:56 +01:00
Elvis Angelaccio c453393d35 Fix PlacesItemModelTest, 2nd try
This partly reverts 15a5189b11

The KDE CI does not have KDE_FULL_SESSION set, which means that KIO
doesn't add the recentlyused:// urls to the model, but defaults to the
old timeline:// urls instead.

In both cases KIO adds 2 places, so it is safe to always assume that the
expected model count is 14.
2020-12-05 19:15:51 +01:00
Elvis Angelaccio bc3e77d2ef Drop obsolete KF5 version check
We depend on 5.77 now.
2020-12-05 18:39:45 +01:00
Elvis Angelaccio c4a1903dd1 Add missing const 2020-12-05 16:58:04 +01:00
Ahmad Samir 1d64b9bb10 DolphinView: set the parent of layout in the ctor
This silences a runtime warning:
QLayout: Attempting to add QLayout "" to DolphinView "", which already
has a layout

Remove redudant setLayout() calls, passing a parent widget to the
Q*BoxLayout ctor sets that layout as the top-level layout for that widget.
2020-12-03 19:50:04 +00:00
Christoph Feck 9b8ac3ef3f GIT_SILENT Update Appstream for new release 2020-12-02 23:01:21 +01:00
Christoph Feck 16ec949f35 GIT_SILENT Update Appstream for new release
(cherry picked from commit 9b8ac3ef3f)
2020-12-02 23:01:21 +01:00
Méven Car 60b9eaa4c1 Toolbar: move and rename filter to edit menu above Search
This is to expose more filter.
Also rename "Show Filter Bar" to simply "Filter", keep "Show Filter Bar" as tooltip

Adds a toggle filter bar action.
2020-12-02 07:07:41 +00:00
Nate Graham ce11325115 Merge branch 'release/20.12' 2020-11-30 17:08:46 -07:00
Méven Car c2a7bde383 Re-allow to paste files via context menu
BUG: 429762
2020-11-30 22:18:48 +01:00
Alexander Lohnau dbf0f645d2 Utilize KFileItemActions::addActionsTo method from KIO 2020-11-29 14:34:07 +00:00
Nicolas Fella 94c1fe6299 Remove unused includes 2020-11-29 15:03:27 +01:00
Carson Black ad9c955835 [kitemlistview]: Animate rubberband fading out 2020-11-28 21:11:44 +00:00
Nate Graham 78c7429a35 Add placeholder text for empty views
Throughout our QML-based software, we now display placeholder text for
empty views so that the user knows that the view is actually empty, and
it's not that the software is just broken.

This commit introduces the same thing for Dolphin's main view.

BUG: 429248
BUG: 426354
FIXED-IN: 21.04
2020-11-28 19:06:28 +00:00
Friedrich W. H. Kossebau ac862c8e2d ui.rc files: consistenly use <gui> instead of deprecated <kpartgui> 2020-11-28 10:28:53 +01:00
Nate Graham 31528188c1 Merge branch 'release/20.12' 2020-11-24 13:53:33 -07:00
Nate Graham bcdb1957af Allow the openURLJob to run executables
Otherwise, excecutable files like AppImages won't be allowed to launch
even if they are correctly marked as executable.

BUG: 429603
FIXED-IN: 20.12
2020-11-24 13:47:48 -07:00
Derek Christ 9e4642d435 Fix delete action switching via 'Shift' when sub-context-menu is open
Switching the 'Move to Trash' action to 'Delete' using the shift key
does not work when the mouse hovers a submenu. This fix resolves the
issue by using an event filter instead of the key event functions.

BUG: 425997
2020-11-23 22:07:31 +00:00
Alexander Lohnau c3b238bbe9 Move repetitive contextmenu related logic in one place
This makes a bit easier to handle the stuff.
Also we don't need the `addVersionControlPluginActions` utility method
and we can put it in the new utility method instead.
2020-11-23 21:58:36 +00:00
Felix Ernst b62095950a Merge branch 'release/20.12' 2020-11-23 13:38:22 +01:00
Méven Car 2cd1c07cad Places panel: highlight place only when it is displayed
BUG: 156678
FIXED-IN: 20.12
2020-11-23 00:02:59 +00:00
Elvis Angelaccio d5a4835f01 PlacesItemModelTest: consider also Pictures/Music/Videos folders
See a371e23b2b667bc85c311d04549f3d7348d00af5 in kio.
2020-11-23 00:40:53 +01:00
Elvis Angelaccio a218b2ce51 PlacesItemModelTest: use helper method to increase indexes
Instead of duplicating the logic all over the place.
2020-11-23 00:36:50 +01:00
Mufeed Ali 4f8c8955b9
Rename 'Url Navigator' to 'Location Bar' 2020-11-22 18:06:37 +05:30
Alexander Lohnau 3b74e4a3ab Remove unneeded version check 2020-11-22 08:42:18 +01:00
Alexander Lohnau 48fec6c9ec Add 'Open Terminal Here' action from dolphin to menu 2020-11-21 20:22:16 +00:00
Felix Ernst 760700819c Select last visited folder when going up/back
This commit fixes a regression introduced by
ad5d3367c7. A lot of connections were
changed there and at least one of them was wrong. The connections can
be separated into GUI connections and internal ones. This commit makes
it so the GUI stuff is connected to m_urlNavigatorConnected and
everything else to m_urlNavigator.

BUG: 429097
2020-11-21 18:24:24 +00:00
l10n daemon script 6171e08eaf GIT_SILENT made messages (after extraction) 2020-11-21 08:23:19 +01:00
Nate Graham f46e630dda Merge branch 'release/20.12' 2020-11-20 11:32:49 -07:00
Méven Car b3c37507dc Re-allow icons that are not theme icon
Particularly concerned are .desktop files.

See also:
15baa93640

BUG: 429113
2020-11-19 21:48:15 +00:00
Felix Ernst 50ca5af7e0 Allow having the UrlNavigators below the tab bar
This commit restores the possibility to have the UrlNavigators below
the tab bar. This will happen automatically whenever the UrlNavigator
is removed from the toolbar.

It is also now again possible to have the toolbar on the side. This
option is disabled while the toolbar contains the UrlNavigators.

This commit makes no changes to the new default which is having the
UrlNavigators in the toolbar but makes sure that upgrading users won't
be affected.
2020-11-19 21:22:27 +00:00
Alexander Lohnau 154843406d Different icon to launch Konsole terminal 2020-11-18 18:59:04 +00:00
Nate Graham b76cc3f6fa Separate Delete/Move To Trash menu items in context menu
Right now these actions are in a visual group with "Rename" and "Add to
Places" which is silly as those actions have no logical connection
whatsoever to deletion.

This commits moves those items into the section above, putting them in a
more logical place and leaving the Delete/Move To Trash item in its own
section.

BUG: 429256
FIXED-IN: 21.04
2020-11-17 22:21:19 +00:00
Elvis Angelaccio b03607b20b Add missing kconfig_version.h include
This should have been part of edced8460b.
2020-11-17 22:54:22 +01:00
Nate Graham e636bae43e Correct indentation and whitespace in prior commit 2020-11-17 09:40:05 -07:00
Domenico Panella edced8460b Allow folder creation on desktop via F10 shortcut 2020-11-17 16:18:54 +00:00
Nate Graham a3c0a822ca Merge branch 'release/20.12' 2020-11-16 10:26:04 -07:00
Méven Car f2d2f325b6 PlacesPanel: tooltip, use toLocalFile instead of path
To avoid Windows compatiblity issues.
2020-11-16 06:59:59 +01:00
Elvis Angelaccio 8fd0d685a6 Merge branch 'release/20.12' 2020-11-15 22:46:34 +01:00
Felix Ernst 8999580e2a Increment kpartgui version
The defaults changed in 37327c9b0a but
I forgot to also bump the kpartgui version so this commit rectifies
that.
2020-11-15 15:21:44 +01:00
Méven Car 5c99790c94 Context Menu: Only add paste action to folders
Either the viewport, or the selected folder is used as destination.
The paste action is only added when enabled.
2020-11-14 20:28:01 +01:00
l10n daemon script 2bfe601272 GIT_SILENT made messages (after extraction) 2020-11-14 02:37:30 +01:00
Felix Ernst 4f645f1b29 Fix navigator alignment for right-to-left localizations 2020-11-13 11:29:54 +01:00
Alexander Lohnau 1208f86696 Fix qrc icon
Apparently the icon was not null, because the mimetype was known.
But there was no icon associated with it and we got an
icon which is not null, but has a null pixmap.
2020-11-12 17:16:50 +01:00
Alexander Lohnau 208d733ae3 Set empty value for packagekit transaction flags
Otherwise the value would be Trusted Only, which will
forbid installing local packages
2020-11-12 17:15:01 +01:00
Méven Car 6b1524e4ff Places panel: show a tooltip after 500 ms
BUG: 426455
FIXED-IN: 20.12
2020-11-10 08:04:15 +00:00
Felix Ernst 63f4981fe0 Adress the third round of Angelaccio's review comments
Additionally remove some redundant code concerning UrlNavigator visuals.
2020-11-09 23:49:07 +01:00
Felix Ernst 2d4d2ce9a1 Adress most of the second round of Angelaccio's review comments
This commit applies most suggestions which were made on the MR.
Most notably the DolphinUrlNavigator class is split up which leads to
the creation of a DolphinUrlNavigatorsController class.

Additionally some minor coding style and const correctness changes are
included.

The error value of cached integers is changed from -1 to INT_MIN
because situations could come up in which -1 would be a valid value.
2020-11-09 23:49:07 +01:00
Felix Ernst 4202383137 Apply Méven Car's suggestions 2020-11-09 23:49:07 +01:00
Felix Ernst a418d6229e Fix a crash and extract unrelated changes
The secondary UrlNavigator is now created when and only when:
- split view mode is activated for the active tab
OR
- switching to a tab that has split view already enabled.
This fixes a crash that occurs when the setting to always start in
split view mode is enabled.

An animation for activating split view is also removed from this and
moved into a separate MR. Another unrelated name change left over from
a previous commit (viewContainers() -> activeViewContainers()) is
dropped.
2020-11-09 23:49:07 +01:00
Felix Ernst 37327c9b0a Make UrlNavigators in the toolbar the only option
The UrlNavigators will be automatically added to the toolbar. The Sort By
action is removed from the default toolbar to make space.

Remove all options to have UrlNavigators outside the toolbar and remove
those code paths.

Make it so the new NavigatorsWidgetAction contains two UrlNavigators when
in split view mode. Spacing was also added to align these UrlNavigators
with the ViewContainers when enough space is available.

Force the toolbar to be either at the top or bottom of the window.

Set a sane sizeHint for DolphinUrlNavigator. It would be better to do this
in KUrlNavigator in the future.

This commit also contains a changes which should be moved to a separate
merge requests before this gets merged:
- Add an expansion animation when split view is enabled by the user
2020-11-09 23:49:07 +01:00
Felix Ernst 6151a7aec0 Add the UrlNavigator to the toolbar automatically if needed
This commit adds the DolphinUrlNavigatorWidgetAction::addToToolbarAndSave()
method which changes the users toolbar configuration to contain an
Url Navigator. This way the user doesn't need to do anything manually.

Aside from that a bunch of minor fixes like renaming and reordering
2020-11-09 23:49:07 +01:00
Felix Ernst b6fc58c3c3 Adress the first round of Angelaccio's review comments
- Split the viewContainers(bool includeInActive) into two methods
    without parameters
- Prevent users from accidently hiding all Url Navigators by
    preventing the dangerous action and then displaying a helpful
    message instead
Unrelated to review comments: Remove a useless line of code
2020-11-09 23:49:07 +01:00
Felix Ernst 00abc6d280 trailing whitespaces 2020-11-09 23:49:07 +01:00
Felix Ernst ad5d3367c7 Add an option to use an UrlNavigator in the toolbar instead
This commit adds a locationInToolbar KToggleAction to switch between
using a location bar to navigate or using a new custom QWidgetAction
in the toolbar.

A big portion of this MR is refactoring because until now the
UrlNavigator was tightly intertwined with the DolphinViewContainer.
With this MR an UrlNavigator for controlling a View can be freely
connected or disconnected with a single method call.

A DolphinUrlNavigator class is created in the process which contains all
Dolphin-specific UrlNavigator code which did previously reside in the
DolphinViewContainer class. Other application parts that belong to
UrlNavigator-management are also moved here.
2020-11-09 23:49:07 +01:00
Méven Car 880766bd56 PlacesItemListWidget: Use Solid to check if device is a network share 2020-11-09 12:30:43 +00:00
Elvis Angelaccio f6327ffec8 Add missing reference 2020-11-08 23:23:07 +01:00
Ismael Asensio ee4ab8ce69 Iterate over a const copy list of containers
This effectively reverts the mutable iterations approach on
2448f88c5f, and fix crashes
and ghost items when using the filter bar

BUG: 428374
2020-11-08 21:59:34 +00:00
Alexander Lohnau 801fb7e0fd Do not expose KCMs in application launchers
We still need to build them, because they
are also loaded on konqueror.
2020-11-07 14:51:20 +00:00
Méven Car 1c2fbdef09 KDirectoryContentsCounter: fix support of symlinks dir
BUG: 428712
FIXED-IN: 20.12
2020-11-07 06:21:11 +00:00
Elvis Angelaccio 465e06138e Add support for KUserFeedback
This commit introduces KUserFeedback in dolphin with some basic data
sources and with a settings page to configure the telemetry values.

There are also a couple custom data sources as proof of concept: a bunch
of settings and the count of available network shares as listed by Solid.

The settings page is shown only if the user feedback framework is
enabled, but currently in Plasma we don't have a global kill switch to
disable it.

At the moment we never show an encouragement message. We need to connect
to the `Provider::showEncouragementMessage()` signal, but first we
should agree to a common way to show a non-annoying message to the users.
2020-11-05 18:31:28 +00:00
Méven Car 61bf84c13d Details view: display empty text instead of unknown for sizeless dirs
BUG: 420037
BUG: 420040
FIXED-IN: 20.12
2020-11-05 08:50:55 +01:00
Chris Holland 6a196bf69d Move m_textInfo to fix ctor warning, and document why it's protected. 2020-11-04 23:16:13 +00:00
Chris Holland 70656d08f9 Use QDeadlineTimer instead of QDateTime.
Use early returns instead of deeply nested if/else.
2020-11-04 23:16:13 +00:00
Chris Holland 60c3fa8d39 Cleanup imports 2020-11-04 23:16:13 +00:00
Chris Holland 9e9cb4d1e1 Remove wip debugging 2020-11-04 23:16:13 +00:00
Chris Holland ee743717e5 Fix freeSpaceInfo cache not being reset. 2020-11-04 23:16:13 +00:00
Chris Holland b8e68a5ea9 Use KDE GitLab url instead of the GitHub mirror 2020-11-04 23:16:13 +00:00
Chris Holland 4a0dbdea4f Cleanup unused colors. Use const. Use KColorScheme danger.
The draw code is more like the last state of D21312 now.
2020-11-04 23:16:13 +00:00
Chris Holland 89ede4b9a1 Refactor capacity by to use async KIO FreeSpaceJob.
Based on this kio filepicker patch:
933887dc33
2020-11-04 23:16:13 +00:00
Chris Holland 8f76df41da Only show capacity bar for devices (has a udi). 2020-11-04 23:16:13 +00:00
Chris Holland e75326077b Only check if place url is mount point once during polish event.
The capacity bars will no longer update when capacity changes. It only
checks the size on init.

Updating during polish event is only a temporarily solution just to
draft code flow for seperating logic from painting. Eventually this
logic update should be in a worker thread detached from blocking the
rendering thread that blocks launching the dolphin window.
2020-11-04 23:16:12 +00:00
Chris Holland ac6de72048 Draw 2 Rectangles below mount points to represent a disk capacity bar
Draws overtop text that's goes below the baseline like a 'j'. It's
fairly difficult to add extra space below the text as the places view
is a "details" view, so the text is vertically centered in the
widget's "row" as you'd desire it to in the main file view.

We can make the widget 8px taller, adding 4px above and below so
there's adequate room for the capacitybar, but that wastes 4px for
each mount point.

Ideally we'd use the "compact" view, which displays the text/size in a
column beside the icon. However the compact view was not designed to
take up the entire width of the viewport. It's also designed to
overflow with a horizontal scrollbar.
2020-11-04 23:16:12 +00:00
Ezike Ebuka e9a39700fc Improve padding in the Places View 2020-11-04 21:54:10 +00:00
Méven Car c7d4c37534 Compute text width taking into account the zoom level
This makes the icon view less crowded.
2020-11-03 10:03:45 +00:00
l10n daemon script af1e13f9fa SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-11-03 06:20:03 +01:00
Méven Car ffe01ee840 FolderPanel: prevents scanning directory tree recursively
KFileItemListView contents are periodically scanned by KFileItemModelRolesUpdater.
It uses then KDirectoryContentsCounter to scan directories to determine their size possibly recursively.

Introduce a scanDirectories setting to disable directory scanning by KFileItemModelRolesUpdater.

BUG: 426617
FIXED-IN: 20.08.3
2020-11-03 02:21:43 +00:00
l10n daemon script 5e9a869a39 GIT_SILENT made messages (after extraction) 2020-11-03 02:35:33 +01:00
Elvis Angelaccio 15a5189b11 Fix PlacesItemModelTest
Since 3dfa0c1c2f87bf1e6bc9 in kio timeline:// is no longer in the places
model.
2020-11-02 01:09:55 +01:00
Elvis Angelaccio 299aff588d servicemenuinstaller: use Q_GLOBAL_STATIC
Global statics should be avoided when possible.
This fixes a clazy warning.
2020-11-02 00:03:20 +01:00
Elvis Angelaccio 6496721110 Port away from deprecated QWheelEvent::delta()
QWheelEvent::angleDelta() returns a QPoint instead of int, so we need to
use its y() value to get the number of steps.
2020-11-01 23:42:46 +01:00
Elvis Angelaccio 327c22bc3b Use QString::rightRef() as suggested by clazy 2020-11-01 23:31:58 +01:00
Martin T. H. Sandsmark 15baa93640 make sure we use valid icons 2020-11-01 22:17:17 +00:00
Martin T. H. Sandsmark 891ebf5758 Fix warnings about scaling pixmaps 2020-11-01 22:17:17 +00:00
Christoph Feck adfca90730 GIT_SILENT Update Appstream for new release
(cherry picked from commit 92d41a7433)
2020-10-31 17:58:55 +01:00
David Faure 97fbcf3ab5 Port from QStandardPaths::DataLocation to QStandardPaths::AppDataLocation
They are the same on Linux (but DataLocation is deprecated). On Windows this enables the use of the roaming path.

NO_CHANGELOG
2020-10-31 14:31:22 +01:00
Nate Graham bf11c835eb Disable session management for daemon
We don't need to autostart the daemon if it was running at logout.

BUG: 417219
FIXED-IN: 20.12
2020-10-29 15:00:39 -06:00
Lothar Paltins 129570b131 Fix wrong parameter in function call
In KDirectoryContentsCounterWorker::CountResult, the first parameter in
the call of walkDir was wrong. It should be path without conversion,
because the conversion is done in the called function.

BUG: 428282
2020-10-27 15:54:03 +01:00
Alexander Lohnau 2448f88c5f Use mutable iterators where required 2020-10-24 16:46:34 +02:00
Alexander Lohnau 97415729c3 Compile with QT_NO_KEYWORDS 2020-10-23 18:23:06 +00:00
Alexander Lohnau a24327cd50 Compile without foreach 2020-10-23 18:23:06 +00:00
Elvis Angelaccio 360a8dd883 DolphinTabWidget: prefer QUrl::toDisplayString() for tooltips
This is better for remote urls.

!35
2020-10-23 19:15:07 +02:00
Elvis Angelaccio be3ffecf0b KItemListSizeHintResolver: remove no longer used member 2020-10-23 19:02:32 +02:00
Nate Graham c733b3aa97 Don't session-restore invalid paths
When session restore is populating the main window, it's unconditional;
you'll get whatever was there before. This can be a problem if any of
those things are now missing. For example, maybe you were browsing files
on a removable disk, then quit Dolphin, and finally removed the disk. The
next time you launch Dolphin again, it will try to show you the
view from the now-missing removable disk.

To prevent this, we now look at all the URLs in all of the view
containers that were created after session-restore has finished doing
its thing; if any of them are invalid local URLs, we change the URL to
the home folder instead to avoid showing the user a view with an invalid
location in it.

BUG: 427619
FIXED-IN: 20.12
2020-10-23 17:00:09 +00:00
Nate Graham ae1d441dac Show home folder if needed after unmounting mounted disk
Right now, when you unmount a device that any active view containers are
displaying, nothing in the view changes. As a result, it's possible to
try to navigate to files or folders in that view, which cannot be done
because the disk that the files or folders are located on has been
unmounted!

With this commit, we detect that case and switch the view containers
to show the home folder after the disk whose contents they are displaying
gets unmounted.

BUG: 158934
FIXED-IN: 20.12
2020-10-23 17:00:09 +00:00
Nate Graham 1501825d44 Fix DolphinMainWindow::viewContainers() to take into account split views
The function was previously assuming that each tab view has exactly one
view container, which is not necessarily accurate; some could have a
split view open.
2020-10-23 17:00:09 +00:00
Laurent Montel 47a5071fc9 If include is define in .h remove it if it's defined in .cpp too (scripted) 2020-10-23 07:43:43 +02:00
Laurent Montel 40cc911319 Remove not implmemented method 2020-10-17 18:05:17 +02:00
l10n daemon script 20a919b787 GIT_SILENT made messages (after extraction) 2020-10-17 02:34:34 +02:00
Elvis Angelaccio 29b894dbba Port away from QTimeLine::setCurveShape()
As recommended, we now set `easingCurve` directly.
2020-10-15 01:27:28 +02:00
Elvis Angelaccio 1ded75ce44 Stop using QVariant < operator
It will be removed in Qt 6 without porting strategy:
f43cb31ba0

We know that that variants will be either ints (for `count`) or longs (for `size`),
so just convert them to longs (to avoid overflows) and compare those.
2020-10-15 01:22:00 +02:00
Elvis Angelaccio d9956c620e Drop obsolete version check
We require Qt 5.14 now.
2020-10-15 01:22:00 +02:00
Elvis Angelaccio de69336178 Port to non-deprecated QLabel::pixmap()
Quoting from:
714409b23c

```
The QLabel changes to the pixmap/picture getters provide the following
migration path:

QPixmap *ppix = l->pixmap(); // up to 5.15, warns in 5.15
QPixmap pval = l->pixmap(Qt::ReturnByValue); // new in 5.15, works in 6
QPixmap pixmap = l->pixmap(); // from Qt 6 on
```

Since we can't require 5.15 yet in dolphin, the port is done only when
building with Qt >= 5.15
2020-10-15 01:22:00 +02:00
Elvis Angelaccio a403df91b7 Port to non-deprecated QString::split() variant
This requires Qt 5.14, which we now depend on.
2020-10-15 01:22:00 +02:00
Elvis Angelaccio 3bf2922e33 Port away from QList::toSet()
The QSet range constructor requires Qt 5.14.

In `DolphinView::slotHeaderContextMenuRequested()` the conversion from
QList to QSet was pointless, so we just use a QList now.
2020-10-15 01:22:00 +02:00
tolu schr 31cba55cff Add tooltip to tabbar 2020-10-13 17:44:32 +00:00
Nate Graham b343fdffc5 Show "Open With" menu items even for empty dirs
We found some legitimate use cases for this after all! :)

This reverts 14f0cd52f6

BUG: 427573
FIXED-IN: 5.12
2020-10-12 18:16:53 -06:00
Nate Graham 4937992e93 When restoring former window state, append any URLs passed as args
Before, when Dolphin was closed but opened with any URLs, it would open
a new window with only those URLs, rather than restoring any window
state (if the user has this feature enabled).

Now, Dolphin will first restore state (if enabled) and then append any
URLs, rather than replacing the existing set of URLs.

The "new instance" case was previously handled automatically and now
needs to be explictly handled by checking for it, to make sure that new
instances give you a clean window rather than a state-restored window.

BUG: 427274
FIXED-IN: 20.12
2020-10-11 17:02:49 +00:00
l10n daemon script 95e34931c0 GIT_SILENT made messages (after extraction) 2020-10-10 02:33:01 +02:00
Nate Graham 462982faa3 Merge branch 'release/20.08' into master 2020-10-05 15:19:04 -06:00
Jan Paul Batrina daa0fc341d When an invalid protocol is used, reset the navigator location to the previous url
BUG: 413478
2020-10-05 20:11:11 +00:00
Ahmad Samir aa12f9ec1d Don't trigger rubberband with back/foward mouse buttons
Right now the back/foward mouse buttons work, but also if you hold either
of them and move the mouse the rubberband selection is triggered.

This is the correct fix (instead of commit d0c71a1435), to match the
original code before the touch events patches,  we need to check the
back/foward buttons after mouseButtonPressed is emitted and before
triggering the rubberbad selection.
2020-10-04 19:41:40 +00:00
Nate Graham 6cf628cbd0 Don't warn when closing multiple tabs if restoring window state
When we're using the "restore window state" feature, there's no need to
warn when closing multiple tabs, because they're saved and you can just
re-open the window.
2020-10-03 09:39:16 -06:00
Christoph Feck 3d8bb6c385 GIT_SILENT Update Appstream for new release
(cherry picked from commit 38f32d5232)
2020-10-03 14:10:20 +02:00