Commit graph

5494 commits

Author SHA1 Message Date
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
Antonio Rojas 05d389c56e Merge branch 'Applications/18.04' 2018-04-29 19:41:29 +02:00
Antonio Rojas 0c05b992c0 Don't filter out duplicated entries from places panel
This can lead to crashes and is inconsistent with the KIO file picker dialog, which shows duplicated entries.
BUG: 393528

Differential Revision: https://phabricator.kde.org/D12558
2018-04-29 19:39:15 +02:00
Elvis Angelaccio 974b2499c4 Use QGuiApplication::applicationDisplayName()
Same result with less code.
2018-04-29 17:13:18 +02:00
Elvis Angelaccio b9d6a97711 Bundle dolphinui.rc also in dolphinmainwindowtest
Otherwise the test executable will not be able to find the .rc file
while creating a DolphinMainWindow instance.

We also need to force the component name to `dolphin`, otherwise kxmlgui
will default to the name of the binary (which in this case would be
dolphinmainwindowtest rather than dolphin).
2018-04-29 17:07:18 +02:00
Elvis Angelaccio 362244ccbe DolphinTabPage: deactivate secondary view after closing split view
We deactivate the previously active view container whenever we change the active
split view, but we never do the same when we close the split view.

Long term we should probably even delete the secondary view after
closing the split view, because it will never be used again and the
pointer will be overwritten the next time the user opens the split view.
2018-04-25 13:42:18 +02:00
Elvis Angelaccio 9ec8135974 Merge branch 'Applications/18.04' 2018-04-25 12:50:12 +02:00
Robert Jennings 78c8b36dd8 Update window title after closing split view
Summary:

In dolphintabpage.cpp:

Through the connections set up in createViewContainer(), m_primaryViewContainer->setActive(true), at line 98,
ends up triggering slotViewActivated().

Because m_primaryViewActive is true, oldActiveView is not set to the view needed in this particular situation.
Both oldActiveView and newActiveView end up pointing to the same view and the connections are not set up.

BUG: 385111
FIXED-IN: 18.04.1

Test Plan:
1. Open split view
2. Make left panel active
3. Close split view
4. Navigate to various directories

Window title now updates to show current directory

Also tried with multiple tabs/combinations

Reviewers: #dolphin, ngraham

Reviewed By: #dolphin, ngraham

Subscribers: elvisangelaccio, ngraham

Differential Revision: https://phabricator.kde.org/D12446
2018-04-25 12:37:28 +02:00
Elvis Angelaccio 74c2d4ea2d Add failing test case for bug #385111
Will be fixed by D12446.

CCBUG: 385111
2018-04-25 12:34:02 +02:00
Nathaniel Graham b9143a55a7 Move "Open" actions to the top of the context menu for files
Summary:
This patch moves the "Open", "Open With", and "Open in" items to the top of the context menu to reap the following benefits:
- Move the "Open" and "Open With" items closer to the top since they're commonly used items, and right now they're buried in the middle of the menu
- Group related functionality
- Consistency with other common platforms (macOS Finder and Windows Explorer both have these items at the top of the context menu)

For folders, the "Open With" entries are moved higher, but not all the way to the top, since the "open in New tab/folder" entries are more useful.

Test Plan:
Tested all menu items in the context menu for files, folders, and links; all still work.

Context menu for single file:
{F5806809}

Context menu for multiple files:
{F5806810}

Context menu for single folder:
{F5806811}

Context menu for multiple folders:
{F5806812}

Context menu for symlink to folder:
{F5806815}

Reviewers: #dolphin, #vdg, elvisangelaccio, abetts

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

Subscribers: markg, abetts, elvisangelaccio

