Commit graph

5615 commits

Author SHA1 Message Date
Kai Uwe Broulik c43165a1c4 [Places Panel] Pass iconName to KFilePlaceEditDialog
Ensures that editing an entry with a custom icon doesn't have its icon discarded.

Differential Revision: https://phabricator.kde.org/D21558
2019-06-04 08:58:28 +02:00
Thomas Posch 853a95b6d5 Tighter match own service when trying to find suitable window to open path in.
Summary:
Current implementation matches org.kde.dolphin-.*PID while trying to exclude itself from the list of running instances.
With this fix applied only org.kde.dolphin-PID is matched.

Test Plan: Open dolphin twice. Observe only one window.

Reviewers: feverfew, #dolphin, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: elvisangelaccio, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D21547
2019-06-03 21:52:40 +02:00
Alexander Saoutkin 27e3907a3d Open externally called files/directories in new tabs
Summary:
FEATURE: 183429
FIXED-IN: 19.08.0
GUI: new cli argument --new-window

Externally called files/directories are opened in a a new tab of an instance of Dolphin that already exists. If any of the given URIs are already open in a tab, then those tabs are activated instead of a new tab being opened.  If there is no instance then the files/directories are opened in a new window. The newly opened file/directory has its tab activated, and consequently, the window is also activated.

When the user clicks "Open In New Window" or "Detach Tab", the files/directories are opened in a new window.

Test Plan:
[Manual]
Before testing, set the default file manager in system settings as the newly built Dolphin executable.
One must also include the new dolphin executable in the $PATH, otherwise some functions will attempt to open the system dolphin instead of the new one.

Furthermore, running two different versions of Dolphin (in particular, where one does not have this patch included) can result in bugs appearing, in particular, new tabs not opening as old instances will not recognise the DBus commands sent to it. However, I see no reason why a user will have two different versions of Dolphin (apart from people like us :D).

Open directories with the help of auxillary programs (i.e. a browser). The files/directories should appear in a new window if an instance does not exist. If an existence already exists, then a new tab should be opened and activated in that instance and the window activated.
Use QDBusViewer to open folders/items by calling the ShowFolders/ShowItems methods in org.freedesktop.FileManager1 of the Dolphin instance.
When a user chooses to "Open In New Window"/"Detach Tab" then the files/directories should be opened in a new window.

Reviewers: #dolphin, elvisangelaccio

Subscribers: zzag, dfaure, fvogt, fikrim, magar, fbg13, davidedmundson, kwin, ngraham, elvisangelaccio, anthonyfieroni, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D16648
2019-05-30 22:40:08 +02:00
Alexander Stippich 36b61838a2 handle maps with multiple or single entries from Baloo
Summary:
Handle maps which may contain multiple entries with the same key.
Bumps frameworks to 5.58. Equivalent to D20739.

Reviewers: #dolphin, elvisangelaccio, bruns

Reviewed By: #dolphin, elvisangelaccio, bruns

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D21157
2019-05-30 11:18:41 +02:00
Nate Graham c22df71df2 When filter bar is focused, switch to view when tab key is pressed
Summary:
Various people have requested that the tab key move keyboard focus from the filter bar's
text edit field to the main view. It already does this when the Enter and return keys
are pressed, but apparently this is not very intuitive and people expect Tab to work too.

This patch makes that behavior possible by moving the Lock button to the left of the
text edit field, and re-arranging the code so that the filter bar is initialized first.
This works because Qt assigns tab ordering by default according to the order of widget
construction. So if we simply construct the main view right after the filter bar, then
the tab ordering is set up this way automatically.

BUG: 403379
BUG: 403356
FIXED-IN: 19.08.0

Test Plan:
1. Activate Filter bar
2. Hit Tab key
3. View has become focused
4. Play around in Dolphin for a while and notice no regressions or crashes

Reviewers: #dolphin, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D21177
2019-05-25 21:32:29 -06:00
l10n daemon script 8477fc7877 GIT_SILENT made messages (after extraction) 2019-05-24 02:40:13 +02:00
l10n daemon script 13258e00c5 GIT_SILENT made messages (after extraction) 2019-05-23 07:22:07 +02:00
l10n daemon script 22f78c474a 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"
2019-05-22 05:14:39 +02:00
Andrew Crouthamel 1b985d1ef4 Add Documents shortcut detection
Summary:
This adds support for Documents detection when included as a default
as implemented in D16852. This is a work-in-progress and currently
does not succeed.

Assistance is welcome.

Test Plan: Run ctest within the dolphin build directory.

Reviewers: #dolphin

Subscribers: elvisangelaccio, kfm-devel, ngraham

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D16967
2019-05-20 16:59:35 -06:00
Nate Graham 2907a34bb5 Merge branch 'Applications/19.04' 2019-05-20 07:15:05 -06:00
Nate Graham d863dd9ad4 Elide tab titles left so key information at the end of the string doesn't get cut off
Summary:
Tab Titles currently elide right. Generally the more useful information is at the right
side of the string--even more so when full paths are being used.

BUG: 406569
FIXED-IN: 19.04.2

