[gtk/wip/otte/for-master: 2/3] selectionmodel: Rename "exclusive" to "unselect_rest"



commit d294b01cee804c95024f1623289686d77c549d62
Author: Benjamin Otte <otte redhat com>
Date:   Mon Jun 8 18:26:48 2020 +0200

    selectionmodel: Rename "exclusive" to "unselect_rest"
    
    The name is better at explaining what this boolean is meant to do.

 gtk/gtkselectionmodel.c | 16 ++++++++--------
 gtk/gtkselectionmodel.h |  8 ++++----
 2 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/gtk/gtkselectionmodel.c b/gtk/gtkselectionmodel.c
index 9deb1e32de..c2edaa2a51 100644
--- a/gtk/gtkselectionmodel.c
+++ b/gtk/gtkselectionmodel.c
@@ -85,7 +85,7 @@ gtk_selection_model_default_is_selected (GtkSelectionModel *model,
 static gboolean
 gtk_selection_model_default_select_item (GtkSelectionModel *model,
                                          guint              position,
-                                         gboolean           exclusive)
+                                         gboolean           unselect_rest)
 {
   return FALSE;
 }
@@ -100,7 +100,7 @@ static gboolean
 gtk_selection_model_default_select_range (GtkSelectionModel *model,
                                           guint              position,
                                           guint              n_items,
-                                          gboolean           exclusive)
+                                          gboolean           unselect_rest)
 {
   return FALSE;
 }
@@ -228,21 +228,21 @@ gtk_selection_model_is_selected (GtkSelectionModel *model,
  * gtk_selection_model_select_item:
  * @model: a #GtkSelectionModel
  * @position: the position of the item to select
- * @exclusive: whether previously selected items should be unselected
+ * @unselect_rest: whether previously selected items should be unselected
  *
  * Requests to select an item in the model.
  */
 gboolean
 gtk_selection_model_select_item (GtkSelectionModel *model,
                                  guint              position,
-                                 gboolean           exclusive)
+                                 gboolean           unselect_rest)
 {
   GtkSelectionModelInterface *iface;
 
   g_return_val_if_fail (GTK_IS_SELECTION_MODEL (model), 0);
 
   iface = GTK_SELECTION_MODEL_GET_IFACE (model);
-  return iface->select_item (model, position, exclusive);
+  return iface->select_item (model, position, unselect_rest);
 }
 
 /**
@@ -269,7 +269,7 @@ gtk_selection_model_unselect_item (GtkSelectionModel *model,
  * @model: a #GtkSelectionModel
  * @position: the first item to select
  * @n_items: the number of items to select
- * @exclusive: whether previously selected items should be unselected
+ * @unselect_rest: whether previously selected items should be unselected
  *
  * Requests to select a range of items in the model.
  */
@@ -277,14 +277,14 @@ gboolean
 gtk_selection_model_select_range (GtkSelectionModel *model,
                                   guint              position,
                                   guint              n_items,
-                                  gboolean           exclusive)
+                                  gboolean           unselect_rest)
 {
   GtkSelectionModelInterface *iface;
 
   g_return_val_if_fail (GTK_IS_SELECTION_MODEL (model), 0);
 
   iface = GTK_SELECTION_MODEL_GET_IFACE (model);
-  return iface->select_range (model, position, n_items, exclusive);
+  return iface->select_range (model, position, n_items, unselect_rest);
 }
 
 /**
diff --git a/gtk/gtkselectionmodel.h b/gtk/gtkselectionmodel.h
index 86657fba15..9a93a6a399 100644
--- a/gtk/gtkselectionmodel.h
+++ b/gtk/gtkselectionmodel.h
@@ -97,13 +97,13 @@ struct _GtkSelectionModelInterface
 
   gboolean              (* select_item)                         (GtkSelectionModel      *model,
                                                                  guint                   position,
-                                                                 gboolean                exclusive);
+                                                                 gboolean                unselect_rest);
   gboolean              (* unselect_item)                       (GtkSelectionModel      *model,
                                                                  guint                   position);
   gboolean              (* select_range)                        (GtkSelectionModel      *model,
                                                                  guint                   position,
                                                                  guint                   n_items,
-                                                                 gboolean                exclusive);
+                                                                 gboolean                unselect_rest);
   gboolean              (* unselect_range)                      (GtkSelectionModel      *model,
                                                                  guint                   position,
                                                                  guint                   n_items);
@@ -129,7 +129,7 @@ gboolean                gtk_selection_model_is_selected         (GtkSelectionMod
 GDK_AVAILABLE_IN_ALL
 gboolean                gtk_selection_model_select_item         (GtkSelectionModel      *model,
                                                                  guint                   position,
-                                                                 gboolean                exclusive);
+                                                                 gboolean                unselect_rest);
 GDK_AVAILABLE_IN_ALL
 gboolean                gtk_selection_model_unselect_item       (GtkSelectionModel      *model,
                                                                  guint                   position);
@@ -137,7 +137,7 @@ GDK_AVAILABLE_IN_ALL
 gboolean                gtk_selection_model_select_range        (GtkSelectionModel      *model,
                                                                  guint                   position,
                                                                  guint                   n_items,
-                                                                 gboolean                exclusive);
+                                                                 gboolean                unselect_rest);
 GDK_AVAILABLE_IN_ALL
 gboolean                gtk_selection_model_unselect_range      (GtkSelectionModel      *model,
                                                                  guint                   position,


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