Improvement requests
: K-Meleon Forum
Use this forum to talk about a feature you're missing. Use the bug tracker to report it if necessary.
Goto:
Forum List
•
Message List
•
Search
•
Log In
Your Name:
Subject:
Help information
BBcode help
Smileys help
[quote=JamesD] @ siria I have created a macro which allows switching between the default location and an alternate location for the "Favorites" folder. FavRenAdd will work with it, but both versions, ASCII and international, require your modification noted below. [quote=siria] _FavRenAdd_RnameTrue{ #### look two places for the favorites directory $_FavRenAdd_FavFolder=getpref(STRING,"kmeleon.plugins.favorites.directory"); [b]$_FavRenAdd_FavFolder=substr($_FavRenAdd_FavFolder,0,length($_FavRenAdd_FavFolder)-1);[/b] $_FavRenAdd_FavFolder==""?$_FavRenAdd_FavFolder=readreg("HKCU",.... [/quote] Adding the substr to remove the trailing "\" when the value comes from the pref is the only change needed to FavRenAdd. Thank you very much for your research and work on this. The following macro allows a user to switch locations. It does require a KM restart because the location is appearently only read at startup. I will get the updated FavRenAdd code to the MacroLibrary soon. [b]FavAltDir.kmm[/b] [code] # K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage) # # ---------- FavAltDir.kmm # ---------- For changing the pref which holds the location of "Favorites". #----------- Note the "windows standard" location does not use the pref. # # Dependencies : KM 1.5.x or later, main.kmm # Resources : ie favorites plugin # Preferences : "kmeleon.plugins.favorites.directory" # Version : 1.0 2010-01-01 # -------------------------------------------------------------------------------- _FavAltDir_Action { $_FavAltDir_AltDir = getpref(STRING, "kmeleon.plugins.favorites.directory"); if ( length($_FavAltDir_AltDir) == 0) { $_FavAltDir_AltDir = "DEFAULT"; } $_FavAltDir_Change = confirm( $_FavAltDir_AltDir, "Change from location shown? Cancel resets default", YESNOCANCEL, QUESTION ); #alert($_FavAltDir_Change, "$_FavAltDir_Change DEBUG", INFO); if ($_FavAltDir_Change == "YES") { $_FavAltDir_AltDir = promptforfolder(_("Select an alternate Favorites folder"), getfolder(ProfileFolder)); $_FavAltDir_AltDir = $_FavAltDir_AltDir."\\" ; setpref(STRING, "kmeleon.plugins.favorites.directory", $_FavAltDir_AltDir); alert("K-Meleon must be restarted\n\nfor the change to\n\n".$_FavAltDir_AltDir."\n\n to take effect.", "RESTART REQUIRED", EXCLAIM) ; } if ($_FavAltDir_Change == 0) { #alert($_FavAltDir_Change, "Running delpref DEBUG", INFO); delpref("kmeleon.plugins.favorites.directory"); alert("K-Meleon must be restarted\n\nfor the change to\n\nDEFAULT\n\n to take effect.", "RESTART REQUIRED", EXCLAIM) ; } } _FavAltDir_BuildMenu { # add another option to Favorites menu setmenu("F&avorites",macro,"Alternate Directory",_FavAltDir_Action,3); } ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $OnInit=$OnInit."_FavAltDir_BuildMenu;"; $macroModules=$macroModules."FavAltDir;"; [/code][/quote]
[Please Enable JavaScript]
K-Meleon forum is powered by
Phorum
.
Home/News
Screenshots
Download
Documentation
Resources
Get Involved
Forum
Bugs
Development