Commit graph

5716 commits

Author SHA1 Message Date
David Edmundson cb6c71ae1b Keep org.freedesktop.FileManager1 registered across processes
Summary:
Currently if someone starts 2 dolphins, the second cannot register
org.freedesktop.FileManager1 meaning and when the first dolphin quits,
no-one has it registered.

It doesn't cause a huge problem right now as we just dbus-activate a new one if
needed, but it means the behaviour is a bit inconsistent and
non-optimal.

DBus has a system to queue names, meaning that as long as any dolphin is
running this name is owned by one of the processes.

Also this patch registers the service after the object which is
technically safer.

Test Plan:
Ran d-feet
Opened 2 dolphins, closed the first
Service was still registered and the PID of the owning process changed.

Reviewers: #dolphin, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: elvisangelaccio, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D15539
2018-09-17 12:04:00 +02:00
Kai Uwe Broulik b98948ae1e Revert "[KFileItemModelRolesUpdater] Avoid duplicate indexes to resolve"
Sometimes causes the first thumbnail to not be loaded :/

This reverts commit 033eb6b3a3.
2018-09-11 11:53:56 +02:00
Kai Uwe Broulik 033eb6b3a3 [KFileItemModelRolesUpdater] Avoid duplicate indexes to resolve
This avoids requesting a thumbnail twice for certain files, typically the first or last one in a folder.

Differential Revision: https://phabricator.kde.org/D15404
2018-09-11 09:55:30 +02:00
Jaime Torres Amate 9991eb0f5e Don't assign twice the same key to the action New Tab
Summary:
QKeySequence::AddTab = Qt::CTRL + Qt::Key_T.
Leaving only the first avoids the warning window "There are two actions (New Tab, New Tab) that want to use the same shortcut (Ctrl+T)"

BUG: 398324

Test Plan:
su - test
unset KDE_FULL_SESSION
dolphin
After: No more the warning window.

Reviewers: #dolphin, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: elvisangelaccio, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D15371
2018-09-10 16:47:31 +02:00
Kai Uwe Broulik 92a4b5bb62 Merge branch 'Applications/18.08' 2018-09-10 10:23:25 +02:00
Kai Uwe Broulik c5ce845e83 Do use QIcon::Selected for non-icon view
Fixes a regression introduced by not using the selected state.
The views other than icon view actually do have a proper highlighted background.

Differential Revision: https://phabricator.kde.org/D15387
2018-09-10 10:22:58 +02:00
Nathaniel Graham cf0052c296 Make thumbnail frame-and-shadow drawing criteria match those of the file dialog
Summary:
KIO's file dialog already has logic to avoid drawing frames around images detected as likely to be icons, which is improved with D15071. Since Dolphin doesn't use KIO for any of this (boo) we have to pull it over here too; this patch brings the same feature to Dolphin, as well as the feature to disable frames and shadows for all thumbnails at very small sizes, which improves clarity.

With this patch, Dolphin's frame drawing behavior becomes consistent with that of the file dialog (as of D15071).

BUG: 295526
FIXED-IN: 18.12.0

Test Plan:
Icons no longer have frames:
{F6214279}

Images without transparency still have frames:
{F6214280}

Nicer presentation for folders with mixed image types (images without transparency get frames; images without it don't):
{F6214278}

At small sizes, thumbnail clarity is improved by omitting the frame and shadow. Before:
{F6214296}

After:
{F6214294}

Reviewers: #dolphin, broulik, elvisangelaccio

Reviewed By: #dolphin, broulik, elvisangelaccio

Subscribers: markg, anthonyfieroni, elvisangelaccio, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D15069
2018-09-06 22:47:02 +02:00
Kai Uwe Broulik 8f10b5540c [DolphinContextMenu] Use the view's already existing root KFileItem
Saves creating a new KFileItem from scratch which stats the file.
Only when the root item isn't available (as can happen when you're currently looking at an non-existing directory)
will it create a new KFileItem

