Bugs :  K-Meleon Web Browser Forum
You can talk about issues with k-meleon here.  
rebarmenu plugin: checkmarks bug
Posted by: siria
Date: November 03, 2014 09:13PM

Quote
adodupan
Quote
siria
And would love to have that menu checkmark bug fixed also for macro-created buttons and for macro-fired popup-menus

This is second place where you comment on 'that bug', i'm not sure i understand it.
Give me your 'problematic' file.

If you open a menu via rebarmenu-plugin, the checkmarks are outdated.
For example the Privacy menu, the checkmarks that indicate what is blocked and what not.
If you toggle them, the action is executed, but the rebar-menu still shows the same checkmarks as before.
Only when opening the menu with right-click or via normal menu system or in KM74 with the plain menu on a button (1b), the checkmarks get refreshed.

-------------

A test in toolbars.cfg:

rebarmenu cfg test(16,16){

test rebarmenu 1a{
rebarmenu(&Privacy)|&Privacy
Test rebarmenu 1a: Toggle checkmarks / left command: rebarmenu(&Privacy)
hotlist.bmp[3]
}

test rebarmenu 1b{
&Privacy
Test rebarmenu 1b: Toggle checkmarks / left command: &Privacy (works in 74)
hotlist.bmp[3]
}
}


-----------------

And a test as macro:

rebarmenu_button2{
$_toolbar="rebarmenu macro test";
$_size="16,16";
pluginmsg(toolbars,"AddToolbar",$_toolbar.",".$_size);
#
$_buttonname="rebarmenu button 2a";
$_left_command = "rebarmenu(&Privacy)" ;
$_right_menu = "&Privacy" ;
$_tooltip = "Test rebarmenu 2a: Toggle checkmarks / MACRO-button: rebarmenu(&Privacy)" ;
$_icons = "hotlist.bmp[3]" ;
#
pluginmsg(toolbars,"AddButton",$_toolbar.",".$_buttonname.",".$_left_command.",".$_right_menu.",".$_tooltip.",".$_size.",".$_icons);
}

# shows up in Tools menu, right above normal Privacy menu:
rebarmenu_test{
macroinfo="Test rebarmenu 3: Toggle checkmarks";
plugin(rebarmenu,"&Privacy");
}

_rebarmenu_BuildMenu{
setmenu("PrivacySecurity",macro,"Test rebarmenu 3","rebarmenu_test",0);
}

#---------------
$OnInit=$OnInit."_rebarmenu_BuildMenu;";
$OnSetup=$OnSetup."rebarmenu_button2;";
$macroModules=$macroModules."rebarmenu_test;";


-----------------

Not sure if it's a problem if two buttons with the same command "rebarmenu(&Privacy)" are created in the same skin. Perhaps should be tested independantly. Perhaps that's also why amazingly the image-count starts with 1 instead of 0 in my test?! Oh well ;-)

Options: ReplyQuote
Re: rebarmenu plugin: checkmarks bug
Posted by: JamesD
Date: November 03, 2014 09:51PM

@ siria

Yes, I do see that the checkmarks in Privacy bar don't work always. I never use that so I did not understand at first. Have you tested to see if an event like OnLoad brings them into compliance?

I just did that check and Javascript does change its checkmark at the onload event. I changed the value in another tab using a macro. When I reloaded that tab the checkmark changed.

Options: ReplyQuote
 
Posted by: adodupan
Date: November 04, 2014 03:00AM

 



Edited 1 time(s). Last edit at 03/21/2016 12:00PM by adodupan.

Options: ReplyQuote
Re: rebarmenu plugin: checkmarks bug
Posted by: siria
Date: November 04, 2014 08:11AM

Forgot to mention: the whole menu doesn't get refreshed, incl. the text, not just the checkmarks.
KM has this beautiful possibility to change menus on the fly with setmenu, so I had tried workarounds with renaming menu lines to "bla bla (ON)" or "bla bla (OFF)" when toggling some pref, but no chance. Still shows old text too, until the menu is opened the first time in a regular way.

@James: now am mighty confused. Perhaps you're testing with 74g31 if there is any influence by page load? But that must be the other bug, which splits the JS-pref (and others??) into a global one and a current-page one. That shouldn't have anything to do with rebarmenu. And even in g31, I remember the normal menus still show the *global* pref checkmarked correctly...
At any rate, if regular menu-calling ways are used, the checkmarks and menu lines have always worked perfectly as far as I remember.

Options: ReplyQuote
Re: rebarmenu plugin: checkmarks bug
Posted by: JamesD
Date: November 08, 2014 05:11PM

@ siria

Yes, I was testing in KM7431.

Options: ReplyQuote
Re: rebarmenu plugin: checkmarks bug
Posted by: JamesD
Date: November 09, 2014 01:46AM

I went back and tested in KM 74 with 24.7 engine. It is exactly like siria described. If a macro changes the javascript the privacy bar button checkmark does not change.

If I do the same test in KM 74 with the 31 engine, the results are different. Reloading the page will change the checkmark to catch up with the change made by the macro.

I wonder if the macrolanguage could have an "event" that it could call which could make the sync with the checkmarks happen? We cannot expect the system to constantly check for sync. That would be too much overhead. Calling for the sync ONLY when needed would require less resources.

Options: ReplyQuote


K-Meleon forum is powered by Phorum.