[Geany-devel] ANN: Configurable Build Menu Alpha in SVN

Enrico Tröger enrico.troeger at xxxxx
Fri Jul 17 17:44:50 UTC 2009


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

-- 
Get my GPG key from http://www.uvena.de/pub.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: build_button_fix.diff
Type: text/x-diff
Size: 429 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/devel/attachments/20090717/f6d80ecb/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/devel/attachments/20090717/f6d80ecb/attachment.pgp>


More information about the Devel mailing list