Differential Revision: https://phabricator.kde.org/D15266
2018-09-05 12:25:39 +02:00
Kai Uwe Broulik 289ef9fa49 Merge branch 'Applications/18.08' 2018-09-05 12:24:47 +02:00
Kai Uwe Broulik 1e7e4fad49 [KStandardItemListWidget] Round to icon size before applying scaling
Otherwise for 22px icons on high dpi we will request either the wrong icons or scale them needlessly.
Dolphin requests a pixmap of 22px, this is then multiplied by dpr resulting in 44 which isn't a valid icon size (only 32 or 48 are).
Moreover, we will also hit the path where it will scale the pixmap to a proper icon size resulting in blurry icons
(and a performance penalty).

Differential Revision: https://phabricator.kde.org/D15260
2018-09-05 12:24:10 +02:00
David Edmundson f3c92120aa Merge branch 'Applications/18.08' 2018-09-04 14:21:00 +02:00
David Edmundson 5f252da8b5 Correctly save behaviourOnLaunch
Summary:
We only wrote out a checkbox value if the checkbox was checked.
Unchecking it would not do anything.

BUG: 398022

Test Plan:
Read KRun's exepcted values
Unchecked config option
Reloaded dolphin
Checkbox remained off

Reviewers: #dolphin, ngraham, elvisangelaccio

Reviewed By: #dolphin, ngraham, elvisangelaccio

Subscribers: ngraham, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D15147
2018-09-04 14:20:33 +02:00
Kai Uwe Broulik cc3eb7d757 Merge branch 'Applications/18.08' 2018-09-04 09:02:07 +02:00
Kai Uwe Broulik b734386cbc Don't use QIcon::Selected state for selected icon
This causes selected monochrome Breeze icons to turn white as this state is meant for when the icon is actually painted ontop of
e.g. a blue highlighted area in a menu
Since the advanced icon configuration (where you could choose a custom hint color and other effects) has been removed in Plasma 5.13
and more importantly the fact that Dolphin always tints the icon in the highlight color disregarding any custom icon effects settings
this is an acceptable change.

CHANGELOG: Fixed monochrome icons turning invisible when selected

BUG: 398014
FIXED-IN: 18.08.2

Differential Revision: https://phabricator.kde.org/D15255
2018-09-04 09:01:04 +02:00
David Hallas aaaaea8e28 Renames DolphinViewContainer::getCaption to caption
Summary:
This commit renames the DolphinViewContainer::getCaption to simply
caption, this was a review comment that I failed to fix in a previous
commit.

Test Plan: None

Reviewers: elvisangelaccio

Reviewed By: elvisangelaccio

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D15114
2018-09-02 11:11:41 +02:00
David Hallas 5a9567730d Changes the tabName function to return the name of a specific tab
Summary:
Changes the tabName function to return the name of the passed in
DolphinTabPage. Previously it would return the name of the active tab,
which causes in-active tabs to get the wrong name.

Test Plan:
Open Dolphin
Right click a folder and select 'Open in new tab'
Notice that the new tab has the wrong title

BUG: 397910

Reviewers: #dolphin, ngraham, elvisangelaccio

Reviewed By: #dolphin, ngraham, elvisangelaccio

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D15112
2018-09-02 11:08:15 +02:00
Elvis Angelaccio a23acffd5e Add test case for open-in-new-tab title regression
Fix will be in D15112.

CCBUG: 397910
2018-09-02 10:55:51 +02:00
Christoph Feck ec3b63c8dc GIT_SILENT Upgrade KDE Applications version to 18.08.1. 2018-08-31 18:38:35 +02:00
Yuri Chornoivan 50702506fa Fix minor EBN issues 2018-08-30 21:29:01 +03:00
Fabian Vogt 1d943518ad Consider all thumbnailers for the information panel and tooltips
Summary:
The text thumbnail is really useful in tooltips, but disabled by default in
KIO. Having just a larger version of the placeholder icon from the theme
doesn't make a lot of sense, so try the best to get a proper preview.
Same applies to the information panel, which would otherwise just
show the same icon.

Test Plan:
Got textfile previews in tooltips and in the information panel even if
disabled.

