MozillaZine

Session Manager 0.1 to 0.3.9+

Talk about add-ons and extension development.
Kupfel

User avatar
 
Posts: 416
Joined: December 18th, 2005, 10:03 pm

Post Posted March 6th, 2006, 10:47 pm

this is awesome ! i slowly got really sick of TMP's sessionmanager that screwed up in conjunction with 'Restar Firefox'. Finally a sessionsaver that works reliably and also restores cookies and form data. Great work.

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

Post Posted March 7th, 2006, 9:50 am

@Recall: There will never be a (hidden) pref to hide a menu entry. Ever. That'd just mean more code and one decision more for the user. Additionally, since I figured out how easy it is to create an Options dialog, I'm no fan of hidden prefs any longer - and I simply don't see an entry "Hide Session Manager's menu entry" fit into that dialog (which BTW has been nicely refactored). If you don't like CSS, try MenuManipulator or a similar extension instead (I suppose that this is not the only menu item you'd like to hide - so better get a universal solution from the start).

@C@rb0n: The typing lag should be every 10 seconds (unless you lowered the minimal saving interval) - if there is any. I've improved performance somewhat more, but there's hardly any place I could further cut down without losing accuracy (I'm already doing quite some caching to keep the impact minimal). I now measure an impact of around 100 to 120 ms per saving/closed tab with 3 windows à 10 tabs opened (on a machine about as performant as yours) - that should be barely noticeable. Now my concern is restoring...

Tahattmeruh
 
Posts: 5
Joined: March 7th, 2006, 10:46 am

Post Posted March 7th, 2006, 10:50 am

I have one window open with about 35 tabs and a second window with only one site.
I close the second window and then the first window. I get asked by FF if I want to close all 35 open
tabs. I click on yes.
When I start FF again, I get asked which session I want to restore. I click on Previous Session and
only the window with the 35 tabs opens. Not the second window or any other windows I had open.
With Sessionsaver, this worked.
Do I have to explicitly save the whole session before closing all windows?


Tahattmeruh

PS: zeniko, could you include a date in your changelog? Would be nice to see how fast you improve this extension

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

Post Posted March 7th, 2006, 10:56 am

problem restoring all windows..

i have two windows open (each in a different virtual desktop). SM is configured to <back up current session> at shutdown. i restart, select [Previous Browsing Session] and only one window is opened.

also, the problem i reported above regarding opening a named window|session from a running window and its tabs not opening but coming up blank, continues but is sporadic. just now, trying to open a named window caused it to come up blank but positioned right; on closing that window and trying again, the tabs came up but the position was wrong. and, bizarrely, closing and opening the new window a 3rd time made it come up right, with both tabs and position!

difficult to have confidence with such inconsistent behavior.

also, one \sessions file is named A and another B.session (also a backup.session), normal? is there a diffence saving a name as window then saving it as session (with one window) or the reverse?

but the new options dialog is very nice, i might even say user friendly.

[edit: huh, i was just writing the same thing as the post above was entered..]

Recall

User avatar
 
Posts: 1686
Joined: November 7th, 2004, 11:07 am
Location: United Kingdom

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

zeniko wrote:@Recall: There will never be a (hidden) pref to hide a menu entry. Ever. That'd just mean more code and one decision more for the user. Additionally, since I figured out how easy it is to create an Options dialog, I'm no fan of hidden prefs any longer - and I simply don't see an entry "Hide Session Manager's menu entry" fit into that dialog (which BTW has been nicely refactored). If you don't like CSS, try MenuManipulator or a similar extension instead (I suppose that this is not the only menu item you'd like to hide - so better get a universal solution from the start).

@C@rb0n: The typing lag should be every 10 seconds (unless you lowered the minimal saving interval) - if there is any. I've improved performance somewhat more, but there's hardly any place I could further cut down without losing accuracy (I'm already doing quite some caching to keep the impact minimal). I now measure an impact of around 100 to 120 ms per saving/closed tab with 3 windows à 10 tabs opened (on a machine about as performant as yours) - that should be barely noticeable. Now my concern is restoring...


Nice job on the options dialogue exactly as i had envisaged it. :)

Guess I will be d/loading another extension ( trying to keep mine to a minimum so less conflicts, thus the reason for the preference request. )
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9) Gecko/2008051206 Firefox/3.0

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

Post Posted March 7th, 2006, 11:31 am

