Improvement requests :  K-Meleon Web Browser Forum
Use this forum to talk about a feature you're missing. 
Choose which Session to Load at Startup
Posted by: George_Hall
Date: April 06, 2015 07:00AM

The ability to choose which session to loads at startup with he K-Meleon Browser would be an improvement.

The method to select which session loads at startup can only selected after the Browser Loads using the Sessions Options and after you restart the K-Meleon Browser the selected Session Loads.

This would give the same ability that the Session Manager Extension https://addons.mozilla.org/en-us/firefox/addon/session-manager/ enables in the Firefox Browser when the Browser Loads.

Options: ReplyQuote
Re: Choose which Session to Load at Startup
Posted by: rodocop
Date: April 06, 2015 08:16AM

George,

isn't that on screenshot what you are speaking about?



UPD.: well, I see that isn't...

I think this could be done with macrolanguage without heavy ff-addons.



Edited 1 time(s). Last edit at 04/06/2015 08:19AM by rodocop.

Options: ReplyQuote
Re: Choose which Session to Load at Startup
Posted by: siria
Date: April 06, 2015 09:43AM

Of course that was irresistible grinning smiley
Save as *.kmm into macros folder:
_________________
session_startupmenu{
plugin(rebarmenu, "&Load Session");
}
$OnStartup=$OnStartup."session_startupmenu;";
$macroModules=$macroModules."session_startupmenu;";
_________________

All this macro does is simply auto-clicking "Sessions > Load Session" and show this menu. With Escape it's cancelled.
The only question is, how to toggle this function on/off.
Guess I'll simply add in the sessions menu a line "Startup Session Menu"... will follow ;-)



Edited 1 time(s). Last edit at 04/06/2015 10:19AM by siria.

Options: ReplyQuote
Re: Choose which Session to Load at Startup
Posted by: siria
Date: April 06, 2015 10:22AM

Quote
George_Hall
...can only selected after the Browser Loads using the Sessions Options and after you restart the K-Meleon Browser the selected Session Loads.

Not really, sessions load instantly.

And here's the same with a pref to toggle it on/off smiling smiley
Must be switched ON first in the sessions menu to start working!

(Cannot attach anything here. Installation as usual, copy text into empty file, name it "session_startupmenu.kmm" and place into a macros-folder)
#---------------

#K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage2)
#
# ---------------------- session_startupmenu.kmm ----------------------
# Automatically show sessions list at browser start to pick one
#
# Version : v1 / 2015-04-06
# Menu : Sessions > Startup Session Menu (On/Off)
# Resources: Sessions Plugin, Rebarmenu Plugin
# Forum: http://kmeleonbrowser.org/forum/read.php?4,133055
# -------------------------------------------------------------------------------------------

session_startupmenu{
plugin(rebarmenu, "&Load Session");
}

session_startupmenu_Toggle{
macroinfo=_("Automatically show sessions list at browser start to pick one (Cancel=ESC)");
menuchecked=getpref(BOOL,"macros.session_startupmenu.auto");
togglepref(BOOL,"macros.session_startupmenu.auto");
statusbar(sub("%s",getpref(BOOL,"macros.session_startupmenu.auto")?$on:$off,_("Session menu at startup %s")));
}

_session_startupmenu_Build{
setmenu("&Sessions",macro,"Startup Session Menu","session_startupmenu_Toggle");
}

#--------------------- At Startup ----------------------------
getpref(BOOL,"macros.session_startupmenu.auto") ? $OnStartup=$OnStartup."session_startupmenu;" : 0;

$OnInit=$OnInit."_session_startupmenu_Build;";
$macroModules=$macroModules."session_startupmenu;";




Edited 1 time(s). Last edit at 04/08/2015 12:16AM by siria.

Options: ReplyQuote
Re: Choose which Session to Load at Startup
Posted by: George_Hall
Date: April 10, 2015 03:08PM

Quote
siria
Quote
George_Hall
...can only selected after the Browser Loads using the Sessions Options and after you restart the K-Meleon Browser the selected Session Loads.

Not really, sessions load instantly.

And here's the same with a pref to toggle it on/off smiling smiley
Must be switched ON first in the sessions menu to start working!

(Cannot attach anything here. Installation as usual, copy text into empty file, name it "session_startupmenu.kmm" and place into a macros-folder)
#---------------

#K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage2)
#
# ---------------------- session_startupmenu.kmm ----------------------
# Automatically show sessions list at browser start to pick one
#
# Version : v1 / 2015-04-06
# Menu : Sessions > Startup Session Menu (On/Off)
# Resources: Sessions Plugin, Rebarmenu Plugin
# Forum: http://kmeleonbrowser.org/forum/read.php?4,133055
# -------------------------------------------------------------------------------------------

session_startupmenu{
plugin(rebarmenu, "&Load Session");
}

session_startupmenu_Toggle{
macroinfo=_("Automatically show sessions list at browser start to pick one (Cancel=ESC)");
menuchecked=getpref(BOOL,"macros.session_startupmenu.auto");
togglepref(BOOL,"macros.session_startupmenu.auto");
statusbar(sub("%s",getpref(BOOL,"macros.session_startupmenu.auto")?$on:$off,_("Session menu at startup %s")));
}

_session_startupmenu_Build{
setmenu("&Sessions",macro,"Startup Session Menu","session_startupmenu_Toggle");
}

#--------------------- At Startup ----------------------------
getpref(BOOL,"macros.session_startupmenu.auto") ? $OnStartup=$OnStartup."session_startupmenu;" : 0;

$OnInit=$OnInit."_session_startupmenu_Build;";
$macroModules=$macroModules."session_startupmenu;";

I was wondering if it was possible to select which session that automatically before the the browserloads. In of selecting which session to load automatically from session options and then do a browser restart.

Besides I noticed a problem in K-Meleon 75 with "Load Session" if you delete the "Last Session" under Sessions options. If that is done you can not use "Load Session" to load sessions. If the "Last Session" is deleted your method that works like "Load Session" will not work in K-Me;eon 75.

To fix the problem of deleting "Last Session" in K-Meleon 75 can be fixed after a saved session is loaded automatically can be done with the Two ways below:

1. Use Duplicate Tab http://kmext.sourceforge.net/extensions/dublicatetab.7z macro to duplicate tabs while deleting the old ones to save the Session with the same name.

2. The other method is to use is to use a new a new name for the saved session deleting the old session name after a session is Loaded automatically.

Also if you have more saved session the above methods to fix the problem of deleting "Last Session" in K-Meleon 75 from the sessions options Must be done with every saved session in K-meleon 75.



Edited 1 time(s). Last edit at 04/10/2015 03:13PM by George_Hall.

Options: ReplyQuote


K-Meleon forum is powered by Phorum.