Reviewers: #dolphin, elvisangelaccio, broulik, markg, ngraham

Reviewed By: #dolphin, broulik, ngraham

Subscribers: abetts, markg, kfm-devel, ngraham

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D15138
2018-08-29 17:19:42 +02:00
David Hallas 44a21ea51a Unify window and tab title
Summary:
Previously the title of tabs was a prettyfied version of the URL.
This is inconsistent with the title of the Window and in some cases
for specials URLs kind of misleading. This commit generalizes the
code from DolphinMainWindow so that both the DolphinMainWindow title
and the tab title uses the same function for the title. This also
means that the 'Show Full Path in Title Bar' also applies to the
tab title, and also that searches changes the tab title.

FEATURE: 387851

Test Plan: Open a new tab from the places panel and navigate around.

Reviewers: #dolphin, ngraham, elvisangelaccio, markg

Reviewed By: #dolphin, ngraham, markg

Subscribers: markg, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D14442
2018-08-24 12:09:26 +02:00
Henrik Fehlauer 79c485a66d Restore settings label and prevent warning when Baloo is unavailable
Summary:
As discussed in D14814, 6674c9c387 removed the {nav Show tooltips}
checkbox in Dolphin's preferences when Baloo is unavailabe at compile
time and thus the tooltip would not be functional. The {nav Miscellaneous}
label in front of the checkbox was also removed, even though it relates
to all options in that group.

In addition, after 6674c9c387 running Dolphin without Baloo support
would print
  QWidget::insertAction: Attempt to insert null action
on startup.

Both issues can be fixed with more `#ifdefs`.

Test Plan:
After building with `-DCMAKE_DISABLE_FIND_PACKAGE_KF5Baloo=ON`, the
{nav Show tooltips} checkbox is removed, the {nav Miscellaneous} label
is still there, and there is no warning printed.

Reviewers: elvisangelaccio

Reviewed By: elvisangelaccio

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D14980
2018-08-22 23:49:17 +02:00
Elvis Angelaccio 6674c9c387 Port away from kdelibs4support
Summary:
It was only used as fallback when baloo was not found, but
`KFileMetaDataWidget` is useless without nepomuk.

The result of this patch is that the information panel and the tooltips
won't be available from platforms without baloo (instead of being
available but broken). The baloo dependency remains optional.

Closes T8720

Test Plan:
Build dolphin with `cmake -DCMAKE_DISABLE_FIND_PACKAGE_KF5Baloo=ON ..` and
make sure it doesn't show tooltips or the information panel.

Reviewers: #dolphin, broulik, ngraham

Subscribers: kfm-devel

Tags: #dolphin

Maniphest Tasks: T8720

Differential Revision: https://phabricator.kde.org/D14814
2018-08-21 01:03:33 +02:00
Kai Uwe Broulik 9134951cb0 Read UDS entry times directly and pretty-print on-demand
This avoids creating a QDateTime object with all the timezone processing that comes with it since we're only
interested in the actual pretty date once we show the role to the user.

Differential Revision: https://phabricator.kde.org/D14880
2018-08-20 11:49:25 +02:00
Kai Uwe Broulik 523c95bed0 Merge branch 'Applications/18.08' 2018-08-16 16:28:58 +02:00
Kai Uwe Broulik f75b8a4287 Pretty-print "creationtime" role
It was forgotten and would show up as ISO date string instead of human-readable string.

Differential Revision: https://phabricator.kde.org/D14878
2018-08-16 16:27:55 +02:00
Jaime Torres Amate e03cbe2584 Make this test work again with new uds implementation
Summary:
With the new uds implementation, when some data is meant to replace an old one, it has to use replace() instead of insert() to avoid an assert of data already exists.
Use 3 different entries and only insert().

Test Plan:
before: crash in the uds assert
after: passes the test

Reviewers: #dolphin, #frameworks, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: bcooksley, bshah, nalvarez, cfeck, dfaure, aacid, ngraham, bruns, elvisangelaccio, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D13813
2018-08-16 13:50:52 +02:00
Jaime Torres Amate adc5f6d3ac wrong name and email address
Summary: This reverts commit 2104d18a67.

