X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpsppire-value-entry.c;h=a55a50465c66aea9d916ef2240ae039cf90794ff;hb=876da2249715aa8495343d8a9b1dd9b4a08fc91d;hp=4cc8be9871acb1f9c90e151626e407709e2f8101;hpb=b03ff6adc04a5b79617c4fa386c424f994a18bfe;p=pspp diff --git a/src/ui/gui/psppire-value-entry.c b/src/ui/gui/psppire-value-entry.c index 4cc8be9871..a55a50465c 100644 --- a/src/ui/gui/psppire-value-entry.c +++ b/src/ui/gui/psppire-value-entry.c @@ -216,6 +216,7 @@ psppire_value_entry_init (PsppireValueEntry *obj) obj->format = F_8_0; obj->encoding = NULL; obj->cur_value = NULL; + gtk_combo_box_entry_set_text_column (GTK_COMBO_BOX_ENTRY (obj), COL_LABEL); g_signal_connect (buffer, "notify::text", G_CALLBACK (psppire_value_entry_text_changed), obj); @@ -241,7 +242,6 @@ psppire_value_entry_new (void) static void psppire_value_entry_refresh_model (PsppireValueEntry *obj) { - GtkWidget *entry = gtk_bin_get_child (GTK_BIN (obj)); GtkTreeModel *model; GtkTreeModel *old_model; @@ -280,8 +280,8 @@ psppire_value_entry_refresh_model (PsppireValueEntry *obj) } gtk_combo_box_set_model (GTK_COMBO_BOX (obj), model); - gtk_combo_box_entry_set_text_column (GTK_COMBO_BOX_ENTRY (obj), COL_LABEL); - gtk_widget_set_sensitive (entry, model != NULL); + if (model != NULL) + g_object_unref (model); } void @@ -319,9 +319,7 @@ void psppire_value_entry_set_value_labels (PsppireValueEntry *obj, const struct val_labs *val_labs) { - if (val_labs != NULL - ? obj->val_labs == NULL || !val_labs_equal (obj->val_labs, val_labs) - : obj->val_labs != NULL) + if (!val_labs_equal (obj->val_labs, val_labs)) { obj->cur_value = NULL;