Re: [Gtk-osx-devs] FYI: proper synching of GtkRadioMenuItems
- From: Richard Procter <richard n procter gmail com>
- To: gtk-osx-devs lists sourceforge net
- Subject: Re: [Gtk-osx-devs] FYI: proper synching of GtkRadioMenuItems
- Date: Tue, 13 Jul 2010 12:26:48 +1200
> On Jun 22, 2010, at 2:43 PM, Richard Procter wrote:
>
> > Hi,
> >
> > I have raised a bug http://bugzilla.gnome.org/show_bug.cgi?id=622260
> > with a tentative patch.
> >
>
> Thanks for filing the bug and patch.
No problem! (I've taken a while to reply as my account hasn't
received any gtk-osx-devs messages apart from the initial welcome).
> It's odd, though, because I have this specific test case (a pair of
> radiomenuitems) in testintegration.c and the synchronization works
> there, both in the MenuBar and in the Dock Menu.
That is odd.
Looking at test-integration.c, I note that
gtk_action_group_add_radio_actions_full connects to the 'changed'
signal (which I presume means the 'group-changed' signal; the gtk+
documentation looks muddled). However, the integration menubar relies
on notify::active.
> I wonder though if it wouldn't be better for the radiomenuitem to
> chain its parent activate method (which would then properly call
> g_object_notify) rather than messing directly with the property
> (which belongs to the parent checkmenuitem, not the radiomenuitem).
> Oh, well. There seems to be a lot of that.
Oh, I agree completely. It's very brittle code. My refactor is just a
clearer equivalent. The current implementation cannot chain up
without breaking the (seemingly implicit!) exactly-one-toggled
invariant as seen by the user code, unfortunately.
best,
Richard.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]