[gtk+/gtk-3-14] GtkRadioButton: Allow setting group more than once
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-14] GtkRadioButton: Allow setting group more than once
- Date: Fri, 3 Oct 2014 03:40:26 +0000 (UTC)
commit 4fc47c800d1abe467a82db157491efba41cc58f4
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Oct 2 23:37:38 2014 -0400
GtkRadioButton: Allow setting group more than once
It turns out that GtkBuilder will sometimes set a property
twice. Normally, this is harmless, but for GtkRadioButton:group,
it triggered a critical. Remove that.
gtk/gtkradiobutton.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkradiobutton.c b/gtk/gtkradiobutton.c
index f61a361..9bfc83c 100644
--- a/gtk/gtkradiobutton.c
+++ b/gtk/gtkradiobutton.c
@@ -275,7 +275,9 @@ gtk_radio_button_set_group (GtkRadioButton *radio_button,
GtkWidget *new_group_singleton = NULL;
g_return_if_fail (GTK_IS_RADIO_BUTTON (radio_button));
- g_return_if_fail (!g_slist_find (group, radio_button));
+
+ if (g_slist_find (group, radio_button))
+ return;
priv = radio_button->priv;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]