Test Plan: revert-hammer

Reviewers:

Subscribers:
2018-08-16 13:48:03 +02:00
Travis CI Bot 2104d18a67 Make this test work again with new uds implementation
Summary:
With the new uds implementation, when some data is meant to replace an old one, it has to use replace() instead of insert() to avoid an assert of data already exists.
Use 3 different entries and only insert().

Test Plan:
before: crash in the uds assert
after: passes the test

Reviewers: #dolphin, #frameworks, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: dfaure, aacid, ngraham, bruns, elvisangelaccio, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D13813
2018-08-16 13:06:06 +02:00
Christoph Feck d58fb69408 GIT_SILENT Upgrade KDE Applications version to 18.08.0. 2018-08-06 22:41:40 +02:00
Nathaniel Graham 496ba56f42 Merge branch 'Applications/18.08' 2018-08-04 17:05:22 -06:00
Shubham Jangra 6e04f50081 Remove custom icon selection for trash
Summary: CCBUG:  391200

Test Plan:
1. Open Dolphin
2. Edit trash in places item
Result: No custom icon option available

Reviewers: ngraham, #dolphin, broulik, pino, elvisangelaccio, cfeck

Reviewed By: ngraham, #dolphin, elvisangelaccio, cfeck

Subscribers: rkflx, cfeck, elvisangelaccio, pino, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D14378
2018-08-04 17:02:51 -06:00
Christoph Feck aed8626f86 GIT_SILENT Upgrade KDE Applications version to 18.07.90. 2018-07-30 23:44:36 +02:00
l10n daemon script 2ef67bf094 GIT_SILENT made messages (after extraction) 2018-07-30 06:00:47 +02:00
l10n daemon script cdb715eb42 GIT_SILENT made messages (after extraction) 2018-07-30 03:21:28 +02:00
Elvis Angelaccio 9be80423dc Drop redundant setAttribute for WA_DeleteOnClose
Every KMainWindow (which DolphinMainWindow inherits) already has this
attribute set.
2018-07-29 23:37:34 +02:00
Kai Uwe Broulik 438f599304 Merge branch 'Applications/18.08' 2018-07-26 10:18:34 +02:00
Kai Uwe Broulik 6d011e9730 Compare UDS entry times directly instead of going through KFileItem
This avoids creating a QDateTime object with all the timezone processing that comes with it since we're only interested in the
relative order, not absolute precise date time values.

CHANGELOG: Sorting files by date is significantly faster now

Differential Revision: https://phabricator.kde.org/D14394
2018-07-26 10:17:36 +02:00
David Hallas 2cbf3cb11e Fixes small memory leak in DolphinContextMenu
Summary: When DolphinContextMenu::baseFileItem is called a KFileItem is allocated and stored in DolphinContextMenu::m_baseFileItem, which is of type KFileItem*, but the destructor failed to delete this.

Test Plan: This leak was found using Address Sanitizer

Reviewers: broulik, elvisangelaccio

Reviewed By: broulik, elvisangelaccio

Subscribers: ngraham, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D14178
2018-07-19 08:25:12 -06:00
Kai Uwe Broulik 80bc133da9 [KItemListSelectionToggle] Adjust painting icon for high dpi scaling
Instead of using KIconLoader which currently doesn't support high dpi scaling, use QIcon::fromTheme which can.

Differential Revision: https://phabricator.kde.org/D14222
2018-07-19 08:24:53 -06:00
Kai Uwe Broulik 445b7cdade [KItemListSelectionToggle] Adjust painting icon for high dpi scaling
Instead of using KIconLoader which currently doesn't support high dpi scaling, use QIcon::fromTheme which can.

Differential Revision: https://phabricator.kde.org/D14222
2018-07-19 10:17:38 +02:00
David Hallas f186124f0e Fixes small memory leak in DolphinContextMenu
Summary: When DolphinContextMenu::baseFileItem is called a KFileItem is allocated and stored in DolphinContextMenu::m_baseFileItem, which is of type KFileItem*, but the destructor failed to delete this.

