pspp-sheet-view: Remove write-only variable from pspp_sheet_view_draw_bin().
[pspp] / src / ui / gui / pspp-sheet-view.c
index 138f86fd4213df848fec6491d71e2238aef1e39e..283e8ca619d4748b2765e6b6e3773bed9d99083c 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPPIRE - a graphical user interface for PSPP.
-   Copyright (C) 2011, 2012, 2013 Free Software Foundation, Inc.
+   Copyright (C) 2011, 2012, 2013, 2015 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -1523,11 +1523,7 @@ pspp_sheet_view_realize (GtkWidget *widget)
                            &attributes, attributes_mask);
   gtk_widget_set_window (widget, window);
 
-#if GTK_CHECK_VERSION(3,8,0)
   gtk_widget_register_window (widget, window);
-#else
-  gdk_window_set_user_data (window, widget);
-#endif
   gtk_widget_get_allocation (widget, &allocation);
 
   /* Make the window for the tree */
@@ -1546,11 +1542,7 @@ pspp_sheet_view_realize (GtkWidget *widget)
 
   tree_view->priv->bin_window = gdk_window_new (window,
                                                &attributes, attributes_mask);
-#if GTK_CHECK_VERSION(3,8,0)
   gtk_widget_register_window (widget, tree_view->priv->bin_window);
-#else
-  gdk_window_set_user_data (tree_view->priv->bin_window, widget);
-#endif
   gtk_widget_get_allocation (widget, &allocation);
 
   /* Make the column header window */
@@ -1568,11 +1560,7 @@ pspp_sheet_view_realize (GtkWidget *widget)
 
   tree_view->priv->header_window = gdk_window_new (window,
                                                   &attributes, attributes_mask);
-#if GTK_CHECK_VERSION(3,8,0)
   gtk_widget_register_window (widget, tree_view->priv->header_window);
-#else
-  gdk_window_set_user_data (tree_view->priv->header_window, widget);
-#endif
 
   { /* Ensure Background */
     GtkStyleContext *context;
@@ -3897,7 +3885,6 @@ pspp_sheet_view_draw_bin (GtkWidget      *widget,
   gint horizontal_separator;
   gint focus_line_width;
   gboolean allow_rules;
-  gboolean has_special_cell;
   gboolean rtl;
   gint n_visible_columns;
   gint grid_line_width;
@@ -4054,27 +4041,6 @@ pspp_sheet_view_draw_bin (GtkWidget      *widget,
 
       parity = node % 2;
 
-      if (tree_view->priv->special_cells == PSPP_SHEET_VIEW_SPECIAL_CELLS_DETECT)
-        {
-          /* we *need* to set cell data on all cells before the call
-           * to _has_special_cell, else _has_special_cell() does not
-           * return a correct value.
-           */
-          for (list = (rtl ? g_list_last (tree_view->priv->columns) : g_list_first (tree_view->priv->columns));
-               list;
-               list = (rtl ? list->prev : list->next))
-            {
-              PsppSheetViewColumn *column = list->data;
-              pspp_sheet_view_column_cell_set_cell_data (column,
-                                                         tree_view->priv->model,
-                                                         &iter);
-            }
-
-          has_special_cell = pspp_sheet_view_has_special_cell (tree_view);
-        }
-      else
-        has_special_cell = tree_view->priv->special_cells == PSPP_SHEET_VIEW_SPECIAL_CELLS_YES;
-
       for (list = (rtl ? g_list_last (tree_view->priv->columns) : g_list_first (tree_view->priv->columns));
           list;
           list = (rtl ? list->prev : list->next))