Commit graph

5460 commits

Author SHA1 Message Date
Nathaniel Graham 02c94b228a Modernize Settings window
Summary: This patch modernizes the appearance of Dolphin's configuration window by following the KDE HIG as much as possible and following design cues from Plasma and System Settings.

Test Plan:
Tested all settings to make sure they still work; they do.

Startup page, before:
{F5825313}

Startup page, after:
{F5918574}

View page (Icons), before:
{F5825319}

View page (Icons) after:
{F5918575}

View page (Compact), before:
{F5825321}

View page (Compact) after:
{F5918700}

View page (Detailed), before:
{F5825323}

View page: (Detailed), after:
{F5918701}

Navigation page: no change

Trash page, before:
{F5858748}

Trash page, after:
{F5866656}
(Provided by {D12986})

General page (behavior), before:
{F5825316}

General page (behavior) after:
{F5918572}

General page (confirmations), before:
{F5866885}

General page (confirmations), after:
{F5918702}

General page (status bar): no change

Reviewers: #dolphin, #vdg, broulik, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: fabianr, cfeck, medhefgo, zzag, rkflx, kfm-devel, elvisangelaccio, abetts

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D12571
2018-07-05 21:24:49 -06:00
Friedrich W. H. Kossebau 85d7a8a2f6 Use more nullptr 2018-07-04 23:43:22 +02:00
Friedrich W. H. Kossebau cd4f42b33a Remove QT definitions duplicated from KDEFrameworkCompilerSettings or dead 2018-06-29 18:42:00 +02:00
Nathaniel Graham b488dc0126 Port from KComboBox to QComboBox
Summary: None of Dolphin's current usages of `KComboBox` use any of its additional features beyond `QComboBox`, so let's use `QComboBox` instead.

Test Plan: Tested all features that use comboboxes in Dolphin. No visual or functional changes or regressions.

Reviewers: #dolphin, elvisangelaccio, broulik

Reviewed By: #dolphin, elvisangelaccio

Subscribers: broulik, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D13749
2018-06-27 14:29:48 -06:00
Elvis Angelaccio 280c974481 Use collapsible box to configure visible roles
Summary:
A modal dialog that opens another modal dialog is bad UX and should be
avoided whenever possible. These days we have `KCollapsibleGroupBox`
that can be used to show advanced settings without cluttering the
default layout.

This change removes the `AdditionalInfoDialog` and uses a collapsible
groupbox instead. The `Apply` buttons gets enabled whenever a role gets
checked or unchecked, consistently with the existing checkboxes.

Test Plan: Change visible roles in the view properties dialog.

Reviewers: #dolphin, #vdg

Reviewed By: #vdg

Subscribers: ngraham, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D13569
2018-06-26 22:13:51 +02:00
Tomaz Canabrava 9b7ceaa74d don't use temporaries when uneeded
Summary:
Remove unused variable

Compiled, Run. Trash still there.

Use copy ellision

Remove uneeded code

Reviewers: #dolphin, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: elvisangelaccio, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D13680
2018-06-26 11:06:36 +02:00
Tomaz Canabrava 088e692007 don't use temporaries when uneeded
Summary:
Remove unused variable

Compiled, Run. Trash still there.

Use copy ellision

Remove uneeded code

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D13680
2018-06-22 16:17:47 +02:00
Tomaz Canabrava 6b72c67b09 Use copy ellision 2018-06-22 15:30:11 +02:00
Tomaz Canabrava f5ce8d865b Remove unused variable
Compiled, Run. Trash still there.
2018-06-22 15:21:00 +02:00
Tomaz Canabrava e1ba299b29 don't use temporaries when uneeded 2018-06-22 15:20:38 +02:00
l10n daemon script 9b2a9704ee GIT_SILENT made messages (after extraction) 2018-06-22 03:17:51 +02:00
Nathaniel Graham d7d403379d Move General settings to the top
Summary: KDE apps generally (ha ha) have their {nav General} page at the top of the list, so it's the first thing the user sees when they open the {nav Settings} window, but Dolphin is an exception. It puts the {nav General} page //last!// This patch makes Dolphin consistent with other KDE apps by moving the {nav General} page up to the top.

Test Plan: {F5918590}

Reviewers: #dolphin, #kde_applications, elvisangelaccio, ltoscano

Reviewed By: elvisangelaccio, ltoscano

Subscribers: kde-doc-english, ltoscano, elvisangelaccio, kfm-devel

Tags: #dolphin, #documentation

