From: John Darrington Date: Fri, 3 Apr 2009 05:30:10 +0000 (+0800) Subject: Add a dialog box for the reliability command. X-Git-Tag: v0.7.3~176^2~6 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?p=pspp-builds.git;a=commitdiff_plain;h=40233794e1b6c07262aaa30a5b6e977caf359ca1 Add a dialog box for the reliability command. --- diff --git a/src/ui/gui/automake.mk b/src/ui/gui/automake.mk index 11106640..cd7c34e6 100644 --- a/src/ui/gui/automake.mk +++ b/src/ui/gui/automake.mk @@ -69,6 +69,7 @@ nodist_src_ui_gui_psppire_DATA = \ $(top_builddir)/src/ui/gui/rank.ui \ $(top_builddir)/src/ui/gui/recode.ui \ $(top_builddir)/src/ui/gui/regression.ui \ + $(top_builddir)/src/ui/gui/reliability.ui \ $(top_builddir)/src/ui/gui/syntax-editor.ui \ $(top_builddir)/src/ui/gui/text-data-import.ui \ $(top_builddir)/src/ui/gui/t-test.ui \ @@ -178,6 +179,8 @@ src_ui_gui_psppire_SOURCES = \ src/ui/gui/recode-dialog.h \ src/ui/gui/regression-dialog.c \ src/ui/gui/regression-dialog.h \ + src/ui/gui/reliability-dialog.c \ + src/ui/gui/reliability-dialog.h \ src/ui/gui/select-cases-dialog.c \ src/ui/gui/select-cases-dialog.h \ src/ui/gui/sort-cases-dialog.c \ @@ -224,6 +227,7 @@ src_ui_gui_psppire_SOURCES = \ src/ui/gui/rank.glade \ src/ui/gui/recode.glade \ src/ui/gui/regression.glade \ + src/ui/gui/reliability.glade \ src/ui/gui/syntax-editor.glade \ src/ui/gui/text-data-import.glade \ src/ui/gui/t-test.glade \ diff --git a/src/ui/gui/data-editor.glade b/src/ui/gui/data-editor.glade index bcc28f50..06776248 100644 --- a/src/ui/gui/data-editor.glade +++ b/src/ui/gui/data-editor.glade @@ -549,9 +549,9 @@ - + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Bivariate _Correlation + Re_liability True diff --git a/src/ui/gui/psppire-data-window.c b/src/ui/gui/psppire-data-window.c index ce048e6a..03ae6e4d 100644 --- a/src/ui/gui/psppire-data-window.c +++ b/src/ui/gui/psppire-data-window.c @@ -54,6 +54,7 @@ #include "frequencies-dialog.h" #include "examine-dialog.h" #include "regression-dialog.h" +#include "reliability-dialog.h" #include "oneway-anova-dialog.h" #include "t-test-independent-samples-dialog.h" #include "t-test-one-sample.h" @@ -1654,7 +1655,22 @@ psppire_data_window_init (PsppireDataWindow *de) G_CALLBACK (regression_dialog), de); } - { + { + GtkAction *invoke_reliability_dialog = + resolve_action (de->builder, "reliability", NULL); + + g_object_set (invoke_reliability_dialog, + "tooltip", _("Reliability Analysis"), + "stock-id", "pspp-reliability", + NULL + ); + + g_signal_connect (invoke_reliability_dialog, "activate", + G_CALLBACK (reliability_dialog), de); + } + + + { GtkUIManager *uim = GTK_UI_MANAGER (get_object_assert (de->builder, "uimanager1", GTK_TYPE_UI_MANAGER)); GtkWidget *recent_data = diff --git a/src/ui/gui/regression-dialog.c b/src/ui/gui/regression-dialog.c index 7b6ce6cc..b42dffe5 100644 --- a/src/ui/gui/regression-dialog.c +++ b/src/ui/gui/regression-dialog.c @@ -214,7 +214,7 @@ dialog_state_valid (gpointer data) GtkTreeIter notused; - return (gtk_tree_model_get_iter_first (dep_vars, ¬used) + return (gtk_tree_model_get_iter_first (dep_vars, ¬used) && gtk_tree_model_get_iter_first (indep_vars, ¬used)); } diff --git a/src/ui/gui/reliability.glade b/src/ui/gui/reliability.glade new file mode 100644 index 00000000..fd106862 --- /dev/null +++ b/src/ui/gui/reliability.glade @@ -0,0 +1,184 @@ + + + + + + + Reliability Analysis + True + + + True + + + True + 12 + + + True + + + True + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_ETCHED_IN + + + True + True + True + 5 + False + + + + + + + True + 0 + 0 + + + True + True + True + True + 5 + 0 + + + + + False + False + 1 + + + + + True + 0 + GTK_SHADOW_NONE + + + True + 12 + + + True + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_ETCHED_IN + + + True + True + False + + + + + + + + + True + _Items: + True + True + + + label_item + + + + + 2 + + + + + + + True + + + True + 1 + Model: + GTK_JUSTIFY_RIGHT + + + False + False + + + + + True + Alpha +Split + + + False + 1 + + + + + False + 1 + + + + + True + False + 5 + + + True + Variables in first split: + + + False + + + + + True + True + 0 0 100 1 10 10 + + + False + 1 + + + + + False + 2 + + + + + + + True + 5 + + + False + False + GTK_PACK_END + 1 + + + + + +