Extensions :  K-Meleon Forum
All about K-Meleon extensions. 
Flashblock toolbar button
Posted by: rodocop
Date: December 12, 2012 08:47PM

Small addition for usability.
Macro creates toolbar button for Flashblock on/off switching.

Just select 16 or 24 version (according to your taste and habits), download and unpack into KM folder.

Then restart.

Now you can easily switch Flash on/off and see whether it's switched on or not (the button image is changed according to preference value).


Latest Release KM75.1 Latest dev KM76RC ||| Visit The K-Meleon Place and join me there!
Old good stuff: KM-1.6db+NS © dugbugoffice // KM-16-S2014 © Fred // KM-1.6beta2.6 © JamesD // KM Twin+ © rodocop // KM 1.8.24.22 © adodupan

RECOMMENDED! K-Meleon 76 Pro ==» Download portable: 7zip or EXE =//= Discuss on forum
K-Meleon 75.1 Pro: Download =//= Discuss || Portable Flash plugin (x86/x64 DLLs)



Edited 2 time(s). Last edit at 12/13/2012 08:41PM by rodocop.

Attachments: fb-button16.7Z (2.6 KB)   fb-button24.7Z (3.7 KB)  
Options: ReplyQuote
Re: Flashblock toolbar button
Posted by: 4td8s
Date: January 07, 2013 10:22AM

cool. can it work with just about any version of K-meleon or just the latest versions of KM?

Options: ReplyQuote
Re: Flashblock toolbar button
Posted by: rodocop
Date: January 08, 2013 02:23AM

I think it should work with any version supporting flashblock out of the box.


Latest Release KM75.1 Latest dev KM76RC ||| Visit The K-Meleon Place and join me there!
Old good stuff: KM-1.6db+NS © dugbugoffice // KM-16-S2014 © Fred // KM-1.6beta2.6 © JamesD // KM Twin+ © rodocop // KM 1.8.24.22 © adodupan

RECOMMENDED! K-Meleon 76 Pro ==» Download portable: 7zip or EXE =//= Discuss on forum
K-Meleon 75.1 Pro: Download =//= Discuss || Portable Flash plugin (x86/x64 DLLs)

Options: ReplyQuote
Re: Flashblock toolbar button
Posted by: deadlock
Date: January 11, 2013 12:40AM

Quote
rodocop
I think it should work with any version supporting flashblock out of the box.

You still didn't rename your skin folders. surprised smiley

If you add (Large) to large skin folder names,
you'll only need one macro that selects an icon.

Macro command index($SkinName, "Large") is -1 for
small skins and bigger than 0 for large skins.

Some people change skins every day.

Options: ReplyQuote
Re: Flashblock toolbar button
Posted by: rodocop
Date: February 08, 2017 07:36AM

May look irrelevant now, but I have 2 questions:

1) this extension works fine in all 1.x versions and in KM74, but it crashes (!) KM 75-76.
Previously I was faced such an effect only when wrong bitmap filenames are written in toolbars.cfg

But I have no glue how can the single kmm-file crash K-Meleon.

Maybe this question is primarily for JamesD who created the runcode (of button change) this extension is based on and who maintains the Macrolanguage docs so he knows all the changes between versions that might be the reason of crashes.

2) I totally missed the message by deadlock so I understand he spoke about the way to automate button size changing according to skin selected.
But I really cannot catch the macrocoding logic to get this done.

Moreover, now things have changed and this may be done, perhaps, using multisized ico-files instead bmp ones.


Latest Release KM75.1 Latest dev KM76RC ||| Visit The K-Meleon Place and join me there!
Old good stuff: KM-1.6db+NS © dugbugoffice // KM-16-S2014 © Fred // KM-1.6beta2.6 © JamesD // KM Twin+ © rodocop // KM 1.8.24.22 © adodupan

RECOMMENDED! K-Meleon 76 Pro ==» Download portable: 7zip or EXE =//= Discuss on forum
K-Meleon 75.1 Pro: Download =//= Discuss || Portable Flash plugin (x86/x64 DLLs)

Options: ReplyQuote
Re: Flashblock toolbar button
Posted by: siria
Date: February 08, 2017 02:41PM

to 2)
he seems to suggest to check if the current skin name (from the pref) contains the word "Large", and depending from this if-condition choose the button name. But wouldn't work for all the large skins out there which do not use "Large" as part of folder name. And with the modernized skin handling I'm not familiar, how different sizes are created in out-of-box KM now, or if contained at all.

to 1)
no idea and not tested, just took a very short look over the macro, and wonder if it might cause any issues that the "default" folder name is now written "Default" in dorians zips, but still in traditional small caps in the macro zip...
Or if checking a BOOL pref with writing "false" in quotes might now be a prob? Technically this is a text string if quotes are added. KM does auto-conversion for numbers with/without quotes, no idea if also for true/false or if it depends from KM-version...
OR it might have to do with the completely rewritten new skinning system, possible using the newer commands instead of the traditional ones might help?