Differential Revision: https://phabricator.kde.org/D13595
2018-06-19 16:55:23 -06:00
Laurent Montel 26e629a78e Do not duplicate work of KAboutData::setupCommandLine() 2018-06-19 08:57:39 +02:00
Elvis Angelaccio 32b8b19ba5 ViewPropertiesDialog: disable Apply button on startup
We call `markAsDirty(false)` at the end of `loadSettings()` but that's
not enough, because `m_isDirty` is initialized to false (as it should be).
This means `isDirtyChanged` is not emitted and the button is not disabled.

By disabling it explicitly, we make it consistent with the Apply button
in the settings dialog (which is also initially disabled).
2018-06-13 23:16:33 +02:00
Elvis Angelaccio 615838083d Merge branch 'Applications/18.04' 2018-06-13 21:42:41 +02:00
Elvis Angelaccio 9616edbb66 Fix loop of FocusIn events
Summary:
Commit 43da84eefc introduced the risk of entering an endless loop of
`FocusIn`/`FocusOut` events sent to two DolphinSearchBox instances when
opening a second tab (see D11871).

This happens because we deactivate the first tab when we open a new one, but
since the `setActive(true)` is delayed with a QTimer, both the old tab
and the new one become active and receive their own `FocusIn` event
(which starts the loop of focus in/out events).

To prevent this issue, we schedule the searchbox activation only if the
searchbox is not already active.

Test Plan:
- Search something in dolphin
- Open a new tab after the search ends
- Check that dolphin does not eat the CPU

Reviewers: #dolphin, anthonyfieroni

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D13152
2018-06-13 21:39:22 +02:00
Kai Uwe Broulik d8cf33d563 Merge branch 'Applications/18.04' 2018-06-06 09:18:17 +02:00
Kai Uwe Broulik 2f6635f4e8 [KBalooRolesProvider] Support properties of type QStringList
QVariant::toString() unwraps a QStringList with a single string to a QString, however a list with multiple entries returns a null string.
Explicitly check for KFileMetaData property type and convert accordingly.

BUG: 395033
FIXED-IN: 18.04.3

Differential Revision: https://phabricator.kde.org/D13349
2018-06-06 09:17:07 +02:00
Elvis Angelaccio e308985de4 Fix scrolling to renamed file when using the rename dialog
Summary:
The `RenameDialog::slotResult()` slot is currently never called because
the dialog is deleted first, due to the usage of the `WA_DeleteOnClose`
attribute. This breaks the scroll-to-renamed-file feature when the
inline renaming is disabled.

Instead of deleting the dialog on close, we can use `deleteLater()` when
we are sure the dialog has actually finished its job, which is when the
KIO move job emits the `result` signal.

Test Plan:
- Disable inline renaming
- Rename a file so that it goes out of the view
- Check whether the view scrolls to the renamed file.

Reviewers: #dolphin, emateli

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D13304
2018-06-05 22:07:45 +02:00
l10n daemon script a8bd6f4b1f 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"
2018-06-05 05:34:15 +02:00
Elvis Angelaccio 3c6ecfa246 Merge branch 'Applications/18.04' 2018-06-03 13:21:31 +02:00
Elvis Angelaccio 588abbf1b6 Fix crash in PlacesItem::setUrl()
Connections to lambda slots without context/receiver argument can lead
to crashes, because if the receiver is deleted Qt won't delete the connection
as it normally would when the receiver is specified.

This patch moves the slot from the lambda in PlacesItem (which is not a QObject)
to PlacesItemSignalHandler. This fixes the `dolphinmainwindowtest` crash
we currently have on master, and should also fix bug #394507 which has
the very same stacktrace.

BUG: 394507
FIXED-IN: 18.04.2
2018-06-03 13:08:51 +02:00
Elvis Angelaccio c1a594a886 Drop obsolete version checks
We already depend on KF5 >= 5.43
2018-06-03 11:32:19 +02:00
Elvis Angelaccio 2e6798088b Enable test mode in dolphinmainwindowtest
We don't want to use the user configuration files when creating a test
instance of DolphinMainWindow.
2018-06-03 11:24:20 +02:00
Nerdopolis Turfwalker 97801e2cdb Add 'Sort By' and 'View Mode' into Dolphin file context menus
Summary: This adds the 'Sort By' and 'View Mode'  options into the context menu of Dolphin within the file browser. I keep looking for these option (especially sort by) in the Context Menu, and keep forgetting to go to the menu. It also makes the order of "View Mode" and "Sort By" options consistent in the control menu

Test Plan: Made sure that the options appeared when right clicking on an empty space.

