MozillaZine

Session Manager 0.1 to 0.3.9+

Talk about add-ons and extension development.
aoeu
 
Posts: 11
Joined: February 19th, 2006, 3:37 pm

Post Posted March 13th, 2006, 3:08 pm

desertfox wrote:there is a simple undo-close button.

right-click a toolbar and go to customize...
find it, then drag it to the toolbar.

Could have sworn it wasn't there when I first found that generic button ;) Perhaps hadn't restarted after an update. Thanks for notifying me! Fits nicely, AND seems to have an intelligence of its own, no longer are the windows display on the end of the generic button, smart ;)

riowong wrote:1, Could the saved sessions of SessionSaver be migrated to Session Manager easily?

2, If I don't uninstall SessionSaver for keeping using saved sessions for the time being, could I uncheck all settings inside SessionSaver for solving conflicting issue with Session Manager?

I just copied the sessionsaver variables from my prefs.js (in your data folder Docs. & Settings/../Firefox/{id}/) to a new profile, then installed SM and SS, opened a sesison in SS, saved in SM, cleaned cookies, and repeated. Worked nicely.
Don't forget to delete the sessionsaver lines in your prefs.js, otherwise they'll just take up space.
Forgot -- then just copy the sessions folder back to your default profile, and done.
siGnatURe [in scii-art]

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

Post Posted March 13th, 2006, 4:23 pm

wcarloss wrote:Is there an about:config entry to add a menu item that says "Undo Close Tab" like the UndoCloseTab extension

There is no such option, but you could add it yourself with an extension such as MenuManipulator (which is to Mouse about as is keyconfig to Keyboard). I prefer not to show too much UI per default, but let you easily add ways of accessing the functionality yourself - through MenuManipulator, keyconfig, Tab Clicking Options (or TMP), etc.

C@rb0n wrote:could you please make the "Closed Windows:" and "Closed Tabs:" labels easier for those who are "visually impaired" to handle?

I'll think about it, although I don't want these labels to be too obtrusive for the rest. Until I find a solution (or get hinted at one), you could use the following CSS:
Code: Select all
#sessionmanager-menu menuitem[_id="windows"], #sessionmanager-toolbar menuitem[_id="windows"], #sessionmanager-undo menuitem[_id="windows"], #sessionmanager-menu menuitem[_id="tabs"], #sessionmanager-toolbar menuitem[_id="tabs"], #sessionmanager-undo menuitem[_id="tabs"] { font-size: 100% !important; color: menutext !important; }

dougeeebear wrote:Is there something I can change in sessionmanager.js (or some other hack) to stop tab history from being preserved in sessions, but keep it preserved on crashing?

