Extensions :
K-Meleon Web Browser Forum
All about K-Meleon extensions.
Help for the Proxy toggle toolbar appreciated
Date: September 29, 2014 01:14PM
Nice to see K-M is alive
Thanks to Dorian, all the contributors and all of you who didn't gave up the hope!
After more than a year I'm using K-M again. The stupid thing, in the intervening period I changed computers and worst of all I didn't save all the things I had about K-M.
Hence my question which is related to this old topic ->
http://kmeleonbrowser.org/forum/read.php?4,90245
Switching proxy on and off works fine. I only had to copy the code for the macro
It's about a separate toolbar, not the PrivacyBar.
I'm unable to make the image/bitmap to work as supposed. Since width and hight of the toolbar can be defined in the macro, that isn't the problem. I can't figure out the sequence of the buttons nor their number. According the macro (ProxTog.kmm by JamesD) there should be 3.
My stupid question: how many buttons the toolbar has and what is the sequence of them?
The server (http://www.perigee.net/~jmd8421r/ProxyTog.bmp) with the image example provided by JamesD is dead. The download link for
Proxy2 Extension kindly provided by desga2 is dead too
Thanks in advance!
Edited 3 time(s). Last edit at 09/29/2014 01:27PM by Yogi.
Re: Help for the Proxy toggle toolbar appreciated
Date: September 29, 2014 03:39PM
I am not sure whether I understand. & I know too little about proxies and kmm.
JamesD is still around so You may get a better answer tonight from US timezone.
The sites where the links in the other thread lead are down.
The pictures on an *.bmp are referenced starting with zero not 1.
The kmm code uses three pics 0,1,2 on a bmp.
This is an independent bar with the Proxy kmm button code from the other thread.
It has one button that uses (toogles between) pic 0 and pic 1 from a bmp called PBProxyTog.bmp.
&Proxy24,24){
%ifplugin macros
Proxy{
macros(_PBProxTog_Button)
Toggle proxy
PBProxyTog.bmp[1]
PBProxyTog.bmp[0]
}
}
Edited 1 time(s). Last edit at 09/29/2014 03:46PM by guenter.
Re: Help for the Proxy toggle toolbar appreciated
Date: September 29, 2014 03:43PM
@ Yogi
That is old stuff. I am on a trip this week and do not have any old stuff on this laptop. I can try to find it next week, but is only a small chance I still have it.
Re: Help for the Proxy toggle toolbar appreciated
Date: September 29, 2014 04:39PM
Quote
Yogi
Thanks to Dorian, all the contributors and all of you who didn't gave up the hope!
Welcome back, Yogi, great to have you in the boat again!
As for those who didn't give up hope, I'm afraid that were about zero people
Those proxy things are quite complicated macrowise, a bit too high for me, except building a basic button, that I've done before. But probably turns out less sophisticated than the original, and of course it would be much better to find that again. Since James isn't overly optimistic to still have it, perhaps ask desga if he still has it? He did the spanish 74 translation, so must be around somewhere. Or perhaps another user finds it in his files. I've searched around quite a bit myself now, but no luck.
If not found, it would be easiest as guenter suggested to build the button yourself by adding a few easy lines in toolbars.cfg, that can be done by most users themselves, and only adding the check-state by macro.
The alternative way is to build the whole button by macro, that would be handier for automatic use in different skins, but the coding is a lot more complicated.
As for pics, you probably need only 2 like the other priv-toggle buttons, just on and off, not dead.
(I cannot do without edits, sigh... PS guenter: move this thread to extensions to allow attachments? Or perhaps move the old thread with the dead links?)
PS2: the sample code needs an opening ( too: ...(24,24){
And if using "ifplugin", that should be closed with "endif" again, like other macro buttons in toolbars.cfg. I'd put the () around the whole toolbar.
Edited 3 time(s). Last edit at 09/29/2014 04:53PM by siria.
Re: Help for the Proxy toggle toolbar appreciated
Date: September 29, 2014 06:10PM
Quote
guenter
The pictures on an *.bmp are referenced starting with zero not 1.
The kmm code uses three pics 0,1,2 on a bmp.
That's what I also thought myself.
I made a toolbar with 3 pics/buttons but had no luck.
$_ProxTog_BWidth = "48" ;
$_ProxTog_BHeight = "16" ;
It doesn't work as supposed.
Besides, the original code of JamesD:
$_ProxTog_BWidth = "52" ;
$_ProxTog_BHeight = "14" ;
As you can see "52" doesn't give an even number if divided by 3 equals.
The funny thing is that the code worked for me with my own pics on the bmp. :mad:
Quote
guenter
This is an independent bar with the Proxy kmm button code from the other thread.
It has one button that uses (toogles between) pic 0 and pic 1 from a bmp called PBProxyTog.bmp.
&Proxy24,24){
%ifplugin macros
Proxy{
macros(_PBProxTog_Button)
Toggle proxy
PBProxyTog.bmp[1]
PBProxyTog.bmp[0]
}
}
Not exactly an independent bar IMO. That snippet is from the code for the PrivacyBar (PBProxTog = PrivacyBarProxyToggle).
Thanks anyway for trying to help.
Quote
JamesD
That is old stuff.
Indeed old stuff. We are getting older too
There is no rush and if you don't find anything that isn't neither a drama
I'm just puzzled about what I'm doing wrong.
@Siria
Thanks for the kind words.
As for the ProxTog.kmm, it works but not exactly as I had it working before I gave up all hope for K-Meleon.
It's just a small disfigurement but it nerves me because I can't figure out why. :s
That's how it looks now. My intention was to just toggle between the pics (blue/grey).
Re: Help for the Proxy toggle toolbar appreciated
Date: September 29, 2014 06:26PM
Thanks for moving
One little misunderstanding is clear: the width (52) is always meant for 1 button, not all three. The sum of all buttons is not given and flexible, that's the system.
My prob is, I have nothing to examine: no kmm, no bmp, no toolbars.cfg...
Could you attach here?
Do you perhaps have other proxy extensions installed except native and this one, that could get in the way with buttons?
If you say you already have a button in the privbar, that's not native in KM74.
Why not use that one, since you do show some other priv buttons too?
The command on the button can be adjusted of course to anything you like.
Edited 1 time(s). Last edit at 09/29/2014 06:32PM by siria.
Re: Help for the Proxy toggle toolbar appreciated
Date: September 29, 2014 06:33PM
Quote
siria
(I cannot do without edits, sigh... PS guenter: move this thread to extensions to allow attachments? Or perhaps move the old thread with the dead links?)
PS2: the sample code needs an opening ( too: ...(24,24){
And if using "ifplugin", that should be closed with "endif" again, like other macro buttons in toolbars.cfg. I'd put the () around the whole toolbar.
Done.
Yes thank You forgot endif / Best put ouside of bar.
Rest is IMHO correct except wrong edited (. Thanks again.
I should not edit code in forum because my mouse is hard to foccus.
There is Blue () around the whole bar. Or what do You mean?
%ifplugin macros
&Proxy(24,24)
{
Proxy
{
macros(_PBProxTog_Button)
Toggle proxy
PBProxyTog.bmp[1]
PBProxyTog.bmp[0]
}
}
%endif
I used &Save Page As... bar as example but had trouble editing.
&Save Page As...(24,24){
Save{
ID_FILE_SAVE_AS
&Save Page As...
mainbarhot.bmp[5]
mainbarcold.bmp[5]
mainbarcold.bmp[5]
}
}
Re: Help for the Proxy toggle toolbar appreciated
Date: September 29, 2014 06:44PM
IMO correct syntaxwise. Of course the exact names of command and bmp are flexible, and I don't know which macro that PBProxyTog belongs to or which shall be used instead.
Re: Help for the Proxy toggle toolbar appreciated
Date: September 29, 2014 06:53PM
Quote
siria
Thanks for moving
One little misunderstanding is clear: the width (52) is always meant for 1 button, not all three. The sum of all buttons is not given and flexible, that's the system.
My prob is, I have nothing to examine: no kmm, no bmp, no toolbars.cfg...
Could you attach here?
Do you perhaps have other proxy extensions installed except native and this one, that could get in the way with buttons?
If you say you already have a button in the privbar, that's not native in KM74.
Why not use that one, since you do show some other priv buttons too?
The command on the button can be adjusted of course to anything you like.
Why 52 for all three or what?
[24,24) is a square button. (Width,Height). And Yogy's button is (52,14).
In that location before the bar - the numbers pre-define all buttons in the bar.
Inside the bar a button can be defined differently from the rest.
The macros is in the thread that was linked by Yogy. The only thing I do not have is the bmp. The button code of priv bar should be much the same in 1.6 and 74. Since 1.x time only some macro names that are called in buttons changed.
Edited 1 time(s). Last edit at 09/29/2014 07:13PM by guenter.
Re: Help for the Proxy toggle toolbar appreciated
Date: September 29, 2014 07:31PM
Quote
siria
Thanks for moving
One little misunderstanding is clear: the width (52) is always meant for 1 button, not all three.
Dear Lady, you solved the problem!
Thanks!
I was gessing that it must be something very stupid on my part.
Now it works as it should.
Quote
siria
If you say you already have a button in the privbar, that's not native in KM74.
Why not use that one, since you do show some other priv buttons too?
The command on the button can be adjusted of course to anything you like.
The button you see in the picture is not on the PrivacyBar. It's a separate toolbar.
I used to use the ProxyToggle option on the PrivBar before but opted now for a separate toolbar.
Edited 2 time(s). Last edit at 09/29/2014 07:33PM by Yogi.
Re: Help for the Proxy toggle toolbar appreciated
Date: September 29, 2014 07:40PM
If only all probs were solved so easily!
Quote
guenter
In that location before the bar - the numbers pre-define all buttons in the bar.
Inside the bar a button can be defined differently from the rest.
That would be new, but perhaps was meanwhile fixed? Last time I tested was when building classiria skin, that's been a "little" while, and it was definitely not possible to get different button sizes inside the same toolbar. I dimly remember it might have been written somewhere, but it never worked. Neither with later macros. Perhaps now? didn't try yet in KM74.
Re: Help for the Proxy toggle toolbar appreciated
Date: September 29, 2014 07:56PM
Just in case someone might have use for it in the future, I'm attaching the ProxTog.kmm (written by JamesD) and the bitmap.
Edited 1 time(s). Last edit at 09/29/2014 07:59PM by Yogi.
Attachments:
ProxTog.kmm.rar (1.9 KB)
Re: Help for the Proxy toggle toolbar
Date: September 29, 2014 08:58PM
James, if you don't mind, I'd like to play with it and add checked button states?
Re: Help for the Proxy toggle toolbar appreciated
Date: September 30, 2014 04:06AM
Quote
Yogi
Just in case someone might have use for it in the future, I'm attaching the ProxTog.kmm (written by JamesD) and the bitmap.
Danke.
It will beuploaded to K-Meleon Extensions eventually. disrupted send me the PWD.
But I haven't had time to learn to work on the pages.
Quote
siria
If only all probs were solved so easily!
Quote
guenter
In that location before the bar - the numbers pre-define all buttons in the bar.
Inside the bar a button can be defined differently from the rest.
That would be new, but perhaps was meanwhile fixed? Last time I tested was when building classiria skin, that's been a "little" while, and it was definitely not possible to get different button sizes inside the same toolbar. I dimly remember it might have been written somewhere, but it never worked. Neither with later macros. Perhaps now? didn't try yet in KM74.
:O
Code Change in Pref bar.
User Agent(16,16){
ID_APP_ABOUT|&User Agent
Check Browser Identity. Right-click to choose different User Agent.
menu1.bmp[8]
menu1.bmp[8]
}
Result: Works partially only. Does not Change the size of the button. Refeneces icon correctly.
Quote
siria
James, if you don't mind, I'd like to play with it and add checked button states?
RFD. You could create a macro based skin button while You play with it.
Edited 2 time(s). Last edit at 09/30/2014 05:27AM by guenter.
Attachments:
Zwischenablage01.gif (5.3 KB)
Re: Help for the Proxy toggle toolbar appreciated
Date: September 30, 2014 08:39AM
Quote
guenter
Danke.
It will beuploaded to K-Meleon Extensions eventually. disrupted send me the PWD.
But I haven't had time to learn to work on the pages.
Keine Ursache!
There is also an extension for toggling proxies written by desga2.
Proxy2 Extension
As far as I can remember it's a more complex code. It would be worth to be uploaded too, so users can have more options to choose from. Since the download link is dead you will have to contact desga2 therefore. Maybe he still has the code.
Re: Help for the Proxy toggle toolbar appreciated
Date: September 30, 2014 08:42AM
Quote
guenterQuote
siria
James, if you don't mind, I'd like to play with it and add checked button states?
RFD. You could create a macro based skin button while You play with it.
What in the world means RFD...?? Ah, good thing there's acronymfinder in my search engines list
But I have no idea what you mean - this whole kmm that Yogi posted is ALL only about creating a macro button! Nothing else. Just checking a native pref value and creating a button that toggles it, together with the button image. Or so I thought... but now getting doubts... remembering later found there was one variable from the native proxy.kmm used in it, that I had first thought were undefined and didn't understand...
Re: Help for the Proxy toggle toolbar
Date: September 30, 2014 06:37PM
Quote
siria
James, if you don't mind, I'd like to play with it and add checked button states?
I consider it abandoned. You can do anything you wish to it.
Re: Help for the Proxy toggle toolbar appreciated
Date: September 30, 2014 09:27PM
Quote
siria
RFD...??
AFAIK Request For Development. But I might be wrong.
In North German: Mach hin.
Re: Help for the Proxy toggle toolbar appreciated
Date: September 30, 2014 09:31PM
Quote
Yogi
Maybe he still has the code.
Habe ihn angeschrieben. Manche Sachen an ihn sind aber schon als SPAM verloren gegangen.
Mal sehn, was von ihm kommt.
Edited 1 time(s). Last edit at 09/30/2014 09:33PM by guenter.
Macro ProxTog2: Button to toggle Proxy On/Off
Date: October 01, 2014 01:36AM
Quote
JamesDQuote
siria
James, if you don't mind, I'd like to play with it and add checked button states?
I consider it abandoned. You can do anything you wish to it.
Thank you
And am afraid I got a bit carried away, when finding there are actually 5 different types of networks in Mozilla. Then wanted to make the button toggle the "Last used" type, which turned into a longer struggle, because I had no clue which prefs would be involved, and then realized there's a younger gecko pref "system default proxy", which is default in FF since 3.6, but doesn't exist at all yet in KM... and then also wanted the button fitting to the privbar... etc....
--------------
Anyway, in the end it was so much different I renamed the whole thing now to
proxTog2.
The button is now created by
default in the privacy bar, but easy to use another toolbar if a user edits the kmm-file in a text editor.
The button will now
stay pressed if proxy is active.
If a user changed the proxy type, the button will
toggle the "last used" type.
The attached macro contains
text buttons for privbar with black or white text (default black, edit kmm to change, very easy). The small button from Yogi or any other buttons can of course also be used, after changing name and size in the kmm-file. That's prepared, only a few comment signs # must be removed.
The button now has the native
proxy menu on right-click.
It offers a
new option for "system proxy", but cannot test if it works.
NOTE: If the proxy type is toggled via menu or in pref sheets, the button can detect that change
only at next page load! Or by clicking it 2x. Until then it looks wrong, can't help it.
--------------
Wonder if anyone with a system proxy could test if that system-setting really works this way?? I only set the main pref, but couldn't figure out if more prefs need to be changed for it.
Installation as usual:
download the attachment and unzip it into the main K-Meleon folder, preserving the folder structure. Restart the browser.
Attachments:
ProxTog2.7z (3.4 KB)
Re: Macro ProxTog2: Button to toggle Proxy On/Off
Date: October 01, 2014 09:22AM
Nice work Siria!
I did test with a HTTP/HTTPS local proxy and a SOCKS local proxy. On/off, switching between them - everything works fine as expected.
Sorry for not testing with system wide proxy. I never set up a proxy system wide (hate it).
However I did test at least the system wide proxy setting empiric.
I simply set up some bogus server & port number and K-Meleon complained that the system wide proxy is refusing connections.
So far that option seems to work as well.
Re: Macro ProxTog2: Button to toggle Proxy On/Off
Date: October 02, 2014 09:48AM
Muchas gracias.
Quote
desga2
I didn't read all thread, said me if you need something more.
Greetings.
Thanks, for now everything is fine.
Re: Macro ProxTog2: Button to toggle Proxy On/Off
Date: October 03, 2014 10:06AM
Quote
YogiI did test with a HTTP/HTTPS local proxy and a SOCKS local proxy. On/off, switching between them - everything works fine as expected.
Sorry for not testing with system wide proxy. I never set up a proxy system wide (hate it).
However I did test at least the system wide proxy setting empiric.
I simply set up some bogus server & port number and K-Meleon complained that the system wide proxy is refusing connections.
So far that option seems to work as well.
That's very nice, thank you for testing, Yogi!
And really glad it works so far.
Hi desga, thanks for finding it again
Just why not attach it in the forum itself, the external hoster will lose it again after awhile.
Of course I was curious about the differences and examined it a bit. Whow - you included 7 (!!) different pairs of button pics! And some very nice ones. I agree that the two hard-coded ones really look the best.
So basically this is the native proxy.kmm with a button like in the first ProxTog version. To toggle only between network-types 0/1, but plus more button pics for choice and even own menu entries to choose between either a normal size button or a privbar-size button. Just the automatic choice for either 16px or 24px can't work anymore, it uses some skin.ini code from 2009 KM-version. No harm, guess it will simply always choose 16px.
And the benefit of including it directly with the proxy.kmm, which manages all the additional settings, is that the button state can be refreshed instantly after toggling proxies by this menu.
Edited 1 time(s). Last edit at 10/03/2014 10:19AM by siria.
Re: Macro ProxTog2: Button to toggle Proxy On/Off
Date: November 25, 2014 06:34PM
Here I am again
Help please with image sequence for K-Ext15X_Proxy2 in KM-75b1.
Proxy2 extension by desga2 is working in KM-75b1. (Klassic skin/toolbar button 16x16).
Only thing I'm too stupid to make work is image changing. It sticks to the same image. I have tried with .bmp and .png as well.
I assume I am doing something very stupid and can't find out what it is.
In case someone might want to look into it, you don't have to set up a real proxy.
In proxy settings for HTTP, will suffice to enter= 127.0.0.1 for proxy and 8080 for port number.
In case you need some .png or .bmp images for testing I can offer them.
Re: Macro ProxTog2: Button to toggle Proxy On/Off
Date: November 25, 2014 10:15PM
@ Yogi
Check my posts in Announcements KM 75. Dorian has my new and old code.
I have the same problem in that I cannot change the image.
Re: Macro ProxTog2: Button to toggle Proxy On/Off
Date: November 28, 2014 09:28AM
Numbering icons inside pics starts 0, 1, 3...
There seems a glitch/paradigm change.
James found that the new code needs *.bmp[0], *.png[0] or whatever format to adress single icon pics (bmp, jpg etc.). For the old code this was AFAIR not needed.
Maybe You stumbled upon that also?
Re: Macro ProxTog2: Button to toggle Proxy On/Off
Date: November 28, 2014 10:50AM
Quote
guenter
Numbering icons inside pics starts 0, 1, 3...
Not 0, 1, 2...?
However, I tried it all possible ways.
Quote
guenter
James found that the new code needs *.bmp[0], *.png[0] or whatever format to adress single icon pics (bmp, jpg etc.). For the old code this was AFAIR not needed.
Mine is a 4x icons pic.
You can look at the macro code which I have posted
here.
Re: Macro ProxTog2: Button to toggle Proxy On/Off
Date: November 28, 2014 01:33PM
Yes but all that matters is 0, ... What other pics are used is up to Your taste and I had chosen 3.
XP 3 75b1 default and custom skin tested.
They work but do not switch state.
But I have no proxy settings.
So I do not really know.
p.s. Desga2's proxy2.kmm?
Copy in situ; Activate in Prefernces; Choose type size of button. Restart.
Edited 1 time(s). Last edit at 11/28/2014 01:49PM by guenter.