Test Plan:
- No change when tab titles don't get elided
- When tabs show the full path and titles are elided, they're now useful: {F6782447}
- When tabs don't show the full path and are elided, they're elided on the other side which seems maybe a tiny bit better, but at least no worse: {F6782448}

Reviewers: #dolphin, #vdg, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: ndavis, elvisangelaccio, kneckermcknacksack, filipf, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D20689
2019-05-20 07:14:49 -06:00
l10n daemon script f3e966e0ed GIT_SILENT made messages (after extraction) 2019-05-15 07:56:38 +02:00
l10n daemon script 35e92fdec5 GIT_SILENT made messages (after extraction) 2019-05-15 02:39:28 +02:00
David Hallas 78540e4921 Summary: Fixes crash when hiding devices
Summary:
Fixes crash when hiding devices. The crash is caused by
KStandardItem::setDataValue which calls the
KStandardItemModel::onItemChanged function, and that function will
delete the KStandardItem if the data value being set is the hidden
attribute being set to true. To fix this KStandardItem now derives
QObject so that we can use deleteLater.

Test Plan:
Right click a device in the places panel and select hide
Right click the places panel and select show hidden
Right click the hidden device and select show
Right click the same device and select hide

BUG: 403064

Reviewers: #dolphin, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D21050
2019-05-13 16:58:21 +02:00
David Hallas 2fac50f5f5 Add Bookmark Handling
Summary:
Add Bookmark Handling. Adds complete bookmark support as provided by
other KDE applications like Konsole and Konqueror. This allows you to
bookmark individual folders, create bookmark folders and open them.

Test Plan:
Go -> Bookmark -> Add Bookmark
Go -> Bookmark -> [Open the bookmark you selected]

FEATURE: 171366

Reviewers: #dolphin, elvisangelaccio, ngraham

Reviewed By: #dolphin, elvisangelaccio, ngraham

Subscribers: ognarb, meven, loh.tar, cfeck, hein, kfm-devel

Tags: #dolphin

Maniphest Tasks: T5408

Differential Revision: https://phabricator.kde.org/D19926
2019-05-13 16:37:15 +02:00
Elvis Angelaccio 0035b041d2 Fix stale comment
GIT_SILENT
2019-05-12 18:18:36 +02:00
Elvis Angelaccio 863112002c Fix indentation
GIT_SILENT
2019-05-12 13:12:01 +02:00
Chinmoy Ranjan Pradhan d7555d8e11 [Inline Rename] Move cursor to correct position on pressing Home and End
Summary:
When pressing home or end key on a wrapped file name the cursor should move to beginning or end of the whole file name
instead of the last line (which is the default behaviour of any textedit widget).

BUG: 363179

Reviewers: #dolphin, elvisangelaccio

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D21031
2019-05-12 16:33:14 +05:30
Alexander Potashev 7bc3b748b3 services/test: Fix test
Reviewers: #dolphin, elvisangelaccio, sitter

Reviewed By: sitter

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D21022
2019-05-08 15:26:09 +03:00
Elvis Angelaccio 9d11e5d4b4 Get rid of ugly static_cast usages in connect() calls 2019-05-05 17:53:29 +02:00
Elvis Angelaccio 957a6f4f31 [PlacesItemModelTest] Rename variable
This variable is not the expected size of the groups list, but it's the
expected index of the 'Remote' group in the model.
2019-05-05 17:53:29 +02:00
Alexander Potashev afbef7d894 Fix formatting in CMakeLists.txt
Reviewers: elvisangelaccio

Reviewed By: elvisangelaccio

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D21021
2019-05-05 18:14:47 +03:00
Elvis Angelaccio 8989e52088 Merge branch 'Applications/19.04' 2019-05-05 17:02:59 +02:00
Elvis Angelaccio d41d3be348 [PlacesItemModelTest] Ignore user tag places
Instead of listing the user tags (as tried in D21017), the test should not have
access to the user's baloo DB in the first place.

To do so, we use a QTemporaryDir as $HOME for the test process and for
its ioslave children (by setting KDE_FORK_SLAVES=yes).

While at it, drop the no-op removeTestUserData() function.
2019-05-05 16:52:16 +02:00
Elvis Angelaccio f3a86bf29e Merge branch 'Applications/19.04' 2019-05-05 16:02:46 +02:00
Elvis Angelaccio 33a0d17ea8 Try again to fix PlacesItemModelTest::testDefaultViewProperties()
Commit bff373d598 was not enough because the model takes into
account the global view properties setting (in PlacesItemModel::initializeDefaultViewProperties()).

This means we need to disable the setting before init() runs.
2019-05-05 15:54:12 +02:00
Arfrever Frehtes Taifersar Arahesis 4f232fb82f Fix create_symlink path to DESTDIR instead of root file system
Test Plan: Builds fine again in a sandbox, with the symlink properly installed.

Reviewers: #dolphin, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: davidedmundson, elvisangelaccio, kfm-devel, ngraham

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D21011
2019-05-04 13:45:16 +02:00
Elvis Angelaccio 292cbefb3d Fix wrong apidox
There is no KStandardItemView class in dolphin. This apidox has been
wrong since the beginning (see commit ae4d11d918).