Reviewers: #dolphin, ngraham, elvisangelaccio

Reviewed By: #dolphin, ngraham, elvisangelaccio

Subscribers: question, markg, elvisangelaccio, mmustac, rkflx, ngraham, kfm-devel, #dolphin

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D12911
2018-06-02 16:39:42 +02:00
Nathaniel Graham 621cd24acf Show a warning when running as the root user
Summary: Now that Dolphin can be run as the root user again, let's show a warning.

Test Plan:
When run with the root user account:
{F5882057}

Reviewers: #dolphin, markg, elvisangelaccio

Reviewed By: markg, elvisangelaccio

Subscribers: acooligan, anthonyfieroni, chinmoyr, kfm-devel, rikmills, emmanuelp, zzag, nicolasfella, elvisangelaccio, Fuchs, mmustac, markg

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D12732
2018-06-01 21:19:35 -06:00
Christoph Feck 45e9fc22d9 GIT_SILENT Upgrade KDE Applications version to 18.04.2. 2018-06-02 00:50:34 +02:00
Nathaniel Graham 316e476b37 Fix the test that broke after recent changes to the default Places items
Test Plan: `ctest`; all tests pass.

Reviewers: #dolphin, markg

Reviewed By: markg

Subscribers: renatoo, kfm-devel, elvisangelaccio, markg

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D12464
2018-05-31 22:33:31 -06:00
Nathaniel Graham 40453cb627 Re-allow running Dolphin as the root user (but still not using sudo)
Summary:
Prohibiting the use of Dolphin as the actual root user (not using `sudo` or `kdesu`) breaks legitimate use cases for using the root user. An example is Kali, a distro that logs in as the root user by default as a deliberate design choice.

In such an environment, there is no additional security vulnerability beyond what you're already potentially exposing yourself to. So, let's re-enable it.

BUG: 387974
FIXED-IN: 18.08.0

Test Plan:
- Log in as normal user and run `sudo dolphin`: you get an error message.
- Log in as normal user and run `kdesu dolphin`: you get an error message.
- Log in as the root user and run dolphin normally: it works.

Reviewers: markg, elvisangelaccio, #dolphin

Reviewed By: markg

Subscribers: chinmoyr, cfeck, elvisangelaccio, mmustac, Fuchs, markg, graesslin, nicolasfella, zzag, kfm-devel, emmanuelp

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D12795
2018-05-31 12:18:18 -06:00
Kai Uwe Broulik 05d5792ac3 Properly sort int roles
Use integer comparison for word count, line count, track, and release year.

BUG: 394355

Differential Revision: https://phabricator.kde.org/D12948
2018-05-22 13:34:14 +02:00
Elvis Angelaccio 099da00df6 part: fix name of 'Select All' action
This should have been part of commit ec12391a1b.
2018-05-20 23:32:24 +02:00
Elvis Angelaccio eb116a741e Bring back 'New Window' action in viewport context menu
This fixes a regression introduced by ec12391a1b.

We don't use anymore the custom `new_window` action, but we use the
standard `file_new` action instead.
2018-05-20 23:24:43 +02:00
Elvis Angelaccio 7a5dbbc6c5 cmake: add warning when baloo will be disabled
Summary:
KFileMetaDataWidget is useless without nepomuk (which no one ships
anymore). Let's add at least a warning until we will get rid of
kdelibs4support (see T8720).

Test Plan: Uninstall baloo-widgets, build dolphin and check the cmake output.

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D13005
2018-05-20 18:54:53 +02:00
Alexander Miller 8e6f4eecd3
Make target_link_libraries for kdeinit_dolphin PRIVATE
Summary:
There is no need to add all of kdeinit_dolphin's
dependencies (including the static archive) when
linking dolphin; kdemain is the only needed symbol.
Mark the link libraries PRIVATE to simplify the
link command for dolphin.

Reviewers: #dolphin, elvisangelaccio

Reviewed By: elvisangelaccio

Subscribers: asturmlechner, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D12931
2018-05-18 22:44:57 +02:00
Alexander Miller b607091c39
Remove main.cpp from dolphinstatic_SRCS
Summary:
The file main.cpp is already in dolphin_SRCS and doesn't
belong in dolphinstatic_SRCS.

Normally the duplicate object is simply ignored, but with
link time optimization (LTO), linking dolphin can fail.
Apparently, the compiler tries to inline inline kdemain()
in this case. That is undesirable anyway and it ultimately
fails because the DBusInterface definition is not available:

