Bug 413564 - Add save tabs feature to Dolphin
Summary: Add save tabs feature to Dolphin
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Nate Graham
URL:
Keywords:
: 388039 416085 420266 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-10-28 19:36 UTC by Varaskkar
Modified: 2020-04-26 18:15 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In: 20.08.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Varaskkar 2019-10-28 19:36:56 UTC
Upon close and open Dolphin, tabs are restarted. It could be interesting recover the previous tabs with the same path.
Comment 1 Nate Graham 2019-10-28 19:45:55 UTC
In progress with https://phabricator.kde.org/D11382.
Comment 2 Varaskkar 2019-10-28 19:51:21 UTC
Nice =)
Comment 3 Nate Graham 2019-11-20 14:26:27 UTC
Git commit 46e5b32ed9293749661eb5a5a8c32e77b1853f1e by Nate Graham.
Committed on 20/11/2019 at 14:26.
Pushed by ngraham into branch 'master'.

Also allow invoking session restoration logic when apps are manually launched

Summary:
Right now session restoration logic only ever gets invoked when apps are started
automatically after rebooting, because of the check for `qApp->isSessionRestored()`.
This limits the feature to only working for that use case, since `qApp->isSessionRestored()`
is set by Qt and we can't override it in the app itself to signal that we want the session
restoration behavior for other reasons. As a result, we can't use it to implement the
behavior of restoring the condition of app when it's manually launched, which has been
requested for several of our apps.

This patch removes the check for `qApp->isSessionRestored()`, which opens the door to
implementing the requested features in our apps.
Related: bug 397463

Test Plan:
D11382 now works

Normal session restoration behavior after a reboot is unchanged

Apps with session restoration behavior but without a user-facing option to invoke it
don't restore session at inappropriate times.

Reviewers: davidedmundson, #frameworks

Reviewed By: davidedmundson

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D25106

M  +0    -6    src/kmainwindow.cpp

https://commits.kde.org/kxmlgui/46e5b32ed9293749661eb5a5a8c32e77b1853f1e
Comment 4 Julian Steinmann 2020-01-10 20:21:11 UTC
*** Bug 416085 has been marked as a duplicate of this bug. ***
Comment 5 Nate Graham 2020-01-31 22:06:34 UTC
*** Bug 388039 has been marked as a duplicate of this bug. ***
Comment 6 Nate Graham 2020-04-02 13:58:10 UTC
Hopefully https://phabricator.kde.org/D11382 will eventually land...
Comment 7 Varaskkar 2020-04-02 15:31:39 UTC
It's fantastic hearing that, Nate. In the long run, this is a feature that gonna save us all a lot of time
Comment 8 Mihai Sorin Dobrescu 2020-04-02 16:41:18 UTC
Hello, I was using the KDE Plasma session restoration feature.
If I let Dolphin open at shutdown, it is restored after.
I use this only to restore Dolphin sessions, but some more usually comes.
I'd like to have this feature without involving other apps restoration.

As note, at some point, Dolphin started to complain at shutdown, by opening the dialog that is generally used when a Dolphin instance, with several tabs open,is closed and asks if the intention is to close the current tab or all.

This is not nice for the shutdown time.
Comment 9 Nate Graham 2020-04-20 19:16:11 UTC
*** Bug 420266 has been marked as a duplicate of this bug. ***
Comment 10 Nate Graham 2020-04-26 18:15:05 UTC
Git commit caf2fe1c4388420dc05c00c71b3d6d0617c6d424 by Nate Graham.
Committed on 26/04/2020 at 18:14.
Pushed by ngraham into branch 'master'.

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}
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

M  +9    -0    src/dolphinmainwindow.cpp
M  +36   -30   src/global.cpp
M  +7    -0    src/global.h
M  +24   -7    src/main.cpp
M  +4    -0    src/settings/dolphin_generalsettings.kcfg
M  +68   -22   src/settings/startup/startupsettingspage.cpp
M  +7    -1    src/settings/startup/startupsettingspage.h

https://commits.kde.org/dolphin/caf2fe1c4388420dc05c00c71b3d6d0617c6d424