On Fri, 17 Jul 2009 18:13:18 +1000, Lex wrote:
Enrico,
Otherwise, tell me exactly what's the problem, then I'll have a look.
Now I know where I'll have a look first, it probably just needs to point to the right menu items again.
Ok, I'm lost again, for me the build toolbar menu is never enabled, the toolbutton is there ok and works but wrong. I can't find where the menu is enabled?
Well, the menu itself is created in build_init(). And it seems while merging with trunk there went something wrong. The build_init() code in your branch has still the old menu handling code. The main thing is that in your branch the final call /* set the submenu to the toolbar item */ geany_menu_button_action_set_menu(GEANY_MENU_BUTTON_ACTION (widgets.build_action), toolmenu);
is missing in build_init(). And also the other code handling the button menu seems to be old. You should update it or tell me to do so if you don't want to.
The build toolbar button runs the compile command. This is because the build_toolbutton_build_clicked user_data is always 0. It used to be GBO_BUILD. Where is it set now?
Er, the build button callback user_data was always NULL. The NULL is set in src/toolbar.c:345. The build button should run the GBO_BUILD command unless any other build action from the menu was chosen. Then the build button runs the last chosen action. This is done in build_toolbutton_build_clicked() and there the user_data isn't taken into account. Maybe you changed the semantics in on_build_menu_item() but this can be easily changed with the attached patch (build_button_fix.diff) which explicitly call the GBO_BUILD action on on_build_menu_item().
Regards, Enrico