GIT_SILENT
2019-05-04 13:35:42 +02:00
Elvis Angelaccio 1b15962c92 Merge branch 'Applications/19.04' 2019-05-04 11:59:56 +02:00
Elvis Angelaccio 9f1b6eb3f4 Fix dolphin cannot be added as favourite in GNOME
The StartupWMClass entry is needed because gnome-shell gets confused by
the mismatch between the desktop file basename ('org.kde.dolphin') and
the WM_CLASS window property ('dolphin').

BUG: 407198
FIXED-IN: 19.04.1
2019-05-04 11:53:22 +02:00
Stefan Brüns ecf1ae6d0b [InformationPanel] Use the new inline configuration mode
Summary:
The current external configuration dialog has some issues:

- its layout is suboptimal, as its initial size is typically to small
- it is quite disassociated with the actual widget it configures, properties
  have a different order, and the property names can be quite abstract
  without the corresponding value.

Doing the visibility selection inline typically avoids the sizing problem,
as the containing application (dolphin) is often vertically maximized.
The selection becomes more obvious, as the item order is kept,
and the values are shown.

Depends on D20524

CCBUG: 389571

Reviewers: #dolphin, #baloo, #frameworks, ngraham, astippich, #vdg, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: elvisangelaccio, meven, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D20525
2019-04-23 12:36:14 +02:00
Carl Schwan 8dc5c7a199
Use placeholder for search action
Summary:
See https://hig.kde.org/style/writing/placeholder.html

Screenshot:

Old: {F6691712}
New: {F6698685}

Test Plan: Compile and run

Reviewers: #dolphin, #vdg, ngraham, elvisangelaccio

Reviewed By: #dolphin, #vdg, ngraham

Subscribers: GB_2, kde-doc-english, elvisangelaccio, ngraham, yurchor, kfm-devel

Tags: #dolphin, #documentation

Maniphest Tasks: T10258

Differential Revision: https://phabricator.kde.org/D19770
2019-04-22 23:03:10 +02:00
Stefan Brüns 832fd09655 [InformationPanel] Remove obsolete intermediate wrapper widget/layout
The Baloo::MetaDataWidget is now able to stretch in a meaningful way
by itself, remove the wrapper.

Summary: Depends on D20667

Reviewers: #dolphin, #baloo, #frameworks, ngraham, astippich, elvisangelaccio

