After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 671362 - Fixes for GtkRadioMenuItem
Fixes for GtkRadioMenuItem
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
: 679563 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2012-03-05 13:17 UTC by Emmanuele Bassi (:ebassi)
Modified: 2015-05-21 04:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
radio-menu-item: Handle a !NULL group (1.01 KB, patch)
2012-03-05 13:17 UTC, Emmanuele Bassi (:ebassi)
committed Details | Review
radio-menu-item: Allow arguments to be NULL (5.14 KB, patch)
2012-03-05 13:17 UTC, Emmanuele Bassi (:ebassi)
committed Details | Review
radio-menu-item: Add join_group() (5.28 KB, patch)
2012-03-05 13:17 UTC, Emmanuele Bassi (:ebassi)
committed Details | Review

Description Emmanuele Bassi (:ebassi) 2012-03-05 13:17:08 UTC
Mostly related to handling NULL arguments, plus a convenience function to match up with the rest of the GtkRadio* classes.
Comment 1 Emmanuele Bassi (:ebassi) 2012-03-05 13:17:10 UTC
Created attachment 208998 [details] [review]
radio-menu-item: Handle a !NULL group

If we create a RadioMenuItem without a group, and then set a group, the
menu item will still be set as active, which means an inconsistently
drawn radio menu item - as the RadioMenuItem will set the active flag on
itself, but then it won't reset it when it gets a new group.
Comment 2 Emmanuele Bassi (:ebassi) 2012-03-05 13:17:13 UTC
Created attachment 208999 [details] [review]
radio-menu-item: Allow arguments to be NULL

Some arguments, like the group and the label of a RadioMenuItem, can be
NULL: the RadioMenuItem has all the code to deal with them. The argument
validation is too strict, though, for instance doing:

  return_if_fail (IS_RADIO_MENU_ITEM (foo))

  if (foo != NULL)
    set_foo (foo)

Which is obviously incorrect.

This commit also modifies the annotations of the API, to ensure that
language bindings do the right thing.
Comment 3 Emmanuele Bassi (:ebassi) 2012-03-05 13:17:15 UTC
Created attachment 209000 [details] [review]
radio-menu-item: Add join_group()

The other Radio* widgets have this convenience method that removes the
memory management of the opaque GSList used to handle the group from the
API usable from language bindings (especially the ones not based on
introspection).

This commit adds gtk_radio_menu_item_join_group().
Comment 4 André Klapper 2012-05-07 16:37:30 UTC
So who could review GtkRadio* patches in the GTK+ team?
Comment 5 Matthias Clasen 2015-03-07 20:10:17 UTC
Review of attachment 208998 [details] [review]:

lets do this at the beginning of the next cycle, just to avoid the risk of fallout.
Comment 6 Matthias Clasen 2015-03-07 20:10:49 UTC
Review of attachment 208999 [details] [review]:

lets do this at the beginning of the next cycle, just to avoid the risk of fallout.
Comment 7 Matthias Clasen 2015-03-07 20:11:21 UTC
Review of attachment 209000 [details] [review]:

lets do this at the beginning of the next cycle, just to avoid the risk of fallout.
Comment 8 Matthias Clasen 2015-03-07 20:12:02 UTC
*** Bug 679563 has been marked as a duplicate of this bug. ***
Comment 9 Matthias Clasen 2015-03-22 06:16:19 UTC
Attachment 208998 [details] pushed as 955aed9 - radio-menu-item: Handle a !NULL group
Attachment 208999 [details] pushed as ad05d84 - radio-menu-item: Allow arguments to be NULL
Attachment 209000 [details] pushed as 5c5464a - radio-menu-item: Add join_group()