Add the following method to gSessionManager and call it then on the result of getSessionState in the save method (should you need more help for this, just PM me):
Code: Select all
removeTabHistory: function(aState) {
  return aState.replace(this.mOneTabRE, function($0, $1) {
    var data = $0.split("\n\n");
    if (/^index=(\d+)/m.test(data[0])) {
      var index = RegExp.$1;
      data[0] = data[0].replace(/^(index=)\d+/m, "$11");
      return data.filter(function(aEntry, aIx) {
        var header = "[Window" + $1 + ".Entry" + index;
        return aIx == 0 || aEntry.indexOf(header + "]") == 0 || aEntry.indexOf(header + ".") == 0;
      }).join("\n\n").replace(/^(\[Window\d+\.Tab\d+\.Entry)\d+/gm, "$11");
    }
    return $0;
  });
},

aoeu wrote:I'd suggest a seperate entry in the Tools menu for closed tabs and closed windows -- as SessionSaver did. That way it was possible to press Alt-T->b->a (or was it 1) for the last tab, as I don't have any special shortcut extensions.

I'll think about it, although I'm not conviced that the Tools menu is the proper place for such a menu (Session Manager is a tool, a list of closed windows/tabs isn't). OTOH, [Alt]-[T] + [b] + [a] isn't the easiest way for restoring a tab - and just for that I won't add the desired menu. Please consider using keyconfig for creating [Ctrl]+[Shift]+[Z] or a similar shortcut or use the Undo Close toolbar button for one-click restoring.

riowong wrote:1, Could the saved sessions of SessionSaver be migrated to Session Manager easily?

As long as nobody steps forward and writes a conversion routine, you'll be stuck with having both extensions side-by-side and playing the load-it-save-it game (a note to developers: converting to Session Manager's file format should be quite simple - since you'll just have to deal with JavaScript objects -, converting from SessionSaver's format will thus be the main job).

riowong wrote:2, If I don't uninstall SessionSaver for keeping using saved sessions for the time being, could I uncheck all settings inside SessionSaver for solving conflicting issue with Session Manager?

AFAIK there's no (UI) option to disable SessionSaver's crash recovering feature (setting the hidden crashload pref to false might do the trick). You might thus get unexpected behavior after a crash. At worst, you'll have to disable SessionSaver if you don't want to uninstall it completely. In the end, you have to know that I just preemptively warn not to use SessionSaver at the same time - I've simply never tested it.

riowong

User avatar
 
Posts: 587
Joined: May 4th, 2005, 1:33 am

Post Posted March 13th, 2006, 8:16 pm

Thanks for zeniko's and aoeu's suggestions!! I'll try to convert those sessions in this week using your given ways! :)

cyberrus

User avatar
 
Posts: 144
Joined: October 15th, 2004, 5:42 pm
Location: Wroclaw, Poland

Post Posted March 13th, 2006, 9:25 pm

sorry not to read all the thread - maybe it was mentioned before... - does Session Manager contain Cache Fixer code (should I uninstall Cache Fixer when I install Session Manager)?

logan

User avatar
 
Posts: 3453
Joined: May 22nd, 2003, 3:51 pm
Location: NGC 2403

Post Posted March 13th, 2006, 9:29 pm

<a href="http://www.extensionsmirror.nl/index.php?showtopic=3630">Cache Fixer</a> is not part of Session Manager.

C@rb0n
 
Posts: 1426
Joined: February 19th, 2005, 11:22 am

Post Posted March 14th, 2006, 1:54 am

<b>zeniko:</b> I just had a crash whereby Session Manager lost a whole after restarting. I had three windows open (one being a popup) and, upon closing the popup, the browser crashed. The interesting thing about the crash is that, although the browser windows disappeared, something was still happening in the background (my mouse busy icon was showing) before the browser exited completely.

When I started the browser back up, after making sure the Firefox process was not still running, the browser started and loaded only the last active browser window. The other window and all its tabs were gone. Worse, since Firefox itself did not detect the crash, Session Manager also did not even the crash, and the crash recovery dialog did not appear. When I looked under Tools -> Session Manager, all that was listed was "Previous Session", and restore from that produced nothing but the same single windows.

I have now enabled the "Restore the list of reopenable closed windows at startup" to hopefully mitigate this bizarre crash scenario.

Is there anything you could do to mitigate something like this? For instance, how about keeping two previous sessions, like you used to (but name the older one something else), since what should have been my previous session of interest ended up getting overwritten when I restarted the browser thinking I would get a crash restore - not realizing a crash was not detected and I would therefore lose my session. This may be easier than a scenario whereby you toggle writing session data between two files.

Another piece of information, which might be helpful, is that the crash happended between 5-6 minutes past midnight; thus, I'm wondering if there could have been a date/time roll-over handling bug. Who knows, maybe there is such a bug and Session Manager got had trouble dealing with writing the session information, after I closed the popup, because it did not expect and thus did not take into account the change in date? Just a thought?

Thanks

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

Post Posted March 14th, 2006, 4:22 am

cyberrus wrote:does Session Manager contain Cache Fixer code

Yes it does (always has - just have a look at Session Manager's About dialog). Having Cache Fixer installed is harmless, but also useless.

C@rb0n wrote:I just had a crash whereby Session Manager lost a whole after restarting. I had three windows open (one being a popup) and, upon closing the popup, the browser crashed. The interesting thing about the crash is that, although the browser windows disappeared, something was still happening in the background (my mouse busy icon was showing) before the browser exited completely.

What do you precisely mean by "it crashed"? Currently only application errors are considered to be a crash (i.e. when the OS terminates the program at once). In your case, Firefox apparently had a chance of closing itself cleanly. Unless I can reproduce this sort of behavior, there won't be much I can do against this (since I've got no idea against what to do anything).

C@rb0n wrote:Is there anything you could do to mitigate something like this? For instance, how about keeping two previous sessions, like you used to (but name the older one something else), since what should have been my previous session of interest ended up getting overwritten when I restarted the browser thinking I would get a crash restore - not realizing a crash was not detected and I would therefore lose my session. This may be easier than a scenario whereby you toggle writing session data between two files.

I'll think about keeping the next older session around as well.

dougeeebear

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

Post Posted March 14th, 2006, 5:18 am

@zeniko:
Session Manager is now working exactly as I wanted it to.
Tab history is removed when saving a session, but retained in previous browsing sessions, crashed sessions and the closed windows list.

Thanks for your help... it is greatly appreciated :)

