MozillaZine

Session Manager 0.1 to 0.3.9+

Talk about add-ons and extension development.
alta88
 
Posts: 1002
Joined: January 28th, 2006, 3:08 pm

Post Posted February 22nd, 2006, 9:22 am

minimal but informative is a noble goal, and such design is very difficult for sure. but might i suggest the following extremely simple solution:

toolbar button rt click, mouseover Save Session, menu expands to list all Sessions, clicking one saves it. selecting [new name] option brings up the dialog.

toolbar button rt click, mouseover Save Current Window, menu expands to list all Windows, clicking one saves it. a [new name] option brings up the dialog (for windows).

in one nearly bloat-free swoop this organizes windows & sessions very clearly. i'd also do a Replace Current Window with.. and Open New Window with.. using the same method, & etc. with some more thought, it may even be possible to get rid of the dialog box and actually reduce bloat.

anyway, i appreciate your listening. thanks for the multizilla tip - on quick look it looks like a Big App, but complete. not sure how i missed that one!

i'll do a test later on the one issue, i have 50+ extensions and was using a web site for homepage, and get back if it's still a problem.

Recall

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

Post Posted February 22nd, 2006, 3:12 pm

One request, could there be an option to hide the menu in tools please? Thanks!
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9) Gecko/2008051206 Firefox/3.0

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

Post Posted February 22nd, 2006, 3:15 pm

setting no homepage works fine, i'll just use that as default.

i realized there will always have to be a small dialog for new name or rename. but i think in the large majority of usage cases, the above method would never require a dialog popping up, which is a big plus i think.

ok - i'm done! :D

@recall

zeniko wrote:
Code: Select all
#sessionmanager-menu { display: none !important; }


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

Post Posted February 22nd, 2006, 6:35 pm

zeniko,
Warning this post contains bloat. ;-) :-)

yet another small tweak which popped into my head
to differentiate between saving a current window and a session


line 296
if (aOneWindow)
{
aName = aName+ " - Window";
state = state.split(this.mWindowSeparator)[0];
}

red italics = localized string

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

Post Posted February 23rd, 2006, 2:54 pm

I don't think that naming a marking a saved window as such will help much, since it will still be treated as a one-window session. If you wish, you can manually mark your saved windows as such (e.g. by prepending their name with a W_), but that won't prevent them to replace all other windows if the "Replace Existing Windows" option is checked. What you can do now (as of <a href="http://www.haslo.ch/zeniko/software/sessionmanager.xpi">Session Manager 0.2.10</a>) at least indicate where you want a session to be opened: shift+clicking and middle-clicking forces a new window (even with the replace option), ctrl+clicking adds tabs to the current window (if the session contained more than one window, all other windows are still loaded as such, though). As already mentioned, I'm no fan of sub-sub-menus or of popups on menus at all, so the save session, etc. dialogs will stay. Thanks for the suggestions, though - but I suppose the next step in usability would be (yet another) sidebar for the session list, and I somehow doubt that this would add so much to this little extension (which doesn't mean you might not see one soon, just don't expect one).

On a different note, you might enjoy this Russian rant about the pain of having to support yet another session saving extension and the call for a common API (which Crash Recovery/Session Manager tries to provide to some extent).

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

Post Posted February 23rd, 2006, 3:19 pm

zeniko: how about a preference to set the maximum number of crashed sessions to keep? I have installed this for a n00b and I can't imagine her knowing how to manage an unwieldy list of sessions.

Also, would it be possible to add the ability to select more than one session at a time when deleting sessions (i.e. via either <SHIFT>+click or <CTRL>+click)?

Thanks

By the way, I like the JavaScript Console info messages suggesting what may have caused the last crash. Nice touch. Kudos :wink: I sure wish the Mozilla devs would add such (user understandable) reporting to Gecko itself.

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

Post Posted February 23rd, 2006, 4:58 pm

