Session Manager 0.1 to 0.3.9+

Talk about add-ons and extension development.
Locked
User avatar
Branstrom
Posts: 97
Joined: March 16th, 2004, 9:45 am
Location: Sweden
Contact:

Post by Branstrom »

Ugly toolbarbutton all of a sudden. Please change it back, or maybe I can make a new one for you.
C@rb0n
Posts: 1428
Joined: February 19th, 2005, 11:22 am

Post by C@rb0n »

Thanks, zeniko, for the feature. Much appreciated. However, I do agree with Recall in that I believe that the "Reopen Closed Windows" item should instead be a submenu under "Session Manager" so that the Tools menu can be kept minimal. I have already forced all of my other extensions, where possible, to use submenus.
alta88
Posts: 1029
Joined: January 28th, 2006, 3:08 pm

Post by alta88 »

hi zeniko,

i don't think window sizing/position is working the way i was thinking it should. i save session A, whose window is 1000x800 @ 0,0 and then resize and relocate the window to 500x1200 @ 0,1000 and add new tabs, then save a new session called B.

if i then switch to A, the window should resize/relocate. same if i switch to B. if i want to open a new window with B, then it's located/sized as when it was saved.

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

Post by old zeniko »

@Recall: I won't go "crazy" on features, but you'll excuse me if I add a little more than just what you need. As for the light version, it already exists: Crash Recovery. ;)

@Branstrom: The intention of that ugly button is to get somebody more apt than myself to design a better one... ;) If you would, that'd be great.

@C@rb0n: I don't like submenus to submenus (they're terribly difficult to open by mouse). However, I've decided to unify both menus into one. If that one gets too bloated, you can always reduce the number of displayed elements either through about:config or through some userChrome.css hacking...

@alta88: Is it better now?

Additionally, the Tab Mix Plus problem should now be solved (you might see some rescaling, but at least the tab sizes are correct). Then, Undo Close Tab has nevertheless been implemented (don't worry, you can switch that one off, too). And for keyboard junkies, there are two more keyconfig shortcuts:

Code: Select all

SessionManager.undoCloseTab();

Code: Select all

SessionManager.undoCloseWindow();
AnonEmoose
Posts: 2031
Joined: February 6th, 2004, 11:59 am

Post by AnonEmoose »

zeniko wrote:@Branstrom: The intention of that ugly button is to get somebody more apt than myself to design a better one... ;) If you would, that'd be great.

Call me nuts but I like the button image.
C@rb0n
Posts: 1428
Joined: February 19th, 2005, 11:22 am

Post by C@rb0n »

zeniko wrote:@C@rb0n: I don't like submenus to submenus (they're terribly difficult to open by mouse). However, I've decided to unify both menus into one. If that one gets too bloated, you can always reduce the number of displayed elements either through about:config or through some userChrome.css hacking...

Arrgh! :shock:
zeniko: please change it back. This is worse than before. Another menu item, under Tools, is better than this. :-s
Other than that, many thanks for adding this. I can now forget about the Sessionsaver and TMP functionalities. :biggrin:

By the way, is it possible to get the undo tabs functionality to work with "Tab Clicking Options" like undoclosetab extension did?
alta88
Posts: 1029
Joined: January 28th, 2006, 3:08 pm

Post by alta88 »

yes! almost there..

it works properly for one window and Replace Existing Window checked . but the whole point is to have a second or multiple windows, each with their own state. so if i File-->New Window a second window and choose Session A, then the B window is closed and A is properly sized/located.

now, i can save a Session C, with two windows open, each with their own tabs/sizing/location. so it's all or none; ie i can't add windows. is it possible to name Windows with their state etc.? so there basically exists Session state + Window(s) state(s). this is incredibly valuable for organizing various projects..

the Closed Windows list seems to mean more Closed Sessions, and not any individual window, as selecting any of them brings up Session C example.

some things:

1) upon start/restart, session manager should ask which session (or hopefully named Window) to start (if Resume Current Session is not checked).
2) seems i'm able to enter duplicate session names; both appear in the list and their different states are maintained, just have an identical name. TMP has a very nice way of handling this.

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

Post by old zeniko »

@AnonEmoose: Then you're probably not using Winstripe/Pinstripe or any other decently looking theme... ;)

@C@rb0n: Now that I got used to having everything in the same menu, I actually like it. If you don't, simply toggle the pref extensions.sessionmanager.submenus and you'll get a submenu inside the Session Manager menu (as you originally asked for it). And Tab Clicking Options should now recognize Session Manager.

@alta88: Session Manager now always opens a new window when loading a session. But keep in mind: Session Manager is no "Window Manager". Tab Mix Plus' session manager also manages window states. This extension doesn't and won't (it's already complex enough for my taste - I prefer not to have a separate Options screen, nor context menus on menu items). As for your two "things":
1) It shouldn't. I'll think about including a startup- and a shutdown-dialog (both optional), though.
2) Sure you're able to enter duplicate names. Why shouldn't you?
alta88
Posts: 1029
Joined: January 28th, 2006, 3:08 pm

Post by alta88 »

zeniko wrote: Session Manager now always opens a new window when loading a session.


does this mean now as in that's what it does now, or does that mean you've made a change? all i'm asking for is for opening a named session in one window to not close the other window. if it means knowing to save a session as only one window, fine.

zeniko wrote:
1) It shouldn't. I'll think about including a startup- and a shutdown-dialog (both optional), though.


optional is great, that's the way to do it. it's just so much easier to select on startup/shutdown.


