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




commit 7c12fc2d0d3d4e7ad0c67d0c5d5379ec365e0f8a
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 6600302446..fb77599574 100644
--- a/gtk/gtkcheckbutton.c
+++ b/gtk/gtkcheckbutton.c
@@ -802,7 +802,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]