[gtk+/wip/ricotz/deprecated] treeview: Remove deprecated API



commit d9a5fc07327743bbc6868eae2769d7ea1712ada9
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Sun Oct 23 17:50:02 2016 +0200

    treeview: Remove deprecated API

 docs/reference/gtk/gtk4-sections.txt |    4 -
 gtk/gtktreeview.c                    |  155 ----------------------------------
 gtk/gtktreeview.h                    |   17 ----
 3 files changed, 0 insertions(+), 176 deletions(-)
---
diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt
index ee137b4..eb26406 100644
--- a/docs/reference/gtk/gtk4-sections.txt
+++ b/docs/reference/gtk/gtk4-sections.txt
@@ -4133,8 +4133,6 @@ gtk_tree_view_set_headers_visible
 gtk_tree_view_columns_autosize
 gtk_tree_view_get_headers_clickable
 gtk_tree_view_set_headers_clickable
-gtk_tree_view_set_rules_hint
-gtk_tree_view_get_rules_hint
 gtk_tree_view_set_activate_on_single_click
 gtk_tree_view_get_activate_on_single_click
 gtk_tree_view_append_column
@@ -4202,8 +4200,6 @@ gtk_tree_view_get_hover_selection
 gtk_tree_view_set_hover_selection
 gtk_tree_view_get_hover_expand
 gtk_tree_view_set_hover_expand
-GtkTreeDestroyCountFunc
-gtk_tree_view_set_destroy_count_func
 GtkTreeViewRowSeparatorFunc
 gtk_tree_view_get_row_separator_func
 gtk_tree_view_set_row_separator_func
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index 3382f06..041cb38 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -392,11 +392,6 @@ struct _GtkTreeViewPrivate
   gint last_extra_space_per_column;
   gint last_number_of_expand_columns;
 
-  /* ATK Hack */
-  GtkTreeDestroyCountFunc destroy_count_func;
-  gpointer destroy_count_data;
-  GDestroyNotify destroy_count_destroy;
-
   /* Row drag-and-drop */
   GtkTreeRowReference *drag_dest_row;
   GtkTreeViewDropPosition drag_dest_pos;
@@ -472,8 +467,6 @@ struct _GtkTreeViewPrivate
   guint reorderable : 1;
   guint header_has_focus : 1;
   guint drag_column_window_state : 3;
-  /* hint to display rows in alternating colors */
-  guint has_rules : 1;
   guint mark_rows_col_dirty : 1;
 
   /* for DnD */
@@ -1061,21 +1054,6 @@ gtk_tree_view_class_init (GtkTreeViewClass *class)
                             FALSE,
                             GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
 
