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=jsnj] [quote=siria] Thanks for the hint, yet that's exactly what keeps confusing me... Because on one hand building menu lines works fine just with "setmenu", also for adding, deleting or modifying single items in a menu on-the-fly, sometime during a session. What I haven't understood yet, is how to delete or modify a "whole menu" on-the-fly (popup or inline). The description sounds easy enough, and yet... Perhaps I'm "sitting on the cable" as we say here ;-) What I'd need is a simple example macro. The given "proxy" example didn't really help when I tried it awhile ago, can't remember exactly why. Either the command wasn't in it at all or it was because the whole macro is about 3 levels above my own level. Didn't manage to find any other macro that uses it.[/quote] James's [url=http://kmeleon.sourceforge.net/wiki/KmmGroups2]Groups2[/url] macro also uses it. Setmenu can also delete or more accurately hide a "whole" menu. I used it to toggle visibilty of the "Previous Searches" popup menu in the Search+ extension. _SearchPreviousMenu{ getpref(BOOL, $_Search_pref_Prev.".OFF") ? setmenu("&Web Search",inline,$_SubM,0): setmenu("&Web Search",popup,_("&Previous Searches"),0); setmenu(_("&Previous Searches"),inline,_PreviousSearchList); $_loc=""; &_GetPrevCount; while($_p>0) &_Search_BuildPrevMenu; setmenu(_("&Previous Searches"),inline,"ClearPrevious"); setmenu(_("Searches"),inline,"ClearPrevious"); setmenu(ClearPrevious,macro,_("Clear Previous Searches..."),"_ClearPrevSearches"); } _TogglePreviousSearch{ menuchecked=(getpref(BOOL, $_Search_pref_Prev.".OFF")!=true); togglepref(BOOL,$_Search_pref_Prev.".OFF"); $_SubM=""; &_SearchPreviousMenu; } _Search_BuildPrevMenu{ $_PS=getpref(STRING,$_Search_pref_Prev.$_p.".name"); $_PQ=getpref(STRING,$_Search_pref_Prev.$_p.".query"); $_PS ? $_PS=$_PQ." --> ".$_PS:""; setmenu("_PreviousSearchList",macro,$_PS,"_OpenPreviousSearch(".$_p.")",$_loc); $_p=$_p-1; } Had to define $_SubM as " " OnInit (not to be confused with "" as shown above in TogglePreviousSearch) for it to work properly. Somewhat hackish solution maybe but I couldn't get rebuildmenu to work for me in this regard or for rebuilding the previous search list itself. I don't think it could've worked for what I wanted in Search+. I may have another look one day. EDIT: Just noticed that I'd toggled between defining the menu as inline and popup. Not sure why I did that originally. Keeping it as popup eliminates the need for $_SubM at all. Just hide the popup menu with "".[/quote]
[Please Enable JavaScript]
K-Meleon forum is powered by
Phorum
.
Home/News
Screenshots
Download
Documentation
Resources
Get Involved
Forum
Bugs
Development