After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 316245 - SessionSaver extension
SessionSaver extension
Status: RESOLVED WONTFIX
Product: epiphany-extensions
Classification: Deprecated
Component: general
unspecified
Other Linux
: Low enhancement
: ---
Assigned To: epiphany-extensions-maint
epiphany-extensions-maint
gnome[unmaintained]
: 321359 325265 325486 331129 337490 566992 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-09-13 22:07 UTC by Gustavo Gama
Modified: 2013-05-27 16:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
SessionSaver extension + patches to epiphany and epiphany-extensions modules (31.27 KB, application/x-bzip-compressed-tar)
2005-09-13 22:09 UTC, Gustavo Gama
  Details
Alternative "Quit" extension (3.56 KB, application/x-compressed-tar)
2005-09-13 22:51 UTC, Adam Hooper
  Details
SessionSaver extension (4.09 KB, application/x-bzip-compressed-tar)
2005-09-14 17:21 UTC, Gustavo Gama
  Details
SessionSaver extension rev. 3 (5.07 KB, application/x-bzip-compressed-tar)
2005-10-14 18:53 UTC, Gustavo Gama
  Details
SessionSaver Extension, rev. 4 (4.01 KB, application/x-bzip-compressed-tar)
2006-07-31 16:08 UTC, Gustavo Gama
  Details
Adds the GTK_STOCK_QUIT icon to the Quit entry added by the extension. (583 bytes, patch)
2006-08-02 04:38 UTC, Diego Escalante Urrelo (not reading bugmail)
none Details | Review

Description Gustavo Gama 2005-09-13 22:07:16 UTC
I remember seeing a couple of messages at #epiphany or epiphany@gnome.org asking
about how one might be able use the session recovery feature after a clean exit.
I decided to give it a try and write an extension that does just that. It
required a few changes to Epiphany's shell startup code, so it's certainly not
the cleanest design, but it's a start.

As a side note: I thought about two other ways to implement the same feature.
The first is a really ugly hack and I don't even have the guts to describe it,
but at least it requires no changes to Ephy's code. I'll keep hidden in the
dungeon for now. :-) The other would involve changing the "ephy_session_load"
function and would probably be the cleanest solution, but since I definetly
won't get it right on my first try, I thought I'd better post the patch as it is
now and wait for chpe's input before going any further.
Comment 1 Gustavo Gama 2005-09-13 22:09:05 UTC
Created attachment 52193 [details]
SessionSaver extension + patches to epiphany and epiphany-extensions modules

Diff's taken with "cvs diff -u". Not sure this is the desired format. Please
let me know if anything is broken.
Comment 2 Adam Hooper 2005-09-13 22:49:40 UTC
A few questions:

- Why did you need to change Epiphany's startup code? I wrote a similar
extension (unpublished) which didn't need any changes to Epiphany (I'll attach it).
- I gather you connect to the window's delete_cb because you want the window's
contents to be saved if you're closing the last window. That's an inconsistent
design: if I've got an Epiphany window open on Workspace 3 that I've forgotten
about, and I close the Epiphany window on workspace 1 which has 10 tabs, I'll
lose all those tabs. But if I closed the window on Workspace 3 and then closed
the one on Workspace 1, I'd keep the 10 tabs. This seems rather arbitrary: since
I'm going to have to stop and think before closing the window, why not just
stick with the "Quit" menu option?
- Check Epiphany's HACKING file for the correct coding convention.
Comment 3 Adam Hooper 2005-09-13 22:51:48 UTC
Created attachment 52195 [details]
Alternative "Quit" extension

I wrote this extension a while ago, but I never published it because chpe and I
couldn't find a single use case which justifies its existence. (chpe said it
won't be going into epiphany-extensions CVS unless we can find a use case.)

I never used it since I wrote it, so it may have bitrotted a bit. It could be
replaced by a 10-line Python extension, too.
Comment 4 Gustavo Gama 2005-09-14 17:18:48 UTC
Hi Adam,

