DevHeads.net

Review Request: Konqueror: Ask for session restore ONLY on plain startup (not for every window)

Review request for KDE Base Apps and David Faure.

Summary
This patch stops asking for session restore for EVERY new window (popups!) and does so ONLY when initial konqueror process is started, and called without URL. Because i didn't want to loose all my crashed sessions and the 'import crashed sessions as bookmarks' feature disappeared sometime, i had been clicking on 'ask again later' 42 bazillion times. Restoring all the crashed sessions always brought down the process (imho each session should restore as individual process, but that is another patch).

Diffs
konqueror/src/konqmain.cpp 218e708
konqueror/src/konqmisc.cpp c46dc07

Diff: <a href="http://git.reviewboard.kde.org/r/101850/diff" title="http://git.reviewboard.kde.org/r/101850/diff">http://git.reviewboard.kde.org/r/101850/diff</a>

Testing
Tryed out and traced everything with GDB, does as says. Finally no huge crashed-session-parsing-delay for every stupid popup ^^

Thanks,

Marcel

Comments

Re: Review Request 101850: Konqueror: Ask for session restore ON

By David Faure at 10/27/2014 - 16:44

Any plans to update the patch according to our discussion?

- David Faure

On July 4, 2011, 11:44 p.m., Marcel Partap wrote:

Re: Review Request: Konqueror: Ask for session restore ONLY on p

By David Faure at 08/29/2011 - 12:09

konqueror/src/konqmain.cpp
<http://git.reviewboard.kde.org/r/101850/#comment5429>

So it won't ask when logging into a new KDE session? Seems to me that this could be kept here, no? It's not what you have been annoyed with ("on every popup").

konqueror/src/konqmisc.cpp
<http://git.reviewboard.kde.org/r/101850/#comment5430>

If you don't offer restoration when opening a new URL, then offering that only on process startup is not enough. When using preloading (and especially if one sets the use of preloading to "always"), then there is never a new process started, it's all in one process, and kfmclient simply talks to the running konqueror. So you would never offer restoration.

It seems to me that you would like it to run when "clicking on the konqueror icon only", but that icon is usually wired to kfmclient, not to konqueror directly. So it's kind of hard to make a difference, unless you add a different command-line switch to kfmclient which could then, when talking to a running konqueror, start by calling the "ask user" via DBus...

- David

On July 4, 2011, 11:44 p.m., Marcel Partap wrote:

Re: Review Request: Konqueror: Ask for session restore ONLY on p

By David Faure at 10/16/2011 - 06:27

I think you are forgetting one very common case that can happen:
on day 1, you browse lots of sites, logout, that's your saved session in the session management stuff.
on day 2, you browse different sites, but then the computer crashes, or you run out of batteries, or you type shutdown -h now.
on day 3, when you log into KDE again, standard session management will restore the windows from day 1, and crashed-session-restoring will offer to restore the windows from day 2, which are even more important to you, they are the ones you were viewing last.

So if you have konqueror-1 and konqueror-2 (two processes), and konqueror-2 crashes, and then you click on a link which calls kfmclient, it wouldn't offer to restore konqueror-2 urls, if you already did this once in the past...

I think the real issue here is that procrastination ("ask again later") is not a valid option in life :-)

- David

On July 4, 2011, 11:44 p.m., Marcel Partap wrote:

Re: Review Request: Konqueror: Ask for session restore ONLY on p

By Marcel Partap at 09/23/2011 - 02:34

Ok, although i consider it superfluous to ask for restoring crashed sessions in case a valid session can be restored, but that's just my personal preference.

- Marcel

On July 4, 2011, 11:44 p.m., Marcel Partap wrote:

Re: Review Request: Konqueror: Ask for session restore ONLY on p

By Marcel Partap at 07/19/2011 - 12:47

Uhhmm.. so can i commit this? David? .. (:

- Marcel

On July 4, 2011, 11:44 p.m., Marcel Partap wrote: