[gtk/checkbutton-fixes] Add docs about grouping via action



commit 203283f3209db3f8f49877bb42a2c14bb0c9d5e6
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Sep 1 15:31:24 2020 -0400

    Add docs about grouping via action
    
    Mention this in the docs for gtk_check_button_set_group
    and gtk_toggle_button_set_group.

 gtk/gtkcheckbutton.c  | 8 +++++++-
 gtk/gtktogglebutton.c | 6 ++++++
 2 files changed, 13 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkcheckbutton.c b/gtk/gtkcheckbutton.c
index ce3b758ec4..7a2abfdfb4 100644
--- a/gtk/gtkcheckbutton.c
+++ b/gtk/gtkcheckbutton.c
@@ -796,7 +796,13 @@ gtk_check_button_set_label (GtkCheckButton *self,
  * Setting the group of a check button also changes the css name of the
  * indicator widget's CSS node to 'radio'.
  *
- * The behavior of a checkbutton in a group is also commonly known as a 'radio button'.
+ * The behavior of a checkbutton in a group is also commonly known as
+ * a 'radio button'.
+ *
+ * Note that the same effect can be achieved via the #GtkActionable
+ * api, by using the same action with parameter type and state type 's'
+ * for all buttons in the group, and giving each button its own target
+ * value.
  */
 void
 gtk_check_button_set_group (GtkCheckButton *self,
diff --git a/gtk/gtktogglebutton.c b/gtk/gtktogglebutton.c
index edce7e0368..45019471b7 100644
--- a/gtk/gtktogglebutton.c
+++ b/gtk/gtktogglebutton.c
@@ -446,6 +446,12 @@ gtk_toggle_button_toggled (GtkToggleButton *toggle_button)
  *
  * Adds @self to the group of @group. In a group of multiple toggle buttons,
  * only one button can be active at a time.
+ *
+ * Note that the same effect can be achieved via the #GtkActionable
+ * api, by using the same action with parameter type and state type 's'
+ * for all buttons in the group, and giving each button its own target
+ * value.
+
  */
 void
 gtk_toggle_button_set_group (GtkToggleButton *self,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]