@Tahattmeruh: You have to distinguish between closing your browser window by window and closing all windows together. You close window by window which will quit the browser when the last window is closed. Now, Session Manager only restores what was open when the browser actually exited. If you wanted both windows to be restored, quit through File -> Exit (which closes all windows together). SessionSaver stores closed windows for a few seconds and saves everything should the browser exit in that time. I originally considered this to be a bug (getting windows restored I had closed right before closing the browser) and now just disagree with this design decision...

As for the changelog dates: that would be too depressing. ;-) There are currently minor releases about every day and major ones about twice a week. Since version 0.1 is less than a month back, you can figure out the rest for yourself...

@alta88: The restarting problem sounds like you hit the bug in "Restart Firefox"/"Local Install" again. ~ As for the problems with restoring the windows: what's the status of the pref nglayout.debug.disable_xul_cache? What other extensions do you have installed? And do you get any errors in the JS console (make sure to enable the javascript.options.* prefs)? ~ As for the different file naming: that changed somewhere around version 0.2.2. Before it was just the filename, now the filename gets a .session extension.

Test4711
 
Posts: 1
Joined: March 7th, 2006, 12:38 pm

Post Posted March 7th, 2006, 12:40 pm

How about saving all the closed windows and clear the list if a new site is opened?
So closing all windows manually will restore all windows again.

dougeeebear

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

Post Posted March 7th, 2006, 1:15 pm

It would be nice if the closed windows list was saved on a crash and also at shutdown as a current session backup, especially in my case where I never have other actual windows open.
As it is, I only have preserved what is in the current window saved (as some others have noted).

I have Session Manager configured to Replace Existing Windows.

And zenico, with a little tweaking, I am able to overwrite the current window with undo closed windows without using ctrl-shift :)

Nice work on the latest release, btw.

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

Post Posted March 7th, 2006, 1:26 pm

Test4711 wrote:How about saving all the closed windows and clear the list if a new site is opened?
So closing all windows manually will restore all windows again.

No. If you close a window, you just close that window unless it was the last one and the browser is closed together with the window. If you want several windows to be restored, you'll have to explicitely say so (by quitting through File -> Exit). This extension won't try to second-guess your intentions. You might thus want to consider to adapt your habits to a more precise expression when interacting with your dumb-as-a-stone computer.

@dougeeebear: The list of closed windows is preserved when Firefox crashes. If you also want it to be preserved after regular shutdowns, you'll currently have to manually remove the line this.clearUndoData("window", true); after "quit-application" in sessionmanager.js or explicitely tell Session Manager to store the current session. And for the next release, I'll think about adding a pref for persisting the Undo Close list at shutdown...

dougeeebear

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

Post Posted March 7th, 2006, 1:52 pm

@zenico:
Preserving closed windows worked, but it worked too good :)
I was expecting them to be preserved in the [Previous Browsing Session], but they were preserved at startup, which is undesired.

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

Post Posted March 7th, 2006, 5:19 pm

ah i recall many pages back a restart bug - would getting rid of MTLI solve it? i'm on the verge of dumping that anyway..

as for nglayout.debug.disable_xul_cache - i don't have the pref. i've made sure both javascript.option prefs are true (strict was false).

but now i can't recreate it. as i said it's sporadic, seems if i don't start the second window but maybe do a lot of restarts or work with the first, after time trying to start the second will fail.

i won't bug you again unless i get some diags that are useful.. but i've never seen a sessionmanager error in the console.

thanks.

AnonEmoose
 
Posts: 2031
Joined: February 6th, 2004, 11:59 am

Post Posted March 7th, 2006, 5:21 pm

zeniko wrote:There are currently minor releases about every day and major ones about twice a week.
I can't count the times that I was creating a test case to present a 'bug' andit's possible cause/fix and then posting it (or customize SM for my own use), only to find that you just either fixed it or added the the feature.... hehehe.... Kudos.... :-)

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

Post Posted March 7th, 2006, 6:12 pm

zeniko wrote:@C@rb0n: The typing lag should be every 10 seconds (unless you lowered the minimal saving interval) - if there is any. I've improved performance somewhat more, but there's hardly any place I could further cut down without losing accuracy (I'm already doing quite some caching to keep the impact minimal). I now measure an impact of around 100 to 120 ms per saving/closed tab with 3 windows à 10 tabs opened (on a machine about as performant as yours) - that should be barely noticeable. Now my concern is restoring...

Thanks so much, zeniko. Sorry for being so demanding.
Last edited by C@rb0n on March 7th, 2006, 7:12 pm, edited 1 time in total.

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

Post Posted March 7th, 2006, 6:23 pm

ok, here we go. did some browsing with just one window, then tried to open the second, which failed. first several console errors.

Error: this.docShell has no properties
Source file: chrome://global/content/bindings/browser.xml
----------
Error: '[JavaScript Error: "this.docShell has no properties" {file: "chrome://global/content/bindings/browser.xml" line: 0}]' when calling method: [nsICrashRecoveryService::restoreWindow] = NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS
Source file: chrome://sessionmanager/content/sessionmanager.js
Line: 918
----------
Error: missing catch or finally after try
Source file: chrome://longtitles/content/longtitles.xul
Line: 86, Column: 2
Source code:
}
----------
Error: elt has no properties
Source file: chrome://browser/content/browser.js
Line: 3649