.../ccHEv6cl.ltrans0.ltrans.o: In function `DBusInterface::~DBusInterface()':
<artificial>:(.text+0x2583): undefined reference to `vtable for DBusInterface'
.../ccHEv6cl.ltrans0.ltrans.o: In function `DBusInterface::~DBusInterface()':
<artificial>:(.text+0x5aa3): undefined reference to `vtable for DBusInterface'
.../ccHEv6cl.ltrans0.ltrans.o: In function `kdemain':
<artificial>:(.text+0x7686): undefined reference to `DBusInterface::DBusInterface()'
<artificial>:(.text+0x7b64): undefined reference to `vtable for DBusInterface'
collect2: error: ld returned 1 exit status

See also <https://bugs.gentoo.org/655710>.

Reviewers: #dolphin, elvisangelaccio

Reviewed By: elvisangelaccio

Subscribers: elvisangelaccio, asturmlechner, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D12929
2018-05-18 22:43:58 +02:00
Nathaniel Graham 9a3d4a29ba Revert "Reverting Baloo-widgets version change in cmakelists, since this breaks the information panel"
Sorry, this was actually correct, and the rest of us were using old baloo-widgets.

Anyone experiencing issues with Information Panel content in Dolphin master should
Compile and deploy baloo-widgets from git master too.

CCMAIL: elvis.angelaccio@kde.org
CCMAIL: kde@privat.broulik.de

This reverts commit 58edb20a99.
2018-05-17 16:32:58 -06:00
Nathaniel Graham 58edb20a99 Reverting Baloo-widgets version change in cmakelists, since this breaks the information panel
Let's find another way to do this.

CCMAIL: elvis.angelaccio@kde.org
CCMAIL: kde@privat.broulik.de
2018-05-17 08:32:20 -06:00
Nathaniel Graham 56e8e77e68 Re-add "Open With" items to context menu for files in search view 2018-05-14 16:51:11 -06:00
Antonio Larrosa 720e1a2a3d Remove duplicated entry
Summary:
This gave a warning when running the script, and the value was
overwritten a few lines below, so just remove the unused value.

Reviewers: #dolphin, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D12845
2018-05-14 09:08:46 +02:00
Elvis Angelaccio 6e05c6365e Merge branch 'Applications/18.04' 2018-05-13 13:28:00 +02:00
Melanie Genz 2e1cc199c3 Add missing i18n call
The string was already part of dolphin but was not exposed for
translation.

BUG: 394194
2018-05-13 13:25:18 +02:00
Elvis Angelaccio 2912894d4f Fix broken build without baloo-widgets master
D11245 introduced a dependency on baloo-widgets master, but
baloo-widgets is only an optional dependency.
2018-05-12 20:54:01 +02:00
l10n daemon script ac9e3f9295 GIT_SILENT made messages (after extraction) 2018-05-11 06:27:59 +02:00
l10n daemon script 1c9d91b217 GIT_SILENT made messages (after extraction) 2018-05-11 03:37:42 +02:00
Nathaniel Graham e133c4557e Disable all the 'create new' items when in the Trash
Summary:
Disable all the items in the 'create new' menu when the active view is in the trash,
because they're not useful and don't even work. We don't disable the entire menu
because it's useful to be able to see what specific things are disabled.

This can be reverted once T8234 is implemented.

BUG: 332463
FIXED-IN: 18.08.0

Test Plan:
- Enter the trash with and without a split view; the 'create new' menu items are all disabled
- Be looking at something other than the trash with and without a split view; the 'create new' menu items are all enabled
- Toggle between split views (one in the trash, one elsewhere); menu is correct for both cases

Out of the trash:
{F5837042}

In the trash:
{F5837043}

Reviewers: #dolphin, broulik, elvisangelaccio, markg

Reviewed By: #dolphin, elvisangelaccio, markg

Subscribers: markg, elvisangelaccio

Differential Revision: https://phabricator.kde.org/D12731
2018-05-07 14:55:14 -06:00
Christoph Feck 8d9e0c2426 GIT_SILENT Upgrade KDE Applications version to 18.04.1. 2018-05-02 14:16:23 +02:00
l10n daemon script 94ba6a0978 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"
2018-04-30 07:09:04 +02:00
l10n daemon script c270f47136 GIT_SILENT made messages (after extraction) 2018-04-30 06:08:03 +02:00
l10n daemon script 90e1cc9c03 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"
2018-04-30 05:25:52 +02:00
l10n daemon script ded82601ef GIT_SILENT made messages (after extraction) 2018-04-30 03:29:21 +02:00