X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Ffind-dialog.c;h=1a3a0a5c91afcfeb70067d2e29bf56887880eba6;hb=ea17c5b225557fc0760810861451a84dc241d462;hp=8dea41768ae6fba92d39f94cd037edc8f2d8ae30;hpb=6982cc4aef29f7026e75702174efa8091d9badb2;p=pspp diff --git a/src/ui/gui/find-dialog.c b/src/ui/gui/find-dialog.c index 8dea41768a..1a3a0a5c91 100644 --- a/src/ui/gui/find-dialog.c +++ b/src/ui/gui/find-dialog.c @@ -20,37 +20,35 @@ which match particular strings */ #include -#include "find-dialog.h" -#include "psppire-selector.h" -#include "psppire-dialog.h" -#include "builder-wrapper.h" -#include "helper.h" -#include "psppire-data-window.h" -#include "dict-display.h" -#include -#include -#include -#include -#include "psppire-data-store.h" #include -#include -#include -#include -#include - #include +#include #include +#include -#include "xalloc.h" +#include "data/data-in.h" +#include "data/datasheet.h" +#include "data/format.h" +#include "data/value.h" +#include "libpspp/cast.h" +#include "libpspp/message.h" +#include "ui/gui/builder-wrapper.h" +#include "ui/gui/dict-display.h" +#include "ui/gui/find-dialog.h" +#include "ui/gui/helper.h" +#include "ui/gui/psppire-data-sheet.h" +#include "ui/gui/psppire-data-store.h" +#include "ui/gui/psppire-data-window.h" +#include "ui/gui/psppire-dialog.h" +#include "ui/gui/psppire-selector.h" + +#include "gl/xalloc.h" #include #define _(msgid) gettext (msgid) #define N_(msgid) msgid -/* FIXME: These shouldn't be here */ -#include "psppire-var-store.h" - struct find_dialog { GtkBuilder *xml; @@ -102,12 +100,13 @@ refresh (GObject *obj, const struct find_dialog *fd) static void do_find (GObject *obj, const struct find_dialog *fd) { + PsppireDataSheet *data_sheet; casenumber x = -1; gint column = -1; glong row; - g_object_get (fd->de->data_editor, "current-case", &row, NULL); - + data_sheet = psppire_data_editor_get_active_data_sheet (fd->de->data_editor); + row = psppire_data_sheet_get_selected_case (data_sheet); if ( row < 0 ) row = 0; @@ -119,10 +118,8 @@ do_find (GObject *obj, const struct find_dialog *fd) gtk_notebook_set_current_page (GTK_NOTEBOOK (fd->de->data_editor), PSPPIRE_DATA_EDITOR_DATA_VIEW); - g_object_set (fd->de->data_editor, - "current-case", x, - "current-variable", column, - NULL); + psppire_data_sheet_goto_case (data_sheet, x); + psppire_data_sheet_goto_variable (data_sheet, column); } } @@ -196,7 +193,6 @@ find_dialog (PsppireDataWindow *de) GtkWidget *buttonbox; - PsppireVarStore *vs ; PsppireDataStore *ds ; fd.xml = builder_new ("find.ui"); @@ -215,12 +211,10 @@ find_dialog (PsppireDataWindow *de) selector = get_widget_assert (fd.xml, "find-selector"); g_object_get (de->data_editor, - "var-store", &vs, + "dictionary", &fd.dict, "data-store", &ds, NULL); - g_object_get (vs, "dictionary", &fd.dict, NULL); - fd.data = ds->datasheet; fd.variable_entry = get_widget_assert (fd.xml, "find-variable-entry");