zeniko wrote:
2) Sure you're able to enter duplicate names. Why shouldn't you?


well, this just forces someone to delete a particular name, and then save under that the same name. at least do a replace or add, sheesh.

sorry, i don't get this one. sure, you can name both your kids the same name. you could even have two database fields with the same name (but ya don't). :roll: if you can tell 'A' from 'A' you're far more clever than i am.
User avatar
logan
Posts: 3453
Joined: May 22nd, 2003, 3:51 pm
Location: NGC 2403
Contact:

Post by logan »

zeniko wrote:2) Sure you're able to enter duplicate names. Why shouldn't you?

Maybe by "handling" he means MySession, MySession(2), MySession(3), etc. ?
bhe2g1
Posts: 31
Joined: November 17th, 2004, 12:40 pm

Post by bhe2g1 »

Hi zeniko, a couple things I've noticed, both related to Tab Mix Plus.

In Tab Mix Plus I have my tabs set to display on multiple rows (Tab Mix Plus Options>Display>Tab Bar>When tabs don't fit width), after a certain number fill up one line the next tab starts a second line and so on (Max. number of rows to display is set to 5), using Session Manager with the Resume Current Session At Startup option enabled, closing Firefox then restarting it shows only one row of tabs loading from the previous session, the other rows are there they are just unseen unless I use the up and down scroll arrows to look through them. If I open a blank tab then close it all rows show themselves as expected. I think the tab width option could also be related (Tab Mix Plus Options>Display>Tab>Width), I have it set as 90 to 250 pixels. Possible to change Session Manager so it shows all rows of tabs on startup?

The undo close tab/window feature in Session Manager disables the undo close tab feature in Tab Mix Plus, how about an option to disable that feature (maybe an about:config entry?) in Session Manager to allow the one in Tab Mix Plus to be used?

Using Session Manager v0.2.4.2 in Firefox v1.5.0.1
Tab Mix Plus v0.3.0.3

Session Manager is working great so far for me, haven't lost a tab yet :)
Thanks for the extension zeniko
C@rb0n
Posts: 1428
Joined: February 19th, 2005, 11:22 am

Post by C@rb0n »

zeniko wrote:@C@rb0n: Now that I got used to having everything in the same menu, I actually like it. If you don't, simply toggle the pref extensions.sessionmanager.submenus and you'll get a submenu inside the Session Manager menu (as you originally asked for it). And Tab Clicking Options should now recognize Session Manager.

zeniko: thanks so much. I'm content now. :D
alta88
Posts: 1029
Joined: January 28th, 2006, 3:08 pm

Post by alta88 »

logan wrote:
zeniko wrote:2) Sure you're able to enter duplicate names. Why shouldn't you?

Maybe by "handling" he means MySession, MySession(2), MySession(3), etc. ?


actually, in TMP if you type in the same name in the save dialog as an existing name, the Save button auto changes to Replace (with focus) upon a type ahead style match. now that's slick. here, you literally get two undifferentiated names.

i can't emphasize enough how something that tiny makes users love an app. the Palm VP of Product Management spent 5 minutes at a presentation last fall boasting how they figured out a way to save *1* click when looking up addresses. the TMP guys just did that kind of user effort saving feature, probably without spending a couple of mil of R&D :)

no one wants to bloat an extension (especially a technical one) with fancy gui dialogs etc, so if these sort of prefs are userpref toggles or values, that's absolutely fine if you just document them. but not having certain basic usability aids for this reason is sorta not useful, unless yer just writing extensions for yer own fun.
User avatar
Recall
Posts: 1686
Joined: November 7th, 2004, 11:07 am
Location: United Kingdom

Post by Recall »

zeniko wrote:@Recall: I won't go "crazy" on features, but you'll excuse me if I add a little more than just what you need. As for the light version, it already exists: Crash Recovery. ;)


Code: Select all

SessionManager.undoCloseWindow();


Works fine now thanks, slight resizing on load but end result is fine. As to what I want, its not that at all. Its more the fact I hjave seen so many extensions get overluy bloated because the developer wants to please too many. When the emphasis should be on a small code base that is FAST which is essential for an extension such as this.

Your restoring speed is still a bit slower than sessionsaver which was not overly fast in the first place. So optimisation over features imo should be the current aim. You will win alot more user thru speed, reliablity and simplicity than a bloated, slower and altogether less accessable add-on.
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9) Gecko/2008051206 Firefox/3.0
AnonEmoose
Posts: 2031
Joined: February 6th, 2004, 11:59 am

Post by AnonEmoose »

I think there might be a very minor bug in the usage of the ISO8601 Date formatting
getMonth() = month (0 = January - 11 = December).
getDay() = numerical value of a day in the week (0 = Sunday - 6 = Saturday).
getDate() = numerical value of a day in the month (1 - 31).

I believe u need to add +1 to the month. Also, you probably meant to use getDate() instead of getDay()

function toISO8601(aDate)
{
return [aDate.getFullYear(), pad2(aDate.getMonth()), pad2(aDate.getDay())].join("-");
}

to be

function toISO8601(aDate)
{
return [aDate.getFullYear(), pad2(aDate.getMonth()+1), pad2(aDate.getDate())].join("-");
}



*****************************************************
Note: to anyone wishes the date to be in a 12 hour (am/pm) format, the querySessionName function can be modified from

var value = { value: aDefault || (new Date()).toString() };
to
var value = { value: aDefault || (new Date()).toLocaleString() };
Locked