X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Ffind-dialog.c;h=1a3a0a5c91afcfeb70067d2e29bf56887880eba6;hb=d2ee46757c7602fb0d6827136fdb00af1140e2e1;hp=1f929b6485f88e5071d79bddb54e8b5c5044f7a8;hpb=0fe886a656b0ee57b4d542b7c16b3c56288b6fc6;p=pspp diff --git a/src/ui/gui/find-dialog.c b/src/ui/gui/find-dialog.c index 1f929b6485..1a3a0a5c91 100644 --- a/src/ui/gui/find-dialog.c +++ b/src/ui/gui/find-dialog.c @@ -49,9 +49,6 @@ which match particular strings */ #define N_(msgid) msgid -/* FIXME: These shouldn't be here */ -#include "psppire-var-store.h" - struct find_dialog { GtkBuilder *xml; @@ -122,7 +119,7 @@ do_find (GObject *obj, const struct find_dialog *fd) PSPPIRE_DATA_EDITOR_DATA_VIEW); psppire_data_sheet_goto_case (data_sheet, x); - psppire_data_sheet_show_variable (data_sheet, column); + 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"); @@ -471,8 +465,13 @@ string_label_compare (const struct comparator *cmptr, const struct string_comparator *ssc = (const struct string_comparator *) cmptr; + int width; + const char *text = var_lookup_value_label (cmptr->var, val); - int width = strlen (text); + if (text == NULL) + return false; + + width = strlen (text); assert ( cmptr->flags & STR_CMP_LABELS);