@C@rb0n: Deleting multiple sessions at once will come for the next release. ~ Limiting the number of saved crashed sessions is unfortunately not really possible, since Session Manager itself can't tell a crashed from a "normal" session after creating the file. Since it is now possible to delete a bunch of sessions at once, this might be mostly alleviated. ~ As for the Console messages, I'm quite interested in those myself - since AFAICT they're not from Session Manager at all. I so far don't know of any way of telling what the cause of the last crash might have been...

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

Post Posted February 23rd, 2006, 5:15 pm

zeniko wrote:@C@rb0n: ... ~ As for the Console messages, I'm quite interested in those myself - since AFAICT they're not from Session Manager at all. I so far don't know of any way of telling what the cause of the last crash might have been...

Hmm. Maybe they're being generate by LiveHTTPHeaders, since that's the only type of report I'm getting. I doubt that it's being generated by Firefox (Trunk build -->Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051111 Firefox/1.5 ID:2006022223 ). Here's what is written in JavaScript Console:

<i>Crash Recovery: LiveHTTPHeaders seems to crash Firefox at file uploads!</i>

ps. Firefox is not actually crashing when these messages are generated. So don't know. :-k

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

Post Posted February 23rd, 2006, 5:50 pm

Oh, these... they're just reminding you of the fact that Crash Recovery/Session Manager currently won't save any file uploads and posted data (such as a message in these forums) while LiveHTTPHeaders is enabled. That's an incompatibility I haven't found a way around yet (and where I'm not sure whether it isn't actually LiveHTTPHeaders' fault). I'll disable the message in the next release for the case where POSTDATA saving is disabled (by setting the maximum amount to 0).

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

Post Posted February 23rd, 2006, 6:35 pm

zeniko wrote:Oh, these... they're just reminding you of the fact that Crash Recovery/Session Manager currently won't save any file uploads and posted data (such as a message in these forums) while LiveHTTPHeaders is enabled.

If I do a normal shutdown of the browser it saves the form data. Is it only on crash that it doesn't? Using Live HTTP Headers 0.12

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

Post Posted February 24th, 2006, 7:11 am

я прочитал етот 'рант', не понимал по русский ещё не по англиский.. :D

i've done a bit of testing on a clean profile, with .2.10, and windows/sessions open sized/located properly.

however, the state of toolbars/sidebars i'm not sure about. if i close a sidebar in one window of three, save the window, on restart that window will have a sidebar. what's the plan here?

i have to say, i find it hard to use due to the inability to differentiate window and session. also, i would not use the keyboard shortcuts - not possible or desirable for me to remember that sort of thing given how many other apps are competing. don't know how many average users will be in the same boat.

also can't see how a sidebar is in any way preferable to (certainly not 'liter' than) an extra submenu. it will now take even more clicks and work to get stuff done that should take no effort.

i suppose i have to figure out how to do custom buttons now - because what i really want is a button to save this window, one to save this session (all windows), and one to bring up list of sessions+their windows and a list of windows and let me select which one i want.

you want to build a smart car instead of a hummer. but you cannot avoid rear view mirrors or door handles, no matter how 'small'. ;)

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

Post Posted February 24th, 2006, 11:51 am

@C@rb0n: Form data of the current pages is always saved. POSTDATA is form data that has been sent to the server (e.g. by posting in this forum). Not storing POSTDATA will simply prevent you from revisiting e.g. preview pages after a crash/restart.

@alta88: Sidebars so far haven't been considered, at all. As of <a href="http://www.haslo.ch/zeniko/software/sessionmanager.xpi">0.2.11</a>, I do some minimal sidebar state restoring, but don't expect too much of it. ~ As for the inability to differentiate between windows and sessions: there shouldn't be any need, since this is a Session Manager (and no window manager). The "Save Current Window..." item is simply a shortcut for closing all other windows, saving the session and restoring all other windows (except it doesn't really close and restore the windows). ~ As for the keyboard shortcuts: since there aren't any, you aren't forced to use any, at all, since you can access everything through the menu. And if you don't want to take advantage of keyconfig, that's completely your choice. ~ As for the sidebar, the advantage would be that it doesn't close after one operation. However, I've decided against it. ~ As for the buttons: the one toolbar button already does all three, depending on which mouse button you click: left for session saving, middle for window saving, right for getting the list - except that as already mentioned there's no separate window list (which you'd need a different extension for). ~ And as for your car metaphor: what precisely would be the mirrors and door handles in this case?

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