Differential Revision: https://phabricator.kde.org/D11884
2018-04-22 09:40:50 -06:00
Nathaniel Graham e8d8a8c35b Merge branch 'Applications/18.04' 2018-04-19 19:01:01 -06:00
Nathaniel Graham e15d9f266b Fix inconsistent preview spacing and icon wiggly-ness when toggling previews in Icon mode
Summary:
Dolphin had some code to change the grid spacing when previews were toggled, in an attempt to optimize the view for 3:2 landscape photos. This was problematic for many reasons:
- Conceptually, it was a bad idea to optimize the view for one specific use case. Previews are useful for more than just landscape photos, and this optimization would be inapplicable to any other set of files.
- Folders entirely full of images commonly have some portrait-orientation images included too, so even if the goal were appropriate, it was a bad idea to optimize for only having landscape images.
- For small sizes and medium icons (< 96px), the preview grid size was virtually identical to the non-preview grid size, so it had essentially no effect, and only made the icons wiggle strangely when previews were toggled.
- For large large sizes (>= 96px), all it did was unnecessarily increase the horizontal grid spacing, actually //reducing// usability for browsing through folders of images.

Therefore, let's just remove this code.

BUG: 393306
FIXED-IN: 18.04.1

Test Plan:
- Go to {nav Settings > View Modes > Icons} and make the icon size and preview size identical for 64px
- Toggle previews on and off
- Change both sizes to 112x
- Toggle previews on and off

In both cases, the grid spacing does not change and the icons do not wiggle strangely. The only visual change is that previews turn on or off.

Dolphin still works fine for viewing  3:2 landscape photos. 80px icons:
{F5813467}

192px icons:
{F5813465}

In fact, it's vastly //improved// for the >=96px use case since the grid spacing is no longer excessively wide

Reviewers: #dolphin, hein

Reviewed By: hein

Subscribers: broulik

Differential Revision: https://phabricator.kde.org/D12362
2018-04-19 14:52:25 -06:00
Roman Inflianskas ec12391a1b Convert hard coded shortcuts to standard keys
Test Plan: Check all changed shortcuts on all platforms.

Reviewers: #dolphin, rizzitello, elvisangelaccio

Reviewed By: #dolphin, rizzitello, elvisangelaccio

Subscribers: anthonyfieroni, ngraham, elvisangelaccio, rizzitello, #dolphin

Differential Revision: https://phabricator.kde.org/D11048
2018-04-13 21:33:18 +03:00
Antonio Rojas a4f16761fc Merge branch 'Applications/18.04' 2018-04-12 22:50:55 +02:00
Antonio Rojas ed5102a5fd Fix untranslated places panel entries
Load the places panel entries strings from the kio5 catalog, where they live now

BUG: 392822
Differential Revision: https://phabricator.kde.org/D12119
2018-04-12 22:49:05 +02:00
Michael Heidelbach 7d463ddd04 infopanel: Add choice of date display formats
Summary:
Let user choose date display format via checkbox in context menu

[[ https://phabricator.kde.org/file/info/PHID-FILE-5xjr7tvypj3jaczjtzrz | Example ]]

Depends on D11242

FEATURE: 392352

Test Plan: visual inspection

Reviewers: #dolphin, markg, ngraham

Reviewed By: markg, ngraham

Subscribers: broulik, markg, ngraham

Tags: #dolphin, #kde_applications

Differential Revision: https://phabricator.kde.org/D11245
2018-04-11 13:14:59 +02:00
Nathaniel Graham 9536d1170a Select and scroll to the file for "Open path" and "Open Path in New Window" operations
Summary:
After performing a search and using  the "Open path" or "Open Path in New Window"  present in the context menu, make sure the file is selected and visible in the resulting view.

Cannot implement the same fix for "Open Path in New Tab" because of a limitation in how the contents of inactive tabs are rendered; will need to fix that separately in another patch.

BUG: 377510

Test Plan: Search for an item, and choose {nav Open Path} or {nav Open path in new window}

Reviewers: #dolphin, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: elvisangelaccio, broulik

Differential Revision: https://phabricator.kde.org/D11703
2018-04-09 17:02:09 -06:00