Fix leak in dialogs, and correct name of options button.
authorJohn Darrington <john@darrington.wattle.id.au>
Sun, 3 Feb 2008 04:15:34 +0000 (04:15 +0000)
committerJohn Darrington <john@darrington.wattle.id.au>
Sun, 3 Feb 2008 04:15:34 +0000 (04:15 +0000)
src/ui/gui/dialog-common.c
src/ui/gui/t-test-independent-samples-dialog.c
src/ui/gui/t-test-paired-samples.c
src/ui/gui/t-test.glade

index fe2c7937ef45f539848783327f0332ca9a55dfd3..bbdc36a2d6bd3260a0d67cd09737c165ff9e0a1a 100644 (file)
@@ -280,17 +280,14 @@ numeric_only (GtkWidget *source, GtkWidget *dest)
   for (l = list; l ; l = l->next)
     {
       GtkTreePath *path = l->data;
-      GtkTreePath *fpath;
-      gint *idx;
-
-      const struct variable *v;
-
-      fpath = gtk_tree_model_filter_convert_path_to_child_path
+      GtkTreePath *fpath = gtk_tree_model_filter_convert_path_to_child_path
        (GTK_TREE_MODEL_FILTER (model), path);
 
-      idx = gtk_tree_path_get_indices (fpath);
+      gint *idx = gtk_tree_path_get_indices (fpath);
 
-      v = psppire_dict_get_variable (dict, idx[0]);
+      const struct variable *v = psppire_dict_get_variable (dict, idx[0]);
+
+      gtk_tree_path_free (fpath);
 
       if ( var_is_alpha (v))
        {
index 74b43cc1dba7d84987ea33021a56063d343d8274..c759edfb11a15a5a620cfdb1e757b0e1d3c4e059 100644 (file)
@@ -417,7 +417,7 @@ t_test_independent_samples_dialog (GObject *o, gpointer data)
     get_widget_assert (xml, "indep-samples-t-test-selector1");
 
   GtkWidget *options_button =
-    get_widget_assert (xml, "options-button");
+    get_widget_assert (xml, "indep-samples-t-test-options-button");
 
   vs = PSPPIRE_VAR_STORE (gtk_sheet_get_model (var_sheet));
 
index 6b5a6e9e20c92b2320cae84a4a28c656ed816d14..7bb422ca7c55d240a8e7823c5a482466ee70e4ae 100644 (file)
@@ -196,7 +196,7 @@ t_test_paired_samples_dialog (GObject *o, gpointer data)
   GtkWidget *dict_view =
     get_widget_assert (xml, "paired-samples-t-test-treeview1");
 
-  GtkWidget *options_button = get_widget_assert (xml, "options-button");
+  GtkWidget *options_button = get_widget_assert (xml, "paired-samples-t-test-options-button");
 
   GtkWidget *selector = get_widget_assert (xml, "psppire-selector3");
 
index 0ee5f1182ddb901f2d842000a847bbc607ae0628..e355daf442b655be6422835c2022ff7bcacb2070 100644 (file)
@@ -61,7 +61,7 @@
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkButton" id="options-button">
+                      <widget class="GtkButton" id="indep-samples-t-test-options-button">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">True</property>
                     <property name="visible">True</property>
                     <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">Group_2 value:</property>
-                <property name="use_underline">True</property>
-              </widget>
-              <packing>
+                    <property name="use_underline">True</property>
+                  </widget>
+                  <packing>
                     <property name="top_attach">1</property>
                     <property name="bottom_attach">2</property>
                     <property name="x_options"></property>
-              </packing>
-            </child>
-            <child>
+                  </packing>
+                </child>
+                <child>
                   <widget class="GtkLabel" id="label1">
                     <property name="visible">True</property>
                     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                   </widget>
                   <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">2</property>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
                     <property name="top_attach">1</property>
                     <property name="bottom_attach">2</property>
-              </packing>
-            </child>
-            <child>
+                  </packing>
+                </child>
+                <child>
                   <widget class="GtkEntry" id="group1-entry">
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="right_attach">2</property>
                   </packing>
                 </child>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
+              </widget>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="right_attach">2</property>
+                <property name="top_attach">1</property>
+                <property name="bottom_attach">2</property>
                 <property name="y_options">GTK_EXPAND</property>
-                  </packing>
-                </child>
-                <child>
+              </packing>
+            </child>
+            <child>
               <widget class="GtkHBox" id="hbox1">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                 <child>
                   <widget class="GtkLabel" id="label5">
                     <property name="visible">True</property>
             <property name="right_attach">4</property>
           </packing>
         </child>
-            <child>
+        <child>
           <widget class="GtkFrame" id="frame2">
             <property name="visible">True</property>
             <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                 <property name="left_padding">12</property>
                 <child>
                   <widget class="GtkScrolledWindow" id="scrolledwindow3">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                     <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
                     <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
                     <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
                         <property name="can_focus">True</property>
                         <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                         <property name="headers_visible">False</property>
-              </widget>
-            </child>
-          </widget>
+                      </widget>
+                    </child>
+                  </widget>
                 </child>
               </widget>
             </child>
                 <property name="label" translatable="yes">Test Variable(s):</property>
                 <property name="use_markup">True</property>
               </widget>
-          <packing>
+              <packing>
                 <property name="type">label_item</property>
               </packing>
             </child>
             <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
             <child>
               <widget class="GtkScrolledWindow" id="scrolledwindow2">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-            <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-            <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-            <child>
-                  <widget class="GtkTreeView" id="paired-samples-t-test-treeview1">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="headers_visible">False</property>
+                <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+                <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+                <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+                <child>
+                  <widget class="GtkTreeView" id="paired-samples-t-test-treeview1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="headers_visible">False</property>
                     <property name="headers_clickable">True</property>
                   </widget>
                 </child>
                     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                     <property name="no_show_all">True</property>
                     <property name="border_width">5</property>
+                  </widget>
+                </child>
               </widget>
-            </child>
-          </widget>
-          <packing>
+              <packing>
                 <property name="expand">False</property>
                 <property name="fill">False</property>
                 <property name="position">1</property>
-          </packing>
-        </child>
-        <child>
+              </packing>
+            </child>
+            <child>
               <widget class="GtkVBox" id="vbox3">
                 <property name="visible">True</property>
                 <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                 <property name="spacing">5</property>
                 <child>
                   <widget class="GtkFrame" id="frame4">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="shadow_type">GTK_SHADOW_NONE</property>
-            <child>
-                      <widget class="GtkAlignment" id="alignment6">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="left_padding">12</property>
-                <child>
-                          <widget class="GtkScrolledWindow" id="scrolledwindow1">
                     <property name="visible">True</property>
-                    <property name="can_focus">True</property>
                     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-                    <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                    <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+                    <property name="shadow_type">GTK_SHADOW_NONE</property>
                     <child>
-                              <widget class="GtkTreeView" id="paired-samples-t-test-treeview2">
+                      <widget class="GtkAlignment" id="alignment6">
                         <property name="visible">True</property>
-                        <property name="can_focus">True</property>
                         <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <widget class="GtkScrolledWindow" id="scrolledwindow1">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+                            <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+                            <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+                            <child>
+                              <widget class="GtkTreeView" id="paired-samples-t-test-treeview2">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                                 <property name="enable_search">False</property>
+                              </widget>
+                            </child>
+                          </widget>
+                        </child>
                       </widget>
                     </child>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-            <child>
+                    <child>
                       <widget class="GtkLabel" id="label13">
-                <property name="visible">True</property>
-                <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">Test Variable(s):</property>
-                <property name="use_markup">True</property>
-              </widget>
-              <packing>
-                <property name="type">label_item</property>
-              </packing>
-            </child>
-          </widget>
+                        <property name="visible">True</property>
+                        <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">Test Variable(s):</property>
+                        <property name="use_markup">True</property>
+                      </widget>
+                      <packing>
+                        <property name="type">label_item</property>
+                      </packing>
+                    </child>
+                  </widget>
                 </child>
                 <child>
                   <widget class="GtkVButtonBox" id="vbuttonbox2">
                     <property name="visible">True</property>
                     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                     <child>
-                      <widget class="GtkButton" id="options-button">
+                      <widget class="GtkButton" id="paired-samples-t-test-options-button">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">True</property>
                       </widget>
                     </child>
                   </widget>
-          <packing>
+                  <packing>
                     <property name="expand">False</property>
                     <property name="fill">False</property>
                     <property name="position">1</property>
               </widget>
               <packing>
                 <property name="position">2</property>
-          </packing>
-        </child>
+              </packing>
+            </child>
           </widget>
         </child>
         <child>