Commit graph

5888 commits

Author SHA1 Message Date
Kai Uwe Broulik cef2c67613 [KStandardItemListWidget] Request the pixmap size we want and let the icon loader scale it
I noticed that depending on the configured icon size it would spend a significant amount of time in KPixmapModifier::scale.
I don't see a point in requesting a fixed icon size and then scale it down manually as opposed to having the KIconLoader do the scaling for us.
Especially for SVGs it could then even serve us a properly rendered SVG for this size rather than a scaled down pixmap version.

Differential Revision: https://phabricator.kde.org/D22116
2019-09-16 08:52:05 +02:00
Elvis Angelaccio cb0f6f4d9b Fix failing testWindowTitle() on the KDE CI
Forgot that the default places panel no longer ships the Root place.

GIT_SILENT
2019-09-15 20:59:08 +02:00
Nazar Kalinowski 681d8bb6cd Fix wrong window titles
Summary:
BUG: 389135
FIXED-IN: 19.11.80

Currently dolphin shows a folder's name instead of a "place" name if the current path has trailing slash and place's name doesn't, or vice versa.
This patch fixes this behavior, so that dolphin always shows a "place" name.

The QUrl::FullyEncoded string conversion is required because that's how
the places model stores the places URLs in the XML bookmarks file.

Test Plan:
Test configuration: https://imgur.com/a/U4zBp8c
Before (wrong window titles are in red): https://imgur.com/a/dB4xRwo
After (all window titles are correct): https://imgur.com/a/W7virBn

Reviewers: #dolphin, elvisangelaccio

Subscribers: elvisangelaccio, ngraham, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D23706
2019-09-15 20:38:52 +02:00
Elvis Angelaccio 79bbadb263 Introduce test for window titles 2019-09-15 15:12:08 +02:00
Nate Graham 0303df092d Clean up hamburger menu and viewport and single-folder context menus
Summary:
Dolphin's hamburger and context menus have grown organically over time,
becoming a bit messy and somewhat visually overwhelming. This makes them
harder to parse and more intimidating to use.

This patch cleans up the hamburger menu and viewport and single-folder context
menus to group items more logically, and remove items that aren't actually relevant
to the context.

The hamburger menu part of the patch is fairly significant, and draws from the
principle of only showing actions with a global scope that are not already accessible
from another visible method (e.g. via the default toolbar). In the end, it manages to be
shorter than the current hamburger menu with expose actions that are more relevant.

