
K-Meleon in Spanish
Quote
Yogi
Just in case anybody else is also using the PBProxTog.kmm but with another skin and has problems making a suitable bitmap, I could try to make one. For sure it won't be perfect but more appropriate at least.
Somehow I have the feeling that I'm one of the very few (maybe only?) K-M user who uses a proxy on a regular basis
Quote
JamesD
@ Yogi
Finally got it working.
Quote
soccerfan
JamesD, could you possibly adapt PBProxyTog.kmm to km 1.1.x.
# 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 -- ver for KM 1.1.x & KM 1.5.x
#
# Dependencies : main.kmm, proxy.kmm
# Resources :
# Preferences : "network.proxy.type"
# Version : 0.6 3/24/09
# Author : JamesD
# --------------------------------------------------------------------------------
_PBProxTog_Status{
$_PBProxTog_ToolbarName = "&Privacy Bar" ;
$_PBProxTog_Command = "macros(_PBProxTog_Button)" ;
getpref(INT,"network.proxy.type") == 0 ? &_PBProxTog_S_E_0 : 0;
}
_PBProxTog_S_E_0{
$_PBProxTog_IconTag = $_PBProxTog_ToolbarName.",".$_PBProxTog_Command.", COLD, PBProxyTog.bmp[2]" ;
pluginmsg(toolbars, "SetButtonImage", $_PBProxTog_IconTag);
}
_PBProxTog_Button{
getpref(INT,"network.proxy.type") != 0 ? &_PBProxTog_B_N_0 : &_PBProxTog_B_E_1;
}
_PBProxTog_B_N_0{
setpref(INT,"network.proxy.type",0);
$_PBProxTog_IconTag = $_PBProxTog_ToolbarName.",".$_PBProxTog_Command.", COLD, PBProxyTog.bmp[2]" ;
pluginmsg(toolbars, "SetButtonImage", $_PBProxTog_IconTag);
}
_PBProxTog_B_E_1{
setpref(INT,"network.proxy.type",1);
$_PBProxTog_IconTag = $_PBProxTog_ToolbarName.",".$_PBProxTog_Command.", COLD, PBProxyTog.bmp[0]" ;
pluginmsg(toolbars, "SetButtonImage", $_PBProxTog_IconTag);
}
PBProxTog_ToolsAlert{
getpref(INT,"network.proxy.type")==1 ? &_PBProxTog_T_E_1 : &_PBProxTog_T_N_1 ;
}
_PBProxTog_T_E_1{
$_PBProxTog_IconTag = $_PBProxTog_ToolbarName.",".$_PBProxTog_Command.", COLD, PBProxyTog.bmp[0]" ;
pluginmsg(toolbars, "SetButtonImage", $_PBProxTog_IconTag);
}
_PBProxTog_T_N_1{
$_PBProxTog_IconTag = $_PBProxTog_ToolbarName.",".$_PBProxTog_Command.", COLD, PBProxyTog.bmp[2]" ;
pluginmsg(toolbars, "SetButtonImage", $_PBProxTog_IconTag);
}
$OnStartup=$OnStartup."_PBProxTog_Status;";
$macroModules=$macroModules."PBProxTog;";
Proxy_None{
menuchecked=(getpref(INT,$_Proxy_Active."type")==0);
setpref(INT,$_Proxy_Active."type",0); &_Proxy_Status;
}
Proxy_Auto{
menuchecked=(getpref(INT,$_Proxy_Active."type")==4);
setpref(INT,$_Proxy_Active."type",4); &_Proxy_Status;
}
Proxy_File{
menuchecked=(getpref(INT,$_Proxy_Active."type")==2);
getpref(STRING,$_Proxy_PACURL)==""?0: setpref(INT,$_Proxy_Active."type",2); &_Proxy_Status;
}
Proxy_Custom{
menuchecked=((getpref(INT,$_Proxy_Active."type")==1)*(getpref(STRING,$_Proxy_Custom.$ARG.".http")==getpref(STRING,$_Proxy_Active."http")));
$__srvr=getpref(STRING,$_Proxy_Custom.$ARG.".http");
$__port=getpref(INT,$_Proxy_Custom.$ARG.".http_port");
# When no server url is set, do not change anything!
$__srvr==""?0: setpref(STRING,$_Proxy_Active."http",$__srvr);
$__srvr==""?0: setpref(INT,$_Proxy_Active."http_port",$__port);
$__srvr==""?0: setpref(INT,$_Proxy_Active."type",1); &_Proxy_Status;
}
Any help appreciated. If needed, I could post the entire contents of proxy.kmm


_PBProxTog_B_N_0{
setpref(INT,"network.proxy.type",0);
$_PBProxTog_IconTag = $_PBProxTog_ToolbarName.",".$_PBProxTog_Command.", COLD, PBProxyTog.bmp[2]" ;
pluginmsg(toolbars, "SetButtonImage", $_PBProxTog_IconTag);
setpref(INT,$_Proxy_Type,0); statusbar(_("Connecting directly"));
}
_PBProxTog_B_E_1{
setpref(INT,"network.proxy.type",1);
$_PBProxTog_IconTag = $_PBProxTog_ToolbarName.",".$_PBProxTog_Command.", COLD, PBProxyTog.bmp[0]" ;
pluginmsg(toolbars, "SetButtonImage", $_PBProxTog_IconTag);
setpref(INT,$_Proxy_Type,1); statusbar(_("Connecting over proxy"));
}
K-Meleon in Spanish


Quote
JamesD
@ soccerfan
Did you get the code to work in 1.1.x version? I have a 1.1.6 but I do not know how to set up a dummy proxy in that version. Much different from 1.5.2 I only changed the if statements to conditional statments. I have not gotten a test done in 1.1.6 I would suggest not to trust the button to change proxy until you check the condition with tools menu.
Quote
desga2
- Button is added in new toolbar. (Isn't possible add to default existed bars, I opened bug # 1092 about this)

Toggling Proxy on/off doesn't need to exit and reload K-M.Quote
MXB
Thought it didn't work at first but it appears one must exit and reload K-M before any change takes effect. I'll try and remember that in future.
Quote
Yogi
Toggling Proxy on/off doesn't need to exit and reload K-M.Quote
MXB
Thought it didn't work at first but it appears one must exit and reload K-M before any change takes effect. I'll try and remember that in future.
Changes take effect as soon as you hit the toggling button.
At least that's how it works with 1.5.4 here.
I can't tell for 1.6 beta which I didn't tested yet (shame on me) but I assume it will also work like 1.5.4 does.
Quote
Yogi
Toggling Proxy on/off doesn't need to exit and reload K-M.Quote
MXB
Thought it didn't work at first but it appears one must exit and reload K-M before any change takes effect. I'll try and remember that in future.
Changes take effect as soon as you hit the toggling button.
At least that's how it works with 1.5.4 here.
I can't tell for 1.6 beta which I didn't tested yet (shame on me) but I assume it will also work like 1.5.4 does.