[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pspp-cvs] pspp glade.patch doc/ChangeLog doc/transformati...
From: |
John Darrington |
Subject: |
[Pspp-cvs] pspp glade.patch doc/ChangeLog doc/transformati... |
Date: |
Sat, 31 Mar 2007 11:44:46 +0000 |
CVSROOT: /sources/pspp
Module name: pspp
Changes by: John Darrington <jmd> 07/03/31 11:44:45
Modified files:
. : glade.patch
doc : ChangeLog transformation.texi
glade : psppire.xml
src/ui/gui : ChangeLog TODO automake.mk data-editor.c
data-editor.glade data-editor.h dialog-common.c
psppire-buttonbox.c psppire-dialog.c
psppire-dialog.h psppire-selector.c
psppire-selector.h psppire.c psppire.glade
sort-cases-dialog.c sort-cases-dialog.h
split-file-dialog.c transpose-dialog.c
weight-cases-dialog.c
Added files:
src/ui/gui/icons: recent-dialogs.png
Log message:
Fixed the refresh button on the dialogs.
Added a "recent-dialogs" toolbar button.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pspp/glade.patch?cvsroot=pspp&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/pspp/doc/ChangeLog?cvsroot=pspp&r1=1.44&r2=1.45
http://cvs.savannah.gnu.org/viewcvs/pspp/doc/transformation.texi?cvsroot=pspp&r1=1.12&r2=1.13
http://cvs.savannah.gnu.org/viewcvs/pspp/glade/psppire.xml?cvsroot=pspp&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/pspp/src/ui/gui/ChangeLog?cvsroot=pspp&r1=1.46&r2=1.47
http://cvs.savannah.gnu.org/viewcvs/pspp/src/ui/gui/TODO?cvsroot=pspp&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/pspp/src/ui/gui/automake.mk?cvsroot=pspp&r1=1.23&r2=1.24
http://cvs.savannah.gnu.org/viewcvs/pspp/src/ui/gui/data-editor.c?cvsroot=pspp&r1=1.20&r2=1.21
http://cvs.savannah.gnu.org/viewcvs/pspp/src/ui/gui/data-editor.glade?cvsroot=pspp&r1=1.14&r2=1.15
http://cvs.savannah.gnu.org/viewcvs/pspp/src/ui/gui/data-editor.h?cvsroot=pspp&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/pspp/src/ui/gui/dialog-common.c?cvsroot=pspp&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/pspp/src/ui/gui/psppire-buttonbox.c?cvsroot=pspp&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/pspp/src/ui/gui/psppire-dialog.c?cvsroot=pspp&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/pspp/src/ui/gui/psppire-dialog.h?cvsroot=pspp&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/pspp/src/ui/gui/psppire-selector.c?cvsroot=pspp&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/pspp/src/ui/gui/psppire-selector.h?cvsroot=pspp&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/pspp/src/ui/gui/psppire.c?cvsroot=pspp&r1=1.37&r2=1.38
http://cvs.savannah.gnu.org/viewcvs/pspp/src/ui/gui/psppire.glade?cvsroot=pspp&r1=1.15&r2=1.16
http://cvs.savannah.gnu.org/viewcvs/pspp/src/ui/gui/sort-cases-dialog.c?cvsroot=pspp&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/pspp/src/ui/gui/sort-cases-dialog.h?cvsroot=pspp&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/pspp/src/ui/gui/split-file-dialog.c?cvsroot=pspp&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/pspp/src/ui/gui/transpose-dialog.c?cvsroot=pspp&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/pspp/src/ui/gui/weight-cases-dialog.c?cvsroot=pspp&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/pspp/src/ui/gui/icons/recent-dialogs.png?cvsroot=pspp&rev=1.1
Patches:
Index: glade.patch
===================================================================
RCS file: /sources/pspp/pspp/glade.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- glade.patch 26 Jan 2007 07:35:02 -0000 1.3
+++ glade.patch 31 Mar 2007 11:44:45 -0000 1.4
@@ -1,9 +1,6 @@
-This patch mitigates a bug in glade-2, which silently deletes stock_ids, which
-it thinks are not valid. You may have to apply this patch after editing
-data-editor.glade with glade-3.
---- src/ui/gui/data-editor.glade,bad 2007-01-26 16:15:32.000000000 +0900
-+++ src/ui/gui/data-editor.glade 2007-01-26 16:16:18.000000000 +0900
-@@ -506,7 +506,7 @@
+--- /Scratch/john/tmp.vKHTg31290/share/pspp/data-editor.glade 2007-03-31
12:55:02.000000000 +0800
++++ src/ui/gui/data-editor.glade 2007-03-31 13:04:27.000000000 +0800
+@@ -494,7 +494,7 @@
<property name="sensitive">False</property>
<property name="tooltip"
translatable="yes">Variables</property>
<property name="use_underline">True</property>
@@ -12,16 +9,16 @@
</widget>
<packing>
<property name="expand">False</property>
-@@ -547,7 +547,7 @@
+@@ -535,7 +535,7 @@
<property name="sensitive">False</property>
<property name="tooltip" translatable="yes">Insert
Case</property>
<property name="use_underline">True</property>
- <property name="stock_id">gtk-missing-image</property>
+ <property name="stock_id">pspp-insert-case</property>
- <signal name="clicked" handler="on_insert_case_clicked"/>
</widget>
<packing>
-@@ -560,7 +560,7 @@
+ <property name="expand">False</property>
+@@ -547,7 +547,7 @@
<property name="sensitive">False</property>
<property name="tooltip" translatable="yes">Insert
Variable</property>
<property name="use_underline">True</property>
@@ -30,8 +27,8 @@
</widget>
<packing>
<property name="expand">False</property>
-@@ -581,7 +581,7 @@
- <property name="sensitive">False</property>
+@@ -567,7 +567,7 @@
+ <property name="visible">True</property>
<property name="tooltip" translatable="yes">Split
File</property>
<property name="use_underline">True</property>
- <property name="stock_id">gtk-missing-image</property>
@@ -39,7 +36,7 @@
</widget>
<packing>
<property name="expand">False</property>
-@@ -592,7 +592,7 @@
+@@ -578,7 +578,7 @@
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Weight
Cases</property>
<property name="use_underline">True</property>
@@ -48,7 +45,7 @@
</widget>
<packing>
<property name="expand">False</property>
-@@ -604,7 +604,7 @@
+@@ -590,7 +590,7 @@
<property name="sensitive">False</property>
<property name="tooltip" translatable="yes">Select
Cases</property>
<property name="use_underline">True</property>
@@ -57,754 +54,12 @@
</widget>
<packing>
<property name="expand">False</property>
-@@ -624,7 +624,7 @@
+@@ -610,7 +610,7 @@
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Value
Labels</property>
<property name="use_underline">True</property>
- <property name="stock_id">gtk-missing-image</property>
+ <property name="stock_id">pspp-value-labels</property>
- <signal name="toggled"
handler="on_togglebutton_value_labels_toggled"/>
- </widget>
- <packing>
-@@ -667,25 +667,25 @@
- <property name="n_rows">1</property>
- <property name="n_columns">2</property>
- <child>
-- <widget class="GtkEntry" id="entry4">
-+ <widget class="GtkEntry" id="cell_ref_entry">
- <property name="visible">True</property>
-- <property name="can_focus">True</property>
-+ <property name="sensitive">False</property>
-+ <property name="editable">False</property>
-+ <property name="width_chars">25</property>
- </widget>
- <packing>
-- <property name="left_attach">1</property>
-- <property name="right_attach">2</property>
-+ <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
-- <widget class="GtkEntry" id="cell_ref_entry">
-+ <widget class="GtkEntry" id="entry4">
- <property name="visible">True</property>
-- <property name="sensitive">False</property>
-- <property name="editable">False</property>
-- <property name="width_chars">25</property>
-+ <property name="can_focus">True</property>
- </widget>
- <packing>
-- <property name="x_options">GTK_FILL</property>
-+ <property name="left_attach">1</property>
-+ <property name="right_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
-@@ -1216,63 +1216,63 @@
- <property name="column_spacing">2</property>
- <property name="row_spacing">1</property>
- <child>
-- <widget class="GtkLabel" id="decimals_label">
-+ <widget class="GtkHBox" id="hbox2">
- <property name="visible">True</property>
-- <property name="xalign">0</property>
-- <property name="label" translatable="yes">Decimal
Places:</property>
-+ <child>
-+ <widget class="GtkLabel" id="width_label">
-+ <property name="visible">True</property>
-+ <property name="label"
translatable="yes">Width:</property>
- <property name="justify">GTK_JUSTIFY_RIGHT</property>
- </widget>
- <packing>
-- <property name="top_attach">1</property>
-- <property name="bottom_attach">2</property>
-+ <property name="expand">False</property>
-+ <property name="fill">False</property>
-+ <property name="pack_type">GTK_PACK_END</property>
-+ </packing>
-+ </child>
-+ </widget>
-+ <packing>
- <property name="x_options">GTK_FILL</property>
-- <property name="y_options"></property>
-+ <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
-- <widget class="GtkEntry" id="width_entry">
-+ <widget class="GtkEntry" id="decimals_entry">
- <property name="width_request">25</property>
-+ <property name="visible">True</property>
- <property name="can_focus">True</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"></property>
- </packing>
- </child>
- <child>
-- <widget class="GtkEntry" id="decimals_entry">
-+ <widget class="GtkEntry" id="width_entry">
- <property name="width_request">25</property>
-- <property name="visible">True</property>
- <property name="can_focus">True</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"></property>
- </packing>
- </child>
- <child>
-- <widget class="GtkHBox" id="hbox2">
-- <property name="visible">True</property>
-- <child>
-- <widget class="GtkLabel" id="width_label">
-+ <widget class="GtkLabel" id="decimals_label">
- <property name="visible">True</property>
-- <property name="label"
translatable="yes">Width:</property>
-+ <property name="xalign">0</property>
-+ <property name="label" translatable="yes">Decimal
Places:</property>
- <property name="justify">GTK_JUSTIFY_RIGHT</property>
- </widget>
- <packing>
-- <property name="expand">False</property>
-- <property name="fill">False</property>
-- <property name="pack_type">GTK_PACK_END</property>
-- </packing>
-- </child>
-- </widget>
-- <packing>
-+ <property name="top_attach">1</property>
-+ <property name="bottom_attach">2</property>
- <property name="x_options">GTK_FILL</property>
-- <property name="y_options">GTK_FILL</property>
-+ <property name="y_options"></property>
- </packing>
- </child>
- </widget>
-@@ -1360,50 +1360,28 @@
- <property name="n_columns">2</property>
- <property name="row_spacing">5</property>
- <child>
-- <widget class="GtkVButtonBox" id="vbuttonbox2">
-- <property name="visible">True</property>
-- <property name="border_width">5</property>
-- <child>
-- <widget class="GtkButton" id="val_labs_add">
-- <property name="visible">True</property>
-- <property name="sensitive">False</property>
-- <property name="can_focus">True</property>
-- <property name="can_default">True</property>
-- <property name="label">gtk-add</property>
-- <property name="use_stock">True</property>
-- </widget>
-- </child>
-- <child>
-- <widget class="GtkButton" id="val_labs_change">
-+ <widget class="GtkScrolledWindow" id="scrolledwindow3">
- <property name="visible">True</property>
-- <property name="sensitive">False</property>
- <property name="can_focus">True</property>
-- <property name="can_default">True</property>
-- <property name="label">gtk-apply</property>
-- <property name="use_stock">True</property>
-- </widget>
-- <packing>
-- <property name="position">1</property>
-- </packing>
-- </child>
-+ <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="GtkButton" id="val_labs_remove">
-+ <widget class="GtkTreeView" id="treeview1">
- <property name="visible">True</property>
-- <property name="sensitive">False</property>
- <property name="can_focus">True</property>
-- <property name="can_default">True</property>
-- <property name="label">gtk-remove</property>
-- <property name="use_stock">True</property>
-+ <property name="headers_visible">False</property>
-+ <property name="enable_search">False</property>
- </widget>
-- <packing>
-- <property name="position">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>
- <property name="x_options">GTK_FILL</property>
-+ <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
-@@ -1415,27 +1393,26 @@
- <property name="column_spacing">5</property>
- <property name="row_spacing">4</property>
- <child>
-- <widget class="GtkLabel" id="label5">
-+ <widget class="GtkHBox" id="hbox4">
- <property name="visible">True</property>
-- <property name="xalign">0</property>
-- <property name="label"
translatable="yes">Value:</property>
-+ <child>
-+ <widget class="GtkEntry" id="value_entry">
-+ <property name="width_request">85</property>
-+ <property name="visible">True</property>
-+ <property name="can_focus">True</property>
- </widget>
- <packing>
-- <property name="x_options">GTK_FILL</property>
-- <property name="y_options"></property>
-+ <property name="expand">False</property>
-+ <property name="fill">False</property>
-+ <property name="padding">1</property>
- </packing>
- </child>
-- <child>
-- <widget class="GtkLabel" id="label6">
-- <property name="visible">True</property>
-- <property name="xalign">0</property>
-- <property name="label" translatable="yes">Value
Label:</property>
- </widget>
- <packing>
-- <property name="top_attach">1</property>
-- <property name="bottom_attach">2</property>
-+ <property name="left_attach">1</property>
-+ <property name="right_attach">2</property>
- <property name="x_options">GTK_FILL</property>
-- <property name="y_options"></property>
-+ <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
-@@ -1452,26 +1429,27 @@
- </packing>
- </child>
- <child>
-- <widget class="GtkHBox" id="hbox4">
-- <property name="visible">True</property>
-- <child>
-- <widget class="GtkEntry" id="value_entry">
-- <property name="width_request">85</property>
-+ <widget class="GtkLabel" id="label6">
- <property name="visible">True</property>
-- <property name="can_focus">True</property>
-+ <property name="xalign">0</property>
-+ <property name="label" translatable="yes">Value
Label:</property>
- </widget>
- <packing>
-- <property name="expand">False</property>
-- <property name="fill">False</property>
-- <property name="padding">1</property>
-+ <property name="top_attach">1</property>
-+ <property name="bottom_attach">2</property>
-+ <property name="x_options">GTK_FILL</property>
-+ <property name="y_options"></property>
- </packing>
- </child>
-+ <child>
-+ <widget class="GtkLabel" id="label5">
-+ <property name="visible">True</property>
-+ <property name="xalign">0</property>
-+ <property name="label"
translatable="yes">Value:</property>
- </widget>
- <packing>
-- <property name="left_attach">1</property>
-- <property name="right_attach">2</property>
- <property name="x_options">GTK_FILL</property>
-- <property name="y_options">GTK_FILL</property>
-+ <property name="y_options"></property>
- </packing>
- </child>
- </widget>
-@@ -1481,28 +1459,50 @@
- </packing>
- </child>
- <child>
-- <widget class="GtkScrolledWindow" id="scrolledwindow3">
-+ <widget class="GtkVButtonBox" id="vbuttonbox2">
-+ <property name="visible">True</property>
-+ <property name="border_width">5</property>
-+ <child>
-+ <widget class="GtkButton" id="val_labs_add">
- <property name="visible">True</property>
-+ <property name="sensitive">False</property>
- <property name="can_focus">True</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_default">True</property>
-+ <property name="label">gtk-add</property>
-+ <property name="use_stock">True</property>
-+ </widget>
-+ </child>
- <child>
-- <widget class="GtkTreeView" id="treeview1">
-+ <widget class="GtkButton" id="val_labs_change">
- <property name="visible">True</property>
-+ <property name="sensitive">False</property>
- <property name="can_focus">True</property>
-- <property name="headers_visible">False</property>
-- <property name="enable_search">False</property>
-+ <property name="can_default">True</property>
-+ <property name="label">gtk-apply</property>
-+ <property name="use_stock">True</property>
- </widget>
-+ <packing>
-+ <property name="position">1</property>
-+ </packing>
-+ </child>
-+ <child>
-+ <widget class="GtkButton" id="val_labs_remove">
-+ <property name="visible">True</property>
-+ <property name="sensitive">False</property>
-+ <property name="can_focus">True</property>
-+ <property name="can_default">True</property>
-+ <property name="label">gtk-remove</property>
-+ <property name="use_stock">True</property>
-+ </widget>
-+ <packing>
-+ <property name="position">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>
- <property name="x_options">GTK_FILL</property>
-- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- </widget>
-@@ -1590,64 +1590,68 @@
- <property name="n_rows">2</property>
- <property name="n_columns">2</property>
- <child>
-- <widget class="GtkVButtonBox" id="vbuttonbox5">
-+ <widget class="GtkVBox" id="vbox7">
- <property name="visible">True</property>
-- <property name="border_width">5</property>
-- <property name="spacing">5</property>
-- <property name="layout_style">GTK_BUTTONBOX_START</property>
- <child>
-- <widget class="GtkButton" id="missing_val_ok">
-+ <widget class="GtkRadioButton" id="range_missing">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
-- <property name="can_default">True</property>
-- <property name="label">gtk-ok</property>
-- <property name="use_stock">True</property>
-- <signal name="clicked" handler="gtk_widget_hide"
object="val_labs_dialog"/>
-+ <property name="label" translatable="yes">_Range plus one
optional discrete missing value</property>
-+ <property name="use_underline">True</property>
-+ <property name="focus_on_click">False</property>
-+ <property name="draw_indicator">True</property>
-+ <property name="group">no_missing</property>
- </widget>
-+ <packing>
-+ <property name="expand">False</property>
-+ <property name="fill">False</property>
-+ </packing>
- </child>
- <child>
-- <widget class="GtkButton" id="missing_val_cancel">
-+ <widget class="GtkVBox" id="vbox8">
- <property name="visible">True</property>
-- <property name="can_focus">True</property>
-- <property name="can_default">True</property>
-- <property name="label">gtk-cancel</property>
-- <property name="use_stock">True</property>
-- <signal name="clicked" handler="gtk_widget_hide"
object="val_labs_dialog"/>
-+ <property name="spacing">5</property>
-+ <child>
-+ <widget class="GtkHBox" id="hbox7">
-+ <property name="visible">True</property>
-+ <child>
-+ <widget class="GtkHBox" id="hbox8">
-+ <property name="visible">True</property>
-+ <child>
-+ <widget class="GtkLabel" id="label11">
-+ <property name="visible">True</property>
-+ <property name="label"
translatable="yes">_Low:</property>
-+ <property name="use_underline">True</property>
-+ <property name="mnemonic_widget">mv-low</property>
- </widget>
- <packing>
-- <property name="position">1</property>
-+ <property name="expand">False</property>
-+ <property name="fill">False</property>
-+ <property name="padding">20</property>
- </packing>
- </child>
- <child>
-- <widget class="GtkButton" id="help_button_missing_values">
-+ <widget class="GtkEntry" id="mv-low">
-+ <property name="width_request">75</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
-- <property name="can_default">True</property>
-- <property name="label">gtk-help</property>
-- <property name="use_stock">True</property>
- </widget>
- <packing>
-- <property name="position">2</property>
-+ <property name="expand">False</property>
-+ <property name="position">1</property>
- </packing>
- </child>
- </widget>
-- <packing>
-- <property name="left_attach">1</property>
-- <property name="right_attach">2</property>
-- </packing>
- </child>
- <child>
-- <widget class="GtkVBox" id="vbox5">
-+ <widget class="GtkHBox" id="hbox9">
- <property name="visible">True</property>
-- <property name="spacing">12</property>
- <child>
-- <widget class="GtkRadioButton" id="no_missing">
-+ <widget class="GtkLabel" id="label12">
- <property name="visible">True</property>
-- <property name="can_focus">True</property>
-- <property name="label" translatable="yes">_No missing
values</property>
-+ <property name="label"
translatable="yes">_High:</property>
- <property name="use_underline">True</property>
-- <property name="active">True</property>
-- <property name="draw_indicator">True</property>
-+ <property
name="mnemonic_widget">mv-high</property>
- </widget>
- <packing>
- <property name="expand">False</property>
-@@ -1655,97 +1659,102 @@
- </packing>
- </child>
- <child>
-- <widget class="GtkVBox" id="vbox6">
-- <property name="visible">True</property>
-- <child>
-- <widget class="GtkRadioButton" id="discrete_missing">
-+ <widget class="GtkEntry" id="mv-high">
-+ <property name="width_request">75</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
-- <property name="label" translatable="yes">_Discrete
missing values</property>
-- <property name="use_underline">True</property>
-- <property name="focus_on_click">False</property>
-- <property name="draw_indicator">True</property>
-- <property name="group">no_missing</property>
- </widget>
- <packing>
-- <property name="expand">False</property>
-+ <property name="padding">5</property>
-+ <property name="position">1</property>
-+ </packing>
-+ </child>
-+ </widget>
-+ <packing>
- <property name="fill">False</property>
-+ <property name="padding">20</property>
-+ <property name="position">1</property>
- </packing>
- </child>
- <child>
-- <widget class="GtkHBox" id="hbox10">
-- <property name="visible">True</property>
-+ <placeholder/>
-+ </child>
- <child>
-- <widget class="GtkHBox" id="hbox5">
-+ <placeholder/>
-+ </child>
-+ </widget>
-+ </child>
-+ <child>
-+ <widget class="GtkHBox" id="hbox6">
- <property name="visible">True</property>
-- <property name="border_width">5</property>
-- <property name="spacing">5</property>
-- <property name="homogeneous">True</property>
- <child>
-- <widget class="GtkEntry" id="mv0">
-- <property name="width_request">75</property>
-+ <widget class="GtkLabel" id="label10">
- <property name="visible">True</property>
-- <property name="can_focus">True</property>
-+ <property name="label" translatable="yes">Di_screte
value:</property>
-+ <property name="use_underline">True</property>
-+ <property
name="mnemonic_widget">mv-discrete</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
-+ <property name="padding">20</property>
- </packing>
- </child>
- <child>
-- <widget class="GtkEntry" id="mv1">
-+ <widget class="GtkEntry" id="mv-discrete">
- <property name="width_request">75</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- </widget>
- <packing>
- <property name="expand">False</property>
-- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
-- <child>
-- <widget class="GtkEntry" id="mv2">
-- <property name="width_request">75</property>
-- <property name="visible">True</property>
-- <property name="can_focus">True</property>
- </widget>
- <packing>
-- <property name="expand">False</property>
-- <property name="fill">False</property>
-- <property name="position">2</property>
-+ <property name="position">1</property>
- </packing>
- </child>
- </widget>
- <packing>
-- <property name="padding">20</property>
-+ <property name="position">1</property>
- </packing>
- </child>
- </widget>
- <packing>
-- <property name="position">1</property>
-+ <property name="right_attach">2</property>
-+ <property name="top_attach">1</property>
-+ <property name="bottom_attach">2</property>
-+ <property name="x_options">GTK_FILL</property>
- </packing>
- </child>
-+ <child>
-+ <widget class="GtkVBox" id="vbox5">
-+ <property name="visible">True</property>
-+ <property name="spacing">12</property>
-+ <child>
-+ <widget class="GtkRadioButton" id="no_missing">
-+ <property name="visible">True</property>
-+ <property name="can_focus">True</property>
-+ <property name="label" translatable="yes">_No missing
values</property>
-+ <property name="use_underline">True</property>
-+ <property name="active">True</property>
-+ <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
-- <property name="position">1</property>
-- </packing>
-- </child>
-- </widget>
-- <packing>
-- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
-- <widget class="GtkVBox" id="vbox7">
-+ <widget class="GtkVBox" id="vbox6">
- <property name="visible">True</property>
- <child>
-- <widget class="GtkRadioButton" id="range_missing">
-+ <widget class="GtkRadioButton" id="discrete_missing">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
-- <property name="label" translatable="yes">_Range plus one
optional discrete missing value</property>
-+ <property name="label" translatable="yes">_Discrete
missing values</property>
- <property name="use_underline">True</property>
- <property name="focus_on_click">False</property>
- <property name="draw_indicator">True</property>
-@@ -1757,125 +1766,116 @@
- </packing>
- </child>
- <child>
-- <widget class="GtkVBox" id="vbox8">
-- <property name="visible">True</property>
-- <property name="spacing">5</property>
-- <child>
-- <widget class="GtkHBox" id="hbox7">
-+ <widget class="GtkHBox" id="hbox10">
- <property name="visible">True</property>
- <child>
-- <widget class="GtkHBox" id="hbox8">
-+ <widget class="GtkHBox" id="hbox5">
- <property name="visible">True</property>
-+ <property name="border_width">5</property>
-+ <property name="spacing">5</property>
-+ <property name="homogeneous">True</property>
- <child>
-- <widget class="GtkLabel" id="label11">
-+ <widget class="GtkEntry" id="mv0">
-+ <property name="width_request">75</property>
- <property name="visible">True</property>
-- <property name="label"
translatable="yes">_Low:</property>
-- <property name="use_underline">True</property>
-- <property name="mnemonic_widget">mv-low</property>
-+ <property name="can_focus">True</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
-- <property name="padding">20</property>
- </packing>
- </child>
- <child>
-- <widget class="GtkEntry" id="mv-low">
-+ <widget class="GtkEntry" id="mv1">
- <property name="width_request">75</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
</widget>
<packing>
<property name="expand">False</property>
-+ <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
-- </widget>
-- </child>
-- <child>
-- <widget class="GtkHBox" id="hbox9">
-- <property name="visible">True</property>
- <child>
-- <widget class="GtkLabel" id="label12">
-+ <widget class="GtkEntry" id="mv2">
-+ <property name="width_request">75</property>
- <property name="visible">True</property>
-- <property name="label"
translatable="yes">_High:</property>
-- <property name="use_underline">True</property>
-- <property
name="mnemonic_widget">mv-high</property>
-+ <property name="can_focus">True</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
-+ <property name="position">2</property>
-+ </packing>
-+ </child>
-+ </widget>
-+ <packing>
-+ <property name="padding">20</property>
- </packing>
- </child>
-- <child>
-- <widget class="GtkEntry" id="mv-high">
-- <property name="width_request">75</property>
-- <property name="visible">True</property>
-- <property name="can_focus">True</property>
- </widget>
- <packing>
-- <property name="padding">5</property>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- <packing>
-+ <property name="expand">False</property>
- <property name="fill">False</property>
-- <property name="padding">20</property>
- <property name="position">1</property>
- </packing>
- </child>
-- <child>
-- <placeholder/>
-- </child>
-- <child>
-- <placeholder/>
-- </child>
- </widget>
-+ <packing>
-+ <property name="y_options">GTK_FILL</property>
-+ </packing>
- </child>
- <child>
-- <widget class="GtkHBox" id="hbox6">
-+ <widget class="GtkVButtonBox" id="vbuttonbox5">
- <property name="visible">True</property>
-+ <property name="border_width">5</property>
-+ <property name="spacing">5</property>
-+ <property name="layout_style">GTK_BUTTONBOX_START</property>
- <child>
-- <widget class="GtkLabel" id="label10">
-+ <widget class="GtkButton" id="missing_val_ok">
- <property name="visible">True</property>
-- <property name="label" translatable="yes">Di_screte
value:</property>
-- <property name="use_underline">True</property>
-- <property
name="mnemonic_widget">mv-discrete</property>
-+ <property name="can_focus">True</property>
-+ <property name="can_default">True</property>
-+ <property name="label">gtk-ok</property>
-+ <property name="use_stock">True</property>
-+ <signal name="clicked" handler="gtk_widget_hide"
object="val_labs_dialog"/>
- </widget>
-- <packing>
-- <property name="expand">False</property>
-- <property name="fill">False</property>
-- <property name="padding">20</property>
-- </packing>
- </child>
- <child>
-- <widget class="GtkEntry" id="mv-discrete">
-- <property name="width_request">75</property>
-+ <widget class="GtkButton" id="missing_val_cancel">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
-- </widget>
-- <packing>
-- <property name="expand">False</property>
-- <property name="position">1</property>
-- </packing>
-- </child>
-+ <property name="can_default">True</property>
-+ <property name="label">gtk-cancel</property>
-+ <property name="use_stock">True</property>
-+ <signal name="clicked" handler="gtk_widget_hide"
object="val_labs_dialog"/>
- </widget>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
-+ <child>
-+ <widget class="GtkButton" id="help_button_missing_values">
-+ <property name="visible">True</property>
-+ <property name="can_focus">True</property>
-+ <property name="can_default">True</property>
-+ <property name="label">gtk-help</property>
-+ <property name="use_stock">True</property>
- </widget>
- <packing>
-- <property name="position">1</property>
-+ <property name="position">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>
-- <property name="x_options">GTK_FILL</property>
- </packing>
- </child>
- </widget>
Index: doc/ChangeLog
===================================================================
RCS file: /sources/pspp/pspp/doc/ChangeLog,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -b -r1.44 -r1.45
--- doc/ChangeLog 1 Mar 2007 21:26:28 -0000 1.44
+++ doc/ChangeLog 31 Mar 2007 11:44:45 -0000 1.45
@@ -1,3 +1,7 @@
+2007-03-31 John Darrington <address@hidden>
+
+ * transformation.texi: SORT CASES: elaborated on the (D) (A) flags.
+
2007-03-01 Ben Pfaff <address@hidden>
* automake.mk: Fix "make distcheck" by distributing doc/ni.texi,
Index: doc/transformation.texi
===================================================================
RCS file: /sources/pspp/pspp/doc/transformation.texi,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- doc/transformation.texi 5 Nov 2006 05:20:53 -0000 1.12
+++ doc/transformation.texi 31 Mar 2007 11:44:45 -0000 1.13
@@ -525,7 +525,7 @@
@vindex SORT CASES
@display
-SORT CASES BY var_list.
+SORT CASES BY var_list[(@{D|address@hidden [ var_list[(@{D|address@hidden ] ...
@end display
@cmd{SORT CASES} sorts the active file by the values of one or more
@@ -534,8 +534,8 @@
Specify BY and a list of variables to sort by. By default, variables
are sorted in ascending order. To override sort order, specify (D) or
(DOWN) after a list of variables to get descending order, or (A) or (UP)
-for ascending order. These apply to the entire list of variables
-preceding them.
+for ascending order. These apply to all the listed variables
+up until the preceding (A), (D), (UP) or (DOWN).
The sort algorithms used by @cmd{SORT CASES} are stable. That is,
records that have equal values of the sort variables will have the
Index: glade/psppire.xml
===================================================================
RCS file: /sources/pspp/pspp/glade/psppire.xml,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- glade/psppire.xml 30 Mar 2007 23:39:32 -0000 1.3
+++ glade/psppire.xml 31 Mar 2007 11:44:45 -0000 1.4
@@ -49,6 +49,7 @@
<property id="modal" ignore="True" default="True" />
+ <property id="visible" ignore="True" default="False" />
</properties>
@@ -90,6 +91,11 @@
<property id="homogeneous" disabled="True"/>
<property id="n-columns" disabled="True"/>
<property id="n-rows" disabled="True"/>
+
+ <property id="above-child" disabled="True"/>
+ <property id="visible-window" disabled="True"/>
+ <property id="resize-mode" disabled="True"/>
+ <property id="border-width" disabled="True"/>
</properties>
</glade-widget-class>
Index: src/ui/gui/ChangeLog
===================================================================
RCS file: /sources/pspp/pspp/src/ui/gui/ChangeLog,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -b -r1.46 -r1.47
--- src/ui/gui/ChangeLog 30 Mar 2007 23:39:33 -0000 1.46
+++ src/ui/gui/ChangeLog 31 Mar 2007 11:44:45 -0000 1.47
@@ -1,5 +1,14 @@
2007-03-31 John Darrington <address@hidden>
+ * data-editor.c data-editor.glade data-editor.h dialog-common.c
+ psppire-buttonbox.c psppire-dialog.c psppire-dialog.h
+ psppire-selector.c psppire-selector.h psppire.c psppire.glade
+ sort-cases-dialog.c sort-cases-dialog.h split-file-dialog.c
+ transpose-dialog.c weight-cases-dialog.c : Fixed the Refresh
+ button on all the dialogs.
+
+2007-03-31 John Darrington <address@hidden>
+
* data-editor.c: Added hooks for the split-file-dialog
* psppire.glade: Added the split file dialog box.
Index: src/ui/gui/TODO
===================================================================
RCS file: /sources/pspp/pspp/src/ui/gui/TODO,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- src/ui/gui/TODO 30 Jul 2006 12:27:59 -0000 1.5
+++ src/ui/gui/TODO 31 Mar 2007 11:44:45 -0000 1.6
@@ -4,8 +4,6 @@
* Cell Ref Entry populate/depopulate.
-* Case weights.
-
* Goto Variable.
Wishlist
Index: src/ui/gui/automake.mk
===================================================================
RCS file: /sources/pspp/pspp/src/ui/gui/automake.mk,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -b -r1.23 -r1.24
--- src/ui/gui/automake.mk 30 Mar 2007 23:39:33 -0000 1.23
+++ src/ui/gui/automake.mk 31 Mar 2007 11:44:45 -0000 1.24
@@ -56,6 +56,7 @@
$(top_srcdir)/src/ui/gui/icons/goto-variable.png\
$(top_srcdir)/src/ui/gui/icons/insert-case.png \
$(top_srcdir)/src/ui/gui/icons/insert-variable.png \
+ $(top_srcdir)/src/ui/gui/icons/recent-dialogs.png \
$(top_srcdir)/src/ui/gui/icons/split-file.png \
$(top_srcdir)/src/ui/gui/icons/select-cases.png \
$(top_srcdir)/src/ui/gui/icons/weight-cases.png
Index: src/ui/gui/data-editor.c
===================================================================
RCS file: /sources/pspp/pspp/src/ui/gui/data-editor.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- src/ui/gui/data-editor.c 30 Mar 2007 23:39:33 -0000 1.20
+++ src/ui/gui/data-editor.c 31 Mar 2007 11:44:45 -0000 1.21
@@ -34,6 +34,7 @@
#include "weight-cases-dialog.h"
#include "split-file-dialog.h"
#include "transpose-dialog.h"
+#include "sort-cases-dialog.h"
#include "dict-display.h"
#define _(msgid) gettext (msgid)
@@ -183,11 +184,21 @@
_("Split the active file"),
"pspp-split-file");
-
g_signal_connect (de->invoke_split_file_dialog, "activate",
G_CALLBACK (split_file_dialog), de);
+
+ de->invoke_sort_cases_dialog =
+ gtk_action_new ("sort-cases-dialog",
+ _("Sort"),
+ _("Sort cases in the active file"),
+ "pspp-sort-cases");
+
+ g_signal_connect (de->invoke_sort_cases_dialog, "activate",
+ G_CALLBACK (sort_cases_dialog), de);
+
+
e->window = GTK_WINDOW (get_widget_assert (de->xml, "data_editor"));
g_signal_connect_swapped (get_widget_assert (de->xml,"file_new_data"),
@@ -244,6 +255,10 @@
get_widget_assert (de->xml, "data_split-file")
);
+ gtk_action_connect_proxy (de->invoke_sort_cases_dialog,
+ get_widget_assert (de->xml, "data_sort-cases")
+ );
+
g_signal_connect (get_widget_assert (de->xml,"help_about"),
"activate",
Index: src/ui/gui/data-editor.glade
===================================================================
RCS file: /sources/pspp/pspp/src/ui/gui/data-editor.glade,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- src/ui/gui/data-editor.glade 30 Mar 2007 23:39:33 -0000 1.14
+++ src/ui/gui/data-editor.glade 31 Mar 2007 11:44:45 -0000 1.15
@@ -280,9 +280,8 @@
</widget>
</child>
<child>
- <widget class="GtkMenuItem" id="sort_cases">
+ <widget class="GtkMenuItem" id="data_sort-cases">
<property name="visible">True</property>
- <property name="sensitive">False</property>
<property name="label" translatable="yes">Sort
Cases</property>
<property name="use_underline">True</property>
</widget>
@@ -439,6 +438,18 @@
</packing>
</child>
<child>
+ <widget class="GtkToolButton" id="button-recent">
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="tooltip"
translatable="yes">Recall</property>
+ <property name="stock_id">pspp-recent-dialogs</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+
+ <child>
<widget class="GtkSeparatorToolItem" id="separatortoolitem1">
<property name="visible">True</property>
</widget>
@@ -653,25 +664,25 @@
<property name="n_rows">1</property>
<property name="n_columns">2</property>
<child>
- <widget class="GtkEntry" id="cell_ref_entry">
+ <widget class="GtkEntry" id="entry4">
<property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="editable">False</property>
- <property name="width_chars">25</property>
+ <property name="can_focus">True</property>
</widget>
<packing>
- <property name="x_options">GTK_FILL</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
<property name="y_options"></property>
</packing>
</child>
<child>
- <widget class="GtkEntry" id="entry4">
+ <widget class="GtkEntry" id="cell_ref_entry">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="sensitive">False</property>
+ <property name="editable">False</property>
+ <property name="width_chars">25</property>
</widget>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
@@ -1913,7 +1924,7 @@
<property name="can_default">True</property>
<property name="label">gtk-ok</property>
<property name="use_stock">True</property>
- <property name="response_id">-5</property>
+ <property name="response_id">5</property>
</widget>
</child>
</widget>
Index: src/ui/gui/data-editor.h
===================================================================
RCS file: /sources/pspp/pspp/src/ui/gui/data-editor.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- src/ui/gui/data-editor.h 30 Mar 2007 23:39:33 -0000 1.7
+++ src/ui/gui/data-editor.h 31 Mar 2007 11:44:45 -0000 1.8
@@ -38,6 +38,8 @@
GtkAction *invoke_transpose_dialog;
GtkAction *invoke_split_file_dialog;
+ GtkAction *invoke_sort_cases_dialog;
+
GladeXML *xml;
gboolean save_as_portable;
Index: src/ui/gui/dialog-common.c
===================================================================
RCS file: /sources/pspp/pspp/src/ui/gui/dialog-common.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- src/ui/gui/dialog-common.c 30 Mar 2007 23:39:33 -0000 1.1
+++ src/ui/gui/dialog-common.c 31 Mar 2007 11:44:45 -0000 1.2
@@ -21,6 +21,13 @@
#include <config.h>
#include "dialog-common.h"
+#include "helper.h"
+
+
+/* Append the names of selected variables to STRING.
+ TREEVIEW is the treeview containing the variables.
+ DICT is the dictionary for those variables.
+*/
gint
append_variable_names (GString *string,
PsppireDict *dict, GtkTreeView *treeview)
Index: src/ui/gui/psppire-buttonbox.c
===================================================================
RCS file: /sources/pspp/pspp/src/ui/gui/psppire-buttonbox.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- src/ui/gui/psppire-buttonbox.c 9 Feb 2007 15:06:28 -0000 1.3
+++ src/ui/gui/psppire-buttonbox.c 31 Mar 2007 11:44:45 -0000 1.4
@@ -113,7 +113,7 @@
dialog = PSPPIRE_DIALOG (gtk_widget_get_toplevel (w));
- psppire_dialog_reload (dialog, data);
+ psppire_dialog_reload (dialog);
}
Index: src/ui/gui/psppire-dialog.c
===================================================================
RCS file: /sources/pspp/pspp/src/ui/gui/psppire-dialog.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- src/ui/gui/psppire-dialog.c 9 Feb 2007 15:06:28 -0000 1.3
+++ src/ui/gui/psppire-dialog.c 31 Mar 2007 11:44:45 -0000 1.4
@@ -160,6 +160,8 @@
gtk_widget_show (GTK_WIDGET (dialog));
+ g_signal_emit (dialog, signals [DIALOG_REFRESH], 0);
+
g_main_loop_run (dialog->loop);
return dialog->response;
@@ -167,7 +169,7 @@
void
-psppire_dialog_reload (PsppireDialog *dialog, gpointer data)
+psppire_dialog_reload (PsppireDialog *dialog)
{
- g_signal_emit (dialog, signals [DIALOG_REFRESH], 0, data);
+ g_signal_emit (dialog, signals [DIALOG_REFRESH], 0);
}
Index: src/ui/gui/psppire-dialog.h
===================================================================
RCS file: /sources/pspp/pspp/src/ui/gui/psppire-dialog.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- src/ui/gui/psppire-dialog.h 20 Jan 2007 00:02:13 -0000 1.2
+++ src/ui/gui/psppire-dialog.h 31 Mar 2007 11:44:45 -0000 1.3
@@ -38,8 +38,8 @@
GType psppire_dialog_get_type (void);
GtkWidget* psppire_dialog_new (void);
+void psppire_dialog_reload (PsppireDialog *);
void psppire_dialog_close (PsppireDialog *);
-void psppire_dialog_reload (PsppireDialog *, gpointer data);
gint psppire_dialog_run (PsppireDialog *);
Index: src/ui/gui/psppire-selector.c
===================================================================
RCS file: /sources/pspp/pspp/src/ui/gui/psppire-selector.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- src/ui/gui/psppire-selector.c 30 Mar 2007 23:39:33 -0000 1.3
+++ src/ui/gui/psppire-selector.c 31 Mar 2007 11:44:45 -0000 1.4
@@ -242,9 +242,7 @@
gtk_widget_show (selector->arrow);
- /* FIXME: This shouldn't be necessary, but Glade interfaces seem to
- need it. */
- gtk_widget_show (GTK_WIDGET (selector));
+ selector->selecting = FALSE;
}
@@ -397,6 +395,8 @@
static void
de_select_selection (PsppireSelector *selector)
{
+ selector->selecting = TRUE;
+
if ( GTK_IS_TREE_VIEW (selector->dest ) )
de_select_selection_tree_view (selector);
@@ -406,6 +406,8 @@
else
g_assert_not_reached ();
+ selector->selecting = FALSE;
+
gtk_tree_model_filter_refilter (selector->filtered_source);
g_signal_emit (selector, signals [DE_SELECTED], 0);
@@ -428,6 +430,7 @@
g_return_if_fail (selector->select_items);
+ selector->selecting = TRUE;
for (item = g_list_first (selected_rows);
item != NULL;
@@ -456,9 +459,11 @@
gtk_tree_model_filter_refilter (selector->filtered_source);
g_signal_emit (selector, signals [SELECTED], 0);
+
+ selector->selecting = FALSE;
}
-/* Callback fro then the source treeview is activated (double clicked) */
+/* Callback for when the source treeview is activated (double clicked) */
static void
on_row_activate (GtkTreeView *tree_view,
GtkTreePath *path,
@@ -617,17 +622,57 @@
}
+/*
+ Callback for when the destination treeview's data changes
+ */
+static void
+on_dest_data_change (GtkTreeModel *tree_model,
+ GtkTreePath *path,
+ GtkTreeIter *iter,
+ gpointer user_data)
+{
+ PsppireSelector *selector = user_data;
+
+ if ( selector->selecting) return;
+
+ gtk_tree_model_filter_refilter (selector->filtered_source);
+}
+
+
+static void
+on_dest_data_delete (GtkTreeModel *tree_model,
+ GtkTreePath *path,
+ gpointer user_data)
+{
+ PsppireSelector *selector = user_data;
+
+ if ( selector->selecting ) return;
+
+ gtk_tree_model_filter_refilter (selector->filtered_source);
+}
+
+
+
+
/* Set the destination widget to DEST */
static void
set_tree_view_dest (PsppireSelector *selector,
GtkTreeView *dest)
{
GtkTreeSelection* selection = gtk_tree_view_get_selection (dest);
+ GtkTreeModel *model = gtk_tree_view_get_model (dest);
gtk_tree_selection_set_mode (selection, GTK_SELECTION_MULTIPLE);
g_signal_connect (selection, "changed", G_CALLBACK (on_dest_treeview_select),
selector);
+
+ g_signal_connect (model, "row-changed", G_CALLBACK (on_dest_data_change),
+ selector);
+
+ g_signal_connect (model, "row-deleted", G_CALLBACK (on_dest_data_delete),
+ selector);
+
}
/* Callback for when the DEST GtkEntry is activated (Enter is pressed) */
Index: src/ui/gui/psppire-selector.h
===================================================================
RCS file: /sources/pspp/pspp/src/ui/gui/psppire-selector.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- src/ui/gui/psppire-selector.h 30 Mar 2007 23:39:33 -0000 1.2
+++ src/ui/gui/psppire-selector.h 31 Mar 2007 11:44:45 -0000 1.3
@@ -79,6 +79,11 @@
GtkWidget *source;
GtkWidget *dest;
+ /* A flag indicating that the object is in the process of
+ updating its subjects.
+ (not thread safe if two threads access the same object)
+ */
+ gboolean selecting;
gint orientation;
Index: src/ui/gui/psppire.c
===================================================================
RCS file: /sources/pspp/pspp/src/ui/gui/psppire.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -b -r1.37 -r1.38
--- src/ui/gui/psppire.c 26 Mar 2007 10:11:01 -0000 1.37
+++ src/ui/gui/psppire.c 31 Mar 2007 11:44:45 -0000 1.38
@@ -275,6 +275,13 @@
g_object_unref (pixbuf);
gtk_icon_factory_add ( factory, "pspp-select-cases", icon_set);
+ pixbuf = PIXBUF_NEW_FROM_FILE ("recent-dialogs.png");
+ icon_set = gtk_icon_set_new_from_pixbuf (pixbuf);
+ g_object_unref (pixbuf);
+ gtk_icon_factory_add ( factory, "pspp-recent-dialogs", icon_set);
+
+
+
gtk_icon_factory_add_default (factory);
}
Index: src/ui/gui/psppire.glade
===================================================================
RCS file: /sources/pspp/pspp/src/ui/gui/psppire.glade,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- src/ui/gui/psppire.glade 30 Mar 2007 23:39:33 -0000 1.15
+++ src/ui/gui/psppire.glade 31 Mar 2007 11:44:45 -0000 1.16
@@ -110,6 +110,7 @@
<property name="visible">True</property>
<child>
<widget class="PsppireSelector"
id="weight-cases-selector">
+ <property name="visible">True</property>
<property name="border_width">5</property>
</widget>
</child>
@@ -185,6 +186,9 @@
</packing>
</child>
</widget>
+ <packing>
+ <property name="padding">5</property>
+ </packing>
</child>
<child>
<widget class="PsppireButtonBox" id="psppire-buttonbox1">
@@ -201,6 +205,7 @@
</child>
</widget>
<widget class="PsppireDialog" id="transpose-dialog">
+ <property name="title">Transpose</property>
<property name="modal">True</property>
<child internal-child="hbox">
<widget class="GtkHBox" id="dialog-hbox2">
@@ -327,6 +332,7 @@
</child>
<child>
<widget class="PsppireSelector" id="psppire-selector3">
+ <property name="visible">True</property>
<property name="border_width">5</property>
</widget>
<packing>
@@ -338,6 +344,7 @@
</child>
<child>
<widget class="PsppireSelector" id="psppire-selector2">
+ <property name="visible">True</property>
<property name="border_width">5</property>
</widget>
<packing>
@@ -347,10 +354,14 @@
</child>
</widget>
<packing>
+ <property name="padding">5</property>
<property name="position">1</property>
</packing>
</child>
</widget>
+ <packing>
+ <property name="padding">5</property>
+ </packing>
</child>
<child>
<widget class="PsppireButtonBox" id="psppire-buttonbox2">
@@ -660,7 +671,6 @@
</child>
</widget>
<widget class="GtkWindow" id="window1">
- <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="GtkVBox" id="vbox9">
@@ -936,7 +946,6 @@
<property
name="visible">True</property>
<property
name="can_focus">True</property>
<property
name="receives_default">True</property>
- <property name="style"></property>
<property
name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK |
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property
name="border_width">5</property>
</widget>
@@ -1109,4 +1118,185 @@
</widget>
</child>
</widget>
+ <widget class="PsppireDialog" id="sort-cases-dialog">
+ <property name="events">GDK_POINTER_MOTION_MASK |
GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK |
GDK_BUTTON_RELEASE_MASK</property>
+ <property name="title">Sort Cases</property>
+ <property name="modal">True</property>
+ <child internal-child="hbox">
+ <widget class="GtkHBox" id="dialog-hbox4">
+ <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">2</property>
+ <child>
+ <widget class="GtkHBox" id="hbox14">
+ <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="GtkScrolledWindow" id="scrolledwindow6">
+ <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="sort-cases-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>
+ </widget>
+ </child>
+ <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="yalign">0.25</property>
+ <property name="xscale">0</property>
+ <property name="yscale">0</property>
+ <child>
+ <widget class="PsppireSelector" id="sort-cases-selector">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">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="border_width">5</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkVBox" id="vbox12">
+ <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="GtkVBox" id="vbox16">
+ <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="label18">
+ <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="xalign">0</property>
+ <property name="label" translatable="yes">Sort
by:</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkScrolledWindow" id="scrolledwindow7">
+ <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="sort-cases-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="headers_visible">False</property>
+ <property name="headers_clickable">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">5</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkFrame" id="frame9">
+ <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_xalign">0</property>
+ <child>
+ <widget class="GtkAlignment" id="alignment5">
+ <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="GtkVButtonBox" id="vbuttonbox4">
+ <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="layout_style">GTK_BUTTONBOX_SPREAD</property>
+ <child>
+ <widget class="GtkRadioButton"
id="sort-cases-radiobutton0">
+ <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="label"
translatable="yes">Ascending</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkRadioButton"
id="sort-cases-radiobutton1">
+ <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="label"
translatable="yes">Descending</property>
+ <property name="draw_indicator">True</property>
+ <property
name="group">sort-cases-radiobutton0</property>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label17">
+ <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">Sort
Order</property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">5</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="PsppireButtonBox" id="psppire-buttonbox4">
+ <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="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>
Index: src/ui/gui/sort-cases-dialog.c
===================================================================
RCS file: /sources/pspp/pspp/src/ui/gui/sort-cases-dialog.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- src/ui/gui/sort-cases-dialog.c 24 Dec 2006 23:08:25 -0000 1.6
+++ src/ui/gui/sort-cases-dialog.c 31 Mar 2007 11:44:45 -0000 1.7
@@ -1,481 +1,134 @@
-/*
- PSPPIRE --- A Graphical User Interface for PSPP
- Copyright (C) 2006 Free Software Foundation
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA. */
-
-/* This module describes the behaviour of the Sort Cases dialog box. */
-
-
-/* This code is rather quick and dirty. Some of the issues are:
-
- 1. Character set conversion when displaying dictionary tree view.
-
- 2. The interaction between the dictionary treeview, the criteria
- list treeview and the button, needs to be abstracted and made
- available as an external interface.
-
- 3. There's no destroy function for this dialog.
-
- 4. Some of the functionality might be better implemented with
- GtkAction.
-
- 5. Double clicking the tree view rows should insert/delete them
- from the criteria list.
-
- 6. Changing the Ascending/Descending flag ought to be possible for
- a criteria already in the criteria tree view.
-
- 7. Variables which are in the criteria tree view should not be
- shown in the dictionary treeview.
-
- 8. The dialog box structure itself ought to be a GtkWindow and
- abstracted better.
-*/
-
-
-#include <config.h>
-#include "helper.h"
+#include <gtk/gtk.h>
#include "sort-cases-dialog.h"
-#include "psppire-dict.h"
-#include <math/sort.h>
-
-#include <gettext.h>
-#define _(msgid) gettext (msgid)
-#define N_(msgid) msgid
-
-
-enum {CRIT_TVM_IDX = 0, CRIT_TVM_DIR};
-
-/* Occurs when the dictionary tree view selection changes */
-static void
-dictionary_selection_changed (GtkTreeSelection *selection,
- gpointer data)
-{
- GtkTreeSelection *otherselection ;
- struct sort_cases_dialog *dialog = (struct sort_cases_dialog*) data;
-
- if ( 0 == gtk_tree_selection_count_selected_rows (selection) )
- return ;
-
- gtk_arrow_set (dialog->arrow, GTK_ARROW_RIGHT, GTK_SHADOW_OUT);
- dialog->button_state = VAR_SELECT;
-
- otherselection = gtk_tree_view_get_selection (dialog->criteria_view);
-
- gtk_tree_selection_unselect_all (otherselection);
-}
-
-
-/* Occurs when the sort criteria tree view selection changes */
-static void
-criteria_selection_changed (GtkTreeSelection *selection,
- gpointer data)
-{
- GtkTreeSelection *otherselection ;
- struct sort_cases_dialog *dialog = (struct sort_cases_dialog*) data;
-
- if ( 0 == gtk_tree_selection_count_selected_rows (selection) )
- return ;
-
- otherselection = gtk_tree_view_get_selection (dialog->dict_view);
-
- gtk_arrow_set (dialog->arrow, GTK_ARROW_LEFT, GTK_SHADOW_OUT);
- dialog->button_state = VAR_DESELECT;
-
- gtk_tree_selection_unselect_all (otherselection);
-}
-
-
-/* Occurs when the dialog box is deleted (eg: closed via the title bar) */
-static gint
-delete_event_callback (GtkWidget *widget,
- GdkEvent *event,
- gpointer data)
-{
- struct sort_cases_dialog *dialog = (struct sort_cases_dialog*) data;
-
- g_main_loop_quit (dialog->loop);
-
- gtk_widget_hide_on_delete (widget);
-
- dialog->response = GTK_RESPONSE_DELETE_EVENT;
-
- return TRUE;
-}
-
-/* Occurs when the cancel button is clicked */
-static void
-sort_cases_cancel_callback (GObject *obj, gpointer data)
-{
- struct sort_cases_dialog *dialog = (struct sort_cases_dialog*) data;
-
- gtk_widget_hide (dialog->window);
-
- g_main_loop_quit (dialog->loop);
-
- dialog->response = GTK_RESPONSE_CANCEL;
-}
-
-/* Occurs when the reset button is clicked */
-static void
-sort_cases_reset_callback (GObject *obj, gpointer data)
-{
- struct sort_cases_dialog *dialog = (struct sort_cases_dialog*) data;
-
- gtk_arrow_set (dialog->arrow, GTK_ARROW_RIGHT, GTK_SHADOW_OUT);
- dialog->button_state = VAR_SELECT;
-
- gtk_list_store_clear (dialog->criteria_list);
-}
+#include "helper.h"
+#include "psppire-dialog.h"
+#include "data-editor.h"
+#include <gtksheet/gtksheet.h>
+#include "psppire-var-store.h"
+#include "dialog-common.h"
+#include "dict-display.h"
+#include <language/syntax-string-source.h>
+#include "syntax-editor.h"
-/* Add variables currently selected in the dictionary tree view to the
- list of criteria */
static void
-select_criteria (GtkTreeModel *model, GtkTreePath *path,
- GtkTreeIter *iter, gpointer data)
+refresh (PsppireDialog *dialog, GtkTreeView *dest)
{
- GtkTreeIter new_iter;
- gint index;
- gint dir;
- struct variable *variable;
- struct sort_cases_dialog *dialog = (struct sort_cases_dialog*) data;
-
- /* Get the variable from the dictionary */
- gtk_tree_model_get (model, iter,
- DICT_TVM_COL_VAR, &variable,
- -1);
-
- index = var_get_dict_index (variable);
-
- dir = gtk_toggle_button_get_active (dialog->ascending_button) ?
- SRT_ASCEND:SRT_DESCEND;
-
- /* Append to the list of criteria */
- gtk_list_store_append (dialog->criteria_list, &new_iter);
- gtk_list_store_set (dialog->criteria_list,
- &new_iter, CRIT_TVM_IDX, index, -1);
- gtk_list_store_set (dialog->criteria_list,
- &new_iter, CRIT_TVM_DIR, dir, -1);
-}
+ GtkTreeModel *liststore = gtk_tree_view_get_model (dest);
-/* Create a list of the RowRefs which are to be removed from the
- criteria list */
-static void
-path_to_row_ref (GtkTreeModel *model, GtkTreePath *path,
- GtkTreeIter *iter, gpointer data)
-{
- GList **rrlist = data;
- GtkTreeRowReference *rowref = gtk_tree_row_reference_new (model, path);
- *rrlist = g_list_append (*rrlist, rowref);
+ gtk_list_store_clear (GTK_LIST_STORE (liststore));
}
-/* Remove a row from the list of criteria */
-static void
-deselect_criteria (gpointer data,
- gpointer user_data)
+struct sort_cases_dialog
{
- GtkTreeIter iter;
- GtkTreeRowReference *row_ref = data;
- GtkTreePath *path;
- struct sort_cases_dialog *dialog = (struct sort_cases_dialog*) user_data;
-
- path = gtk_tree_row_reference_get_path (row_ref);
-
- gtk_tree_model_get_iter (GTK_TREE_MODEL (dialog->criteria_list), &iter,
path);
-
- gtk_list_store_remove (dialog->criteria_list, &iter);
-
- gtk_tree_row_reference_free (row_ref);
-}
+ GtkTreeView *tv;
+ PsppireDict *dict;
+ GtkToggleButton *ascending;
+};
-
-
-/* Callback which occurs when the button to remove variables from the list
- of criteria is clicked. */
-static void
-sort_cases_button_callback (GObject *obj, gpointer data)
+static char *
+generate_syntax (const struct sort_cases_dialog *scd)
{
- struct sort_cases_dialog *dialog = (struct sort_cases_dialog*) data;
+ gchar *text;
+ GString *string = g_string_new ("SORT CASES BY ");
+ gint n_vars = append_variable_names (string,
+ scd->dict, GTK_TREE_VIEW (scd->tv));
- if ( dialog->button_state == VAR_SELECT) /* Right facing arrow */
+ if ( n_vars == 0 )
+ g_string_assign (string, "");
+ else
{
- GtkTreeSelection *selection =
- gtk_tree_view_get_selection (dialog->dict_view);
-
- gtk_tree_selection_selected_foreach (selection, select_criteria, dialog);
+ const char up_down =
+ gtk_toggle_button_get_active (scd->ascending) ? 'A' : 'D';
+ g_string_append_printf (string, "(%c)", up_down);
+ g_string_append (string, ".");
}
- else /* Left facing arrow */
- {
- GList *selectedRows = NULL;
- GtkTreeSelection *selection =
- gtk_tree_view_get_selection (dialog->criteria_view);
-
- /* Make a list of rows to be deleted */
- gtk_tree_selection_selected_foreach (selection, path_to_row_ref,
- &selectedRows);
- /* ... and delete them */
- g_list_foreach (selectedRows, deselect_criteria, dialog);
- g_list_free (selectedRows);
- }
-}
+ text = string->str;
+ g_string_free (string, FALSE);
-/* Callback which occurs when the OK button is clicked */
-static void
-sort_cases_ok_callback (GObject *obj, gpointer data)
-{
- struct sort_cases_dialog *dialog = (struct sort_cases_dialog*) data;
-
- gtk_widget_hide (dialog->window);
- g_main_loop_quit (dialog->loop);
-
- dialog->response = GTK_RESPONSE_OK;
+ return text;
}
-/* This function is responsible for rendering a criterion in the
- criteria list */
-static void
-criteria_render_func (GtkTreeViewColumn *column, GtkCellRenderer *renderer,
- GtkTreeModel *model, GtkTreeIter *iter,
- gpointer data)
+/* Pops up the Sort Cases dialog box */
+void
+sort_cases_dialog (GObject *o, gpointer data)
{
- gint var_index;
- struct variable *variable ;
- gint direction;
- gchar *buf;
- gchar *varname;
- PsppireDict *dict = data;
-
- gtk_tree_model_get (model, iter,
- CRIT_TVM_IDX, &var_index,
- CRIT_TVM_DIR, &direction, -1);
-
- variable = psppire_dict_get_variable (dict, var_index);
-
- varname = pspp_locale_to_utf8 (var_get_name (variable),
- -1, 0);
-
- if ( direction == SRT_ASCEND)
- buf = g_strdup_printf ("%s: %s", varname, _("Ascending"));
- else
- buf = g_strdup_printf ("%s: %s", varname, _("Descending"));
+ gint response;
+ struct data_editor *de = data;
- g_free (varname);
+ struct sort_cases_dialog scd;
- g_object_set (renderer, "text", buf, NULL);
+ GladeXML *xml = XML_NEW ("psppire.glade");
- g_free (buf);
-}
-
-
-/* Create the dialog */
-struct sort_cases_dialog *
-sort_cases_dialog_create (GladeXML *xml)
-{
- struct sort_cases_dialog *dialog = g_malloc (sizeof (*dialog));
-
- dialog->loop = g_main_loop_new (NULL, FALSE);
+ GtkWidget *dialog = get_widget_assert (xml, "sort-cases-dialog");
- dialog->window = get_widget_assert (xml, "sort-cases-dialog");
- dialog->dict_view = GTK_TREE_VIEW (get_widget_assert
- (xml, "sort-cases-treeview-dict"));
- dialog->criteria_view = GTK_TREE_VIEW (get_widget_assert
- (xml, "sort-cases-treeview-criteria"));
+ GtkWidget *source = get_widget_assert (xml, "sort-cases-treeview1");
+ GtkWidget *selector = get_widget_assert (xml, "sort-cases-selector");
+ GtkWidget *dest = get_widget_assert (xml, "sort-cases-treeview2");
- dialog->arrow = GTK_ARROW (get_widget_assert (xml, "sort-cases-arrow"));
- dialog->button = GTK_BUTTON (get_widget_assert (xml, "sort-cases-button"));
+ GtkSheet *var_sheet =
+ GTK_SHEET (get_widget_assert (de->xml, "variable_sheet"));
- dialog->ascending_button =
- GTK_TOGGLE_BUTTON (get_widget_assert (xml, "sort-cases-button-ascending"));
+ PsppireVarStore *vs = PSPPIRE_VAR_STORE (gtk_sheet_get_model (var_sheet));
- g_signal_connect (dialog->window, "delete-event",
- G_CALLBACK (delete_event_callback), dialog);
+ gtk_window_set_transient_for (GTK_WINDOW (dialog), de->parent.window);
- g_signal_connect (get_widget_assert (xml, "sort-cases-cancel"),
- "clicked", G_CALLBACK (sort_cases_cancel_callback), dialog);
+ attach_dictionary_to_treeview (GTK_TREE_VIEW (source),
+ vs->dict,
+ GTK_SELECTION_MULTIPLE, NULL);
- g_signal_connect (get_widget_assert (xml, "sort-cases-ok"),
- "clicked", G_CALLBACK (sort_cases_ok_callback), dialog);
+ set_dest_model (GTK_TREE_VIEW (dest), vs->dict);
+ psppire_selector_set_subjects (PSPPIRE_SELECTOR (selector),
+ source,
+ dest,
+ insert_source_row_into_tree_view,
+ NULL);
- g_signal_connect (get_widget_assert (xml, "sort-cases-reset"),
- "clicked", G_CALLBACK (sort_cases_reset_callback), dialog);
+ g_signal_connect (dialog, "refresh", G_CALLBACK (refresh), dest);
+ scd.tv = GTK_TREE_VIEW (dest);
+ scd.dict = vs->dict;
+ scd.ascending =
+ GTK_TOGGLE_BUTTON (get_widget_assert (xml, "sort-cases-radiobutton0"));
- g_signal_connect (get_widget_assert (xml, "sort-cases-button"),
- "clicked", G_CALLBACK (sort_cases_button_callback), dialog);
+ response = psppire_dialog_run (PSPPIRE_DIALOG (dialog));
+ switch (response)
{
- /* Set up the dictionary treeview */
- GtkTreeViewColumn *col;
-
- GtkTreeSelection *selection =
- gtk_tree_view_get_selection (dialog->dict_view);
-
- GtkCellRenderer *renderer = gtk_cell_renderer_text_new ();
-
- col = gtk_tree_view_column_new_with_attributes (_("Var"),
- renderer,
- "text",
- 0,
- NULL);
-
- /* FIXME: make this a value in terms of character widths */
- g_object_set (col, "min-width", 100, NULL);
-
- gtk_tree_view_column_set_sizing (col, GTK_TREE_VIEW_COLUMN_FIXED);
-
- gtk_tree_view_append_column (dialog->dict_view, col);
-
- gtk_tree_selection_set_mode (selection, GTK_SELECTION_MULTIPLE);
+ case GTK_RESPONSE_OK:
+ {
+ gchar *syntax = generate_syntax (&scd);
+ struct getl_interface *sss = create_syntax_string_source (syntax);
+ execute_syntax (sss);
- g_signal_connect (selection, "changed",
- G_CALLBACK (dictionary_selection_changed), dialog);
+ g_free (syntax);
}
-
+ break;
+ case PSPPIRE_RESPONSE_PASTE:
{
- /* Set up the variable list treeview */
- GtkTreeSelection *selection =
- gtk_tree_view_get_selection (dialog->criteria_view);
-
- gtk_tree_selection_set_mode (selection, GTK_SELECTION_MULTIPLE);
-
- dialog->crit_renderer = gtk_cell_renderer_text_new ();
-
- dialog->crit_col = gtk_tree_view_column_new_with_attributes (_("Criteria"),
- dialog->crit_renderer,
- "text",
- 0,
- NULL);
+ gchar *syntax = generate_syntax (&scd);
- gtk_tree_view_column_set_sizing (dialog->crit_col,
GTK_TREE_VIEW_COLUMN_FIXED);
+ struct syntax_editor *se =
+ (struct syntax_editor *) window_create (WINDOW_SYNTAX, NULL);
- gtk_tree_view_append_column (GTK_TREE_VIEW (dialog->criteria_view),
- dialog->crit_col);
+ gtk_text_buffer_insert_at_cursor (se->buffer, syntax, -1);
- g_signal_connect (selection, "changed",
- G_CALLBACK (criteria_selection_changed), dialog);
+ g_free (syntax);
}
-
- {
- /* Create the list of criteria */
- dialog->criteria_list = gtk_list_store_new (2,
- G_TYPE_INT, /* index of the variable */
- G_TYPE_INT /* Ascending/Descending */
- );
-
- gtk_tree_view_set_model (dialog->criteria_view,
- GTK_TREE_MODEL (dialog->criteria_list));
+ break;
+ default:
+ break;
}
- dialog->response = GTK_RESPONSE_NONE;
-
- return dialog;
-}
-
-
-static void
-convert_list_store_to_criteria (GtkListStore *list,
- PsppireDict *dict,
- struct sort_criteria *criteria);
-
-
-/* Run the dialog.
- If the return value is GTK_RESPONSE_OK, then CRITERIA gets filled
- with a valid sort criteria which can be used to sort the data.
- This structure and its contents must be freed by the caller. */
-gint
-sort_cases_dialog_run (struct sort_cases_dialog *dialog,
- PsppireDict *dict,
- struct sort_criteria *criteria
- )
-{
- g_assert (! g_main_loop_is_running (dialog->loop));
-
- gtk_tree_view_set_model (GTK_TREE_VIEW (dialog->dict_view),
- GTK_TREE_MODEL (dict));
-
-
- gtk_tree_view_column_set_cell_data_func (dialog->crit_col,
- dialog->crit_renderer,
- criteria_render_func, dict, 0);
-
- gtk_list_store_clear (dialog->criteria_list);
-
- gtk_arrow_set (dialog->arrow, GTK_ARROW_RIGHT, GTK_SHADOW_OUT);
- dialog->button_state = VAR_SELECT;
-
- gtk_widget_show (dialog->window);
-
- g_main_loop_run (dialog->loop);
-
- if ( GTK_RESPONSE_OK == dialog->response)
- convert_list_store_to_criteria (dialog->criteria_list,
- dict, criteria);
-
- return dialog->response;
-}
-
-
-
-/* Convert the GtkListStore to a struct sort_criteria*/
-static void
-convert_list_store_to_criteria (GtkListStore *list,
- PsppireDict *dict,
- struct sort_criteria *criteria)
-{
- GtkTreeIter iter;
- gboolean valid;
- gint n = 0;
-
- GtkTreeModel *model = GTK_TREE_MODEL (list);
-
- criteria->crit_cnt = gtk_tree_model_iter_n_children (model, NULL);
-
- criteria->crits = g_malloc (sizeof (struct sort_criterion) *
- criteria->crit_cnt);
-
- for (valid = gtk_tree_model_get_iter_first (model, &iter);
- valid;
- valid = gtk_tree_model_iter_next (model, &iter))
- {
- struct variable *variable;
- gint index;
- struct sort_criterion *scn = &criteria->crits[n];
- g_assert ( n < criteria->crit_cnt);
- n++;
-
- gtk_tree_model_get (model, &iter,
- CRIT_TVM_IDX, &index,
- CRIT_TVM_DIR, &scn->dir,
- -1);
-
- variable = psppire_dict_get_variable (dict, index);
-
- scn->fv = var_get_case_index (variable);
- scn->width = var_get_width (variable);
- }
+ g_object_unref (xml);
}
Index: src/ui/gui/sort-cases-dialog.h
===================================================================
RCS file: /sources/pspp/pspp/src/ui/gui/sort-cases-dialog.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- src/ui/gui/sort-cases-dialog.h 24 Dec 2006 22:49:18 -0000 1.4
+++ src/ui/gui/sort-cases-dialog.h 31 Mar 2007 11:44:45 -0000 1.5
@@ -23,43 +23,8 @@
#include <gtk/gtk.h>
#include <glade/glade.h>
-#include "psppire-dict.h"
-struct sort_criteria;
-struct sort_cases_dialog
-{
- GtkWidget *window;
- GMainLoop *loop;
-
- GtkTreeView *dict_view;
-
-
- GtkTreeView *criteria_view;
- GtkTreeViewColumn *crit_col;
- GtkCellRenderer *crit_renderer;
-
- GtkListStore *criteria_list;
-
- struct sort_criteria *sc;
-
- GtkArrow *arrow;
- GtkButton *button;
-
- GtkToggleButton *ascending_button;
-
- /* FIXME: Could this be done better with a GtkToggleAction ?? */
- enum {VAR_SELECT, VAR_DESELECT} button_state;
-
- gint response;
-};
-
-struct sort_cases_dialog * sort_cases_dialog_create (GladeXML *xml);
-
-
-gint sort_cases_dialog_run (struct sort_cases_dialog *dialog,
- PsppireDict *dict,
- struct sort_criteria *criteria
- );
+void sort_cases_dialog (GObject *o, gpointer data);
#endif
Index: src/ui/gui/split-file-dialog.c
===================================================================
RCS file: /sources/pspp/pspp/src/ui/gui/split-file-dialog.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- src/ui/gui/split-file-dialog.c 30 Mar 2007 23:39:33 -0000 1.1
+++ src/ui/gui/split-file-dialog.c 31 Mar 2007 11:44:45 -0000 1.2
@@ -39,25 +39,41 @@
#include "psppire-var-store.h"
+struct split_file_dialog
+{
+ /* The XML that created the dialog */
+ GladeXML *xml;
+
+ /* The dictionary to which this dialog pertains */
+ PsppireDict *dict;
+
+ /* The treeview widget containing the list of variables
+ upon which the file should be split */
+ GtkTreeView *tv;
+
+
+ PsppireSelector *selector;
+};
+
static gchar *
-generate_syntax (GladeXML *xml, PsppireDict *dict)
+generate_syntax (const struct split_file_dialog *sfd)
{
gchar *text;
- GtkWidget *off = get_widget_assert (xml, "split-radiobutton0");
+ GtkWidget *off = get_widget_assert (sfd->xml, "split-radiobutton0");
GtkWidget *vars =
- get_widget_assert (xml, "split-file-grouping-vars");
+ get_widget_assert (sfd->xml, "split-file-grouping-vars");
GString *string = g_string_new ("SPLIT FILE OFF.");
if ( ! gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (off)))
{
GString * varlist = g_string_sized_new (80);
- GtkWidget *sort = get_widget_assert (xml, "split-radiobutton3");
- GtkWidget *layered = get_widget_assert (xml, "split-radiobutton1");
+ GtkWidget *sort = get_widget_assert (sfd->xml, "split-radiobutton3");
+ GtkWidget *layered = get_widget_assert (sfd->xml, "split-radiobutton1");
gint n_vars = append_variable_names (varlist,
- dict, GTK_TREE_VIEW (vars));
+ sfd->dict, GTK_TREE_VIEW (vars));
if ( n_vars > 0 )
{
@@ -113,47 +129,81 @@
}
static void
-refresh (GladeXML *xml)
+refresh (PsppireDialog *dialog, struct split_file_dialog *d)
{
- GtkWidget *off = get_widget_assert (xml, "split-radiobutton0");
+ GtkWidget *off = get_widget_assert (d->xml, "split-radiobutton0");
+ GtkWidget *on = get_widget_assert (d->xml, "split-radiobutton1");
+
+ GtkTreeModel *liststore = gtk_tree_view_get_model (d->tv);
+
+ gint n_vars = dict_get_split_cnt (d->dict->dict);
- g_print ("%s\n", __FUNCTION__);
+ gtk_list_store_clear (GTK_LIST_STORE (liststore));
+
+ if ( n_vars == 0 )
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(off), TRUE);
+ else
+ {
+ GtkTreeIter iter;
+ gint i;
+ struct variable *const *vars = dict_get_split_vars (d->dict->dict);
+
+ for (i = 0 ; i < n_vars; ++i )
+ {
+ gint idx = var_get_dict_index (vars[i]);
+
+ gtk_list_store_append (GTK_LIST_STORE (liststore), &iter);
+ gtk_list_store_set (GTK_LIST_STORE (liststore), &iter, 0, idx, -1);
+ }
+
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(on), TRUE);
+ }
+
gtk_toggle_button_toggled (GTK_TOGGLE_BUTTON(off));
}
-/* Pops up the Weight Cases dialog box */
+/* Pops up the Split File dialog box */
void
split_file_dialog (GObject *o, gpointer data)
{
gint response;
struct data_editor *de = data;
- PsppireDict *dict;
+ struct split_file_dialog sfd;
- GladeXML *xml = XML_NEW ("psppire.glade");
+ GtkWidget *dialog ;
+ GtkWidget *source ;
+ GtkWidget *dest ;
+ GtkWidget *selector ;
+ GtkWidget *on_off ;
- GtkWidget *dialog = get_widget_assert (xml, "split-file-dialog");
- GtkWidget *source = get_widget_assert (xml, "split-file-dict-treeview");
- GtkWidget *dest = get_widget_assert (xml, "split-file-grouping-vars");
- GtkWidget *selector = get_widget_assert (xml, "split-file-selector");
- GtkWidget *on_off = get_widget_assert (xml, "split-radiobutton0");
+ GtkSheet *var_sheet ;
+
+ sfd.xml = XML_NEW ("psppire.glade");
+
+ dialog = get_widget_assert (sfd.xml, "split-file-dialog");
+ source = get_widget_assert (sfd.xml, "split-file-dict-treeview");
+ dest = get_widget_assert (sfd.xml, "split-file-grouping-vars");
+ selector = get_widget_assert (sfd.xml, "split-file-selector");
+ on_off = get_widget_assert (sfd.xml, "split-radiobutton0");
- GtkSheet *var_sheet =
- GTK_SHEET (get_widget_assert (de->xml, "variable_sheet"));
+ var_sheet = GTK_SHEET (get_widget_assert (de->xml, "variable_sheet"));
PsppireVarStore *vs = PSPPIRE_VAR_STORE (gtk_sheet_get_model (var_sheet));
- dict = vs->dict;
+ sfd.dict = vs->dict;
+ sfd.tv = GTK_TREE_VIEW (dest);
+ sfd.selector = PSPPIRE_SELECTOR (
+ get_widget_assert (sfd.xml,
"split-file-selector"));
attach_dictionary_to_treeview (GTK_TREE_VIEW (source),
vs->dict,
GTK_SELECTION_MULTIPLE, NULL);
- g_signal_connect (on_off, "toggled", G_CALLBACK(on_off_toggled), xml);
+ g_signal_connect (on_off, "toggled", G_CALLBACK(on_off_toggled), sfd.xml);
set_dest_model (GTK_TREE_VIEW (dest), vs->dict);
@@ -164,7 +214,7 @@
insert_source_row_into_tree_view,
NULL);
- refresh (xml);
+ g_signal_connect (dialog, "refresh", G_CALLBACK (refresh), &sfd);
response = psppire_dialog_run (PSPPIRE_DIALOG (dialog));
@@ -173,7 +223,7 @@
{
case GTK_RESPONSE_OK:
{
- gchar *syntax = generate_syntax (xml, dict);
+ gchar *syntax = generate_syntax (&sfd);
struct getl_interface *sss = create_syntax_string_source (syntax);
execute_syntax (sss);
@@ -182,7 +232,7 @@
break;
case PSPPIRE_RESPONSE_PASTE:
{
- gchar *syntax = generate_syntax (xml, dict);
+ gchar *syntax = generate_syntax (&sfd);
struct syntax_editor *se =
(struct syntax_editor *) window_create (WINDOW_SYNTAX, NULL);
@@ -196,6 +246,6 @@
break;
}
- g_object_unref (xml);
+ g_object_unref (sfd.xml);
}
Index: src/ui/gui/transpose-dialog.c
===================================================================
RCS file: /sources/pspp/pspp/src/ui/gui/transpose-dialog.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- src/ui/gui/transpose-dialog.c 30 Mar 2007 23:39:33 -0000 1.3
+++ src/ui/gui/transpose-dialog.c 31 Mar 2007 11:44:45 -0000 1.4
@@ -46,6 +46,18 @@
static gchar * generate_syntax (PsppireDict *dict, GladeXML *xml);
+static void
+refresh (PsppireDialog *dialog, gpointer data)
+{
+ GladeXML *xml = data;
+ GtkWidget *dest = get_widget_assert (xml, "variables-treeview");
+ GtkWidget *entry = get_widget_assert (xml, "new-name-entry");
+ GtkTreeModel *dmodel = gtk_tree_view_get_model (dest);
+
+ gtk_list_store_clear (GTK_LIST_STORE (dmodel));
+ gtk_entry_set_text (GTK_ENTRY (entry), "");
+}
+
void
transpose_dialog (GObject *o, gpointer data)
{
@@ -84,6 +96,8 @@
is_currently_in_entry);
+ g_signal_connect (dialog, "refresh", G_CALLBACK (refresh), xml);
+
response = psppire_dialog_run (PSPPIRE_DIALOG (dialog));
switch (response)
Index: src/ui/gui/weight-cases-dialog.c
===================================================================
RCS file: /sources/pspp/pspp/src/ui/gui/weight-cases-dialog.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- src/ui/gui/weight-cases-dialog.c 26 Mar 2007 10:11:01 -0000 1.3
+++ src/ui/gui/weight-cases-dialog.c 31 Mar 2007 11:44:45 -0000 1.4
@@ -31,6 +31,11 @@
#include <gtk/gtk.h>
#include <glade/glade.h>
+#include <gettext.h>
+#define _(msgid) gettext (msgid)
+#define N_(msgid) msgid
+
+
/* FIXME: These shouldn't be here */
#include <gtksheet/gtksheet.h>
#include "psppire-var-store.h"
@@ -60,10 +65,43 @@
gtk_entry_set_text (entry, "");
}
+struct weight_cases_dialog
+{
+ PsppireDict *dict;
+ GtkEntry *entry;
+ GtkLabel *status;
+ GtkToggleButton *off;
+ GtkToggleButton *on;
+};
+static void
+refresh (PsppireDialog *dialog, const struct weight_cases_dialog *wcd)
+{
+ const struct variable *var = dict_get_weight (wcd->dict->dict);
+ if ( ! var )
+ {
+ gtk_entry_set_text (wcd->entry, "");
+ gtk_label_set_text (wcd->status, _("Do not weight cases"));
+ gtk_toggle_button_set_active (wcd->off, TRUE);
+ }
+ else
+ {
+ gchar *text =
+ g_strdup_printf (_("Weight cases by %s"), var_get_name (var));
-static gchar * generate_syntax (PsppireDict *, GtkEntry *);
+ gtk_entry_set_text (wcd->entry, var_get_name (var));
+ gtk_label_set_text (wcd->status, text);
+
+ g_free (text);
+ gtk_toggle_button_set_active (wcd->on, TRUE);
+ }
+
+ g_signal_emit_by_name (wcd->entry, "activate");
+}
+
+
+static gchar * generate_syntax (const struct weight_cases_dialog *wcd);
/* Pops up the Weight Cases dialog box */
@@ -72,8 +110,7 @@
{
gint response;
struct data_editor *de = data;
- PsppireDict *dict;
- struct variable *var;
+ struct weight_cases_dialog wcd;
GladeXML *xml = XML_NEW ("psppire.glade");
@@ -84,13 +121,14 @@
GtkWidget *radiobutton1 = get_widget_assert (xml,
"weight-cases-radiobutton1");
GtkWidget *radiobutton2 = get_widget_assert (xml, "radiobutton2");
+ GtkWidget *status = get_widget_assert (xml, "weight-status-label");
GtkSheet *var_sheet =
GTK_SHEET (get_widget_assert (de->xml, "variable_sheet"));
PsppireVarStore *vs = PSPPIRE_VAR_STORE (gtk_sheet_get_model (var_sheet));
- dict = vs->dict;
+ gtk_window_set_transient_for (GTK_WINDOW (dialog), de->parent.window);
g_signal_connect (radiobutton1, "toggled", G_CALLBACK (on_toggle), entry);
g_signal_connect (selector, "selected", G_CALLBACK (on_select),
@@ -100,7 +138,7 @@
radiobutton1);
attach_dictionary_to_treeview (GTK_TREE_VIEW (source),
- dict,
+ vs->dict,
GTK_SELECTION_SINGLE,
var_is_numeric
);
@@ -112,13 +150,14 @@
is_currently_in_entry
);
- var = dict_get_weight (dict->dict);
- if ( ! var )
- gtk_entry_set_text (GTK_ENTRY (entry), "");
- else
- gtk_entry_set_text (GTK_ENTRY (entry), var_get_name (var));
- g_signal_emit_by_name (entry, "activate");
+ wcd.dict = vs->dict;
+ wcd.entry = GTK_ENTRY (entry);
+ wcd.status = GTK_LABEL (status);
+ wcd.off = GTK_TOGGLE_BUTTON (radiobutton1);
+ wcd.on = GTK_TOGGLE_BUTTON (radiobutton2);
+
+ g_signal_connect (dialog, "refresh", G_CALLBACK (refresh), &wcd);
response = psppire_dialog_run (PSPPIRE_DIALOG (dialog));
@@ -128,7 +167,7 @@
{
case GTK_RESPONSE_OK:
{
- gchar *syntax = generate_syntax (dict, GTK_ENTRY (entry));
+ gchar *syntax = generate_syntax (&wcd);
struct getl_interface *sss = create_syntax_string_source (syntax);
execute_syntax (sss);
@@ -137,7 +176,7 @@
break;
case PSPPIRE_RESPONSE_PASTE:
{
- gchar *syntax = generate_syntax (dict, GTK_ENTRY (entry));
+ gchar *syntax = generate_syntax (&wcd);
struct syntax_editor *se =
(struct syntax_editor *) window_create (WINDOW_SYNTAX, NULL);
@@ -154,13 +193,13 @@
static gchar *
-generate_syntax (PsppireDict *dict, GtkEntry *entry)
+generate_syntax (const struct weight_cases_dialog *wcd)
{
gchar *syntax;
- const gchar *text = gtk_entry_get_text (entry);
+ const gchar *text = gtk_entry_get_text (wcd->entry);
- struct variable *var = psppire_dict_lookup_var (dict, text);
+ struct variable *var = psppire_dict_lookup_var (wcd->dict, text);
if ( var == NULL)
syntax = g_strdup ("WEIGHT OFF.");
Index: src/ui/gui/icons/recent-dialogs.png
===================================================================
RCS file: src/ui/gui/icons/recent-dialogs.png
diff -N src/ui/gui/icons/recent-dialogs.png
Binary files /dev/null and /tmp/cvs4Jbfpd differ
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pspp-cvs] pspp glade.patch doc/ChangeLog doc/transformati...,
John Darrington <=