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] @ Yogi Thanks for the new bitmap image. Saved me a lot of work. Still have had no luck with the version for Privacy bar. The _PBProxTog_Status macro may be running at a wrong time. I always get green when sometimes I should get red. Also when I click on the button and the _PBProxTog_Button macro runs the image is gone. I am going to post the code in hope that someone can spot my mistake. I cannot see anything wrong with the pluginmsg(toolbars, "SetButtonImage", statement. The rest of the statement looks like this: [code] From PBProxyTog.kmm for Privacy bar using setclipboard &Privacy Bar,macros(_PBProxTog_Button), COLD, PBProxyTog.bmp[2] From ProxyTog.kmm for Proxy bar using setclipboard Proxy,macros(_ProxTog_Button), COLD, ProxyTog.bmp[2] [/code] Except for name change they are the same. For the PBProxyTog.kmm there has to be a button created in toolbars.cfg file. I put my code after User Agent. [code] User Agent{ ID_APP_ABOUT|&User Agent Check Browser Identity. Right-click to choose different User Agent. privbar_red.bmp[14] privbar_green.bmp[14] } [b] - Proxy{ macros(_PBProxTog_Button) Toggle proxy PBProxyTog.bmp[1] PBProxyTog.bmp[0] PBProxyTog.bmp[2] } [/b] %endif [/code] [b]PBProxyTog.kmm[/b] [code] # K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage) # # ---------- PBProxTog.kmm # ---------- Icon for proxy on and proxy off as part of privacy bar # ---------- Does not yet handle auto detect # # Dependencies : main.kmm, proxy.kmm # Resources : # Preferences : "network.proxy.type" # Version : 0.4 3/18/09 # -------------------------------------------------------------------------------- _PBProxTog_Status{ $_PBProxTog_ToolbarName = "&Privacy Bar" ; $_PBProxTog_Command = "macros(_PBProxTog_Button)" ; if (getpref(INT,"network.proxy.type") == 0) { #alert("In the zero loop", "status macro DEBUG", INFO); $_PBProxTog_IconTag = $_PBProxTog_ToolbarName.",".$_PBProxTog_Command.", COLD, PBProxyTog.bmp[2]" ; #alert($_PBProxTog_IconTag, "data for setbuttonimage DEBUG", INFO); setclipboard($_PBProxTog_IconTag); pluginmsg(toolbars, "SetButtonImage", $_PBProxTog_IconTag); } } _PBProxTog_Button{ # If a defined proxy is in use the status will be in getpref(INT,"network.proxy.type") alert($_PBProxTog_ToolbarName, "toolbar name DEBUG", INFO); alert($_PBProxTog_Command, "button name DEBUG", INFO); $_PBProxTog_Status = getpref(INT,"network.proxy.type"); if ($_PBProxTog_Status != 0) { # A proxy was in use CHANGE TO NOT IN USE setpref(INT,"network.proxy.type",0); $_PBProxTog_IconTag = $_PBProxTog_ToolbarName.",".$_PBProxTog_Command.", COLD, PBProxyTog.bmp[2]" ; pluginmsg(toolbars, "SetButtonImage", $_PBProxTog_IconTag); } else { # A proxy was not in use CHANGE TO IN USE setpref(INT,"network.proxy.type",1); $_PBProxTog_IconTag = $_PBProxTog_ToolbarName.",".$_PBProxTog_Command.", COLD, PBProxyTog.bmp[0]" ; pluginmsg(toolbars, "SetButtonImage", $_PBProxTog_IconTag); } } ProxTog_ToolsAlert{ if ( getpref(INT,"network.proxy.type") == 1 { $_PBProxTog_IconTag = $_PBProxTog_ToolbarName.",".$_PBProxTog_Command.", COLD, ProxyTog.bmp[0]" ; pluginmsg(toolbars, "SetButtonImage", $_PBProxTog_IconTag); } else { $_PBProxTog_IconTag = $_PBProxTog_ToolbarName.",".$_PBProxTog_Command.", COLD, ProxyTog.bmp[2]" ; pluginmsg(toolbars, "SetButtonImage", $_PBProxTog_IconTag); } } $OnInit=$OnInit."_PBProxTog_Status;"; $macroModules=$macroModules."PBProxTog;"; [/code][/quote]
[Please Enable JavaScript]
K-Meleon forum is powered by
Phorum
.
Home/News
Screenshots
Download
Documentation
Resources
Get Involved
Forum
Bugs
Development