MozillaZine

[Ext] Session Manager 0.4 to 0.4.3

Announce and Discuss the Latest Theme and Extension Releases.
Peng

User avatar
 
Posts: 778
Joined: November 9th, 2004, 2:31 pm
Location: Central Florida

Post Posted April 19th, 2006, 11:07 am

I have a question:

I like to keep the session backups made after crashes, but I don't at all want the session backups made after safe restarts. How do I keep the former at whatever amount I want but the latter at 0? The 'Number of older (crashed) session backups to keep' preference controls both together, right?

(BTW: Why is the options window/dialog/thing modal when opened from the toolbar button's menu (and presumably the Tools menu menu)? I really, really hate that. Modal dialogs usually just seem to inconvenience the user for no benefit whatsoever, as is the case with this one. Nothing explodes if you open it in another window or through the Extension Manager and leave it open while browsing.)
Hug Peng
(aka Matt Nordhoff)
Check out: Adblock Plus | FoxClocks | OpenBook

old zeniko
 
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post Posted April 19th, 2006, 11:41 am

Peng wrote:I like to keep the session backups made after crashes, but I don't at all want the session backups made after safe restarts.

Out of interest: why do you want to do that? And how will you remember which crashed session contains which sites if you don't rename them (renaming an older/crashed session will keep it from being automatically deleted)?

Anyway, to get what you desire, add the following line to your userChrome.js (which will revert this to the behavior of version 0.3.9):
Code: Select all
gSessionManager.keepOldBackups = function() { };

Peng wrote:Why is the options window/dialog/thing modal

Out of the same reason that Firefox' own Options dialog is modal: so that you won't lose the dialog behind the main browser window. I've just looked at how Firefox does it - and I've seen a few differences (mainly Firefox' Options dialog isn't modal when you've got instantApply activated). I'll fix that for the next release. Of course, you can already get rid of the "modal" bit throught the following userChrome.js line:
Code: Select all
eval("gSessionManager.openOptions = " + gSessionManager.openOptions.toString().replace("modal", ""));

alta88
 
Posts: 1003
Joined: January 28th, 2006, 3:08 pm

Post Posted April 20th, 2006, 9:39 am

either i'm doing something wrong or the behavior in .4.0 has changed..

previously, i had a [Previous Browsing Session] at the top of the list and to load upon startup, and to auto backup current session at shutdown. and 1 session to keep for crashes.

now, i always get an [Older Browsing Session ..], ahead of [Previous..], though the latter loads, is indicated in bold as default, and in fact does have the latest state at shutdown. i'd like to get rid of [Older..] but then that also gets rid of crashed sessions.

ideally, one could choose the name of the auto backup session on (normal) Fx shutdown. and crashed sessions (up to the pref number) would appear only if there's a crash.

is this possible?

old zeniko
 
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post Posted April 20th, 2006, 9:55 am

alta88 wrote:and 1 session to keep for crashes.

There never was an option for this.

alta88 wrote:i'd like to get rid of [Older..] but then that also gets rid of crashed sessions.

There's a one-line userChrome.js snippet for this right above your post.

alta88 wrote:ideally, one could choose the name of the auto backup session on (normal) Fx shutdown. and crashed sessions (up to the pref number) would appear only if there's a crash.

Crashed sessions only appear after a crash... they are now just treated as any other previous browsing session (of which I don't believe you'll still know what they contain after one or two restarts). Remember that the automatically created backups are not removed if you rename them. As for the name of the [ Previous Browsing Session ] - why would you want that one to be different? If it's the order in the session list which bothers you, try ordering it "newest to oldest".

alta88
 
Posts: 1003
Joined: January 28th, 2006, 3:08 pm

Post Posted April 20th, 2006, 11:19 am

'doh, peng just wrote the same thing, i usually read his posts carefully..

i guess the default 1 session appeared with .4, i don't recall the exact options, not a place i go to often.

mistake was setting crashed sessions to 0 to get rid of [Older..]; thanks for the snippet fix to get rid of that.

i certainly don't need more than 1 crashed session. the last session name of [Previous..] is fine enough, the [Older.. ] name doesn't ring well.. so as long as the auto backup one is always named [Previous ], [Older ] is gone, and crashed appear on crash, then that's perfect. i'd change the [Previous Browsing Session] mainly just to have something shorter, like [Last].

old zeniko
 
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post Posted April 20th, 2006, 1:39 pm

alta88 wrote:the last session name of [Previous..] is fine enough, the [Older.. ] name doesn't ring well.. so as long as the auto backup one is always named [Previous ], [Older ] is gone, and crashed appear on crash, then that's perfect. i'd change the [Previous Browsing Session] mainly just to have something shorter, like [Last].

What would you suggest instead of [ Older Browsing Session (...) ]? And to get the previous to [ Last ], just add the following line to your userChrome.js:
Code: Select all
eval("gSessionManager.backupCurrentSession = " + gSessionManager.backupCurrentSession.toString().replace(/(getSessionState)\([\s\S]*?\);/, '$1("[ Last ]");'));

alta88
 
Posts: 1003
Joined: January 28th, 2006, 3:08 pm

Post Posted April 20th, 2006, 2:50 pm

well this gets into subjective areas of personal preference, mine is just one opinion. but [Older ..] makes me think of a session with a long white beard.

if i were naming the defaults, i'd do the following for highest clarity for most users (english), for myself i'd make them nice and short.

[Most Recent Session 2006-04-21 23:15:45]
[Previous Session 2006-04-20 21:15:45]
[Previous Session 2006-04-19 11:15:45]

but dates certainly need to be optional, as you already do; if so i'd add ordinals to Previous
[Previous (1) ]
[Previous (2) ]

and i'd put them in a section sortable by time, separate from the named session section sortable by alpha. just a tweak on what you do now.

dougeeebear

User avatar
 
Posts: 548
Joined: September 15th, 2005, 4:17 pm

Post Posted April 20th, 2006, 3:20 pm

I use the following:

[ History Session (date/time) ]
[ Previous Browsing Session ]

Peng

User avatar
 
Posts: 778
Joined: November 9th, 2004, 2:31 pm
Location: Central Florida

Post Posted April 20th, 2006, 3:52 pm

zeniko wrote:Out of interest: why do you want to do that? And how will you remember which crashed session contains which sites if you don't rename them (renaming an older/crashed session will keep it from being automatically deleted)?

Anyway, to get what you desire, add the following line to your userChrome.js (which will revert this to the behavior of version 0.3.9):
Code: Select all
gSessionManager.keepOldBackups = function() { };


I don't remember which sites I had open, but I like to only keep five session backups, and create new ones when they're useful: When I've created one because I was closing all but one tab to mess with extensions or something, or after a crash, when another crash could happen soon and damage my session.

I do always rename crashed sessions (remember when I asked for a default different name? :P ), so I guess I don't need to do anything.

zeniko wrote:Out of the same reason that Firefox' own Options dialog is modal: so that you won't lose the dialog behind the main browser window. I've just looked at how Firefox does it - and I've seen a few differences (mainly Firefox' Options dialog isn't modal when you've got instantApply activated). I'll fix that for the next release. Of course, you can already get rid of the "modal" bit throught the following userChrome.js line:
Code: Select all
eval("gSessionManager.openOptions = " + gSessionManager.openOptions.toString().replace("modal", ""));


Oh. I keep instantApply on, so I didn't know the Firefox preferences window was modal otherwise.

Thanks for changing it in the next release. I'm still not installing userChrome.js, because it does look useful, but I haven't found something I really, really want with it yet; I don't know JavaScript, so I can't create userChrome.js snippets myself; and I want to avoid JS hacks, because they could be potentially harmful.

(I need to read all of the posts after the one I'm responding to. So, yeah. I haven't read them yet.)

Edit: Eep. Typo.

Edit: And some bad writing. Well, I'll deal with that later. Or, more likely, never.
Last edited by Peng on April 21st, 2006, 5:58 am, edited 2 times in total.
Hug Peng
(aka Matt Nordhoff)
Check out: Adblock Plus | FoxClocks | OpenBook

stoneflash
 
Posts: 22
Joined: April 20th, 2006, 3:59 pm

Post Posted April 20th, 2006, 4:00 pm


old zeniko
 
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post Posted April 21st, 2006, 5:07 am

@alta88, dougeeebear, Peng: Thanks for the input. I'll think about it.

@stoneflash: Thanks. I've already included it in the latest <a href="http://www.haslo.ch/zeniko/software/sessionmanager-dev.xpi">testing version</a> (0.4.0.4+).

********
 
Posts: 947
Joined: August 24th, 2005, 12:23 pm

Post Posted April 21st, 2006, 2:57 pm

zeniko, what would be the userChrome.js code to make the toolbar button menu so that when i right-click a session, i can rename it, and when i middle-click a session, it brings up a confirmation dialog to delete the session? i don't want any menuitems removed from the toolbar button menu. thanks.

********
 
Posts: 947
Joined: August 24th, 2005, 12:23 pm

Post Posted April 21st, 2006, 6:37 pm

thanks for making me do it myself, because i did :)
presenting a userChrome.js spinnet for Session Clicking Shortcuts
it does the following:
1. right-click a session to rename it
2. middle-click a session to remove it
3. bolds the session to be resumed
WARNING: This spinnet is not compatible with the TMP style context menu snippet!

Gary King
 
Posts: 983
Joined: September 5th, 2003, 9:27 pm

Post Posted April 22nd, 2006, 12:09 pm

On the Mac, you can have Firefox running but have no window open. So, when I have Firefox running and no windows, and I open a URL, it opens a Firefox window with my homepage in the first tab, and then the URL in the second tab. What used to happen was that the URL would replace the first tab; I'd like this to happen again. I'm not sure if I'm clear or not, but basically, if the only tab saved is my homepage, then I DON'T want that session to be saved.

Or, how can I make it so that if only one tab is saved, then it is not saved at all?

old zeniko
 
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post Posted April 23rd, 2006, 7:26 am

@Gary: I've introduced a new pref in today's <a href="http://www.haslo.ch/zeniko/software/sessionmanager-dev.xpi">testing version</a> (0.4.0.6+) which allows to revert the behavior to what it was until version 0.3.9: extensions.crashrecovery.allow_empty_session (you'll have to set it in about:config). I haven't found a better alternative solution which wouldn't require second-guessing the user's intentions...

Return to Extension/Theme Releases


Who is online

Users browsing this forum: No registered users and 2 guests