Implemented the goto-case dialog
[pspp-builds.git] / src / ui / gui / psppire-data-store.c
index 2603d0f4fb63c4dbf259f8dc4896a7749947175e..22bc10ee8d192b060c1cab761f5d62101fc6793c 100644 (file)
@@ -1,11 +1,9 @@
-/* psppire-data-store.c
-
-   PSPPIRE --- A Graphical User Interface for PSPP
+/* PSPPIRE - a graphical user interface for PSPP.
    Copyright (C) 2006  Free Software Foundation
 
-   This program is free software; you can redistribute it and/or modify
+   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
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
@@ -14,9 +12,7 @@
    GNU General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-   02110-1301, USA. */
+   along with this program.  If not, see <http://www.gnu.org/licenses/>. */
 
 #include <config.h>
 #include <string.h>
@@ -163,8 +159,14 @@ psppire_data_store_get_var_count (const GSheetModel *model)
   return psppire_dict_get_var_cnt (store->dict);
 }
 
+casenumber
+psppire_data_store_get_case_count (PsppireDataStore *store)
+{
+  return psppire_case_file_get_case_count (store->case_file);
+}
+
 static gint
-psppire_data_store_get_case_count (const GSheetModel *model)
+psppire_data_store_get_case_count_from_model (const GSheetModel *model)
 {
   const PsppireDataStore *store = PSPPIRE_DATA_STORE (model);
 
@@ -172,6 +174,8 @@ psppire_data_store_get_case_count (const GSheetModel *model)
 }
 
 
+
+
 static void
 psppire_data_store_init (PsppireDataStore *data_store)
 {
@@ -223,7 +227,7 @@ psppire_data_store_sheet_model_init (GSheetModelIface *iface)
   iface->get_font_desc = psppire_data_store_get_font_desc;
   iface->get_cell_border = NULL;
   iface->get_column_count = psppire_data_store_get_var_count;
-  iface->get_row_count = psppire_data_store_get_case_count;
+  iface->get_row_count = psppire_data_store_get_case_count_from_model;
 }
 
 static