and extensions:

Generated: Wed Mar 08 2006 02:20:22 GMT+0100
User Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1
Build ID: 2006011112

Enabled Extensions: [62]
- Adblock Filterset.G Updater 0.3.0.2: http://www.pierceive.com/
- Adblock Plus 0.6.1.2: http://adblockplus.mozdev.org
- All-in-One Gestures 0.17.4: http://perso.wanadoo.fr/marc.boullet/ex ... ns-en.html
- All-In-One Sidebar 0.6.4: http://firefox.exxile.net/aios/
- Auto Copy 0.6.2: http://autocopy.mozdev.org
- autoHideStatusbar 0.3.5: http://caspar.regis.free.fr/ahs/
- ChromEdit 0.1.1.1: http://cdn.mozdev.org/chromedit/
- ChromEdit Plus 1.5: http://www.webdesigns.ms11.net/FrankFox/
- ColorZilla 0.8.3.1: http://www.iosart.com/firefox/colorzilla/
- Compact Menu 1.7.4.5: http://cdn.mozdev.org/compact/
- Console² 0.3.3: http://forums.mozillazine.org/viewtopic.php?t=318102
- Cookie Button in the status bar 0.8.5: http://basic.mozdev.org/cookiebutton/
- Copy Plain Text 0.3.2: http://mozmonkey.com/
- Customizable Toolbar Buttons 0.1.6: http://www.google.com/search?q=Firefox% ... %20Buttons
- DOM Inspector 1.8.0.1: http://www.mozilla.org/projects/inspector/
- Download Manager Tweak 0.7.1: http://dmextension.mozdev.org/
- DragToScroll 0.2: http://dragtotab.mozdev.org/dragtoscroll/
- EditCSS 0.3.5: http://editcss.mozdev.org
- Find Selection 0.3: http://www.stonie.co.uk/firefox/extensions/
- Findbar Basics 1.2.09: http://www.tom-cat.com/mozilla/
- FireFoxMenuButtons 1.1.5: http://firefoxmenubuttons.narod.ru/index2.html
- Flashblock 1.5.1: http://flashblock.mozdev.org/
- Forecastfox 0.8.5.2: http://forecastfox.mozdev.org/
- Forecastfox Enhanced 0.8.5.2: http://users.rcn.com/shoofy/forecastfox_enhanced/
- FoxClocks 1.2.70: http://www.stemhaus.com/firefox/
- functions for keyconfig 1.3.2: http://www.pqrs.org/~tekezo/firefox/ext ... keyconfig/
- googlebar 0.9.15.07: http://googlebar.mozdev.org/
- Greasemonkey 0.6.4: http://greasemonkey.mozdev.org/
- Image Zoom 0.2.3: http://imagezoom.yellowgorilla.net/
- ImageShack right-click 0.3.3: http://www.imageshack.us
- InFormEnter 0.4.6: http://informenter.mozdev.org/
- InspectThis 0.1.4: http://firefox.mackay.dyndns.info/exten ... spectthis/
- keyconfig 20050908.2: http://mozilla.dorando.at/
- Linkification 1.2.3: http://www.beggarchooser.com/firefox/
- Long Titles 1.2.1: http://home.etu.unige.ch/~robin0/LongTitles_en.html
- MenuManipulator 20051223.1.1: http://mozilla.dorando.at/
- Mozilla Calendar 0.3a1+: http://www.mozilla.org/projects/calendar/
- MR Tech Local Install 4.2.5: http://www.mrtech.com/extensions/local_install/
- NoScript 1.1.3.9: http://noscript.net
- OpenBook 1.3.4: http://www.chuonthis.com/extensions/
- Organize Status Bar 0.3: http://www.beggarchooser.com/firefox/
- PopupMaster 1.1: http://www.beggarchooser.com/firefox/
- Sage 1.3.6: http://sage.mozdev.org
- Save Link in Folder 1.0: http://www.achimonline.de/mozext/
- ScrapBook 0.22.10: http://amb.vis.ne.jp/mozilla/scrapbook/
- Search Button 0.4.11: http://www.pikey.me.uk/mozilla/
- SearchBox Sync 0.3.7: http://legege.com/mozilla/
- SearchWP 0.6.9b: http://legege.com/mozilla/
- Send Link button 0.1: http://www.splintered.co.uk/
- Session Manager 0.3.3: http://forums.mozillazine.org/viewtopic.php?t=380534
- ShowIP 0.7.99.12: http://l4x.org/showip
- SmoothWheel 0.44.7.20050605: http://smoothwheel.mozdev.org/
- StockTicker 1.0.3: http://www.roundtwo.com/product/stockticker
- Stylish 0.3: http://userstyles.org/stylish/
- Tab Mix Plus 0.3.0.5: http://tmp.garyr.net
- Table2Clipboard 0.0.2: http://dafizilla.sourceforge.net/table2clip
- Talkback 1.5.0.1: http://talkback.mozilla.org/
- TinyUrl Creator 1.0.1: http://mozmonkey.com/
- Unified Back-/Forward Button 0.2.1: http://forums.mozillazine.org/viewtopic.php?t=389946
- View Rendered Source Chart 1.5.02: http://jennifermadden.com
- WellRounded 0.43: http://www.breakzdjs.com/ltn100/wellrounded/
- x mod 0.6.5: http://www.google.com/search?q=Firefox%20x%20mod