-  /**
-   * GtkTreeView:rules-hint:
-   *
-   * Sets a hint to the theme to draw rows in alternating colors.
-   *
-   * Deprecated: 3.14: The theme is responsible for drawing rows
-   *   using zebra striping
-   */
-  tree_view_props[PROP_RULES_HINT] =
-      g_param_spec_boolean ("rules-hint",
-                            P_("Rules Hint"),
-                            P_("Set a hint to the theme engine to draw rows in alternating colors"),
-                            FALSE,
-                            GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY|G_PARAM_DEPRECATED);
-
   tree_view_props[PROP_ENABLE_SEARCH] =
       g_param_spec_boolean ("enable-search",
                             P_("Enable Search"),
@@ -1920,11 +1898,6 @@ gtk_tree_view_set_property (GObject         *object,
     case PROP_REORDERABLE:
       gtk_tree_view_set_reorderable (tree_view, g_value_get_boolean (value));
       break;
-    case PROP_RULES_HINT:
-G_GNUC_BEGIN_IGNORE_DEPRECATIONS
-      gtk_tree_view_set_rules_hint (tree_view, g_value_get_boolean (value));
-G_GNUC_END_IGNORE_DEPRECATIONS
-      break;
     case PROP_ENABLE_SEARCH:
       gtk_tree_view_set_enable_search (tree_view, g_value_get_boolean (value));
       break;
@@ -2022,9 +1995,6 @@ gtk_tree_view_get_property (GObject    *object,
     case PROP_REORDERABLE:
       g_value_set_boolean (value, tree_view->priv->reorderable);
       break;
-    case PROP_RULES_HINT:
-      g_value_set_boolean (value, tree_view->priv->has_rules);
-      break;
     case PROP_ENABLE_SEARCH:
       g_value_set_boolean (value, tree_view->priv->enable_search);
       break;
@@ -2192,13 +2162,6 @@ gtk_tree_view_destroy (GtkWidget *widget)
       tree_view->priv->column_drop_func_data = NULL;
     }
 
-  if (tree_view->priv->destroy_count_destroy &&
-      tree_view->priv->destroy_count_data)
-    {
-      tree_view->priv->destroy_count_destroy (tree_view->priv->destroy_count_data);
-      tree_view->priv->destroy_count_data = NULL;
-    }
-
   gtk_tree_row_reference_free (tree_view->priv->anchor);
   tree_view->priv->anchor = NULL;
 
@@ -9202,16 +9165,6 @@ gtk_tree_view_row_has_child_toggled (GtkTreeModel *model,
 }
 
 static void
-count_children_helper (GtkRBTree *tree,
-                      GtkRBNode *node,
-                      gpointer   data)
-{
-  if (node->children)
-    _gtk_rbtree_traverse (node->children, node->children->root, G_POST_ORDER, count_children_helper, data);
-  (*((gint *)data))++;
-}
-
-static void
 check_selection_helper (GtkRBTree *tree,
                         GtkRBNode *node,
                         gpointer   data)
@@ -9309,14 +9262,6 @@ gtk_tree_view_row_deleted (GtkTreeModel *model,
       cursor_changed = TRUE;
     }
 
-  if (tree_view->priv->destroy_count_func)
-    {
-      gint child_count = 0;
-      if (node->children)
-       _gtk_rbtree_traverse (node->children, node->children->root, G_POST_ORDER, count_children_helper, 
&child_count);
-      tree_view->priv->destroy_count_func (tree_view, path, child_count, 
tree_view->priv->destroy_count_data);
-    }
-
   if (tree->root->count == 1)
     {
       if (tree_view->priv->tree == tree)
@@ -11789,64 +11734,6 @@ gtk_tree_view_get_headers_clickable (GtkTreeView *tree_view)
 }
 
 /**
- * gtk_tree_view_set_rules_hint:
- * @tree_view: a #GtkTreeView
- * @setting: %TRUE if the tree requires reading across rows
- *
- * Sets a hint for the theme to draw even/odd rows in the @tree_view
- * with different colors, also known as "zebra striping".
- *
- * This function tells the GTK+ theme that the user interface for your
- * application requires users to read across tree rows and associate
- * cells with one another.
- *
- * Do not use it just because you prefer the appearance of the ruled
- * tree; that’s a question for the theme. Some themes will draw tree
- * rows in alternating colors even when rules are turned off, and
- * users who prefer that appearance all the time can choose those
- * themes. You should call this function only as a semantic hint to
- * the theme engine that your tree makes alternating colors useful
- * from a functional standpoint (since it has lots of columns,
- * generally).
- *
- * Deprecated: 3.14
- */
-void
-gtk_tree_view_set_rules_hint (GtkTreeView  *tree_view,
-                              gboolean      setting)
-{
-  g_return_if_fail (GTK_IS_TREE_VIEW (tree_view));
-
-  setting = setting != FALSE;
-
-  if (tree_view->priv->has_rules != setting)
-    {
-      tree_view->priv->has_rules = setting;
-      gtk_widget_queue_draw (GTK_WIDGET (tree_view));
-      g_object_notify_by_pspec (G_OBJECT (tree_view), tree_view_props[PROP_RULES_HINT]);
-    }
-}
-
-/**
- * gtk_tree_view_get_rules_hint:
- * @tree_view: a #GtkTreeView
- *
- * Gets the setting set by gtk_tree_view_set_rules_hint().
- *
- * Returns: %TRUE if the hint is set
- *
- * Deprecated: 3.14
- */
-gboolean
-gtk_tree_view_get_rules_hint (GtkTreeView  *tree_view)
-{
-  g_return_val_if_fail (GTK_IS_TREE_VIEW (tree_view), FALSE);
-
-  return tree_view->priv->has_rules;
-}
-
-
-/**
  * gtk_tree_view_set_activate_on_single_click:
  * @tree_view: a #GtkTreeView
  * @single: %TRUE to emit row-activated on a single click
@@ -12861,18 +12748,6 @@ gtk_tree_view_real_collapse_row (GtkTreeView *tree_view,
        _gtk_tree_view_column_cell_set_dirty (column, TRUE);
     }
 
-  if (tree_view->priv->destroy_count_func)
-    {
-      GtkTreePath *child_path;
-      gint child_count = 0;
-      child_path = gtk_tree_path_copy (path);
-      gtk_tree_path_down (child_path);
-      if (node->children)
-       _gtk_rbtree_traverse (node->children, node->children->root, G_POST_ORDER, count_children_helper, 
&child_count);
-      tree_view->priv->destroy_count_func (tree_view, child_path, child_count, 
tree_view->priv->destroy_count_data);
-      gtk_tree_path_free (child_path);
-    }
-
   if (tree_view->priv->cursor_node)
     {
       cursor_changed = (node->children == tree_view->priv->cursor_tree)
@@ -14625,36 +14500,6 @@ gtk_tree_view_create_row_drag_icon (GtkTreeView  *tree_view,
 }
 
 
-/**
- * gtk_tree_view_set_destroy_count_func:
- * @tree_view: A #GtkTreeView
- * @func: (allow-none): Function to be called when a view row is destroyed, or %NULL
- * @data: (allow-none): User data to be passed to @func, or %NULL
- * @destroy: (allow-none): Destroy notifier for @data, or %NULL
- *
- * This function should almost never be used.  It is meant for private use by
- * ATK for determining the number of visible children that are removed when the
- * user collapses a row, or a row is deleted.
- *
- * Deprecated: 3.4: Accessibility does not need the function anymore.
- **/
-void
-gtk_tree_view_set_destroy_count_func (GtkTreeView             *tree_view,
-                                     GtkTreeDestroyCountFunc  func,
-                                     gpointer                 data,
-                                     GDestroyNotify           destroy)
-{
-  g_return_if_fail (GTK_IS_TREE_VIEW (tree_view));
-
-  if (tree_view->priv->destroy_count_destroy)
-    tree_view->priv->destroy_count_destroy (tree_view->priv->destroy_count_data);
-
-  tree_view->priv->destroy_count_func = func;
-  tree_view->priv->destroy_count_data = data;
-  tree_view->priv->destroy_count_destroy = destroy;
-}
-
-
 /*
  * Interactive search
  */
diff --git a/gtk/gtktreeview.h b/gtk/gtktreeview.h
index 8b38464..b1ac055 100644
--- a/gtk/gtktreeview.h
+++ b/gtk/gtktreeview.h
@@ -230,11 +230,6 @@ gboolean               gtk_tree_view_get_headers_clickable         (GtkTreeView
 GDK_AVAILABLE_IN_ALL
 void                   gtk_tree_view_set_headers_clickable         (GtkTreeView               *tree_view,
                                                                    gboolean                   setting);
-GDK_DEPRECATED_IN_3_14
-void                   gtk_tree_view_set_rules_hint                (GtkTreeView               *tree_view,
-                                                                   gboolean                   setting);
-GDK_DEPRECATED_IN_3_14
-gboolean               gtk_tree_view_get_rules_hint                (GtkTreeView               *tree_view);
 GDK_AVAILABLE_IN_3_8
 gboolean               gtk_tree_view_get_activate_on_single_click  (GtkTreeView               *tree_view);
 GDK_AVAILABLE_IN_3_8
@@ -492,18 +487,6 @@ void gtk_tree_view_convert_bin_window_to_tree_coords   (GtkTreeView *tree_view,
                                                        gint        *tx,
                                                        gint        *ty);
 
-/* This function should really never be used.  It is just for use by ATK.
- */
-typedef void (* GtkTreeDestroyCountFunc)  (GtkTreeView             *tree_view,
-                                          GtkTreePath             *path,
-                                          gint                     children,
-                                          gpointer                 user_data);
-GDK_DEPRECATED_IN_3_4
-void gtk_tree_view_set_destroy_count_func (GtkTreeView             *tree_view,
-                                          GtkTreeDestroyCountFunc  func,
-                                          gpointer                 data,
-                                          GDestroyNotify           destroy);
-
 GDK_AVAILABLE_IN_ALL
 void     gtk_tree_view_set_fixed_height_mode (GtkTreeView          *tree_view,
                                              gboolean              enable);


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