[gtk+] GtkRadioButton: Allow setting group more than once
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] GtkRadioButton: Allow setting group more than once
- Date: Fri, 3 Oct 2014 03:39:44 +0000 (UTC)
commit cc529c242354475e2aee5a6176922ec7f989bdfc
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]