[Gazpacho] adding support for gtk.ToggleAction and gtk.RadioAction
Lorenzo Gil Sanchez
lgs at sicem.biz
Mon May 15 23:29:32 CEST 2006
Hi Michael,
El dom, 14-05-2006 a las 20:48 +0930, Michael Gratton escribió:
> Hi guys,
>
> I have started working on support for gtk.ToggleAction and
> gtk.RadioAction in Gazpacho. This will let people add toggle and radio
> menu items and toolbar buttons to their apps.
That's great!
>
> I have attached an initial patch to bug 341723
> <http://bugzilla.gnome.org/show_bug.cgi?id=341723>. It allows you to
> create and use toggle and radio actions, save and load them, but not
> much else for the moment.
>
> If anyone has time, I'd appreciate a bit of feedback on how I am
> implementing this. Basically, I have subclassed GAction, GActionDialog
> and ActionAdapter and added additional methods/callbacks as needed in
> various places. Does this seem like a reasonable approach?
It is. And please, don't forgive to implement unit tests for the new
functionality you are adding. Don't hesitate to ask if you find writing
tests difficult. It's easier than it seems!
>
> Also, the UI is a bit ugly with the two additional "Add" toolbar
> buttons/menu items. I think using something like a gtk.MenuToolButton on
> the toolbar might help, but UIManager does not seem to support it.
>
> Comments welcome.
As Mattias did, it's better to put the comments about specific parts or
your code in the bug's comments.
Anyway, excellent work Mike. Thanks a lot for helping us making Gazpacho
better!
Best regards
Lorenzo
More information about the Gazpacho
mailing list