A visible method to display context-specific actions should be explored separately
(see https://bugs.kde.org/show_bug.cgi?id=411500).

Depends on D23945

Test Plan:
Before, hamburger menu: {F7334178}
After, hamburger menu: {F7350958}

Before, viewport: {F7324802}
After, viewport: {F7330109}

Before, one folder selected: {F7324798}
After, one folder selected: {F7341163}

No change for the context menus shown when selecting a single item, multiple items, or multiple folders

Reviewers: #vdg, #dolphin, meven, elvisangelaccio, GB_2

Reviewed By: #vdg, #dolphin, meven, elvisangelaccio, GB_2

Subscribers: GB_2, mmustac, elvisangelaccio, meven, ndavis, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D23757
2019-09-15 07:05:50 -06:00
Méven Car b4188442d1 Bring back placesitemmodeltest
KIO_VERSION is not defined, KF5_VERSION is.
2019-09-15 10:34:41 +02:00
Yuri Chornoivan c150ee4e10 Sync docs with interface 2019-09-15 08:25:21 +03:00
Nate Graham 0078d8e6fe Improve icons and text for some actions
Summary: Split out from D23757

Reviewers: #dolphin, #vdg, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: elvisangelaccio, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D23945
2019-09-14 08:53:29 -06:00
Elvis Angelaccio 67909d867f Fix unused variable warning
Should have been removed by 60d6a3bdbc

GIT_SILENT
2019-09-14 16:10:07 +02:00
Ismael Asensio 1a0066dc16 This is not unused
GIT_SILENT
2019-09-14 15:32:17 +02:00
Elvis Angelaccio ef5732c89b DolphinTabWidget: cleanup index-by-URL API usage
Summary:
Follow-up of D23655 where we didn't have time to polish the code:

- add a couple of variables to make the code more clear.
- remove the `get` prefix which we usually don't use in Qt code.
- make the function private since it's very tied to implementation.
- add a new isUrlOpen public method as wrapper.

Reviewers: feverfew

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D23860
2019-09-14 13:37:09 +02:00
Laurent Montel abbb98f57b We depend against 5.61 which depends against qt 5.11 2019-09-14 09:41:37 +02:00
Laurent Montel da83e8cbdb Use directly "isEmpty()" 2019-09-14 09:40:09 +02:00
Nate Graham 7165ea7afd Add Reset Zoom Level action inside View menu
Summary:
FEATURE: 409591
FIXED-IN: 19.12.0

Test Plan: {F7096397}

Reviewers: elvisangelaccio, shubham, #dolphin

Reviewed By: elvisangelaccio, #dolphin

Subscribers: broulik, cfeck, kfm-devel, kde-doc-english

Tags: #dolphin, #documentation

Differential Revision: https://phabricator.kde.org/D22444
2019-09-10 07:09:33 -06:00
Nate Graham 4c9952683a Merge branch 'Applications/19.08' 2019-09-09 07:17:40 -06:00
Nate Graham 60d6a3bdbc Fix ascending/descending choosers getting unchecked when re-selecting the same sort order
Summary:
When you select the same sort order that's already selected, the currently-checked
sort order description (the human-readable ascending/descending items) gets unchecked
in `slotSortTriggered()` yet the ascending/descending items items only get checked in
`slotSortOrderChanged()`. Because the order hasn't gotten changed, neither one gets
checked again.

This patch fixes the problem by not unchecking them in the first place.

BUG: 411223
FIXED-IN: 19.08.2

Test Plan:
1. Right-click > Sort By > Click the currently-selected sort order
2. Right-click > Sort By > See that the item for the current ascending/descending setting has not been changed

Reviewers: elvisangelaccio, #dolphin

Reviewed By: elvisangelaccio, #dolphin

Subscribers: broulik, meven, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D23412
2019-09-09 07:17:17 -06:00
Laurent Montel 81065795b7 GIT_SILENT: minor qstring optimization 2019-09-08 09:33:41 +02:00
Björn Feber dfe713edf0 Use large colorful category icons in Dolphin settings
Summary:
{F7324074}
Ref task T10165
Depends on D23749

Test Plan: Open the Dolphin settings dialog.

Reviewers: #dolphin, #vdg, ndavis, ngraham

Reviewed By: #dolphin, #vdg, ndavis, ngraham

Subscribers: ngraham, ndavis, kfm-devel, #vdg, #dolphin

Tags: #dolphin

Maniphest Tasks: T10165

Differential Revision: https://phabricator.kde.org/D23750
2019-09-06 15:34:23 +02:00
Noah Davis 0c66610260 Change terminal panel icon to dialog-scripts
Summary: The old icon was a color icon, which does not match the style of other toolbar/menu buttons

Test Plan: {F7321334, size=full}{F7321319}

Reviewers: #dolphin, #vdg, ngraham

Reviewed By: #dolphin, #vdg, ngraham

Subscribers: ngraham, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D23740
2019-09-05 11:55:43 -04:00
Nate Graham ac14383e95 Use better-named visible and hidden icons 2019-09-04 09:04:13 -06:00
Luca Beltrame d23fba320f
Unbreak context menu showing when right clicking on an empty area
In D22149, a request was made to remove a variable assignment ("action",
on line 389 in src/dolphincontextmenu.cpp. However the change went too
far, and it actually removed the exec() call, not just the assignment
which should have stayed.

This resulted in the context menu not being shown at all.

Adding back exec(m_pos) at least allows for the context menu to show.

CCMAIL: nate@kde.org
2019-09-04 11:36:42 +02:00
Elvis Angelaccio 3df68fb667 Merge branch 'Applications/19.08' 2019-09-02 23:18:33 +02:00
Alexander Saoutkin a640371643 Fixing bugs in new folders in tabs feature
Summary:
Fixing bug where urls in secondary view containers would not be considered
for the open new folders in tabs feature.

Test Plan: Manual testing. Testing for no regressions. Testing that URL is found if in secondary view container

Reviewers: elvisangelaccio

Reviewed By: elvisangelaccio

Subscribers: kfm-devel, ngraham

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D23655
2019-09-02 23:15:08 +02:00
Alexander Saoutkin 56b3059f77 Making sure that DBus objects are all created before the service
Summary:
Currently the DBus service is created before the MainWindow DBus object is
created. This can cause hangs if another service makes calls to a a method
in an object that's not been initialised, when the service is already published.
This patch defers the creation of the service until all DBus objects are
created.

Test Plan:
Tested in KDevelop. Have "open new folders in tabs" feature enabled.
Open several folders with Dolphin at once. Before this patch
there would be noticeable hanging. With this patch all tabs instantly open with
no hanging.

Reviewers: elvisangelaccio, ngraham

Reviewed By: elvisangelaccio

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D23672
2019-09-02 23:13:53 +02:00
Elvis Angelaccio c5a713763d Fix places text when the URL has a trailing slash
Summary: QUrl::fileName() returns an empty string if the URL ends with a slash.

Test Plan:
1. Run `dolphin /tmp` from command line
2. Right-click from viewport and click 'Add to Places'

Reviewers: ngraham

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D23654
2019-09-02 20:30:06 +02:00
Kai Uwe Broulik 63c195b7ed [Tab Bar] Resolve tab icon only if visible
Calling KIO::iconNameForUrl will determine mime type of the file potentially blocking.
Don't needless do it when the tab bar isn't visible.

Differential Revision: https://phabricator.kde.org/D23295
2019-09-02 09:13:56 +02:00
Kai Uwe Broulik 41f7f4e4e8 Merge branch 'Applications/19.08' 2019-09-02 09:13:29 +02:00
Kai Uwe Broulik ada16756d6 Reset progress bar text when directory loading starts
Dolphin shows a different text for whether it is loading the directory or currently sorting its contents.
However, when entering a folder that causes sort criteria to change (e.g. because of different view properties in that folder),
the status bar text is changed to "Sorting..." while it is still actually loading the folder.
When loading a directory starts, reset any status bar text to ensure "Loading..." is displayed in this case.

Differential Revision: >https://phabricator.kde.org/D23459
2019-09-02 09:12:48 +02:00
Méven Car 9996b1f89c Replace the stop button of the media preview by a pause button
Summary:
Stop is not as useful as paused plus it makes the button coherent with the click to play/pause feature.

CCBUG: 364957

Test Plan: {F7305382}

Reviewers: #dolphin, elvisangelaccio, ngraham

Reviewed By: #dolphin, ngraham

Subscribers: ngraham, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D23648
2019-09-02 07:00:31 +02:00
Yuri Chornoivan 290411cf1c Add missing space 2019-09-02 07:23:53 +03:00
Nate Graham 7cad80b292 Add "Add to Places" action to file menu
Summary:
It's recommended that actions available in context menus be available in the main menu
as well for discoverability's sake. This patch does so for the "Add to Places" action.

The action is moved over to the main window, and accessed in the context menu via the
actionCollection it lives in.

BUG: 390757
FIXED-IN: 19.08.0

Test Plan:
- Action still works
- Action still appears in context menu when relevant
- Action in the File menu only becomes enabled when only a single directory is selected or nothing is selected

{F7143876}

{F7143877}

{F7143878}

{F7143879}

Reviewers: #dolphin, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: elvisangelaccio, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D22149
2019-09-01 15:04:45 -06:00
Ismael Asensio 3a7586907e [dolphin] Add an action to toggle the searchbar
Summary:
Make search action toggle the searchbar instead of just launching it.

The search action in dolphin did only bring up the search bar, but to close it again you had to go to the closing button on the same searchbar.
This behavior in inconsistent with other dolphin actions which toggle panels or tools.

BEFORE:
{F7256652}

AFTER:
{F7256862}

BUG: 344617
FIXED-IN: 19.12.0
Closes T8473

Depends on D23075

Test Plan:
- Enable the search mode: the searchbar appears and the toolbar button gets checked
- Press the search button again, and it goes back to normal mode.
- The search button state is coherent with the searchbox
- Coherence is kept when changing to a split view or different tab
- Shorcut <Ctrl-F> does not close the searchbar, but moves the focus to it.

Reviewers: #dolphin, ngraham, #vdg, elvisangelaccio

Reviewed By: ngraham, #vdg

Subscribers: ndavis, felixernst, elvisangelaccio, kfm-devel

Tags: #dolphin

Maniphest Tasks: T8473

Differential Revision: https://phabricator.kde.org/D23232
2019-09-01 21:59:43 +02:00
Nazar Kalinowski 7f6d49377b Make non-empty textual columns come first in sorting
Summary:

Current behavior of dolphin in sorting of files with textual columns (e.g. tags) is to show files without this particular textual column (e.g. without tags) first.
This patch changes this behavior so that dolphin shows the files with some value before the files without any value for chosen sorting method.

BUG: 410538

Test Plan:
Sorting by name (isn't affected by the patch): https://i.imgur.com/eqbYwyZ.png
Sorting by textual column ("tags" in this particular example),
old version (non-tagged files and folders come first): https://i.imgur.com/5KLLujU.png
patched version (tagged files and folders come first): https://i.imgur.com/oUAeZ2z.png

Reviewers: #dolphin, #vdg, ngraham

Reviewed By: #dolphin, #vdg, ngraham

Subscribers: elvisangelaccio, ngraham, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D23482
2019-09-01 17:50:25 +02:00
Méven Car eaec53a7af Add click to play/pause feature on previews for audio/video
Test Plan:
In dolphin, click on a video or audio preview in the information panel.
The video or audio preview starts

Reviewers: elvisangelaccio, #dolphin, ngraham

Reviewed By: elvisangelaccio, #dolphin, ngraham

Subscribers: alexde, anthonyfieroni, ngraham, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D22183
2019-09-01 16:47:22 +02:00
Christoph Feck 246a525fda GIT_SILENT Upgrade KDE Applications version to 19.08.1. 2019-09-01 05:28:07 +02:00
Kai Uwe Broulik db717a21c5 Don't store view properties on network shares
Entering a folder will have Dolphin determine whether it can store the view properties in a .directory file within the folder or
in a generic config location.
It does so by checking for permissions on the file and parent dir causing various stat calls that potentially block on a slow mount.
Also, the config reading thereafter can be very slow.
Moreover, network shares are typically shared between users, so one user's view properties shouldn't affect or be overwritten
by this Dolphin instance.
It doesn't resolve symlinks but is surely an improvement over the status quo.

Differential Revision: https://phabricator.kde.org/D23458
2019-08-28 09:47:29 +02:00
Kai Uwe Broulik f4a1d1b022 Always periodically dispatch pending items
"Local" URLs can also be slow.
This might jeopardize loading large local directories where a resorting could take place but imho it's better than leaving the user
wondering when files will finally show up. However, it takes some time for KDirLister to initially signal items having been added,
and only then our 2 second timer starts.
Also, stop the timer when loading has completed.

Differential Revision: https://phabricator.kde.org/D23460
2019-08-27 13:26:26 +02:00
Nate Graham 0c4f58328f Merge branch 'Applications/19.08' 2019-08-25 10:36:26 -06:00
Alexander Saoutkin 91709cb6fe Fixing bug where split view opens with no URLs
Summary:
BUG: 411193
FIXED-IN: 19.08.1

Test Plan:
Reproduce steps as given in bug report. Observe the exected result.
Used qdbusviewer and ShowFolders method to observe that no regressions occured
in the "open new folders in tabs" feature.

Reviewers: elvisangelaccio, ngraham

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D23445
2019-08-25 10:36:07 -06:00
Simon Krull 9cd042a86c Change default Dolphin toolbar layout
Summary:
{F7205836}

Use a default toolbar layout that looks better and makes more sense for new users.

Test Plan: Open Dolphin (with the default toolbar)

Reviewers: #dolphin, #vdg, ngraham, GB_2, elvisangelaccio

Reviewed By: #dolphin, #vdg, ngraham, GB_2

Subscribers: iasensio, filipf, meven, elvisangelaccio, felixernst, GB_2, ndavis, ngraham, kfm-devel, #vdg, #dolphin

Tags: #dolphin, #vdg

Differential Revision: https://phabricator.kde.org/D23075
2019-08-25 09:35:00 -06:00
Nate Graham 97f4934748 Middle-elide file/folder labels so the extension is always visible
Summary:
This ensures that the filename extension is always visible, and also is just a
nicer way to elide file and folder names in general.

BUG: 404955
FIXED-IN: 19.12.0

Test Plan:
Details view: {F6648784}
Icons view with limited label height: {F6648785}

Reviewers: #dolphin, #vdg, elvisangelaccio, GB_2

Reviewed By: #dolphin, #vdg, elvisangelaccio, GB_2

Subscribers: GB_2, ndavis, rooty, elvisangelaccio, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D19471
2019-08-24 12:44:56 -06:00
Nate Graham 7a83a680a5 Correct "New Window" tooltip
BUG: 411215
FIXED-IN: 19.12.0
2019-08-24 08:16:42 -06:00
Laurent Montel 6dc0e81ef1 Exclude build* repository 2019-08-23 08:10:41 +02:00
Nazar Kalinowski 30b57ac339 Fix a typo
Reviewers: #dolphin, ngraham

Reviewed By: #dolphin, ngraham

Subscribers: ngraham, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D23264
2019-08-19 09:57:37 -06:00
Nate Graham ea82a36420 Correct translation context for zoom out action's what's this text 2019-08-14 12:04:56 -06:00
Antonio Prcela 0ab2779058 Remove redundant code
Summary: Remove redundant negation and the AND check. OR is enough.

Reviewers: meven, elvisangelaccio

Reviewed By: meven, elvisangelaccio

Subscribers: elvisangelaccio, meven, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D23129
2019-08-13 23:22:06 +02:00
Elvis Angelaccio c18f5fde4b Match style of if() condition used above
To be consistent with aeba47648d.
2019-08-11 16:05:42 +02:00
Elvis Angelaccio 87f30d3fc8 Merge branch 'Applications/19.08' 2019-08-11 16:01:41 +02:00
Andrey Yashkin ec1a0c2543 Fix an issue with focus lost after closing terminal panel
Summary:
After leaving terminal with Ctrl-D or exit commands the input focus isn't set back to the folder view.
The problem appears, because `TerminalPanel::isHiddenInVisibleWindow` returns not what it supposed to return,
since when the terminal process exits, `m_terminal` is set to nullptr.

I moved unwanted checks from it inside `TerminalPanel::dockVisibilityChanged`

This change also exposes a crash in `DolphinMainWindow::slotTerminalPanelVisibilityChanged()`,
which was previously working only by luck.
Now we check whether `m_activeViewContainer` is not null before using it.

BUG: 407979
FIXED-IN: 19.11.80

Test Plan:
1. Open Dolphin
2. Press F4 to open the terminal panel
3. Type exit<Enter> or press Ctrl-D
4. Check current focus widget

Reviewers: #dolphin

Subscribers: ngraham, elvisangelaccio, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D22420
2019-08-11 13:14:00 +02:00
Elvis Angelaccio 4a25f01b7c Move variables closer to their usage
GIT_SILENT
2019-08-11 12:37:51 +02:00