Reviewed By: #dolphin, #baloo, ngraham, elvisangelaccio

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D20668
2019-04-22 13:43:31 +02:00
Elvis Angelaccio c2da7e9efe More coding style fixes
GIT_SILENT
2019-04-20 16:28:38 +02:00
Stefan Brüns 28a949a925 Fix missing update of file name label in information panel without preview
Summary:
The file name label was only updated when the preview was shown, after
the function was moved into a conditional section. This is a regression
caused by commit 405aa4878f ("[InformationPanel] Hide the video when the
preview is disabled, avoid computing the preview when it is disabled").

Test Plan:
Hide the preview in dolphin's information panel
Hover different files, the name label reflects the hovered file again

Reviewers: #dolphin, elvisangelaccio, meven, ngraham

Reviewed By: meven

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D20660
2019-04-20 13:10:28 +02:00
Elvis Angelaccio c7aee6de10 [InformationPanelContent] Fix coding style
GIT_SILENT
2019-04-20 13:06:24 +02:00
Nate Graham 546ff9a19e Merge branch 'Applications/19.04' 2019-04-18 13:17:13 -06:00
Nate Graham 48c082767e Fix adding "Create New..." menu to toolbar
Summary:
Access the object by its existing name rather than renaming it.

BUG: 405780
FIXED-IN: 19.04.1

Test Plan:
- Add {nav Create New} item to toolbar; it now works
- Verify that {nav Create New} menu and toolbar items are disabled when in the trash
- All tests still pass

Reviewers: elvisangelaccio, broulik, #dolphin, cfeck

Reviewed By: cfeck

Subscribers: cfeck, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D20664
2019-04-18 13:17:00 -06:00
Stefan Brüns e26e823909 Fix missing update of file name label in information panel without preview
Summary:
The file name label was only updated when the preview was shown, after
the function was moved into a conditional section. This is a regression
caused by commit 405aa4878f ("[InformationPanel] Hide the video when the
preview is disabled, avoid computing the preview when it is disabled").

Test Plan:
Hide the preview in dolphin's information panel
Hover different files, the name label reflects the hovered file again

Reviewers: #dolphin, elvisangelaccio, meven, ngraham

Reviewed By: meven

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D20660
2019-04-18 15:45:00 +02:00
Stefan Brüns 05a4d27813 Remove last traces of KFileMetaDataWidget from information panel
Summary:
The whole information panel is not included when Baloo is not found,
so there is no need for the HAVE_BALOO guards.
KFileMetaDataWidget and KFileMetaDataConfigurationWidget were never part
of KF5, see https://git.reviewboard.kde.org/r/113153/

Test Plan: ctest

Reviewers: #frameworks, apol, ngraham, #dolphin, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: elvisangelaccio, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D20513
2019-04-14 14:59:00 +02:00
Stefan Brüns 3b491c3ccd [Information Panel] Remove nullptr checks for MetaDataWidget member
Summary:
The widget has the same livetime as the containing widget, no need to
do any extra checks.

Reviewers: #dolphin, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D20514
2019-04-14 14:45:00 +02:00
l10n daemon script 924c883edc GIT_SILENT made messages (after extraction) 2019-04-12 07:49:57 +02:00
Tranter Madi b7db272af2 Scroll to item if it's not visible on keyPress
Summary: Always scroll to item if it's not visible on keyPress, even if it's the current index.

Test Plan: Select the last item, scroll up to make it not visible > press the `End` key > Dolphin now scrolls to that item.

Reviewers: #dolphin, ngraham, elvisangelaccio

Reviewed By: #dolphin, ngraham, elvisangelaccio

Subscribers: elvisangelaccio, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D20152
2019-04-12 09:50:57 +07:00
l10n daemon script 97e9af5ceb GIT_SILENT made messages (after extraction) 2019-04-12 02:51:38 +02:00
Nate Graham b8f8c90275 Merge branch 'Applications/19.04' 2019-04-09 20:22:23 -06:00
Nate Graham 14f0cd52f6 Don't show "Open With" menu items for empty directories
Summary:
Any app that registers itself as able to open directories generally can't do anything
useful with an empty directory. So, don't show the {nav Open With} menu items for them.

Test Plan:
Before: {F6759793}

After: {F6759794}

The {nav Open With} items still appear for non-empty directories.

Reviewers: #dolphin, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: trmdi, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D20396
2019-04-09 20:19:17 -06:00
Stefan Brüns 9ce757b3d3 Make buttons in seach bar nicer (icon, tooltip, autoselect)
Summary:
The "Everywhere" button actually selects the home directory, so use
an appropriate label ("Your files") and add a "user-home" icon.

Pre-select the right button when entering search, depending on the
location where the "Find ..." action was triggered.

Add tooltips for both buttons, stating where to look for files. Most
importantly, this includes the full path for "From here".

Canonicalize the path correctly (always strip trailing slash), otherwise
QUrl::fileName() will be an empty string, resulting in "From Here (/)"

Do not hide the buttons in case the url is non-local, as it is confusing:
1. The state depends on the previous search. When the user hits "Find"
    when browsing e.g an SMB share, the search was probably in the home dir.
2. The current search location was hidden
3. The user may want to do a local search, give the option to do so.

Reviewers: #dolphin, ngraham, elvisangelaccio

Reviewed By: #dolphin, ngraham, elvisangelaccio

Subscribers: loh.tar, meven, elvisangelaccio, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D20357
2019-04-09 23:18:50 +02:00
Elvis Angelaccio 93f26f799f Merge branch 'Applications/19.04' 2019-04-07 22:51:05 +02:00
Elvis Angelaccio 30a335cbcf [DolphinMainWindowTest] Fix testNewFileMenuEnabled
The newFileMenu enabled status is updated whenever the KDirLister emits
the `completed` signal: use QTRY_COMPARE so that we can wait for it.
2019-04-07 22:42:50 +02:00
Elvis Angelaccio d47090eb13 [KFileItemModelTest] Port to fastInsert()
We already depend on KF5 > 5.47, so we are ready to switch to the
non-deprecated fastInsert() method.
2019-04-07 17:16:01 +02:00
Nate Graham b303e3c93a Re-implement Meta-E global launch shortcut using KGlobalAccel
Summary:
FEATURE: 405302
FIXED-IN: 19.08.0

Test Plan:
1. Apply patch
2. Reboot (didn't work until I rebooted or logged out and back in again)
3. Hit {key Meta E}
4. Dolphin Launches

Reviewers: #dolphin, elvisangelaccio, davidedmundson

Reviewed By: #dolphin, elvisangelaccio

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D20229
2019-04-06 11:40:54 -06:00
Elvis Angelaccio f4549a196b [KFileItemModel] Fix alignment of rolesInfoMap
GIT_SILENT
2019-03-30 18:40:04 +01:00
Kochih Wu 4bca03532b Add "Aspect Ratio" and "Frame Rate" to additional video information columns
Summary:
Add options to show aspect ratio and frame rate.

BUG: 366524
FIXED-IN: 19.08.0

Test Plan: Under Control -> Additional Info -> Video, there should be options for aspect ratio and frame rate.

Reviewers: #dolphin, #kde_applications, ngraham

Reviewed By: #dolphin, #kde_applications, ngraham

Subscribers: astippich, ngraham, elvisangelaccio, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D20074
2019-03-27 14:22:49 -06:00
Yi-Jyun Pan f0c46c1749 Fix typo in dolphinsettingsdialog.cpp
Summary: Just remove the useless "have".

Reviewers: #dolphin, ngraham

Reviewed By: #dolphin, ngraham

Subscribers: ngraham, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D20080
2019-03-27 10:02:21 -06:00
Amish Naidu 017cd2322a Prompt user to save/discard changes upon closing config dialog
Summary:
When the configuration dialog is closed with unsaved changes,
a message box is prompted to save/discard them or cancel the event.

BUG: 391206

Reviewers: #dolphin, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: ngraham, elvisangelaccio, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D19904
2019-03-26 14:23:42 +05:30
Nate Graham 3dec3ee092 Merge branch 'Applications/19.04' 2019-03-24 11:31:44 -06:00
Méven Car 405aa4878f [InformationPanel] Hide the video when the preview is disabled, avoid computing the preview when it is disabled
Summary:
Bug symptom : {F6698879}

Fix the bugs and allow to avoid launching a PreviewJob with all files even when the preview is disabled.

Test Plan:
 # In dolphin with an information panel with preview on
 # launch the video preview
 # Disable the preview

  ->bug 1: the video player control is still visible (this bug fix this)

 # re-enable preview

 -> bug 2: the video stays visible and the preview is displayed above (this bug fix this)

Reviewers: #dolphin, elvisangelaccio, ngraham

Reviewed By: #dolphin, elvisangelaccio, ngraham

Subscribers: ngraham, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D19844
2019-03-24 18:32:58 +01:00
Tigran Gabrielyan 1eaf5d3e03 Move Safely Remove down in places context menu
Summary: BUG: 405620

Reviewers: #dolphin, ngraham, elvisangelaccio

Reviewed By: #dolphin, ngraham, elvisangelaccio

Subscribers: elvisangelaccio, ngraham, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D19950
2019-03-24 11:31:13 -06:00
Méven Car d7277e47a6 When hovering over a file on the not-focus view panel, the information panel gets updated
Test Plan:
 - In Dolphin with two views (split view) and with the information panels
 - Hover over a file on the not selected view
 - > the information panel show information about this file

No other changes in behavior

Reviewers: #dolphin, elvisangelaccio, ngraham

Reviewed By: #dolphin, ngraham

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D19936
2019-03-24 18:38:42 +01:00
Méven Car 35f1fd5c15 [InformationPanel] Hide the video when the preview is disabled, avoid computing the preview when it is disabled
Summary:
Bug symptom : {F6698879}

Fix the bugs and allow to avoid launching a PreviewJob with all files even when the preview is disabled.

Test Plan:
 # In dolphin with an information panel with preview on
 # launch the video preview
 # Disable the preview

  ->bug 1: the video player control is still visible (this bug fix this)

 # re-enable preview

 -> bug 2: the video stays visible and the preview is displayed above (this bug fix this)

Reviewers: #dolphin, elvisangelaccio, ngraham

Reviewed By: #dolphin, elvisangelaccio, ngraham

Subscribers: ngraham, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D19844
2019-03-24 18:34:32 +01:00
Elvis Angelaccio 0b9cb0f7d9 [PhononWidget] Fix layout warning
`controlsLayout` should not be a direct child of the widget, since it
already has `m_topLayout` as layout.

This fixes the following warning:

    QLayout: Attempting to add QLayout "" to PhononWidget "", which already has a layout
2019-03-24 11:55:12 +01:00
Elvis Angelaccio aee1b07e26 Merge branch 'Applications/19.04' 2019-03-23 10:51:17 +01:00
Méven Car 6dbabdfee6 Convert foreach to for loops
Test Plan: Compile

Reviewers: #dolphin, elvisangelaccio, ngraham

Reviewed By: #dolphin, elvisangelaccio, ngraham

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D19911
2019-03-22 10:38:18 +01:00
Harald Sitter af8c491904 find ruby gems & make coverage conditional on BUILD_COVERAGE
Summary:
new finding tech:
- find_gem function configures gem-specific FindFoo files and wraps around
  find_package
- FindFoo files look for ruby and then attempt to require the gem name
  i.e. it checks if the gem can be successfully loaded by the interpreter
- since this is based on find_package it may be influenced in all the
  regular ways (e.g. forced found or disabled from finding altogether
  via CMAKE_DISABLE_FIND_PACKAGE_$PKGNAME)

various notes for the future:
- technically this isn't 100% correct because the require name of a gem and
  the gem name may not be the same. e.g. the gem `docker-api` has the
  require name `docker`. for all currently used gems the names are however
  the same and so simply requiring the gem name is expected to work
- the implementation doesn't care about versions, again because we don't
  need it to
- test-unit is a bundled gem, some distributions (e.g. Arch) do split it
  out without making suitable dependency arrangements on a package level
  though

the tech is heavily inspired by Aleix Pol's tech for finding QML modules
as seen in extra-cmake-modules

Test Plan:
- ruby not found: none of the modules found
- test-unit not present: error
- simplecov not prseent: never errors
- having a module installed or not is reported in the cmake output

Reviewers: #dolphin, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: elvisangelaccio, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D19856
2019-03-21 10:56:11 +01:00
Elvis Angelaccio bff373d598 Fix PlacesItemModelTest::testDefaultViewProperties()
The test was assuming that global view properties are off by default,
which is no longer true after d6c086ad04.
2019-03-20 21:36:31 +01:00
Nate Graham 1775002247 Merge branch 'Applications/19.04' 2019-03-20 17:48:26 +01:00
Tigran Gabrielyan 303cd17444 Fix rearranging items in places panel with hidden items
Summary:
`m_sourceModel->movePlace` is called using index from the view model.
This becomes an issue when there are hidden places items.

This change calls `m_sourceModel->movePlace` using the corresponding mapped source index.

BUG: 399430
FIXED-IN: 19.04.0

Test Plan:
  # Create at least 4 Places items
  # Hide first item
  # Drag the now first visible item between second and third item

Actual: The item does not move
Expected: The first visible item should now be second visible item in the list

Reviewers: #dolphin, ngraham

Reviewed By: #dolphin, ngraham

Subscribers: ngraham, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D19901
2019-03-20 17:46:15 +01:00
Christoph Feck b2b1f76031 Merge remote-tracking branch 'origin/Applications/19.04' 2019-03-18 23:00:25 +01:00
Elvis Angelaccio 5b463d82fe Bring back KActivities support
Summary: This code has been unused since the KF5 port.

Reviewers: #dolphin, #plasma

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D18273
2019-03-18 21:18:04 +01:00
Harald Sitter 81ff2a73f9 fix coverage generation when run through ctest
path construction is a bit disappointing and doesn't actually work all that
well for out-of-tree PWDs. in lieu of an upstream fix let's try our best
to get the correct coverage directory set. without this hack no results
get recorded unfortunately.
2019-03-18 15:24:13 +01:00
Harald Sitter 644d6f8522 redo service menu ruby helpers from ground up more or less
Summary:
- apply ruby community style guidelines
- full rewrite fixing, among other things:
  - inefficient/unreadable String#end_with reimplementation
  - inefficient use of Kernel.system (forked shell to fork a shell)
  - inefficient/unreadable Dir.glob reimplementation
  - inefficient File initialization for single chmod
  - invocation conditions are now actually readable
  - invocation conditions now also force +x on argless scripts, not just
    scripts that need arguments
  - repetitive conditions are now expressed as loops on argument arrays
  - mime detection now uses xdg-mime instead of file (xdg-mime internally
    may fall back to mime but will prefer higher level tools such as
    kmimetypefinder5; giving better results overall)
  - return values of "backtick forks" are now checked and will produce
    suitable errors on stderr
  - fail now takes a log_msg argument which is printed to stderr. this
    is in addition to the error raised as notification for the user, as
    that is unfortunately not so useful for diagnostics
  - overall error handling and logging of problem causes is much improved
- add license headers. the original code was actually fairly exhaustive, so
  this really should have had a header to begin with. the code was
  originally introduced in svn r1045663 on Nov 6 14:56:35 2009 UTC
- add blackbox tests. in the interest of keeping the scripts actually
  simple scripts (as opposed to a bunch of classes used by even simpler
  scirpts) they are now also covered by test rigging which runs them as
  scripts (again, as opposed to individual unit testing of distinct units)
  - the tests optionally can use simplecov to gather coverage metrics
  - also wired up to ctest so it actually gets run

structurally there is actually a fair amount of overlap between the two
scripts, but again, in the interest of keeping things simple I think it's
better to live with that instead of refactoring a shared library out of
it and then use heavy-duty meta-programming

Reviewers: #dolphin, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: elvisangelaccio, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D19334
2019-03-18 14:02:16 +01:00
Méven Car bf314f2dff When the previewed video stops playing (because of the user or because the media playback has ended), show the regular preview only if the preview setting is on.
Summary:
Bug result after test plan :

{F6698812}

Test Plan:
In dolphin with the information panel
Select a video
Play the video
Disable the preview through the context menu (the video stays playing and visible and this will get fixed in a subsequent review)
Stop the video -> the video preview reappears when it should not

Reviewers: elvisangelaccio

Reviewed By: elvisangelaccio

Subscribers: elvisangelaccio, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D19843
2019-03-17 21:22:54 +01:00
Méven Car 1ff74854ec Fix a todo: InformationPanelContent::configureSettings code is moved to InformationPanel::contextMenuEvent
Summary:
Fix a TODO : InformationPanelContent::configureSettings code is moved to InformationPanel::contextMenuEvent
Adding necessary accessors and changing visibility of one slot.

Test Plan:
1 compile
2 in dolphin right on the information panel
3 toggle preview
4 from the same context menu, click configure, metadadata settings appears
5 toggle "condensed date" if available

Reviewers: elvisangelaccio, #dolphin

Reviewed By: elvisangelaccio, #dolphin

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D19832
2019-03-17 19:29:53 +01:00
David Hallas 508dc815c7 Fix "Add Network Folder" tooltip icon does not show on Breeze, shows correctly on Breeze Dark
Summary:
Fix "Add Network Folder" tooltip icon does not show on Breeze, shows correctly
on Breeze Dark. The fix is taken from D19596.

Test Plan:
Open Dolphin with the Breeze theme
Hover the mouse over the "Add Network Folder"
The icon is black on black

BUG: 404858

Reviewers: #dolphin, elvisangelaccio, ngraham

Reviewed By: #dolphin, elvisangelaccio, ngraham

Subscribers: broulik, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D19738
2019-03-17 19:11:37 +01:00
David Hallas f0a65179d8 Fix crash at shutdown after showing a tooltip
Summary:
Fix crash at shutdown after showing a tooltip. The commit
94d7e1471e introduced a crash that occurs
when closing Dolphin after Dolphin has showed a tooltip. This happens
because the ToolTipManager::showToolTip function calls the
KToopTipWidget::showBelow function passing in the pointer to the
DolphinFileMetaDataWidget. But this also passes the ownership of the
pointer to the KToopTipWidget as long as a new tooltip is not shown. The
problem is that at shutdown, the KToopTipWidget instance will be
destoyed first and therefore also destroy the DolphinFileMetaDataWidget
instance (which the ToolTipManager still owns through the
QScopedPointer) causing it to be deleted twice. The fix for this is
simply to swap the order of these two members so that the
DolphinFileMetaDataWidget is destroyed first by the QScopedPointer
thereby removing it from the KToopTipWidget if it has been set as it's
parent.

Test Plan:
Open Dolphin
Show a Tool Tip
Close Dolphin

Reviewers: #dolphin, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D19737
2019-03-17 18:10:11 +01:00
Elvis Angelaccio d6c086ad04 Make global view properties the default setting
Summary:
Automatic creation of .directory files is one of the most
complained about things in dolphin.

These days applications are supposed to store application-specific data
within $XDG_DATA_HOME. Long-term that's the proper solution for this
issue, but for now we can at least flip the default so that we no longer
create .directory files out of the box.

A tooltip is also added as a kind of warning for the users who want to
change the setting. Ideally a proper warning should be shown using a
KMessageWidget or KMessageBox, but neither play too well with the
setting dialog workflow used by dolphin.

CCBUG: 322922

Reviewers: #dolphin, #vdg, ngraham

Reviewed By: #dolphin, #vdg, ngraham

Subscribers: ngraham, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D19661
2019-03-17 16:43:20 +01:00
Méven Car 40896c02d9 Correctly position context menu of the information panel under wayland with a secondary screen
Summary:
According to my testing this bug occurs because Qcursor::pos() does not work as expected under wayland on a secondary screen, then it returns inaccurate data.
This could hide bugs elsewhere.

BUG: 404799
FIXED-IN: 19.04.0

Test Plan:
Under Wayland test the context menu on both screens.
Do the same under Xorg.

Reviewers: #dolphin, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: elvisangelaccio, ngraham, nicolasfella, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D19535
2019-03-12 09:25:31 -06:00
David Hallas 94d7e1471e Fixes leak of DolphinFileMetaDataWidget in ToolTipManager
Summary:
Fixes leak of DolphinFileMetaDataWidget in ToolTipManager. The
destructor of ToolTipManager failed to delete the m_fileMetaDataWidget
member. This is seen at shutdown but also when you close a tab that has
displayed a tooltip.

Test Plan:
Compile Dolphin with address sanitizer
Open Dolphin
Show a tooltip
Close Dolphin

Reviewers: #dolphin, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D19485
2019-03-10 17:41:42 +01:00
Elvis Angelaccio 9f2bb143b5 [FoldersPanel] Stop ignoring positions from the controller
This fixes the position of Folder panel's context menus on multi-screens
on Wayland, because `QCursor::pos()` is not reliable on those setups.
2019-03-10 12:45:43 +01:00
Elvis Angelaccio 3c9efb362a [FoldersPanel] Don't show 'Limit to Home Directory' in the view context menu
The `viewContextMenuRequested` signal is emitted without a valid
KFileItem, so `m_fileItem` will always be null in `TreeViewContextMenu::open()`.
2019-03-10 12:37:25 +01:00
Elvis Angelaccio b7e84ed42f Fix clazy-fully-qualified-moc-types warning
Slot arguments should be fully-qualified.
2019-03-10 11:34:40 +01:00
Laurent Montel 1aeea4a6ab port to std::stable_sort 2019-03-10 10:51:27 +01:00
Elvis Angelaccio 1a32594617 Fix context for QDateTime::toString() translations
Summary:
The documentation of QDateTime::toString() says that:

    Any sequence of characters that are enclosed in single
    quotes will be treated as text and not be used as an expression.

This means that translators cannot replace single quotes with other
characters such as «...». This is now described in the context of the
affected strings.

We also check that the translated string contains exactly 2 single
quotes, and we use the untraslated string otherwise.

BUG: 401382

Reviewers: lueck, aacid, cfeck

Subscribers: ltoscano, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D18769
2019-03-09 12:34:36 +01:00
David Hallas e602e532c0 New tab placed after current tab when middle-clicking
Summary:
New tabs should be placed after the currently active tab when using
middle click.

Test Plan:
Open new tab from the places panel using middle click, verify that the
Open new tab from the folders panel using middle click, verify that the
tab is opened after the current tab
Open new tab by middle clicking on the Back button, verify that the tab
is opened after the current tab
Open new tab by middle clicking on the Forward button, verify that the tab
is opened after the current tab

FEATURE: 403690

Reviewers: #dolphin, ngraham, elvisangelaccio

Reviewed By: #dolphin, ngraham, elvisangelaccio

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D19201
2019-03-09 12:11:58 +01:00
Simon Depiets c148eff8ca Improve wording of split view/pane settings
Summary:
I found these strings very hard to understand then translate without looking into the code because the use of "view" refers to both "the split view" and "the left pane and the right pane of the split view".

This patch attempts to explicitly mention panes when needed.

Reviewers: #dolphin, angeloevertonjr, ngraham

Reviewed By: #dolphin, ngraham

Subscribers: ngraham, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D19579
2019-03-06 10:46:54 +08:00
Alexander Stippich 7a57be9812 Use new display string function from KFileMetaData
Summary:
Delete all the custom formatting functions
and use the ones provided from KFileMetaData.

Reviewers: #dolphin, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: bcooksley, elvisangelaccio, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D19105
2019-03-01 12:02:03 +01:00
Laurent Montel 4315e5c938 remove deprecated methods 2019-02-27 08:59:18 +01:00
Nate Graham 1c6240964b Give the "Sort by" menu an appropriate icon 2019-02-24 14:09:53 -07:00
David Hallas d2783df310 Fixes memory leak of KItemListHeader
Summary:
Fixes memory leak of KItemListHeader
The KItemListHeader passed the listView parent object to the QObject
base class, but that pointer seems to always be nullptr causing the
KItemListHeader to not be memory managed by anything. Instead simple
use the listView as parent pointer.

Test Plan: This leak was found using Address Sanitizer

Reviewers: elvisangelaccio

Reviewed By: elvisangelaccio

Subscribers: elvisangelaccio, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D14453
2019-02-24 18:22:55 +01:00
l10n daemon script 16edd9ccec GIT_SILENT made messages (after extraction) 2019-02-24 02:53:48 +01:00
l10n daemon script 33581c60c7 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"
2019-02-22 05:30:16 +01:00
David Hallas c72fdaa773 Fix crash during shutdown
Summary:
Fix crash during shutdown. The root cause is that when Dolphin in stopped as
part of an activity, the KItemListViewAccessible destructor is called after
QApplication::exec has returned causing Qt to already having cleaned up the
QAccessibleInterface instances kept in KItemListViewAccessible. Instead of
storing the pointers to QAccessibleInterface we store the QAccessible::Id so
that we can use the QAccessible::deleteAccessibleInterface function for
deleting the instances.

BUG: 402784

Test Plan:
I wasn't able to reproduce the crash in the first place, but I have just
opened and closed Dolphin a few times and verified the the QAccessibleInterface
instances are correctly cleaned up.

Reviewers: #dolphin, elvisangelaccio, ngraham

Reviewed By: #dolphin, elvisangelaccio

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D19083
2019-02-18 08:58:11 +01:00
Nate Graham 6e88d7cef0 Merge branch 'Applications/18.12' 2019-02-17 14:07:49 -07:00
Nate Graham cf2da56c5e Word-wrap KMessageWidget text
Summary:
Word-wrap KMessageWidget text to prevent the window from being widened
when the text is very long.

CCBUG: 404232

Only `CCBUG: ` because word wrap only works where QLabel detects a word boundary;
it will not wrap a string with no spaces or other word boundaries (e.g.
"aaaaaaaaaaaaaaaaaaaa...")

Test Plan:
- Create a new text file with a 300-character name that has spaces in it
- In the KMessageWidget's error message, the file name is wrapped at the word
boundaries

Reviewers: #dolphin, #frameworks, cfeck, elvisangelaccio

Reviewed By: #dolphin, cfeck, elvisangelaccio

Subscribers: elvisangelaccio, cfeck, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D18968
2019-02-17 14:07:28 -07:00
David Hallas 17af8ae0ad New tab should be placed after the current tab
Summary:
When opening a new using the context menu the new tab should be placed
after the currently open tab, not at the end of the tab list.

BUG: 403690

Test Plan:
Open multiple tabs and select a different tab than the last one.
Open a new tab using the context menu and see that it opens after the currently
selected tab.
Open a tab using Ctrl+T and see that it opens at the end.

Reviewers: #dolphin, ngraham, elvisangelaccio

Reviewed By: #dolphin, ngraham, elvisangelaccio

Subscribers: elvisangelaccio, ngraham, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D18945
2019-02-16 16:51:44 +01:00
Angelo Oliveira Jr 92368c1e4d Add option to choose which view to close
Summary:
This Diff make configurable which view will close when toggling off
the split view mode, if it's the active one or the inactive one.

A new checkbox was added to the Dolphin configuration window,
and defaults to the original behavior.

FEATURE: 312834
FIXED-IN: 19.03.80

Test Plan: {F6535432}

Reviewers: ngraham, #dolphin, elvisangelaccio

Reviewed By: ngraham, #dolphin

Subscribers: elvisangelaccio, cfeck, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D18040
2019-02-16 16:09:27 +01:00
l10n daemon script 36da6c7e32 GIT_SILENT made messages (after extraction) 2019-02-13 07:36:24 +01:00
l10n daemon script 037a394ec7 GIT_SILENT made messages (after extraction) 2019-02-13 02:57:24 +01:00
Kai Uwe Broulik d5744305f6 Merge branch 'Applications/18.12' 2019-02-08 09:02:00 +01:00
Kai Uwe Broulik 585cc994e6 [DolphinView] Use correct color group
Use the inactive color group when the window is inactive and update when window state changes.

CCBUG: 404053

Differential Revision: https://phabricator.kde.org/D18811
2019-02-08 09:01:38 +01:00