The reason I had to mess up with Epiphany's startup code is to prevent an extra
window (with the user's homepage) from opening. IMO, when you are recovering a
saved session, you should get the exact same windows/tabs you had just before
you quited. In fact, my first implementation looked a lot like yours, but I
couldn't prevent the extra window from opening and ended up giving up and trying
a different route. Later, I tried patching ephy_session_load but it didn't work
too well either -- the best I got was to open an extra tab, instead of an extra
window. It seems to me that changing EphyShell is unavoidable, but I'm not sure
what's the best way to do so (new property? new priv attribute? something else?).

Now, regarding the "window closing" behavior, I'll have to disagree with you. I
 believe that, if the user has the habit of using multiple windows, then he
should use the "Quit" menu option to save the session. That's why the extra menu
item was added, right?!. However, if the user is a  "single window/multiple
tabs" kind of user -- such as myself :-) -- shouldn't we save the session when
he/she clicks the window's close button? It seems to me that such an user is
subconsciously "quiting the application". This issue is certainly open to debate
and I'm probably biased by my own usage patterns but I just thought I should
point this out. If the consensus is that the session shouldn't be saved in this
case, no problem, I'll just remove it.

Finally, the problem of "finding a single use case". Well, I don't have the
background to argue about "document-oriented" vs "application-oriented"
navigation, etc etc etc, so I'll skip this one, but I thought I should mention
Firefox's SessionSaver.2 extension
(https://addons.mozilla.org/extensions/moreinfo.php?id=436) just in case you
haven't heard of it. At the moment of this writing, the extension was downloaded
178801 times (11946 in the last week). That sounds like a lot of users to me;
someone *must* have found a use case :-). And, personally, I find the extension
pretty useful, specially when I'm experimenting/testing/debbuging Epiphany or
another extension's code, 'cause I usually have to restart Epiphany over and
over again.

Anyway, I'll attach a new version, quite similar to yours, that doesn't require
any changes to Epiphany, but suffers from the "extra window" issue.
Comment 5 Gustavo Gama 2005-09-14 17:21:50 UTC
Created attachment 52240 [details]
SessionSaver extension

No patches to Epiphany required in this version. It suffers from the "extra
window" bug, mentioned in comment #4 though.
Comment 6 Christian Persch 2005-09-27 18:49:03 UTC
The code looks mostly fine to me, although I'm a bit surprised calling
ephy_session_close from an extension actually works :)

You could simply keep track of the windows opened before and after opening your
session file; the diff is the unwanted window which you could just close?

However, I agree with Adam that this feature isn't well-defined.
Comment 7 Gustavo Gama 2005-10-14 18:53:16 UTC
Created attachment 53489 [details]
SessionSaver extension rev. 3

New revision, with some "voodoo" code to detect and destroy the initial window
with the user's homepage.
Comment 8 Reinout van Schouwen 2005-12-06 22:27:42 UTC
*** Bug 321359 has been marked as a duplicate of this bug. ***
Comment 9 Crispin Flowerday (not receiving bugmail) 2006-01-02 14:32:12 UTC
*** Bug 325486 has been marked as a duplicate of this bug. ***
Comment 10 Christian Persch 2006-01-08 15:00:53 UTC
*** Bug 325265 has been marked as a duplicate of this bug. ***
Comment 11 Christian Persch 2006-02-15 20:51:57 UTC
*** Bug 331129 has been marked as a duplicate of this bug. ***
Comment 12 Reinout van Schouwen 2006-07-14 19:48:05 UTC
*** Bug 337490 has been marked as a duplicate of this bug. ***
Comment 13 Reinout van Schouwen 2006-07-14 19:55:35 UTC
*** Bug 335331 has been marked as a duplicate of this bug. ***
Comment 14 Andrew Conkling 2006-07-14 20:34:27 UTC
Any reason this is implemented as an extension rather than just using Epiphany's native code for restoring tabs (i.e. what happens when you start it after killing it)?
Comment 15 Diego Escalante Urrelo (not reading bugmail) 2006-07-31 00:46:50 UTC
I can't make the extension work, i get NULL library errors.
Any idea?
Comment 16 Jean-François Rameau 2006-07-31 09:16:22 UTC
yes, there's a typo in sessionsaver.ephy-extension.in.in. Change "library" to "Library" in [Loader] section. Should work like a charm !

