Add a dialog box for the reliability command.
authorJohn Darrington <john@darrington.wattle.id.au>
Fri, 3 Apr 2009 05:30:10 +0000 (13:30 +0800)
committerJohn Darrington <john@darrington.wattle.id.au>
Fri, 3 Apr 2009 05:30:10 +0000 (13:30 +0800)
src/ui/gui/automake.mk
src/ui/gui/data-editor.glade
src/ui/gui/psppire-data-window.c
src/ui/gui/regression-dialog.c
src/ui/gui/reliability.glade [new file with mode: 0644]

index 11106640d66db78c5e685b112048da79042eae88..cd7c34e6cac90d8df925cbd1331a74e204c301dd 100644 (file)
@@ -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 \
index bcc28f50688d8e849e8b57912b9222558340eae6..06776248738df3cbea663edeca39e2934b910037 100644 (file)
               </widget>
             </child>
             <child>
-              <widget class="GtkMenuItem" id="bivariate-correlation">
+              <widget class="GtkMenuItem" id="reliability">
                 <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label" translatable="yes">Bivariate _Correlation</property>
+                <property name="label" translatable="yes">Re_liability</property>
                 <property name="use_underline">True</property>
               </widget>
             </child>
index ce048e6a8a7bc5cf2416028f1e587de588d65839..03ae6e4d0172415a5582064523d44b540b240bb3 100644 (file)
@@ -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 =
index 7b6ce6cc8631dfc890aca58890d2184be6714bcb..b42dffe50b06b1583a91f38766aeafcb3bc36880 100644 (file)
@@ -214,7 +214,7 @@ dialog_state_valid (gpointer data)
 
   GtkTreeIter notused;
 
-  return (gtk_tree_model_get_iter_first (dep_vars, &notused) 
+  return (gtk_tree_model_get_iter_first (dep_vars, &notused)
     && gtk_tree_model_get_iter_first (indep_vars, &notused));
 }
 
diff --git a/src/ui/gui/reliability.glade b/src/ui/gui/reliability.glade
new file mode 100644 (file)
index 0000000..fd10686
--- /dev/null
@@ -0,0 +1,184 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
+<!--Generated with glade3 3.4.5 on Fri Apr  3 12:11:45 2009 -->
+<glade-interface>
+  <requires lib="psppire"/>
+  <widget class="PsppireDialog" id="reliability-dialog">
+    <property name="title" translatable="yes">Reliability Analysis</property>
+    <property name="modal">True</property>
+    <child internal-child="hbox">
+      <widget class="GtkHBox" id="dialog-hbox1">
+        <property name="visible">True</property>
+        <child>
+          <widget class="GtkVBox" id="vbox1">
+            <property name="visible">True</property>
+            <property name="spacing">12</property>
+            <child>
+              <widget class="GtkHBox" id="hbox1">
+                <property name="visible">True</property>
+                <child>
+                  <widget class="GtkScrolledWindow" id="scrolledwindow1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+                    <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+                    <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+                    <child>
+                      <widget class="PsppireDictView" id="dict-view">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="has_tooltip">True</property>
+                        <property name="border_width">5</property>
+                        <property name="headers_visible">False</property>
+                      </widget>
+                    </child>
+                  </widget>
+                </child>
+                <child>
+                  <widget class="GtkAlignment" id="alignment2">
+                    <property name="visible">True</property>
+                    <property name="xscale">0</property>
+                    <property name="yscale">0</property>
+                    <child>
+                      <widget class="PsppireSelector" id="psppire-selector1">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">True</property>
+                        <property name="no_show_all">True</property>
+                        <property name="border_width">5</property>
+                        <property name="response_id">0</property>
+                      </widget>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkFrame" id="frame1">
+                    <property name="visible">True</property>
+                    <property name="label_xalign">0</property>
+                    <property name="shadow_type">GTK_SHADOW_NONE</property>
+                    <child>
+                      <widget class="GtkAlignment" id="alignment1">
+                        <property name="visible">True</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <widget class="GtkScrolledWindow" id="scrolledwindow2">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+                            <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+                            <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+                            <child>
+                              <widget class="GtkTreeView" id="treeview2">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="headers_visible">False</property>
+                              </widget>
+                            </child>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label1">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">_Items:</property>
+                        <property name="use_markup">True</property>
+                        <property name="use_underline">True</property>
+                      </widget>
+                      <packing>
+                        <property name="type">label_item</property>
+                      </packing>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkHBox" id="hbox2">
+                <property name="visible">True</property>
+                <child>
+                  <widget class="GtkLabel" id="">
+                    <property name="visible">True</property>
+                    <property name="xalign">1</property>
+                    <property name="label" translatable="yes">Model:   </property>
+                    <property name="justify">GTK_JUSTIFY_RIGHT</property>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkComboBox" id="combobox1">
+                    <property name="visible">True</property>
+                    <property name="items" translatable="yes">Alpha
+Split</property>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkHBox" id="split-point-hbox">
+                <property name="visible">True</property>
+                <property name="sensitive">False</property>
+                <property name="spacing">5</property>
+                <child>
+                  <widget class="GtkLabel" id="label2">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">Variables in first split:</property>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkSpinButton" id="spinbutton1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="adjustment">0 0 100 1 10 10</property>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </widget>
+        </child>
+        <child>
+          <widget class="PsppireVButtonBox" id="psppire-vbuttonbox1">
+            <property name="visible">True</property>
+            <property name="border_width">5</property>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="pack_type">GTK_PACK_END</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+  </widget>
+</glade-interface>