General :  K-Meleon Web Browser Forum
General discussion about K-Meleon 
help needed "addbutton"
Posted by: disrupted(unloged
Date: June 14, 2009 09:53PM

i want to add several buttons to same toolbar..but i can only add one.. the second button gets ignored..when i sharp out the first button, the second button gets read..how can i add more than one button to same toolbar

e.g.
# K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage)

# ---------- media tolbar pending-------------------------------


_fuckthis_BuildToolbar{
# Toolbars
$_fuckthis_Tooltip=_("fuck1 fuck1");
$_fuckthis1_Tooltip=_("fuck2 fuck2");
$_SkinLarge=(index(readfile(getfolder("SkinFolder")."\\..\\skins.ini"),getpref(STRING,"kmeleon.general.skinsCurrent")."=1")>-1);
pluginmsg(toolbars,"AddToolbar","fuckthis,16,16","");
pluginmsg(toolbars,"AddButton","fuckthis,play,macros("."shareshit"."),".".".",".$_fuckthis_Tooltip.",16,16,"."restart.bmp[0],restart.bmp[1]"); <<first button gets read 
pluginmsg(toolbars,"AddButton","fuckthis,stop,macros("."delicious_page"."),".".".",".$_fuckthis1_Tooltip.",16,16,"."grease.bmp");
}



$OnSetup=$OnSetup."_fuckthis_BuildToolbar;";
$macroModules=$macroModules."fuckbar;";


# K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage)

# ---------- media tolbar pending-------------------------------


_fuckthis_BuildToolbar{
# Toolbars
$_fuckthis_Tooltip=_("fuck1 fuck1");
$_fuckthis1_Tooltip=_("fuck2 fuck2");
$_SkinLarge=(index(readfile(getfolder("SkinFolder")."\\..\\skins.ini"),getpref(STRING,"kmeleon.general.skinsCurrent")."=1")>-1);
pluginmsg(toolbars,"AddToolbar","fuckthis,16,16","");
#pluginmsg(toolbars,"AddButton","fuckthis,play,macros("."shareshit"."),".".".",".$_fuckthis_Tooltip.",16,16,"."restart.bmp[0],restart.bmp[1]"); <<hashed out, second button below gets read 
pluginmsg(toolbars,"AddButton","fuckthis,stop,macros("."delicious_page"."),".".".",".$_fuckthis1_Tooltip.",16,16,"."grease.bmp");
}



$OnSetup=$OnSetup."_fuckthis_BuildToolbar;";
$macroModules=$macroModules."fuckbar;";

what am i doing wrong?

p.s. i need 5 addbuttons to same toolbar.. thanks

Options: ReplyQuote
Re: help needed "addbutton"
Posted by: disrupted
Date: June 15, 2009 12:18AM

it's not making sense..everything seems in place..no errors in console

the toolbar is expanded to accomodate the extra buttons yet they don't show

<place for 3 buttons as dictated by macro but only the first one is visible/enabled?

why


# K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage)

# ---------- media tolbar pending-------------------------------

play{
$OpenURL="chrome://policymanager/content/policymanager.xul";
$ExecMacros="OpenURL_InNewWindow"; &ExecMacros_Frames;
}

stop{
$OpenURL="chrome://policymanager/content/policymanager.xul";
$ExecMacros="OpenURL_InNewWindow"; &ExecMacros_Frames;
}

_fuckthis_BuildToolbar{
# Toolbars
$_fuckthis_Tooltip=_("fuck1 fuck1");
$_fuckthis1_Tooltip=_("fuck2 fuck2");
$_SkinLarge=(index(readfile(getfolder("SkinFolder")."\\..\\skins.ini"),getpref(STRING,"kmeleon.general.skinsCurrent")."=1")>-1);
pluginmsg(toolbars,"AddToolbar","Media Bar,16,16","");
#pluginmsg(toolbars, "EnableButton", "fuckthis, macros("."stop"."), [0|1]");
#pluginmsg(toolbars, "SetButtonImage", "fuckthis, macros("."stop"."), "grease.bmp[0],grease.bmp[1]");
$button1=(pluginmsg(toolbars,"AddButton","Media Bar,play,macros("."play"."),"." . ".",".$_fuckthis_Tooltip.",16,16,"."share16.bmp[0],share16.bmp[1],share16.bmp[2]"));
$button2=(pluginmsg(toolbars,"AddButton","Media Bar,stop,macros("."stop"."),"." . ".",".$_fuckthis1_Tooltip.",16,16,"."restart.bmp[0],restart.bmp[1],restart.bmp[2]"));
$button3=(pluginmsg(toolbars,"AddButton","Media Bar,fuck,macros("."stop"."),"." . ".",".$_fuckthis1_Tooltip.",16,16,"."grease.bmp[0]"));
}



$OnSetup=$OnSetup."_fuckthis_BuildToolbar;";
$macroModules=$macroModules."fuckbar;";



Options: ReplyQuote
Re: help needed "addbutton"
Posted by: JamesD
Date: June 15, 2009 02:08AM

I get the same results. If code for first button commented out, then I get second button. If no code commented out then I get first button and blank space on line for second button. Seems like a bug.

#  K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage)
#
# ---------- DblButton.kmm
# ---------- code testing - NEW BAR AND NEW BUTTON FROM MACRO
#
# --------------------------------------------------------------------------------

#From plugin documentation
#pluginmsg(toolbars, "AddToolbar", "<ToolbarName>, <ButtonWidth>, <ButtonHeight>","");
#pluginmsg(toolbars, "AddButton", "<ToolbarName>, <ButtonName>, <Command>, <MenuName>, <TooltipText>, <ButtonWidth>, <ButtonHeight>, hot.bmp[0], cold.bmp[0], dead.bmp[0]","");

_DblButton_RunCode{
$_NB_ToolbarName = "MacroEmbed" ;
$_NB_BSize = "16" ;
$_NB_LastItem = "" ;
$_NB_AddBarTag = $_NB_ToolbarName .",". $_NB_BSize .",". $_NB_BSize .",". $_NB_LastItem ; 
pluginmsg(toolbars, "AddToolbar", $_NB_AddBarTag);

$_NB_ButtonName = "CloseOther" ;
$_NB_Command = ID_CLOSE_ALLOTHERTAB ;
$_NB_MenuName = "" ;
$_NB_tipText = "Close Tabs Except Current";
$_NB_ImageHot = "Nuke.bmp[0]" ;
$_NB_ImageCold = "Nuke.bmp[1]" ;
$_NB_ImageDead = "Nuke.bmp[2]" ;
$_NB_AddButtonTag = $_NB_ToolbarName.",".$_NB_ButtonName.",".$_NB_Command.",".$_NB_MenuName.",".$_NB_tipText.",".$_NB_BSize.",".$_NB_BSize.",".$_NB_ImageHot.",".$_NB_ImageCold.",".$_NB_ImageDead.",".$_NB_LastItem ; 
pluginmsg(toolbars, "AddButton", $_NB_AddButtonTag);

$_NB2_ButtonName = "Close" ;
$_NB2_Command = ID_CLOSE_TAB ;
$_NB2_MenuName = "" ;
$_NB2_tipText = "Close Current Tab";
$_NB2_ImageHot = "Weather.bmp" ;
$_NB2_ImageCold = "Weather.bmp" ;
$_NB2_ImageDead = "Weather.bmp" ;
$_NB2_AddButtonTag = $_NB_ToolbarName.",".$_NB2_ButtonName.",".$_NB2_Command.",".$_NB2_MenuName.",".$_NB2_tipText.",".$_NB_BSize.",".$_NB_BSize.",".$_NB2_ImageHot.",".$_NB2_ImageCold.",".$_NB2_ImageDead.",".$_NB_LastItem ; 
pluginmsg(toolbars, "AddButton", $_NB2_AddButtonTag);
}

$OnSetup=$OnSetup."_DblButton_RunCode;";
$macroModules=$macroModules."DblButton;";


Options: ReplyQuote
Re: help needed "addbutton"
Posted by: disrupted
Date: June 15, 2009 02:53PM

thank you james, i tested with your macro as well.. it does appear tto be a bug. i'll report it and see if kko can confirm it.

Options: ReplyQuote
Re: help needed "addbutton"
Posted by: desga2
Date: June 16, 2009 05:32PM

Yes this is a bug in 1.5.3 version. Thanks to disrupted to report it in bug # 1130.

This must be a disfunction to solved this other bug in 1.5.2; bug # 1092

Currently in 1.5.3 isn't possible add a button in already defined toolbar, with or without (defined in toolbars.cfg file) pluginmsg(toolbars, "AddToolbar", ...) macro command.

K-Meleon in Spanish

Options: ReplyQuote


K-Meleon forum is powered by Phorum.