Jean-François
Comment 17 Gustavo Gama 2006-07-31 16:08:45 UTC
Created attachment 69982 [details]
SessionSaver Extension, rev. 4

It's about time I post an update to this extension. Since Epiphany 2.14, the shell startup code has changed quite a bit and it's now possible to have a clean implementation of the SessionSaver extension (no more "extra-windows", so no more hacks either. Yay! :-) ).

I haven't been able to test it against the latest CVS version, though, only the 2.14 branch. If anyone is currently running HEAD and is willing to give it a try, let me know if it works, please.
Comment 18 Diego Escalante Urrelo (not reading bugmail) 2006-08-02 04:38:21 UTC
Created attachment 70053 [details] [review]
Adds the GTK_STOCK_QUIT icon to the Quit entry added by the extension.

The extension was missing the Quit icon, this adds it.
Comment 19 Parag Baxi 2006-08-11 20:59:17 UTC
How does one install this?  i tried extracting it into my ~/.gnome2/epiphany/ directory but SessionSaver is not listed in extensions.

Thanks.
Comment 20 Sven Herzberg 2006-08-23 19:24:11 UTC
Comment on attachment 69982 [details]
SessionSaver Extension, rev. 4

Fixed the mime type to match tar.gz
Comment 21 Wouter Bolsterlee (uws) 2006-09-07 17:21:40 UTC
I would really love a dialog asking me if I really want to quit if I have >1 tab open.
Comment 22 Diego Escalante Urrelo (not reading bugmail) 2006-10-03 10:49:07 UTC
I found a huge problem while using this extension, basically my history stopped being used.

If I visited planet.gnome.org and later I tipped 'planet' on the location bar, the already visited url wouldn't appear.

I was using Ephy 2.14 at the moment, maybe it's gone now. Ideas of possible errors?
Comment 23 Sven Herzberg 2006-10-03 14:03:59 UTC
I found another problem (severe) with this plugin.

1. Visit a spam website that opens a popup window when you leave.
2. Close the window with <Alt><F4>
3. The popup appears (which is not good because all the other pages just have gone from the restore config).
Comment 24 Daniel Gryniewicz 2006-10-06 17:04:18 UTC
Thanks much for this extension.  I've added it to the Gentoo epiphany, and it finally make epiphany usable as my main browser.

Some people, me included, don't always leave their browser open all the time.  For example, sometimes I need to free up some RAM for a memory intensive operation, so I close my browser and evolution (which are usually open).  Without sessionsaver, I can't restore my session by closing epiphany and restarting it later, only by logging out and logging back in, which I basically never do (I suspend instead).

Of course, the added Exit entry on the menu is a huge bonus.  I'd use this extension just for that. :)
Comment 25 Karel Demeyer 2006-10-06 17:12:21 UTC
Could this extension become part of the official epiphany-extensions release, if not already so ?  it seems not te be included with Ubuntu's package.
Comment 26 Diego Escalante Urrelo (not reading bugmail) 2006-10-06 17:17:09 UTC
There's still some problems that need to be addressed (like comment #23, #22, #21)

Epiphany-extensions should be a package of reliable extensions for Ephy, if a extension isn't still ready it's the best to have it out of the package.

Maybe a package called epiphany-extensions-unstable can be created (or maybe even a --enable-unstable in e-e configure). I don't know.
Comment 27 Sven Herzberg 2006-10-06 17:37:15 UTC
Diego Escalante Urrelo (dieguito) write in comment 26
> Maybe a package called epiphany-extensions-unstable can be created (or maybe
> even a --enable-unstable in e-e configure). I don't know.

