]> Pileus Git - ~andy/gtk/commitdiff
Add a writable group property to align with the GtkRadioButton API.
authorMatthias Clasen <maclas@gmx.de>
Wed, 14 Jan 2004 01:33:53 +0000 (01:33 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Wed, 14 Jan 2004 01:33:53 +0000 (01:33 +0000)
Wed Jan 14 02:34:57 2004  Matthias Clasen  <maclas@gmx.de>

* gtk/gtkradioaction.c: Add a writable group property to align
with the GtkRadioButton API.  (#129166, Olivier Andrieu)

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkradioaction.c

index fcd7524bbae262b4f23ded4adc6ec333c9806b3f..93d4e37abf0233e4113d57ebafbbea955b1a0cd1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Jan 14 02:34:57 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkradioaction.c: Add a writable group property to align
+       with the GtkRadioButton API.  (#129166, Olivier Andrieu) 
+
 Tue Jan 13 14:48:27 GMT 2004  Tony Gale <gale@gtk.org>
 
        * docs/faq/gtk-faq.sgml: Update info on using autoconf
index fcd7524bbae262b4f23ded4adc6ec333c9806b3f..93d4e37abf0233e4113d57ebafbbea955b1a0cd1 100644 (file)
@@ -1,3 +1,8 @@
+Wed Jan 14 02:34:57 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkradioaction.c: Add a writable group property to align
+       with the GtkRadioButton API.  (#129166, Olivier Andrieu) 
+
 Tue Jan 13 14:48:27 GMT 2004  Tony Gale <gale@gtk.org>
 
        * docs/faq/gtk-faq.sgml: Update info on using autoconf
index fcd7524bbae262b4f23ded4adc6ec333c9806b3f..93d4e37abf0233e4113d57ebafbbea955b1a0cd1 100644 (file)
@@ -1,3 +1,8 @@
+Wed Jan 14 02:34:57 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkradioaction.c: Add a writable group property to align
+       with the GtkRadioButton API.  (#129166, Olivier Andrieu) 
+
 Tue Jan 13 14:48:27 GMT 2004  Tony Gale <gale@gtk.org>
 
        * docs/faq/gtk-faq.sgml: Update info on using autoconf
index fcd7524bbae262b4f23ded4adc6ec333c9806b3f..93d4e37abf0233e4113d57ebafbbea955b1a0cd1 100644 (file)
@@ -1,3 +1,8 @@
+Wed Jan 14 02:34:57 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkradioaction.c: Add a writable group property to align
+       with the GtkRadioButton API.  (#129166, Olivier Andrieu) 
+
 Tue Jan 13 14:48:27 GMT 2004  Tony Gale <gale@gtk.org>
 
        * docs/faq/gtk-faq.sgml: Update info on using autoconf
index fcd7524bbae262b4f23ded4adc6ec333c9806b3f..93d4e37abf0233e4113d57ebafbbea955b1a0cd1 100644 (file)
@@ -1,3 +1,8 @@
+Wed Jan 14 02:34:57 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkradioaction.c: Add a writable group property to align
+       with the GtkRadioButton API.  (#129166, Olivier Andrieu) 
+
 Tue Jan 13 14:48:27 GMT 2004  Tony Gale <gale@gtk.org>
 
        * docs/faq/gtk-faq.sgml: Update info on using autoconf
index 35460a33b815ec6a9f02fc0c374bb4d3f936fb7b..f61168c3167c806c11773dbbec8365452d7cede0 100644 (file)
@@ -53,7 +53,8 @@ enum
 enum 
 {
   PROP_0,
-  PROP_VALUE
+  PROP_VALUE,
+  PROP_GROUP
 };
 
 static void gtk_radio_action_init         (GtkRadioAction *action);
@@ -141,6 +142,21 @@ gtk_radio_action_class_init (GtkRadioActionClass *klass)
                                                     0,
                                                     G_PARAM_READWRITE));
 
+  /**
+   * GtkRadioAction:group:
+   *
+   * Sets a new group for a radio action.
+   *
+   * Since: 2.4
+   */
+  g_object_class_install_property (gobject_class,
+                                  PROP_GROUP,
+                                  g_param_spec_object ("group",
+                                                       _("Group"),
+                                                       _("The radio action whose group this action belongs."),
+                                                       GTK_TYPE_RADIO_ACTION,
+                                                       G_PARAM_WRITABLE));
+
   /**
    * GtkRadioAction::changed:
    * @action: the action on which the signal is emitted
@@ -247,6 +263,20 @@ gtk_radio_action_set_property (GObject         *object,
     case PROP_VALUE:
       radio_action->private_data->value = g_value_get_int (value);
       break;
+    case PROP_GROUP: 
+      {
+       GtkRadioAction *arg;
+       GSList *slist = NULL;
+       
+       if (G_VALUE_HOLDS_OBJECT (value)) 
+         {
+           arg = GTK_RADIO_ACTION (g_value_get_object (value));
+           if (arg)
+             slist = gtk_radio_action_get_group (arg);
+           gtk_radio_action_set_group (radio_action, slist);
+         }
+      }
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;