Made everything except gtkitementry.c multi-head safe
[pspp-builds.git] / src / ui / gui / psppire-data-store.c
index afbe3d2fe31f82fb83b4149a2a9656b902d9bc7a..9f7e40754b4851b88678ba450ab8de22370a0264 100644 (file)
@@ -56,7 +56,6 @@ static gboolean psppire_data_store_clear_datum (GSheetModel *model,
 
 
 #define MIN_COLUMNS 10
-
 #define TRAILING_ROWS 10
 
 static GObjectClass *parent_class = NULL;
@@ -236,13 +235,6 @@ psppire_data_store_sheet_model_init (GSheetModelIface *iface)
   iface->get_row_count = psppire_data_store_get_case_count_wrapper;
 }
 
-static
-gboolean always_true ()
-{
-  return TRUE;
-}
-
-
 static void
 delete_cases_callback (GtkWidget *w,
         casenumber first, casenumber n_cases, gpointer data)
@@ -800,9 +792,11 @@ geometry_set_width (GSheetColumn *geom, glong unit, gint width)
 {
   PsppireDataStore *ds = PSPPIRE_DATA_STORE (geom);
 
-  struct variable *pv = psppire_dict_get_variable (ds->dict, unit);
+  struct variable *v = psppire_dict_get_variable (ds->dict, unit);
 
-  var_set_display_width (pv, width / ds->width_of_m );
+  g_return_if_fail (v);
+
+  var_set_display_width (v, width / ds->width_of_m );
 }
 
 
@@ -881,7 +875,6 @@ psppire_data_store_sheet_column_init (GSheetColumnIface *iface)
   iface->get_column_count = geometry_get_column_count;
   iface->get_width = geometry_get_width;
   iface->set_width = geometry_set_width;
-  iface->get_visibility = always_true;
   iface->get_sensitivity = geometry_get_sensitivity;
   iface->get_justification = geometry_get_justification;
   iface->get_button_label = geometry_get_column_button_label;
@@ -934,7 +927,6 @@ geometry_get_row_sensitivity (const GSheetRow *geom, glong unit)
   return (unit < psppire_case_file_get_case_count (ds->case_file));
 }
 
-
 static gchar *
 geometry_get_row_button_label (const GSheetRow *geom, glong unit)
 {
@@ -962,7 +954,6 @@ psppire_data_store_sheet_row_init (GSheetRowIface *iface)
 
   iface->get_height = geometry_get_height;
   iface->set_height = 0;
-  iface->get_visibility = always_true;
   iface->get_sensitivity = geometry_get_row_sensitivity;
   iface->top_ypixel = geometry_get_top_ypixel;
   iface->pixel_to_row = geometry_pixel_to_row;