This is pretty dangerous, as long as they are pushed into the tarballs too (because people won't care about "unstable" and use them anyways). Although it would be a lot easier to resolve the remaining issue within CVS.

Dudes, instead of applying these unstable patches to your distribution, please just fix the remaining issue to make your users' live, your live, upstream's live, and the live of all the other users easier.
Comment 28 Daniel Gryniewicz 2006-10-06 18:35:51 UTC
comment #21 is an enhancement request, and one that I would prefer not to ever see.  I hate when programs ask me if I really meant to do something I did.  So I won't add that, but someone else certainly can.

comment #22 does not seem to be a problem with 2.16.0.  I've been using this for a day or so, and my history is being updated correctly.  I even specifically tested it with a site that I had not been to in epiphany (there was no history entry for it the first time I went), and it added it to my history.  This one seems fixed.

comment #23 doesn't seem to apply, as I have yet to see a single popup ever in epiphany.  If I ever see one, I'll take a look at fixing the problem.

In otherwords, it seems stable to me.  (It's not in stable gentoo yet, it's not even unmasked in gentoo yet.  But, there's no way to get this extension without building it in-tree, so I had to add it to be able to use it.)

If people would really prefer that I not include this in Gentoo, I can back it out and go back to firefox.  It's not a big deal for me.  But this is, in my opinion, extremely important, make-or-break functionality in a browser.  I would prefer to use ephiphany on a day-to-day basis, because I help support it in Gentoo, and I cannot use it without this.

For the record, I've already had one user contact me in the day it's been available in Gentoo, thanking me for including it, so it seems people want it.
Comment 29 Sven Herzberg 2006-10-06 19:40:24 UTC
Daniel, thanks for your very well founded argumentation. Applying unstable patches to distrubution packages seems to tell me very much about your attitude about "stable" installations.

Delivering this patch in a distribution will introduce these problems for you, us and the rest of the world:
* people will notice that gentoo's epiphany extensions are different from Gnome's
* people will notice the difference between the distributions
* people will come across pages opening popups (I just reported comment 23 was reported just after I launched epiphany and was left with just an advertizing popup) and you're ging to break ephy in this case
* people will report bugs to gentoo and to gnome although these bugs should not appear, because upstream considered this patch unstable

So in the end this is lots of bad experience for the users and lots of additional (and avoidable) work for the developers.

> so it seems people want it
If there weren't people, this patch wouldn't have been written.

> comment #23 doesn't seem to apply, as I have yet to see a single popup ever in
> epiphany.  If I ever see one, I'll take a look at fixing the problem.
By claiming that your absolute power on the internet on enough to avoid fix this issue you don't bring the world forward. The unload event handler in javascript as well as flash do provide enough potential to introduce these popups and as long as epiphany doesn't stop interpreting javascript (ar at least opening new windows) there's no reason to consider this patch "stable".
Comment 30 Daniel Gryniewicz 2006-10-06 21:46:22 UTC
You will notice, I specifically said that this is not in stable gentoo.  I don't know if you know or care what "masked" means, but it specifically means "use at your own risk, may be broken."  Gentoo uses this state some times to get further testing.

However, based on your recommendations, I've removed this from Gentoo.
Comment 31 Andrew Conkling 2006-10-06 22:47:34 UTC
(In reply to comment #29)
> > comment #23 doesn't seem to apply, as I have yet to see a single popup ever in
> > epiphany.  If I ever see one, I'll take a look at fixing the problem.
> By claiming that your absolute power on the internet on enough to avoid fix
> this issue you don't bring the world forward. The unload event handler in
> javascript as well as flash do provide enough potential to introduce these
> popups and as long as epiphany doesn't stop interpreting javascript (ar at
> least opening new windows) there's no reason to consider this patch "stable".

Could you post a link here so that others could reproduce this issue?
Comment 32 Reinout van Schouwen 2009-01-08 09:20:31 UTC
*** Bug 566992 has been marked as a duplicate of this bug. ***
Comment 33 André Klapper 2013-05-27 16:10:39 UTC
According to its developer, epiphany-extensions is not under active development
anymore. (For reference: https://mail.gnome.org/archives/gnome-i18n/2013-May/msg00035.html and bug 700924.)

It is unlikely that there will be any further active development.

Closing this report as WONTFIX as part of Bugzilla Housekeeping - Please feel
free to reopen this bug report in the future if anyone takes the responsibility
for active development again.