X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpsppire-dictview.c;h=0e465a3a763a9b237207441e30a3180b019f5de0;hb=b03ff6adc04a5b79617c4fa386c424f994a18bfe;hp=4d56eda9052318128e2b6575edfe296b6226dbd8;hpb=f550aee00a62fe1d8baf62d83cd7efef6cc2ee92;p=pspp diff --git a/src/ui/gui/psppire-dictview.c b/src/ui/gui/psppire-dictview.c index 4d56eda905..0e465a3a76 100644 --- a/src/ui/gui/psppire-dictview.c +++ b/src/ui/gui/psppire-dictview.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2009 Free Software Foundation + Copyright (C) 2009, 2010, 2011 Free Software Foundation 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 @@ -16,7 +16,7 @@ #include -#include +#include #include "psppire-dictview.h" #include "psppire-dict.h" #include "psppire-conf.h" @@ -68,7 +68,7 @@ psppire_dict_view_finalize (GObject *object) { PsppireDictView *dict_view = PSPPIRE_DICT_VIEW (object); - g_object_unref (dict_view->menu); + gtk_widget_destroy (dict_view->menu); } /* Properties */ @@ -105,7 +105,10 @@ set_model (PsppireDictView *dict_view) { GtkTreeModel *model ; - if ( dict_view->predicate ) + if ( dict_view->dict == NULL) + return; + + if ( dict_view->predicate ) { model = gtk_tree_model_filter_new (GTK_TREE_MODEL (dict_view->dict), NULL); @@ -344,7 +347,7 @@ var_icon_cell_data_func (GtkTreeViewColumn *col, } else { - const struct fmt_spec *fs = var_get_write_format (var); + const struct fmt_spec *fs = var_get_print_format (var); int cat = fmt_get_category (fs->type); switch ( var_get_measure (var)) {