[gtk+/gtk-3-22] ComboBox|TreeMenu: Clarify :row|column-span-column
- From: Daniel Boles <dboles src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-22] ComboBox|TreeMenu: Clarify :row|column-span-column
- Date: Wed, 4 Oct 2017 10:21:36 +0000 (UTC)
commit 7559eaf5f985ef7b01864c8fd592f3211da1ddcc
Author: Daniel Boles <dboles src gnome org>
Date: Wed Oct 4 10:14:42 2017 +0100
ComboBox|TreeMenu: Clarify :row|column-span-column
ComboBox and TreeMenu warned in the doc for :row-span-column that the
value must not exceed :wrap-width, but :wrap-width does not interact
with the number of rows; it’s the :column-span-column that’s relevant.
Also: Warn that spans must be > 0 for rows too, and that column spans <=
:wrap-width are also not useful for items at menu column positions > 0.
Finally, refer to items having spans, not values, as we were already
talking about values in the model (and rows in the menu).
gtk/gtkcombobox.c | 16 +++++++---------
gtk/gtktreemenu.c | 15 ++++++++-------
2 files changed, 15 insertions(+), 16 deletions(-)
---
diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c
index 1755a1e..96b9e20 100644
--- a/gtk/gtkcombobox.c
+++ b/gtk/gtkcombobox.c
@@ -932,11 +932,9 @@ gtk_combo_box_class_init (GtkComboBoxClass *klass)
* GtkComboBox:row-span-column:
*
* If this is set to a non-negative value, it must be the index of a column
- * of type %G_TYPE_INT in the model.
- *
- * The values of that column are used to determine how many rows a value in
- * the list will span. Therefore, the values in the model column pointed to
- * by this property must be greater than zero and not larger than wrap-width.
+ * of type %G_TYPE_INT in the model. The value in that column for each item
+ * will determine how many rows the item will span in the popup. Therefore,
+ * values in this column must be greater than zero.
*
* Since: 2.4
*/
@@ -955,10 +953,10 @@ gtk_combo_box_class_init (GtkComboBoxClass *klass)
* GtkComboBox:column-span-column:
*
* If this is set to a non-negative value, it must be the index of a column
- * of type %G_TYPE_INT in the model.
- *
- * The values of that column are used to determine how many columns a value
- * in the list will span.
+ * of type %G_TYPE_INT in the model. The value in that column for each item
+ * will determine how many columns that item will span in the popup.
+ * Therefore, values in this column must be greater than zero, and the sum of
+ * an item’s column position + span should not exceed #GtkComboBox:wrap-width.
*
* Since: 2.4
*/
diff --git a/gtk/gtktreemenu.c b/gtk/gtktreemenu.c
index 057bc96..0c6dc6a 100644
--- a/gtk/gtktreemenu.c
+++ b/gtk/gtktreemenu.c
@@ -347,11 +347,9 @@ _gtk_tree_menu_class_init (GtkTreeMenuClass *class)
* GtkTreeMenu:row-span-column:
*
* If this is set to a non-negative value, it must be the index of a column
- * of type %G_TYPE_INT in the model.
- *
- * The values of that column are used to determine how many rows a value in
- * the list will span. Therefore, the values in the model column pointed to
- * by this property must be greater than zero and not larger than wrap-width.
+ * of type %G_TYPE_INT in the model. The value in that column for each item
+ * will determine how many rows that item will span in the popup. Therefore,
+ * values in this column must be greater than zero.
*
* Since: 3.0
*/
@@ -371,8 +369,11 @@ _gtk_tree_menu_class_init (GtkTreeMenuClass *class)
* If this is set to a non-negative value, it must be the index of a column
* of type %G_TYPE_INT in the model.
*
- * The values of that column are used to determine how many columns a value
- * in the list will span.
+ * If this is set to a non-negative value, it must be the index of a column
+ * of type %G_TYPE_INT in the model. The value in that column for each item
+ * will determine how many columns that item will span in the popup.
+ * Therefore, values in this column must be greater than zero, and the sum of
+ * an item’s column position + span should not exceed #GtkTreeMenu:wrap-width.
*
* Since: 3.0
*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]