From: John Darrington <john@darrington.wattle.id.au> Date: Fri, 16 Jul 2010 20:53:18 +0000 (+0200) Subject: Reliability dialog: Add checkbox for summary subcommand X-Git-Tag: sav-api~155 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5d276e7c96c4c6fb21e4f0bd0f9473f7ab4066a4;p=pspp Reliability dialog: Add checkbox for summary subcommand --- diff --git a/src/ui/gui/reliability-dialog.c b/src/ui/gui/reliability-dialog.c index 8587b723f0..957d9e11ca 100644 --- a/src/ui/gui/reliability-dialog.c +++ b/src/ui/gui/reliability-dialog.c @@ -43,6 +43,7 @@ struct reliability GtkWidget *variables; GtkWidget *split_point_hbox; GtkWidget *split_spinbutton; + GtkWidget *scale_if_item_deleted_checkbutton; }; @@ -93,6 +94,9 @@ refresh (PsppireDialog *dialog, struct reliability *rd) gtk_spin_button_set_range (GTK_SPIN_BUTTON (rd->split_spinbutton), 0, 0); + + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (rd->scale_if_item_deleted_checkbutton), + FALSE); } @@ -128,6 +132,8 @@ reliability_dialog (PsppireDataWindow *de) rd.model_combo = get_widget_assert (xml, "combobox1"); rd.split_spinbutton = get_widget_assert (xml, "spinbutton1"); + rd.scale_if_item_deleted_checkbutton = get_widget_assert (xml, "totals-checkbutton"); + g_signal_connect_swapped (rd.model_combo, "changed", G_CALLBACK (on_method_change), &rd); @@ -207,6 +213,9 @@ generate_syntax (const struct reliability *rd) gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (rd->split_spinbutton)) ); + if ( gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (rd->scale_if_item_deleted_checkbutton))) + g_string_append (string, "\n\t/SUMMARY = TOTAL"); + g_string_append (string, ".\n"); text = string->str; diff --git a/src/ui/gui/reliability.ui b/src/ui/gui/reliability.ui index 588e5e2012..96353509ed 100644 --- a/src/ui/gui/reliability.ui +++ b/src/ui/gui/reliability.ui @@ -7,7 +7,6 @@ <property name="upper">100</property> <property name="step_increment">1</property> <property name="page_increment">10</property> - <property name="page_size">0</property> </object> <object class="GtkListStore" id="model1"> <columns> @@ -30,171 +29,205 @@ <object class="GtkHBox" id="dialog-hbox5"> <property name="visible">True</property> <child> - <object class="GtkVBox" id="vbox1"> + <object class="GtkAlignment" id="alignment1"> <property name="visible">True</property> - <property name="orientation">vertical</property> - <property name="spacing">12</property> + <property name="top_padding">5</property> + <property name="bottom_padding">5</property> + <property name="left_padding">6</property> <child> - <object class="GtkHBox" id="hbox1"> + <object class="GtkVBox" id="vbox1"> <property name="visible">True</property> + <property name="orientation">vertical</property> + <property name="spacing">12</property> <child> - <object class="GtkScrolledWindow" id="scrolledwindow1"> + <object class="GtkHBox" id="hbox1"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="hscrollbar_policy">never</property> - <property name="vscrollbar_policy">automatic</property> - <property name="shadow_type">etched-in</property> <child> - <object class="PsppireDictView" id="dict-view"> + <object class="GtkScrolledWindow" id="scrolledwindow1"> <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> + <property name="hscrollbar_policy">never</property> + <property name="vscrollbar_policy">automatic</property> + <property name="shadow_type">etched-in</property> + <child> + <object class="PsppireDictView" id="dict-view"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="border_width">5</property> + <property name="headers_visible">False</property> + <property name="headers_clickable">False</property> + </object> + </child> </object> + <packing> + <property name="position">0</property> + </packing> </child> - </object> - <packing> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkAlignment" id="alignment2"> - <property name="visible">True</property> - <property name="xscale">0</property> - <property name="yscale">0</property> <child> - <object class="PsppireSelector" id="psppire-selector1"> + <object class="GtkAlignment" id="alignment2"> <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="source_widget">dict-view</property> - <property name="dest_widget">treeview2</property> + <property name="xscale">0</property> + <property name="yscale">0</property> + <child> + <object 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="source_widget">dict-view</property> + <property name="dest_widget">treeview2</property> + </object> + </child> </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">1</property> + </packing> </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">1</property> - </packing> - </child> - <child> - <object class="GtkFrame" id="frame1"> - <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="shadow_type">none</property> <child> - <object class="GtkAlignment" id="alignment1"> + <object class="GtkVBox" id="vbox2"> <property name="visible">True</property> - <property name="left_padding">12</property> + <property name="orientation">vertical</property> <child> - <object class="GtkScrolledWindow" id="scrolledwindow2"> + <object class="GtkFrame" id="frame1"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="hscrollbar_policy">never</property> - <property name="vscrollbar_policy">automatic</property> - <property name="shadow_type">etched-in</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment3"> + <property name="visible">True</property> + <property name="left_padding">12</property> + <child> + <object class="GtkScrolledWindow" id="scrolledwindow2"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hscrollbar_policy">never</property> + <property name="vscrollbar_policy">automatic</property> + <property name="shadow_type">etched-in</property> + <child> + <object class="PsppireVarView" id="treeview2"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="headers_visible">False</property> + <property name="headers_clickable">False</property> + </object> + </child> + </object> + </child> + </object> + </child> + <child type="label"> + <object 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> + </object> + </child> + </object> + <packing> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkHBox" id="hbox2"> + <property name="visible">True</property> + <child> + <object class="GtkLabel" id="label3"> + <property name="visible">True</property> + <property name="xalign">1</property> + <property name="label" translatable="yes">Model: </property> + <property name="justify">right</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkComboBox" id="combobox1"> + <property name="visible">True</property> + <property name="model">model1</property> + <child> + <object class="GtkCellRendererText" id="renderer1"/> + <attributes> + <attribute name="text">0</attribute> + </attributes> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkHBox" id="split-point-hbox"> + <property name="visible">True</property> + <property name="sensitive">False</property> + <property name="spacing">5</property> + <child> + <object class="GtkLabel" id="label2"> + <property name="visible">True</property> + <property name="label" translatable="yes">Variables in first split:</property> + </object> + <packing> + <property name="expand">False</property> + <property name="position">0</property> + </packing> + </child> <child> - <object class="PsppireVarView" id="treeview2"> + <object class="GtkSpinButton" id="spinbutton1"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="headers_visible">False</property> + <property name="invisible_char">●</property> + <property name="adjustment">adjustment1</property> </object> + <packing> + <property name="expand">False</property> + <property name="position">1</property> + </packing> </child> </object> + <packing> + <property name="expand">False</property> + <property name="position">2</property> + </packing> </child> </object> - </child> - <child type="label"> - <object 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> - </object> + <packing> + <property name="position">2</property> + </packing> </child> </object> <packing> - <property name="position">2</property> - </packing> - </child> - </object> - <packing> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkHBox" id="hbox2"> - <property name="visible">True</property> - <child> - <object class="GtkLabel" id="label3"> - <property name="visible">True</property> - <property name="xalign">1</property> - <property name="label" translatable="yes">Model: </property> - <property name="justify">right</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> <property name="position">0</property> </packing> </child> <child> - <object class="GtkComboBox" id="combobox1"> - <property name="visible">True</property> - <property name="model">model1</property> - <child> - <object class="GtkCellRendererText" id="renderer1"/> - <attributes> - <attribute name="text">0</attribute> - </attributes> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="position">1</property> - </packing> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="position">1</property> - </packing> - </child> - <child> - <object class="GtkHBox" id="split-point-hbox"> - <property name="visible">True</property> - <property name="sensitive">False</property> - <property name="spacing">5</property> - <child> - <object class="GtkLabel" id="label2"> - <property name="visible">True</property> - <property name="label" translatable="yes">Variables in first split:</property> - </object> - <packing> - <property name="expand">False</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkSpinButton" id="spinbutton1"> + <object class="GtkCheckButton" id="totals-checkbutton"> + <property name="label" translatable="yes">Show descriptives for scale if _item is deleted</property> + <property name="use_underline">True</property> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="adjustment">adjustment1</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> </object> <packing> <property name="expand">False</property> + <property name="fill">False</property> <property name="position">1</property> </packing> </child> </object> - <packing> - <property name="expand">False</property> - <property name="position">2</property> - </packing> </child> </object> <packing>