(PS the resources line contains a different button name as the real image, but of course only a comment so not bug-related.
Then again, perhaps this other name might have been better, it's unique and avoids possible conflicts with other flashblock-macros)

PS2:
the menu name for the button doesn't exist? At any rate don't see it created in the macro

PS3:
It's using "setbuttonimage", that means flat buttons, not visibly "pressed". Like the Proxy-Toggle macros. Do those still work?



Edited 2 time(s). Last edit at 02/08/2017 02:56PM by siria.

Options: ReplyQuote
Re: Flashblock toolbar button
Posted by: siria
Date: February 08, 2017 02:59PM

It's basically the same principle as any other macro which just toggles a simple pref and creates a button for it, like e.g. the standalone proxy buttons.

Options: ReplyQuote
Re: Flashblock toolbar button
Posted by: rodocop
Date: February 09, 2017 07:21AM

Thank you, siria!

Cannot say I understood all the said but I'll try to change things abd see what will happen ;-)


Latest Release KM75.1 Latest dev KM76RC ||| Visit The K-Meleon Place and join me there!
Old good stuff: KM-1.6db+NS © dugbugoffice // KM-16-S2014 © Fred // KM-1.6beta2.6 © JamesD // KM Twin+ © rodocop // KM 1.8.24.22 © adodupan

RECOMMENDED! K-Meleon 76 Pro ==» Download portable: 7zip or EXE =//= Discuss on forum
K-Meleon 75.1 Pro: Download =//= Discuss || Portable Flash plugin (x86/x64 DLLs)

Options: ReplyQuote
Re: Flashblock toolbar button
Posted by: siria
Date: February 09, 2017 07:39AM

If you have a proxy button macro which still works (?), I'd perhaps first try to copy that one and modify it for a simply BOOL pref, and other names of course for everything.

Options: ReplyQuote
Re: Flashblock toolbar button
Posted by: rodocop
Date: February 09, 2017 08:01AM

FOUND IT!!!

The reason was the change in icon indexing inside graphics files.

I fix all by changing all the entries looking like
$FBlockButtonImageHot = "FBlockButton16.bmp[0]" ;
to
$FBlockButtonImageHot = "FBlockButton16.bmp[0,16,16]" ;

This solved the problem!

NB!!! Sure this works for 16x16 version.

24x24 version needs:
$FBlockButtonImageHot = "FBlockButton24.bmp[0,24,24]" ;


Latest Release KM75.1 Latest dev KM76RC ||| Visit The K-Meleon Place and join me there!
Old good stuff: KM-1.6db+NS © dugbugoffice // KM-16-S2014 © Fred // KM-1.6beta2.6 © JamesD // KM Twin+ © rodocop // KM 1.8.24.22 © adodupan

RECOMMENDED! K-Meleon 76 Pro ==» Download portable: 7zip or EXE =//= Discuss on forum
K-Meleon 75.1 Pro: Download =//= Discuss || Portable Flash plugin (x86/x64 DLLs)



Edited 2 time(s). Last edit at 02/09/2017 08:16AM by rodocop.

Options: ReplyQuote
Re: Flashblock toolbar button
Posted by: siria
Date: February 09, 2017 08:17AM

Uaah.... does that mean that now ALL old button-macros are crashing?? <shock>

Options: ReplyQuote
Re: Flashblock toolbar button
Posted by: rodocop
Date: February 09, 2017 08:36AM

Quote
siria
Uaah.... does that mean that now ALL old button-macros are crashing?? <shock>

Only those using more than 1 icon per BMP-file (or other graphics types supported like PNG)

Not so much do exist really of such type.


Latest Release KM75.1 Latest dev KM76RC ||| Visit The K-Meleon Place and join me there!
Old good stuff: KM-1.6db+NS © dugbugoffice // KM-16-S2014 © Fred // KM-1.6beta2.6 © JamesD // KM Twin+ © rodocop // KM 1.8.24.22 © adodupan

RECOMMENDED! K-Meleon 76 Pro ==» Download portable: 7zip or EXE =//= Discuss on forum
K-Meleon 75.1 Pro: Download =//= Discuss || Portable Flash plugin (x86/x64 DLLs)



Edited 2 time(s). Last edit at 02/09/2017 08:46AM by rodocop.

Options: ReplyQuote
Re: Flashblock toolbar button
Posted by: rodocop
Date: February 09, 2017 08:43AM

Well. Here go the updated extensions.

- Ready for KM 75 and newer;
- Fixed image names and descriptions in KMM;
- macro renamed to avoid naming collisions between 16 and 24 versions;
- localization template inside.


Latest Release KM75.1 Latest dev KM76RC ||| Visit The K-Meleon Place and join me there!
Old good stuff: KM-1.6db+NS © dugbugoffice // KM-16-S2014 © Fred // KM-1.6beta2.6 © JamesD // KM Twin+ © rodocop // KM 1.8.24.22 © adodupan

RECOMMENDED! K-Meleon 76 Pro ==» Download portable: 7zip or EXE =//= Discuss on forum
K-Meleon 75.1 Pro: Download =//= Discuss || Portable Flash plugin (x86/x64 DLLs)



Edited 1 time(s). Last edit at 02/09/2017 08:43AM by rodocop.

Attachments: fb-button16-75+.7Z (2.9 KB)   fb-button24-75+.7Z (4.1 KB)  
Options: ReplyQuote


K-Meleon forum is powered by Phorum.