Add an option to show tabs from last time when Dolphin starts
Needs ReviewPublic

Authored by ngraham on Mar 16 2018, 7:46 AM.

Details

Reviewers
rominf
Group Reviewers
Dolphin
VDG
Summary

Many web browsers (Firefox for example) offer a function to show tabs from last time when a browser starts. This patch implements this functionality as an option.

Test Plan
  1. Go to SettingsConfigure Dolphin...Startup
  2. Check Show tabs from last time
  3. Save settings
  4. Open a few tabs (probably with the splits)
  5. Close Dolphin
  6. Observe no notification on closing multiple tabs
  7. Open Dolphin
  8. Observe tabs and splits from last time

Diff Detail

Repository
R318 Dolphin
Branch
save-window-state
Lint
No Linters Available
Unit
No Unit Test Coverage
rominf requested review of this revision.Mar 16 2018, 7:46 AM
rominf created this revision.
rominf edited the test plan for this revision. (Show Details)Mar 16 2018, 7:47 AM
rominf edited the test plan for this revision. (Show Details)
rominf edited the test plan for this revision. (Show Details)

How does that behave when I start Dolphin a second time? I'm a person that usually has 5 Dolphin windows open with tons of tabs inside of them.

src/dolphinmainwindow.cpp
186

Instead of hardcoding those settings everywhere, please use KConfigXt (the kcfg files you can see for other places in Dolphin), like GeneralSettings

src/settings/startup/startupsettingspage.cpp
95

This wording could be improved (can't think of one right now)

rominf added a comment.EditedMar 16 2018, 7:59 AM

How does that behave when I start Dolphin a second time? I'm a person that usually has 5 Dolphin windows open with tons of tabs inside of them.

It opens a new instance of Dolphin identical to the previous one... I guess that's a wrong behavior. Should the new instance be fresh if there are other Dolphins running? If so, how to check this? DBus?

It opens a new instance of Dolphin identical to the previous one... I guess that's a wrong behavior. Should the new instance be fresh if there are other Dolphins running?

I don't know. Perhaps restore the set only once? (This would make for an awesome crash recovery feature btw) Best add VDG team as reviewers so they can chime in

rominf added a reviewer: VDG.Mar 16 2018, 11:08 AM

@rominf, are you planning to come back and work on this at all?

Restricted Application added a project: Dolphin. · View Herald TranscriptFeb 21 2019, 11:10 PM
Restricted Application added a subscriber: kfm-devel. · View Herald Transcript

@rominf, are you planning to come back and work on this at all?

Hi everyone. I worked on KDE because I was severely ill and couldn't work at a normal job and I wanted to do something valuable. Now I'm healthy and have a full-time job and also a business, so I don't have time for contributing to Free Software. So for now, I'm not planning to contribute to KDE in the nearest future.

Thanks for letting us know. I'm glad to hear that you're healthy, wealthy, and wise! :)

ngraham commandeered this revision.Feb 22 2019, 5:03 PM
ngraham added a reviewer: rominf.

I'll take over from here.

We have some WIP work to add a "single window mode" to Dolphin where all new window calls generate new tabs in the current window instead (D16648, D19150). What do folks think about making this an option only when that mode is being used? Or would that be too restrictive?

I'll take over from here.

We have some WIP work to add a "single window mode" to Dolphin where all new window calls generate new tabs in the current window instead (D16648, D19150). What do folks think about making this an option only when that mode is being used? Or would that be too restrictive?

Yep, hope to be getting the patch merged soon. To note that D16648 is not implementing a strict "single window mode". As in whilst all external calls are opened in an existing window (if it exists), one can still have multiple windows, similar to how most browser's open externally called URIs. I suggest the way this feature should be implemented is that the last dolphin instance closed will have its tabs re-opened. It's the simplest one to code up and makes sense to the user. However, users may find it annoying if they have many tabs sprawled over many windows and want to save them all; users can't drag tabs to other windows.

I'll take over from here.

We have some WIP work to add a "single window mode" to Dolphin where all new window calls generate new tabs in the current window instead (D16648, D19150). What do folks think about making this an option only when that mode is being used? Or would that be too restrictive?

Yep, hope to be getting the patch merged soon. To note that D16648 is not implementing a strict "single window mode". As in whilst all external calls are opened in an existing window (if it exists), one can still have multiple windows, similar to how most browser's open externally called URIs. I suggest the way this feature should be implemented is that the last dolphin instance closed will have its tabs re-opened. It's the simplest one to code up and makes sense to the user. However, users may find it annoying if they have many tabs sprawled over many windows and want to save them all; users can't drag tabs to other windows.

Yeah, that makes a lot of sense. Moving tabs between windows is something we should support in another patch. :)

intika added a subscriber: intika.EditedFeb 27 2019, 5:08 PM

Amazing :) great work and nice feature, tested this under v17.12.3 along with https://phabricator.kde.org/D19150... it works but

  1. Enabling the feature on the settings make the other startup settings grayed/disabled, this should not happen... may be because i am using v17, i will have a deeper look later on ;)
  1. Also this disable the warning about closing window containing multiple tab, it should not disable that warning even it tabs are saved.
  1. Restored window suffer from having right click disabled (can not right click on files)