Post Posted February 24th, 2006, 12:27 pm

zeniko wrote:@C@rb0n: Form data of the current pages is always saved. POSTDATA is form data that has been sent to the server (e.g. by posting in this forum). Not storing POSTDATA will simply prevent you from revisiting e.g. preview pages after a crash/restart.

I see what you mean. Confirmed.

By the way, thank you for adding the ability to select and delete multiple sessions.

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

Post Posted February 24th, 2006, 9:43 pm

zeniko,

I've hit upon a strange, rare (and probably not affect many people) bug which I believe is in FireFox but SessionManager exposes.

If one disables xul caching (as I do, especially when working on my extensions) the restoreWindow function of CrashRecovery module fails (ie a window is opened but no tabs restored)

Error: aWindow.getBrowser is not a function
Source File: file:///PATH TO PROFILE REMOVED/extensions/%7B1280606b-2510-4fe0-97ef-9b5a22eafe30%7D/components/crashrecovery.js
Line: 634

---------------------------------------------------------------
Error: uncaught exception: [Exception... "'[JavaScript Error: "aWindow.getBrowser is not a function" {file: "file:///PATH TO PROFILE REMOVED/extensions/%7B1280606b-2510-4fe0-97ef-9b5a22eafe30%7D/components/crashrecovery.js" line: 634}]' when calling method: [nsICrashRecoveryService::restoreWindow]" nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)" location: "JS frame :: chrome://sessionmanager/content/sessionmanager.js :: anonymous :: line 309" data: yes]
-------------------------------------------------------------------


To reproduce:
1. disable xul caching (doesn't use the XUL.MFL file) via about:config (you might have to add the pref)
nglayout.debug.disable_xul_cache --> true
2. restore a session

Result: Blank window is opened but tabs not restored.....


if the value of the pref is 'false' no errors are generated and all works perfectly. As far as I tested, all parameters are being passed correctly throughout SessionManager and as well to CrashRecovery component. It it only after the window is opened that the CrashRecovery restoreWindow function returns an error. As I said this appears to be an issue with FireFox core but I don't have the technical skills to pursue beyond this point. If you agree perhaps you can file a bugzilla report as you could explain (and know about the components) much more than I do....

bhe2g1
 
Posts: 31
Joined: November 17th, 2004, 12:40 pm

Post Posted February 25th, 2006, 1:36 pm

zeniko wrote:@bhe2g1: I can't reproduce what you are describing. I've already included a hack for remedying the tabbar problem.


Alright since my first post about this I've been able to pin down with steps what I earlier described, hope this time it's reproduceable for you.

1. Starting from default Tab Mix Plus settings, go to Tab Mix Plus Options>Display button>Tab Bar tab, uncheck Close tab button. Switch to the Tab tab, on the line where Width shows 22 to 250 pixels change the 22 to 90, (Also unchecked session manager and crash recovery within Tab Mix Plus) click the OK button
2. In Session Manager enable Resume Current Session At Startup
3. Open two full rows of tabs plus one more tab to have one tab on a third row (blank tabs would do)
4. If not already focused, click on the tab on the third row to give it focus, close Firefox
5. Restart Firefox

Notice only two rows of tabs show. To make the third visible the scroll up arrow can be used. After making the third row visible if a new tab is created the scroll arrows disappear.

Using Session Manager v0.2.11.1 and Tab Mix Plus v0.3.0.4 in Firefox v1.5.0.1

Return to Extension Development


Who is online

Users browsing this forum: No registered users and 2 guests