Commit graph

17 commits

Author SHA1 Message Date
Serg Podtynnyi 38c34eeca3 Add clang-format and format code as in Frameworks 2023-02-05 12:45:38 +07:00
Nicolas Fella 6c19e73367 Fix Wayland window activation when attaching to an existing instance
The application launching Dolphin passes a token via the XDG_ACTIVATION_TOKEN environment variable

We need to pass that to the running instance so that it can use it to raise itself
2022-10-14 14:46:29 +00:00
Felix Ernst 3b7c05b385 Add Selection Mode
The selection mode action is a checkable toggle action named
"Select Files and Folders" which has "Space" as the default
shortcut.

In selection mode a bottom bar with contextual actions is shown.
These should mostly mirror the actions which are available through
the right-click context menu aka DolphinContextMenu.

Resizing of the window might make a overflow button appear in the
bottom selection mode bar.

This commit makes press and hold in the view activate selection
mode. This behaviour is not triggered if the press and hold is
used to either start a rubberband selection or a drag operation
within a short time. The length of the short timeframe is defined
by a QStyleHint. This is currently not implemented in touch
because I can't test it.

Mix the selection mode bars' background colors using a nice
combination of colors from the current color scheme

BUG: 427202
2022-08-14 14:42:40 +00:00
Marco Martin dbabe22249 Add SortOrderForUrl method to DBus interface
adds a method to ask what's the sorting strategy (column and order) for a particular Url, as Dolphin can have directory-specific sorting strategies

This makes possible for other apps that have lists of files, like Gwenview to use the same sorting when invoked from dolphin, ie opening an image

CCBUG:236059
2021-06-04 12:04:14 +00:00
Felix Ernst f01a61b76c Animate split view mode toggling
Have the secondary ViewContainer slide into/out of view when split view mode is switched on or off by the user.

This should help users understand what split view mode is about. Without the animation it might seem like the only thing the button does is creating a weird vertical line in the middle of the view or something. With the animation it should be clear that the second view is a separate entity that was added. The closing animation will help users understand which of the ViewContainers was just closed.
2021-01-02 17:48:52 +00:00
Elvis Angelaccio 954e8c4790 Output of licensedigger + manual cleanup afterwards.
Unfortunately licensedigger does not strip the trailing * characters.
While at it, use a common style for all source files.
2020-08-25 17:07:38 +00:00
Nate Graham a47d8c0e97 Change group spacing from 18px to 12px
This is the value used in QML-based software, so now Dolphin's form
layout settings dialogs look consistent.
2020-08-24 12:35:08 -06:00
Nate Graham caf2fe1c43 Add an option to show tabs from last time when Dolphin starts
Summary:
All modern web browsers offer a function to show tabs from last time when a browser starts, and many apps today
restore their prior state when they're launched. This patch implements thatfunctionality as an option and turns it on by default.

The settings window is accordingly adjusted to be clear about what applies when:

{F7681752}

FEATURE: 413564
FIXED-IN: 20.08.0

Depends on D25106
Depends on D25219

Test Plan:
With the new setting turned off:
- No behavioral changes at all

With the new setting turned on:
- When launched from the GUI or CLI without any URLs, dolphin restores session
- When rebooting with Dolphin open, it restores session normally after the system comes back (i.e. no behavioral change here)
- When launched with URLs, Dolphin window is opened showing those URLs instead of restoring session
- When Dolphin is already running and a new window is opened, that new window shows a single tab with the same URL as was visible in the previously-open Dolphin instance (i.e. no behavioral change here)
- "Open Containing folder" functionality in other apps works regardless of whether or not Dolphin is running

Reviewers: #dolphin, #vdg, feverfew, meven, elvisangelaccio, ndavis

Reviewed By: #dolphin, #vdg, feverfew, elvisangelaccio, ndavis

Subscribers: davidedmundson, ndavis, intika, feverfew, kfm-devel, ngraham, broulik, #dolphin

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D11382
2020-04-26 12:14:56 -06:00
Elvis Angelaccio fa806d48da Exclude daemonized processes from Dolphin::attachToExistingInstance()
Summary:
`dolphin --daemon` does not have the `/dolphin/Dolphin_1` dbus path,
because it doesn't have any DolphinMainWindow.

Instead of working around this issue (as we did in D21666 and D25510),
just exclude these processes from the list of dbus instances checked by
`Dolphin::attachToExistingInstance()`.

CCBUG: 408244

Test Plan: Same test plan as in D21666 and D25510

Reviewers: #dolphin

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D26213
2020-03-16 22:38:40 +01:00
Antonio Rojas faa37a6138 Fix build with Qt 5.14 RC
Add needed Qt includes that are no longer pulled transitively.

BUG: 414492

Differential Revision: https://phabricator.kde.org/D25783
2019-12-09 23:21:51 +01:00
Ismael Asensio 7949aee2d2 Make the search box more compact
Summary:
Reduce the spacing between widgets and remove the content margins on the extended search options to have a more compact and space-saving layout.
Currently, some widgets are not even aligned.
This will be even more important if we remove the toggle button for 'More Options'.

CCBUG: 386754

Test Plan:
BEFORE: {F7681182}
AFTER: {F7681184}

Reviewers: elvisangelaccio, ngraham, #dolphin, #vdg

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

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D25028
2019-11-07 01:51:25 +01:00
Elvis Angelaccio d886cf3c85 Fix container detaching 2019-06-08 13:11:47 +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
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
Kai Uwe Broulik b79ea9f5e4 Pass application name and icon to KRun
Otherwise this results in the generic executable icon as bouncy cursor.

Differential Revision: https://phabricator.kde.org/D4823
2017-03-08 16:52:15 +01:00
Emmanuel Pescosta 5dd5eaf08d Allow home directories with non-local file paths.
Paths like file:/home/me work now instead of showing
an error message.

BUG: 352743
BUG: 353550
FIXED-IN: 15.08.3
REVIEW: 125586
2015-10-21 13:45:45 +02:00
Ashish Bansal 7042c6c289 Add dbus interface to dolphin
Implemented org.freedesktop.FileManager1 dbus interface in dolphin
http://www.freedesktop.org/wiki/Specifications/file-manager-interface/

REVIEW: 123313
BUG: 343016
2015-04-22 18:59:39 +05:30