BTW, I just installed Console².
Excellent job on that one too.

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

Post Posted March 14th, 2006, 5:31 pm

i'm glad your Crash Recovery code is being added to the trunk. :)
It really follows the open source spirit of allowing developers to freely create new and great things.
your Session Manager is the best! my 20 lines are a joke compared to it :P
I liked the article. Definitely a good read.

mattcoz
 
Posts: 1015
Joined: November 7th, 2002, 11:15 pm

Post Posted March 15th, 2006, 11:27 am

I posted this idea in the RestartFirefox thread, but it probably makes more sense here. I'd like a seperate option to save the session when restarting Firefox, as opposed to exiting normally. I know I could save it myself, but this would be nice to have.

dougeeebear

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

Post Posted March 15th, 2006, 11:30 am

desertfox wrote:i'm glad your Crash Recovery code is being added to the trunk.

Here's my personal opinion regarding Firefox and crashing.
From this, I take it that Firefox expects to keep on crashing in the future.
It's as if they know it crashes so much they have to include a crash recovery system.
Apparantly they have no idea in the world what is causing the constant crashing.
They would be far better off trying to implement crash prevention instead.
I know about crashes, I have them all the time.
And from all the posts I have read, so does most everyone else.

I used to use Opera all the time, and I can't recall ever having it crash.
The only reason I am sticking with Firefox is because of the functionality the extensions provide.

Enough ranting... Session Manager saves my life.

@zeniko: How about a Crash Prevention extension? :)

mattcoz
 
Posts: 1015
Joined: November 7th, 2002, 11:15 pm

Post Posted March 15th, 2006, 11:33 am

dougeeebear wrote:
desertfox wrote:i'm glad your Crash Recovery code is being added to the trunk.

Here's my personal opinion regarding Firefox and crashing.
From this, I take it that Firefox expects to keep on crashing in the future.
It's as if they know it crashes so much they have to include a crash recovery system.
Apparantly they have no idea in the world what is causing the constant crashing.
They would be far better off trying to implement crash prevention instead.
I know about crashes, I have them all the time.
And from all the posts I have read, so does most everyone else.

I used to use Opera all the time, and I can't recall ever having it crash.
The only reason I am sticking with Firefox is the functionality the extensions provide.

Enough ranting... Session Manager saves my life.

@zeniko: How about a Crash Prevention extension? :)

Firefox crashes a lot less frequently than Internet Explorer in my experience, and when it does it's usually because I'm using an unstable nightly build.

dougeeebear

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

Post Posted March 15th, 2006, 11:44 am

mattcoz wrote:Firefox crashes a lot less frequently than Internet Explorer in my experience, and when it does it's usually because I'm using an unstable nightly build

I only use the latest released versions (1.5.0.1 as of now).
Ever since 1.5 I have had nothing but constant crashing.
I never had a problem with 1.0.7.
The only reason I'm not still using 1.0.7 is some of the extensions I am using now require 1.5+.

I haven't used IE in ages.

dougeeebear

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

Post Posted March 15th, 2006, 12:20 pm

Here's what seems to trigger *most* the crashes I encounter:

It seems to happen when I am scrolling a menu (no particular one).
It seems like I scroll the menu faster than firefox can keep up with me and it stops responding for a second or two, then crashes.

I seem to have a few less crashes if I slow down the processor speed by using a little MS utility I found, but I don't really like using it (shouldn't have to).

Gateway Laptop, 2.2ghz Intel Celeron, WinXP Home SP1.
Last edited by dougeeebear on March 15th, 2006, 1:17 pm, edited 2 times in total.

C@rb0n
 
Posts: 1426
Joined: February 19th, 2005, 11:22 am

Post Posted March 15th, 2006, 12:52 pm

mattcoz wrote:I posted this idea in the RestartFirefox thread, but it probably makes more sense here. I'd like a seperate option to save the session when restarting Firefox, as opposed to exiting normally. I know I could save it myself, but this would be nice to have.

Read zeniko's comment at the end of the Restart Firefox thread. Restart Firefox does not call a function that would let Session Manager know what's going on. If it did, Session Manager would properly support restoring session on restarting.

However, zeniko, is there not possibly a way Session Manager can work around this? For instance, Session Saver is able to restore sessions on restart in spite of Restart Firefox's flaws. Couldn't Session Manager determine that: no crash occurred but a "normal" exit did not occur, yet the browser did exit? I'm assuming you could detect this using a state variable with its value written to the session file and checked on the next read of the file.

Return to Extension Development


Who is online

Users browsing this forum: No registered users and 1 guest