Test Plan: This leak was found using Address Sanitizer

Reviewers: broulik, elvisangelaccio

Reviewed By: broulik, elvisangelaccio

Subscribers: ngraham, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D14178
2018-07-18 16:48:07 -06:00
Elvis Angelaccio e6bf758406 Merge branch 'Applications/18.08' 2018-07-18 23:23:06 +02:00
David Hallas 4536e25ac9 Fixes memory leak in KItemListViewAccessible
Summary: The KItemListViewAccessible class has a list of QAccessibleInterface pointers in a member variable m_cells. The problem is that when new entries are created, the newly allocated pointer is not stored in the list, only a nullptr is store, this renders the cleanup code in the destructor useless. This patch simply stores the pointer in the list, causing the destructor to correctly free the memory.

Test Plan: I found this issue using address sanitizer. Simply building Dolphin with -fsanitize=address and opening a window caused the memory leak.

Reviewers: #dolphin, jtamate, elvisangelaccio

Reviewed By: #dolphin, jtamate, elvisangelaccio

Subscribers: elvisangelaccio, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D14168
2018-07-18 23:20:19 +02:00
David Hallas 43ab5bdc5f Removes unused member variables
Summary: The InformationPanel::m_pendingPreview and ApplyViewPropsJob::m_currentItem member variables are not used and can therefore be removed.

Reviewers: broulik, elvisangelaccio

Reviewed By: broulik, elvisangelaccio

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D14180
2018-07-18 23:20:08 +02:00
Albert Astals Cid 6072f3a683 GIT_SILENT Upgrade KDE Applications version to 18.11.70. 2018-07-16 19:59:42 +02:00
Albert Astals Cid e76dce3906 GIT_SILENT Upgrade KDE Applications version to 18.07.80. 2018-07-16 19:26:57 +02:00
Nathaniel Graham 9d1a3abd35 Modernize View Properties window
Summary:
Like D12571, but for the {nav View Properties} Window. Also did a little bit of re-organization. This allows us to use a `QFormLayout` as the top-level layout and simplify the code a lot, including no longer using the now-unnecessary paradigm of putting a layout inside a `QWidget`, and ending the use of `QGridLayout` to make a fake and more complicated form-style layout.

Depends on D13749

Test Plan:
Window still resizes properly when the Additional Information content is shown or hidden.

Global view properties, additional information hidden:
{F6035943}

Global view properties, additional information shown:
{F6035945}

Per-folder view properties, additional information hidden:
{F6035869}

Per-folder view properties, additional information shown:
{F6035870}

Reviewers: #dolphin, elvisangelaccio, broulik, #vdg

Reviewed By: #dolphin, elvisangelaccio

Subscribers: abetts, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D13768
2018-07-14 13:55:40 -06:00
Jaime Torres 23c5fce77f Speedup sort
Summary:
Uses a reference to the collator instead of copying and reinitializing it again and again. This is the reason for the speedup.

Changing the implementation from a Functor class to a Lambda removes some boilerplate code, but is not relevant for performance.

This requires a workaround for https://bugreports.qt.io/browse/QTBUG-69361
Just a single comparison to force the clean state of QCollator.

Test Plan:
Sorting in a directory with 82874 images:
[TIME] Sorting: 19883  (before)
[TIME] Sorting: 4198 (after)

kfileitemmodelbenchmark before: ..............   Passed   29.36 sec
kfileitemmodelbenchmark after:    ..............   Passed   20.39 sec

Reviewers: #dolphin, #frameworks, markg, elvisangelaccio, bruns

Reviewed By: #dolphin, markg, elvisangelaccio

Subscribers: elvisangelaccio, apol, bruns, markg, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D13814
2018-07-14 19:37:48 +02:00
Jaime Torres ec89af6778 Revert to change the commit message.
Summary: This reverts commit 765cc968c9.

Test Plan: revert-hammer

Reviewers:

Subscribers:
2018-07-14 19:35:47 +02:00