Disabled Extensions: [14]
- About:Config 1.0: http://pitux.free.fr/
- Extended Statusbar 1.2.4: http://galeb.etf.bg.ac.yu/~ks040161d/fi ... sions/esb/
- Ez Sidebar 3.1.2006011301: http://piro.sakura.ne.jp/xul/_ezsidebar.html.en
- Fission 0.8.2: http://forums.mozillazine.org/viewtopic.php?t=370248
- FoxyTunes 1.1.5.4: http://www.foxytunes.org/firefox/
- Menu Editor 1.2: http://menueditor.mozdev.org/
- Mozilla Archive Format 0.6.3: http://maf.mozdev.org/
- MR Tech Link Wrapper 1.0: http://www.mrtech.com/extensions/
- NewsFox 0.4.1: http://newsfox.mozdev.org/
- Preferential 0.8.1: http://preferential.mozdev.org/
- Split Link 1.55.1: http://www.scorpiondb.com/firefox/extensions/splitlink/
- Stock Quote 1.2.4: http://jeeradej.webhop.org
- TripleSelect 1.7: http://patsis.brownhost.com
- Yet Another Search Trick (YAST) 0.2.7: http://extensions.geckozone.org/yast

Total Extensions: 76

Installed Themes: [2]
- Firefox (default): http://www.mozilla.org/
- Outlook 2003 Green 1.5.3: http://www.google.com/search?q=Firefox% ... 03%20Green

Installed Plugins: (7)
- Adobe Acrobat
- Java(TM) 2 Platform Standard Edition 5.0 Update 6
- Microsoft® DRM
- Mozilla Default Plug-in
- QuickTime Plug-in 6.5.1
- Shockwave Flash
- Windows Media Player Plug-in Dynamic Link Library

AnonEmoose
 
Posts: 2031
Joined: February 6th, 2004, 11:59 am

Post Posted March 7th, 2006, 6:38 pm

alta88 wrote:ok, here we go. did some browsing with just one window, then tried to open the second, which failed. first several console errors.

Error: this.docShell has no properties
Source file: chrome://global/content/bindings/browser.xml
----------
Error: '[JavaScript Error: "this.docShell has no properties" {file: "chrome://global/content/bindings/browser.xml" line: 0}]' when calling method: [nsICrashRecoveryService::restoreWindow] = NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS
Source file: chrome://sessionmanager/content/sessionmanager.js
Line: 918
----------
Error: missing catch or finally after try
Source file: chrome://longtitles/content/longtitles.xul
Line: 86, Column: 2
Source code:
}
----------
That's the same error I reported when xul caching is disabled. Probaly as zeniko said, it is taking the window a longer time than anticipated to set up for some reason (even though zeniko coded to loop if the window isn't set up/exsists yet). So far I can't figure why the loop exits yet the error persists....

On my machine I manually increase the value from '100' to '2100' in the crashrecovery.js (components folder)

if (!aWindow.getBrowser || !aWindow.getBrowser())
{
aWindow.setTimeout(this.restoreWindow_proxy, 2100, aWindow, root, aOverwriteTabs);

Return to Extension Development


Who is online

Users browsing this forum: No registered users and 2 guests