From f30cc841f8044a49cfd215f3f3a22570cedfec82 Mon Sep 17 00:00:00 2001 From: John Darrington Date: Sun, 12 Jun 2016 09:03:33 +0200 Subject: [PATCH] Fixed a small bug in te variable info dialog. --- NEWS | 3 ++ src/ui/gui/psppire-dialog-action-var-info.c | 35 +++++++++++---------- 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/NEWS b/NEWS index 2481c82c0a..8ba15ffcdf 100644 --- a/NEWS +++ b/NEWS @@ -17,6 +17,9 @@ Changes from 0.10.1 to 0.10.2: - T-test with independent samples GUI crashed with string type variable as group variable. + - The variable info dialog showed the previous selected variable + superimposed with the currently selected one. + Changes from 0.10.0 to 0.10.1: * Bug fixes, including the following: diff --git a/src/ui/gui/psppire-dialog-action-var-info.c b/src/ui/gui/psppire-dialog-action-var-info.c index 21f9f0439c..998f7bb45c 100644 --- a/src/ui/gui/psppire-dialog-action-var-info.c +++ b/src/ui/gui/psppire-dialog-action-var-info.c @@ -175,28 +175,29 @@ psppire_dialog_action_var_info_activate (PsppireDialogAction *a) { xml = builder_new ("variable-info.ui"); g_hash_table_insert (thing, a, xml); - } - - act->output = psppire_output_view_new ( - GTK_LAYOUT (get_widget_assert (xml, "layout1")), NULL, NULL, NULL); - pda->dialog = get_widget_assert (xml, "variable-info-dialog"); - pda->source = get_widget_assert (xml, "treeview2"); + act->output = + psppire_output_view_new (GTK_LAYOUT (get_widget_assert (xml, "layout1")), + NULL, NULL, NULL); + + pda->dialog = get_widget_assert (xml, "variable-info-dialog"); + pda->source = get_widget_assert (xml, "treeview2"); - g_object_set (pda->source, - "selection-mode", GTK_SELECTION_MULTIPLE, - NULL); + g_object_set (pda->source, + "selection-mode", GTK_SELECTION_MULTIPLE, + NULL); - g_signal_connect (gtk_tree_view_get_selection (GTK_TREE_VIEW (pda->source)), - "changed", G_CALLBACK (populate_output), - act); + g_signal_connect (gtk_tree_view_get_selection (GTK_TREE_VIEW (pda->source)), + "changed", G_CALLBACK (populate_output), + act); - g_signal_connect (pda->dialog, "response", G_CALLBACK (jump_to), - pda); - - psppire_dialog_action_set_valid_predicate (pda, - treeview_item_selected); + g_signal_connect (pda->dialog, "response", G_CALLBACK (jump_to), + pda); + psppire_dialog_action_set_valid_predicate (pda, + treeview_item_selected); + } + if (PSPPIRE_DIALOG_ACTION_CLASS (psppire_dialog_action_var_info_parent_class)->activate) PSPPIRE_DIALOG_ACTION_CLASS (psppire_dialog_action_var_info_parent_class)->activate (pda); } -- 2.30.2