From 09a1109ddc398f36fe720208e1d38053850cbd2a Mon Sep 17 00:00:00 2001 From: John Darrington Date: Thu, 4 Jan 2007 08:15:26 +0000 Subject: [PATCH] Added psppire-dialog and psppire-buttonbox widgets. Added framework for variable selection using treeview widgets. Added weight cases dialog box. --- Makefile.am | 4 + Smake | 2 + configure.ac | 11 +- glade/automake.mk | 19 ++ glade/bbox.c | 76 ++++++++ glade/dialog.c | 106 ++++++++++++ glade/psppire.xml | 54 ++++++ po/de.po | 250 ++++++++++++++------------ po/pspp.pot | 244 ++++++++++++++------------ src/data/automake.mk | 1 + src/ui/gui/about.c | 23 ++- src/ui/gui/automake.mk | 30 +++- src/ui/gui/data-editor.c | 147 ++++++++++++---- src/ui/gui/data-editor.glade | 256 +++++++++++++-------------- src/ui/gui/data-editor.h | 3 +- src/ui/gui/glade-register.c | 34 ++++ src/ui/gui/psppire-buttonbox.c | 139 +++++++++++++++ src/ui/gui/psppire-buttonbox.h | 38 ++++ src/ui/gui/psppire-dialog.c | 171 ++++++++++++++++++ src/ui/gui/psppire-dialog.h | 47 +++++ src/ui/gui/psppire-dict.c | 17 +- src/ui/gui/psppire-dict.h | 5 +- src/ui/gui/psppire-var-select.c | 289 +++++++++++++++++++++++++++++++ src/ui/gui/psppire-var-select.h | 87 ++++++++++ src/ui/gui/psppire.glade | 225 ++++++++++++++++++++++-- src/ui/gui/weight-cases-dialog.c | 127 ++++++++++++++ src/ui/gui/weight-cases-dialog.h | 28 +++ src/ui/gui/window-manager.c | 20 +++ src/ui/terminal/.cvsignore | 1 + src/ui/terminal/automake.mk | 3 +- tests/formats/.cvsignore | 1 + tests/libpspp/.cvsignore | 1 + 32 files changed, 2048 insertions(+), 411 deletions(-) create mode 100644 glade/automake.mk create mode 100644 glade/bbox.c create mode 100644 glade/dialog.c create mode 100644 glade/psppire.xml create mode 100644 src/ui/gui/glade-register.c create mode 100644 src/ui/gui/psppire-buttonbox.c create mode 100644 src/ui/gui/psppire-buttonbox.h create mode 100644 src/ui/gui/psppire-dialog.c create mode 100644 src/ui/gui/psppire-dialog.h create mode 100644 src/ui/gui/psppire-var-select.c create mode 100644 src/ui/gui/psppire-var-select.h create mode 100644 src/ui/gui/weight-cases-dialog.c create mode 100644 src/ui/gui/weight-cases-dialog.h diff --git a/Makefile.am b/Makefile.am index dd3b1cb8..ad84db7d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -49,3 +49,7 @@ include $(top_srcdir)/examples/automake.mk include $(top_srcdir)/src/automake.mk include $(top_srcdir)/tests/automake.mk + +if WITH_GUI_TOOLS +include $(top_srcdir)/glade/automake.mk +endif diff --git a/Smake b/Smake index d92510bd..35dd3285 100644 --- a/Smake +++ b/Smake @@ -69,6 +69,7 @@ all: po/POTFILES.in echo '*' > gl/m4/.cvsignore test -d intl || mkdir intl echo '*' > intl/.cvsignore + libtoolize --force --automake autopoint --force aclocal -I m4 -I gl/m4 autoconf @@ -123,5 +124,6 @@ clean: rm -f config.h.in~ find . -name Makefile.in -exec rm -f {} \; rm -f compile + rm -f ltmain.sh .PHONY: all gettextize potfiles clean diff --git a/configure.ac b/configure.ac index 38eee691..9faf2983 100644 --- a/configure.ac +++ b/configure.ac @@ -8,10 +8,11 @@ AM_INIT_AUTOMAKE(1.9) dnl Checks for programs. AC_GNU_SOURCE +gl_EARLY AC_PROG_CC AM_PROG_CC_C_O -AC_PROG_RANLIB -gl_EARLY +AC_LIBTOOL_DLOPEN +AC_PROG_LIBTOOL PSPP_ENABLE_WARNING(-Wdeclaration-after-statement) @@ -40,6 +41,12 @@ if test x"$with_gui" != x"no" ; then fi AM_CONDITIONAL(WITHGUI, test x"$with_gui" != x"no") +AC_ARG_WITH(gui_tools, [ --with-gui-tools build the gui developer tools]) +if test x"$with_gui_tools" == x"yes" ; then + PKG_CHECK_MODULES(GLADE_UI, libgladeui-1.0) +fi +AM_CONDITIONAL(WITH_GUI_TOOLS, test x"$with_gui_tools" == x"yes") + PSPP_OFF_T AC_CHECK_LIB(gslcblas,main,,[PSPP_REQUIRED_PREREQ([libgslcblas])]) diff --git a/glade/automake.mk b/glade/automake.mk new file mode 100644 index 00000000..144cb6da --- /dev/null +++ b/glade/automake.mk @@ -0,0 +1,19 @@ +## Process this file with automake to produce Makefile.in -*- makefile -*- + +module_LTLIBRARIES = libglade-psppire.la + +moduledir = `pkg-config --variable=moduledir libgladeui-1.0` +catalogdir = `pkg-config --variable=catalogdir libgladeui-1.0` + +libglade_psppire_la_SOURCES = \ + glade/dialog.c \ + glade/bbox.c \ + src/ui/gui/psppire-dialog.c \ + src/ui/gui/psppire-buttonbox.c + +nodist_catalog_DATA = \ + glade/psppire.xml + + +libglade_psppire_la_CFLAGS = $(GLADE_UI_CFLAGS) $(GLADE_CFLAGS) \ + -I src/ui/gui diff --git a/glade/bbox.c b/glade/bbox.c new file mode 100644 index 00000000..9ce8c34d --- /dev/null +++ b/glade/bbox.c @@ -0,0 +1,76 @@ +#include +#include + +#include "psppire-buttonbox.h" + +void +glade_psppire_button_box_post_create (GladeWidgetAdaptor *adaptor, + GObject *object, + GladeCreateReason reason) +{ + GladeWidget *box_widget; + + PsppireButtonBox *bbox = PSPPIRE_BUTTONBOX (object); + + g_return_if_fail (PSPPIRE_IS_BUTTONBOX (bbox)); + + box_widget = glade_widget_get_from_gobject (GTK_WIDGET (bbox)); + if (!box_widget) + return; + + + if (reason == GLADE_CREATE_USER) + { + /* HIG complient border-width defaults on dialogs */ + glade_widget_property_set (box_widget, "border-width", 5); + } + +} + + +GtkWidget * +glade_psppire_button_box_get_internal_child (GladeWidgetAdaptor *adaptor, + PsppireButtonBox *bbox, + const gchar *name) +{ +#if DEBUGGING + g_print ("%s\n", __FUNCTION__); +#endif + + return bbox; +} + + + + +void +glade_psppire_button_box_set_property (GladeWidgetAdaptor *adaptor, + GObject *object, + const gchar *id, + const GValue *value) +{ +#if DEBUGGING + g_print ("%s(%p) Type=\"%s\" Id=\"%s\"\n", __FUNCTION__, object, + G_OBJECT_TYPE_NAME( object ), + id); +#endif + + GWA_GET_CLASS (GTK_TYPE_WINDOW)->set_property (adaptor, object, + id, value); +} + + + + +GList * +glade_psppire_button_box_get_children (GladeWidgetAdaptor *adaptor, + PsppireButtonBox *bbox) +{ + GList *list = NULL; + + g_return_val_if_fail (PSPPIRE_IS_BUTTONBOX (bbox), NULL); + + list = glade_util_container_get_all_children (GTK_CONTAINER (bbox)); + + return list; +} diff --git a/glade/dialog.c b/glade/dialog.c new file mode 100644 index 00000000..ab38c706 --- /dev/null +++ b/glade/dialog.c @@ -0,0 +1,106 @@ +#include +#include + +#include "psppire-dialog.h" + +#include + + +void GLADEGTK_API +glade_psppire_dialog_post_create (GladeWidgetAdaptor *adaptor, + GObject *object, + GladeCreateReason reason) +{ + GladeWidget *widget ; + + GladeWidget *box_widget; + + PsppireDialog *dialog = PSPPIRE_DIALOG (object); + + g_return_if_fail (PSPPIRE_IS_DIALOG (dialog)); + + widget = glade_widget_get_from_gobject (GTK_WIDGET (dialog)); + if (!widget) + return; + + + if (reason == GLADE_CREATE_USER) + { + /* HIG complient border-width defaults on dialogs */ + glade_widget_property_set (widget, "border-width", 5); + } + + box_widget = glade_widget_adaptor_create_internal + (widget, G_OBJECT(dialog->box), + "hbox", "dialog", FALSE, reason); + + /* These properties are controlled by the GtkDialog style properties: + * "content-area-border", "button-spacing" and "action-area-border", + * so we must disable their use. + */ + glade_widget_remove_property (box_widget, "border-width"); + + /* Only set these on the original create. */ + if (reason == GLADE_CREATE_USER) + { + + /* HIG complient spacing defaults on dialogs */ + glade_widget_property_set (box_widget, "spacing", 2); + + glade_widget_property_set (box_widget, "size", 2); + + } + + + /* set a reasonable default size for a dialog */ + gtk_window_set_default_size (GTK_WINDOW (dialog), 320, 260); + +} + + +GtkWidget * +glade_psppire_dialog_get_internal_child (GladeWidgetAdaptor *adaptor, + PsppireDialog *dialog, + const gchar *name) +{ +#if DEBUGGING + g_print ("%s\n", __FUNCTION__); +#endif + + g_assert (0 == strcmp (name, "hbox")); + + return dialog->box; +} + + + +void +glade_psppire_dialog_set_property (GladeWidgetAdaptor *adaptor, + GObject *object, + const gchar *id, + const GValue *value) +{ +#if DEBUGGING + g_print ("%s(%p) Type=\"%s\" Id=\"%s\"\n", __FUNCTION__, object, + G_OBJECT_TYPE_NAME( object ), + id); +#endif + + GWA_GET_CLASS (GTK_TYPE_WINDOW)->set_property (adaptor, object, + id, value); +} + + + +GList * +glade_psppire_dialog_get_children (GladeWidgetAdaptor *adaptor, + PsppireDialog *dialog) +{ + GList *list = NULL; + + g_return_val_if_fail (PSPPIRE_IS_DIALOG (dialog), NULL); + + list = glade_util_container_get_all_children (GTK_CONTAINER (dialog)); + + return list; +} diff --git a/glade/psppire.xml b/glade/psppire.xml new file mode 100644 index 00000000..10960e5c --- /dev/null +++ b/glade/psppire.xml @@ -0,0 +1,54 @@ + + + my_catalog_init + + + + + glade_psppire_dialog_post_create + glade_psppire_dialog_get_internal_child + + glade_psppire_dialog_get_children + + + glade_psppire_dialog_set_property + + + + + + + + + + + + + glade_psppire_button_box_post_create + glade_psppire_button_box_get_children + + glade_psppire_button_box_get_internal_child + + glade_psppire_button_box_set_property + + + + + + + + + + + + + + + + + + + + diff --git a/po/de.po b/po/de.po index 63f204a9..7cb2f7e1 100644 --- a/po/de.po +++ b/po/de.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: PSPP 0.4.2\n" "Report-Msgid-Bugs-To: pspp-dev@gnu.org\n" -"POT-Creation-Date: 2006-12-29 15:57+0900\n" +"POT-Creation-Date: 2007-01-03 18:41+0900\n" "PO-Revision-Date: 2006-05-26 17:49+0800\n" "Last-Translator: John Darrington \n" "Language-Team: German \n" @@ -182,7 +182,7 @@ msgid "" "system-missing, zero, or negative. These case(s) were ignored." msgstr "" -#: src/data/dictionary.c:1201 +#: src/data/dictionary.c:1206 msgid "Variable suffix too large." msgstr "" @@ -309,13 +309,13 @@ msgid "%s variables are not compatible with %s format %s." msgstr "" #: src/data/format.c:310 src/data/por-file-reader.c:489 -#: src/data/sys-file-reader.c:602 src/ui/gui/data-editor.glade:1558 +#: src/data/sys-file-reader.c:602 src/ui/gui/data-editor.glade:1084 #: src/ui/gui/psppire-var-store.c:482 msgid "String" msgstr "Zeichenkette" #: src/data/format.c:310 src/data/por-file-reader.c:489 -#: src/data/sys-file-reader.c:602 src/ui/gui/data-editor.glade:1419 +#: src/data/sys-file-reader.c:602 src/ui/gui/data-editor.glade:980 #: src/ui/gui/psppire-var-store.c:475 msgid "Numeric" msgstr "Nummer" @@ -4102,334 +4102,343 @@ msgstr "" msgid "Style of bevel around the custom entry button" msgstr "" -#: src/ui/gui/data-editor.c:368 src/ui/gui/data-editor.glade:531 +#: src/ui/gui/data-editor.c:391 src/ui/gui/data-editor.glade:428 msgid "Open" msgstr "Öffen" -#: src/ui/gui/data-editor.c:376 +#: src/ui/gui/data-editor.c:399 msgid "System Files (*.sav)" msgstr "Systemedatein (*.sav)" -#: src/ui/gui/data-editor.c:382 +#: src/ui/gui/data-editor.c:405 msgid "Portable Files (*.por) " msgstr "Tragbardatein (*.por)" -#: src/ui/gui/data-editor.c:388 src/ui/gui/syntax-editor.c:140 -#: src/ui/gui/syntax-editor.c:538 +#: src/ui/gui/data-editor.c:411 src/ui/gui/syntax-editor.c:141 +#: src/ui/gui/syntax-editor.c:544 msgid "All Files" msgstr "Alle Datei" -#: src/ui/gui/data-editor.c:466 +#: src/ui/gui/data-editor.c:487 msgid "Font Selection" msgstr "Schriftwahlung" -#: src/ui/gui/data-editor.glade:38 src/ui/gui/syntax-editor.glade:39 +#: src/ui/gui/data-editor.c:663 +msgid "Weights off" +msgstr "" + +#: src/ui/gui/data-editor.c:676 +#, c-format +msgid "Weight by %s" +msgstr "" + +#: src/ui/gui/data-editor.glade:18 src/ui/gui/syntax-editor.glade:39 msgid "_File" msgstr "_Datei" -#: src/ui/gui/data-editor.glade:56 src/ui/gui/data-editor.glade:85 +#: src/ui/gui/data-editor.glade:33 src/ui/gui/data-editor.glade:59 #: src/ui/gui/syntax-editor.glade:57 src/ui/gui/syntax-editor.glade:86 msgid "_Syntax" msgstr "" -#: src/ui/gui/data-editor.glade:64 src/ui/gui/data-editor.glade:93 -#: src/ui/gui/data-editor.glade:313 src/ui/gui/syntax-editor.glade:65 +#: src/ui/gui/data-editor.glade:40 src/ui/gui/data-editor.glade:66 +#: src/ui/gui/data-editor.glade:253 src/ui/gui/syntax-editor.glade:65 #: src/ui/gui/syntax-editor.glade:95 #, fuzzy msgid "_Data" msgstr "Daten" -#: src/ui/gui/data-editor.glade:144 src/ui/gui/syntax-editor.glade:142 +#: src/ui/gui/data-editor.glade:115 src/ui/gui/syntax-editor.glade:142 msgid "_Edit" msgstr "_Bearbeiten" -#: src/ui/gui/data-editor.glade:181 +#: src/ui/gui/data-editor.glade:150 #, fuzzy msgid "Paste _Variables" msgstr "Variableansicht" -#: src/ui/gui/data-editor.glade:190 +#: src/ui/gui/data-editor.glade:158 msgid "Cl_ear" msgstr "" -#: src/ui/gui/data-editor.glade:206 +#: src/ui/gui/data-editor.glade:171 #, fuzzy msgid "_Find" msgstr "_Datei" -#: src/ui/gui/data-editor.glade:230 +#: src/ui/gui/data-editor.glade:182 msgid "_View" msgstr "_Ansicht" -#: src/ui/gui/data-editor.glade:239 +#: src/ui/gui/data-editor.glade:189 msgid "Status Bar" msgstr "Statusleiste" -#: src/ui/gui/data-editor.glade:247 +#: src/ui/gui/data-editor.glade:196 msgid "Toolbars" msgstr "Werkzeugregal" -#: src/ui/gui/data-editor.glade:261 +#: src/ui/gui/data-editor.glade:208 msgid "Fonts" msgstr "Schrift" -#: src/ui/gui/data-editor.glade:269 +#: src/ui/gui/data-editor.glade:215 msgid "Grid Lines" msgstr "Glitten" -#: src/ui/gui/data-editor.glade:278 src/ui/gui/data-editor.glade:831 -#: src/ui/gui/data-editor.glade:1993 src/ui/gui/data-editor.glade:2270 +#: src/ui/gui/data-editor.glade:223 src/ui/gui/data-editor.glade:633 +#: src/ui/gui/data-editor.glade:1343 src/ui/gui/data-editor.glade:1521 msgid "Value Labels" msgstr "Werten" -#: src/ui/gui/data-editor.glade:293 +#: src/ui/gui/data-editor.glade:235 msgid "Data" msgstr "Daten" -#: src/ui/gui/data-editor.glade:301 src/ui/gui/data-editor.glade:655 +#: src/ui/gui/data-editor.glade:242 src/ui/gui/data-editor.glade:514 msgid "Variables" msgstr "Variableansicht" -#: src/ui/gui/data-editor.glade:323 src/ui/gui/data-editor.glade:734 +#: src/ui/gui/data-editor.glade:261 src/ui/gui/data-editor.glade:568 #, fuzzy msgid "Insert Variable" msgstr "Variableansicht" -#: src/ui/gui/data-editor.glade:333 +#: src/ui/gui/data-editor.glade:270 #, fuzzy msgid "Insert Cases" msgstr "_Stecken" -#: src/ui/gui/data-editor.glade:343 src/ui/gui/data-editor.glade:638 -#: src/ui/gui/data-editor.glade:2835 +#: src/ui/gui/data-editor.glade:279 src/ui/gui/data-editor.glade:502 +#: src/ui/gui/data-editor.glade:1891 msgid "Go To Case" msgstr "" -#: src/ui/gui/data-editor.glade:372 src/ui/gui/data-editor.glade:2946 +#: src/ui/gui/data-editor.glade:294 src/ui/gui/data-editor.glade:1956 msgid "Sort Cases" msgstr "" -#: src/ui/gui/data-editor.glade:382 +#: src/ui/gui/data-editor.glade:303 msgid "Transpose" msgstr "" -#: src/ui/gui/data-editor.glade:391 +#: src/ui/gui/data-editor.glade:311 msgid "Restructure" msgstr "" -#: src/ui/gui/data-editor.glade:400 +#: src/ui/gui/data-editor.glade:319 #, fuzzy msgid "Merge Files" msgstr "Alle Datei" -#: src/ui/gui/data-editor.glade:409 +#: src/ui/gui/data-editor.glade:327 msgid "Aggregate" msgstr "" -#: src/ui/gui/data-editor.glade:425 src/ui/gui/data-editor.glade:765 +#: src/ui/gui/data-editor.glade:341 src/ui/gui/data-editor.glade:589 #, fuzzy msgid "Split File" msgstr "Alle Datei" -#: src/ui/gui/data-editor.glade:434 src/ui/gui/data-editor.glade:801 +#: src/ui/gui/data-editor.glade:349 src/ui/gui/data-editor.glade:613 msgid "Select Cases" msgstr "" -#: src/ui/gui/data-editor.glade:443 src/ui/gui/data-editor.glade:783 +#: src/ui/gui/data-editor.glade:357 src/ui/gui/data-editor.glade:601 msgid "Weight Cases" msgstr "" -#: src/ui/gui/data-editor.glade:455 src/ui/gui/syntax-editor.glade:232 +#: src/ui/gui/data-editor.glade:368 src/ui/gui/syntax-editor.glade:232 #, fuzzy msgid "_Windows" msgstr "_Datei" -#: src/ui/gui/data-editor.glade:465 src/ui/gui/syntax-editor.glade:242 +#: src/ui/gui/data-editor.glade:376 src/ui/gui/syntax-editor.glade:242 msgid "_Minimise All Windows" msgstr "" -#: src/ui/gui/data-editor.glade:478 src/ui/gui/syntax-editor.glade:254 +#: src/ui/gui/data-editor.glade:388 src/ui/gui/syntax-editor.glade:254 msgid "_Help" msgstr "_Hilfe" -#: src/ui/gui/data-editor.glade:487 src/ui/gui/syntax-editor.glade:263 +#: src/ui/gui/data-editor.glade:395 src/ui/gui/syntax-editor.glade:263 msgid "_Reference Manual" msgstr "" -#: src/ui/gui/data-editor.glade:495 src/ui/gui/syntax-editor.glade:271 +#: src/ui/gui/data-editor.glade:402 src/ui/gui/syntax-editor.glade:271 msgid "_About" msgstr "_Info" -#: src/ui/gui/data-editor.glade:547 +#: src/ui/gui/data-editor.glade:439 msgid "Save" msgstr "Speichen" -#: src/ui/gui/data-editor.glade:564 +#: src/ui/gui/data-editor.glade:451 msgid "Print" msgstr "Drucken" -#: src/ui/gui/data-editor.glade:593 +#: src/ui/gui/data-editor.glade:471 msgid "Undo" msgstr "" -#: src/ui/gui/data-editor.glade:609 +#: src/ui/gui/data-editor.glade:482 msgid "Redo" msgstr "" -#: src/ui/gui/data-editor.glade:686 +#: src/ui/gui/data-editor.glade:535 msgid "Find" msgstr "" -#: src/ui/gui/data-editor.glade:715 +#: src/ui/gui/data-editor.glade:555 #, fuzzy msgid "Insert Case" msgstr "_Stecken" -#: src/ui/gui/data-editor.glade:851 +#: src/ui/gui/data-editor.glade:646 msgid "Use Sets" msgstr "" -#: src/ui/gui/data-editor.glade:983 +#: src/ui/gui/data-editor.glade:728 msgid "Data View" msgstr "Datenansicht" -#: src/ui/gui/data-editor.glade:1031 +#: src/ui/gui/data-editor.glade:755 msgid "Variable View" msgstr "Variableansicht" -#: src/ui/gui/data-editor.glade:1079 +#: src/ui/gui/data-editor.glade:785 msgid "Information Area" msgstr "" -#: src/ui/gui/data-editor.glade:1126 +#: src/ui/gui/data-editor.glade:804 msgid "Processor Area" msgstr "" -#: src/ui/gui/data-editor.glade:1169 +#: src/ui/gui/data-editor.glade:829 msgid "OMS Area" msgstr "" -#: src/ui/gui/data-editor.glade:1212 +#: src/ui/gui/data-editor.glade:854 msgid "Case Counter Area" msgstr "" -#: src/ui/gui/data-editor.glade:1255 +#: src/ui/gui/data-editor.glade:879 msgid "Filter Use Status Area" msgstr "" -#: src/ui/gui/data-editor.glade:1298 +#: src/ui/gui/data-editor.glade:904 msgid "Weight Status Area" msgstr "" -#: src/ui/gui/data-editor.glade:1341 +#: src/ui/gui/data-editor.glade:930 #, fuzzy msgid "Split File Status Area" msgstr "Alle Datei" -#: src/ui/gui/data-editor.glade:1386 +#: src/ui/gui/data-editor.glade:959 msgid "Variable Type" msgstr "Variableansicht" -#: src/ui/gui/data-editor.glade:1438 src/ui/gui/psppire-var-store.c:476 +#: src/ui/gui/data-editor.glade:994 src/ui/gui/psppire-var-store.c:476 msgid "Comma" msgstr "Komma" -#: src/ui/gui/data-editor.glade:1458 src/ui/gui/psppire-var-store.c:477 +#: src/ui/gui/data-editor.glade:1009 src/ui/gui/psppire-var-store.c:477 msgid "Dot" msgstr "Punkt" -#: src/ui/gui/data-editor.glade:1478 +#: src/ui/gui/data-editor.glade:1024 msgid "Scientific notation" msgstr "Wissenschaftlichnotation" -#: src/ui/gui/data-editor.glade:1498 src/ui/gui/psppire-var-store.c:479 +#: src/ui/gui/data-editor.glade:1039 src/ui/gui/psppire-var-store.c:479 msgid "Date" msgstr "Datum" -#: src/ui/gui/data-editor.glade:1518 src/ui/gui/psppire-var-store.c:480 +#: src/ui/gui/data-editor.glade:1054 src/ui/gui/psppire-var-store.c:480 msgid "Dollar" msgstr "Euro" -#: src/ui/gui/data-editor.glade:1538 +#: src/ui/gui/data-editor.glade:1069 msgid "Custom currency" msgstr "Spezialwährung" -#: src/ui/gui/data-editor.glade:1683 +#: src/ui/gui/data-editor.glade:1161 msgid "positive" msgstr "positiv" -#: src/ui/gui/data-editor.glade:1708 +#: src/ui/gui/data-editor.glade:1167 msgid "negative" msgstr "negativ" -#: src/ui/gui/data-editor.glade:1737 +#: src/ui/gui/data-editor.glade:1180 msgid "Sample" msgstr "Muster" -#: src/ui/gui/data-editor.glade:1815 -msgid "Decimal Places:" -msgstr "Dezimalstellen:" - -#: src/ui/gui/data-editor.glade:1892 +#: src/ui/gui/data-editor.glade:1230 msgid "Width:" msgstr "Große:" -#: src/ui/gui/data-editor.glade:2111 -msgid "Value:" -msgstr "Werte:" +#: src/ui/gui/data-editor.glade:1274 +msgid "Decimal Places:" +msgstr "Dezimalstellen:" -#: src/ui/gui/data-editor.glade:2139 +#: src/ui/gui/data-editor.glade:1441 msgid "Value Label:" msgstr "Kennsatz:" -#: src/ui/gui/data-editor.glade:2355 +#: src/ui/gui/data-editor.glade:1454 +msgid "Value:" +msgstr "Werte:" + +#: src/ui/gui/data-editor.glade:1587 msgid "Missing Values" msgstr "Lösewerten" -#: src/ui/gui/data-editor.glade:2441 -msgid "_No missing values" -msgstr "_Kein Lösewerten" - -#: src/ui/gui/data-editor.glade:2466 -msgid "_Discrete missing values" -msgstr "_Diskret Lösewerten" - -#: src/ui/gui/data-editor.glade:2595 +#: src/ui/gui/data-editor.glade:1605 msgid "_Range plus one optional discrete missing value" msgstr "Wertebereich und ein optional Lösewert" -#: src/ui/gui/data-editor.glade:2632 +#: src/ui/gui/data-editor.glade:1629 msgid "_Low:" msgstr "_Tief:" -#: src/ui/gui/data-editor.glade:2691 +#: src/ui/gui/data-editor.glade:1658 msgid "_High:" msgstr "_Hoch:" -#: src/ui/gui/data-editor.glade:2765 +#: src/ui/gui/data-editor.glade:1699 msgid "Di_screte value:" msgstr "Di_skretwerte" -#: src/ui/gui/data-editor.glade:2891 +#: src/ui/gui/data-editor.glade:1746 +msgid "_No missing values" +msgstr "_Kein Lösewerten" + +#: src/ui/gui/data-editor.glade:1763 +msgid "_Discrete missing values" +msgstr "_Diskret Lösewerten" + +#: src/ui/gui/data-editor.glade:1908 msgid "Case Number:" msgstr "" -#: src/ui/gui/data-editor.glade:3063 src/ui/gui/sort-cases-dialog.c:279 +#: src/ui/gui/data-editor.glade:2017 +msgid "Sort by:" +msgstr "" + +#: src/ui/gui/data-editor.glade:2066 src/ui/gui/sort-cases-dialog.c:279 msgid "Ascending" msgstr "" -#: src/ui/gui/data-editor.glade:3082 src/ui/gui/sort-cases-dialog.c:281 +#: src/ui/gui/data-editor.glade:2079 src/ui/gui/sort-cases-dialog.c:281 msgid "Descending" msgstr "" -#: src/ui/gui/data-editor.glade:3103 +#: src/ui/gui/data-editor.glade:2095 msgid "Sort Order" msgstr "" -#: src/ui/gui/data-editor.glade:3140 -msgid "Sort by:" -msgstr "" - #: src/ui/gui/helper.c:105 msgid "Sorry. The help system hasn't yet been implemented." msgstr "Es gibt noch nicht kein Helpsysteme. Schade!" @@ -4485,11 +4494,12 @@ msgstr "" msgid "%d" msgstr "" -#: src/ui/gui/psppire.glade:10 -msgid "This is pre-alpha software. It probably will not work." +#: src/ui/gui/psppire.glade:9 +#, fuzzy +msgid "This is pre-alpha software. Use at your own risk." msgstr "Diese Software ist vor-Alpha. Wahrscheinlich Funktioniert es nicht." -#: src/ui/gui/psppire.glade:11 +#: src/ui/gui/psppire.glade:10 msgid "" " This program is free software; you can redistribute it and/or modify\n" " it under the terms of the GNU General Public License as published by\n" @@ -4507,6 +4517,28 @@ msgid "" " 02110-1301, USA.\n" msgstr "" +#: src/ui/gui/psppire.glade:87 src/ui/gui/psppire.glade:170 +#: src/ui/gui/weight-cases-dialog.c:87 +msgid "Do not weight cases" +msgstr "" + +#: src/ui/gui/psppire.glade:96 +msgid "Weight cases by" +msgstr "" + +#: src/ui/gui/psppire.glade:125 +#, fuzzy +msgid "Frequency Variable" +msgstr "Variableansicht" + +#: src/ui/gui/psppire.glade:163 +msgid "Current Status: " +msgstr "" + +#: src/ui/gui/psppire-var-select.c:260 src/ui/gui/sort-cases-dialog.c:339 +msgid "Var" +msgstr "" + #: src/ui/gui/psppire-var-store.c:471 msgid "None" msgstr "Keine" @@ -4519,30 +4551,26 @@ msgstr "Wissenschäflich" msgid "Custom" msgstr "Spezial" -#: src/ui/gui/sort-cases-dialog.c:339 -msgid "Var" -msgstr "" - #: src/ui/gui/sort-cases-dialog.c:367 msgid "Criteria" msgstr "" -#: src/ui/gui/syntax-editor.c:79 +#: src/ui/gui/syntax-editor.c:80 #, c-format msgid "Save contents of syntax editor to %s?" msgstr "" -#: src/ui/gui/syntax-editor.c:126 +#: src/ui/gui/syntax-editor.c:127 #, fuzzy msgid "Save Syntax" msgstr "Speichern unter" -#: src/ui/gui/syntax-editor.c:134 src/ui/gui/syntax-editor.c:532 +#: src/ui/gui/syntax-editor.c:135 src/ui/gui/syntax-editor.c:538 #, fuzzy msgid "Syntax Files (*.sps) " msgstr "Systemedatein (*.sav)" -#: src/ui/gui/syntax-editor.c:524 +#: src/ui/gui/syntax-editor.c:530 msgid "Open Syntax" msgstr "" diff --git a/po/pspp.pot b/po/pspp.pot index b3ef4a6d..b8febd4b 100644 --- a/po/pspp.pot +++ b/po/pspp.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: pspp-dev@gnu.org\n" -"POT-Creation-Date: 2006-12-29 15:57+0900\n" +"POT-Creation-Date: 2007-01-03 18:41+0900\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -181,7 +181,7 @@ msgid "" "system-missing, zero, or negative. These case(s) were ignored." msgstr "" -#: src/data/dictionary.c:1201 +#: src/data/dictionary.c:1206 msgid "Variable suffix too large." msgstr "" @@ -308,13 +308,13 @@ msgid "%s variables are not compatible with %s format %s." msgstr "" #: src/data/format.c:310 src/data/por-file-reader.c:489 -#: src/data/sys-file-reader.c:602 src/ui/gui/data-editor.glade:1558 +#: src/data/sys-file-reader.c:602 src/ui/gui/data-editor.glade:1084 #: src/ui/gui/psppire-var-store.c:482 msgid "String" msgstr "" #: src/data/format.c:310 src/data/por-file-reader.c:489 -#: src/data/sys-file-reader.c:602 src/ui/gui/data-editor.glade:1419 +#: src/data/sys-file-reader.c:602 src/ui/gui/data-editor.glade:980 #: src/ui/gui/psppire-var-store.c:475 msgid "Numeric" msgstr "" @@ -4097,324 +4097,333 @@ msgstr "" msgid "Style of bevel around the custom entry button" msgstr "" -#: src/ui/gui/data-editor.c:368 src/ui/gui/data-editor.glade:531 +#: src/ui/gui/data-editor.c:391 src/ui/gui/data-editor.glade:428 msgid "Open" msgstr "" -#: src/ui/gui/data-editor.c:376 +#: src/ui/gui/data-editor.c:399 msgid "System Files (*.sav)" msgstr "" -#: src/ui/gui/data-editor.c:382 +#: src/ui/gui/data-editor.c:405 msgid "Portable Files (*.por) " msgstr "" -#: src/ui/gui/data-editor.c:388 src/ui/gui/syntax-editor.c:140 -#: src/ui/gui/syntax-editor.c:538 +#: src/ui/gui/data-editor.c:411 src/ui/gui/syntax-editor.c:141 +#: src/ui/gui/syntax-editor.c:544 msgid "All Files" msgstr "" -#: src/ui/gui/data-editor.c:466 +#: src/ui/gui/data-editor.c:487 msgid "Font Selection" msgstr "" -#: src/ui/gui/data-editor.glade:38 src/ui/gui/syntax-editor.glade:39 +#: src/ui/gui/data-editor.c:663 +msgid "Weights off" +msgstr "" + +#: src/ui/gui/data-editor.c:676 +#, c-format +msgid "Weight by %s" +msgstr "" + +#: src/ui/gui/data-editor.glade:18 src/ui/gui/syntax-editor.glade:39 msgid "_File" msgstr "" -#: src/ui/gui/data-editor.glade:56 src/ui/gui/data-editor.glade:85 +#: src/ui/gui/data-editor.glade:33 src/ui/gui/data-editor.glade:59 #: src/ui/gui/syntax-editor.glade:57 src/ui/gui/syntax-editor.glade:86 msgid "_Syntax" msgstr "" -#: src/ui/gui/data-editor.glade:64 src/ui/gui/data-editor.glade:93 -#: src/ui/gui/data-editor.glade:313 src/ui/gui/syntax-editor.glade:65 +#: src/ui/gui/data-editor.glade:40 src/ui/gui/data-editor.glade:66 +#: src/ui/gui/data-editor.glade:253 src/ui/gui/syntax-editor.glade:65 #: src/ui/gui/syntax-editor.glade:95 msgid "_Data" msgstr "" -#: src/ui/gui/data-editor.glade:144 src/ui/gui/syntax-editor.glade:142 +#: src/ui/gui/data-editor.glade:115 src/ui/gui/syntax-editor.glade:142 msgid "_Edit" msgstr "" -#: src/ui/gui/data-editor.glade:181 +#: src/ui/gui/data-editor.glade:150 msgid "Paste _Variables" msgstr "" -#: src/ui/gui/data-editor.glade:190 +#: src/ui/gui/data-editor.glade:158 msgid "Cl_ear" msgstr "" -#: src/ui/gui/data-editor.glade:206 +#: src/ui/gui/data-editor.glade:171 msgid "_Find" msgstr "" -#: src/ui/gui/data-editor.glade:230 +#: src/ui/gui/data-editor.glade:182 msgid "_View" msgstr "" -#: src/ui/gui/data-editor.glade:239 +#: src/ui/gui/data-editor.glade:189 msgid "Status Bar" msgstr "" -#: src/ui/gui/data-editor.glade:247 +#: src/ui/gui/data-editor.glade:196 msgid "Toolbars" msgstr "" -#: src/ui/gui/data-editor.glade:261 +#: src/ui/gui/data-editor.glade:208 msgid "Fonts" msgstr "" -#: src/ui/gui/data-editor.glade:269 +#: src/ui/gui/data-editor.glade:215 msgid "Grid Lines" msgstr "" -#: src/ui/gui/data-editor.glade:278 src/ui/gui/data-editor.glade:831 -#: src/ui/gui/data-editor.glade:1993 src/ui/gui/data-editor.glade:2270 +#: src/ui/gui/data-editor.glade:223 src/ui/gui/data-editor.glade:633 +#: src/ui/gui/data-editor.glade:1343 src/ui/gui/data-editor.glade:1521 msgid "Value Labels" msgstr "" -#: src/ui/gui/data-editor.glade:293 +#: src/ui/gui/data-editor.glade:235 msgid "Data" msgstr "" -#: src/ui/gui/data-editor.glade:301 src/ui/gui/data-editor.glade:655 +#: src/ui/gui/data-editor.glade:242 src/ui/gui/data-editor.glade:514 msgid "Variables" msgstr "" -#: src/ui/gui/data-editor.glade:323 src/ui/gui/data-editor.glade:734 +#: src/ui/gui/data-editor.glade:261 src/ui/gui/data-editor.glade:568 msgid "Insert Variable" msgstr "" -#: src/ui/gui/data-editor.glade:333 +#: src/ui/gui/data-editor.glade:270 msgid "Insert Cases" msgstr "" -#: src/ui/gui/data-editor.glade:343 src/ui/gui/data-editor.glade:638 -#: src/ui/gui/data-editor.glade:2835 +#: src/ui/gui/data-editor.glade:279 src/ui/gui/data-editor.glade:502 +#: src/ui/gui/data-editor.glade:1891 msgid "Go To Case" msgstr "" -#: src/ui/gui/data-editor.glade:372 src/ui/gui/data-editor.glade:2946 +#: src/ui/gui/data-editor.glade:294 src/ui/gui/data-editor.glade:1956 msgid "Sort Cases" msgstr "" -#: src/ui/gui/data-editor.glade:382 +#: src/ui/gui/data-editor.glade:303 msgid "Transpose" msgstr "" -#: src/ui/gui/data-editor.glade:391 +#: src/ui/gui/data-editor.glade:311 msgid "Restructure" msgstr "" -#: src/ui/gui/data-editor.glade:400 +#: src/ui/gui/data-editor.glade:319 msgid "Merge Files" msgstr "" -#: src/ui/gui/data-editor.glade:409 +#: src/ui/gui/data-editor.glade:327 msgid "Aggregate" msgstr "" -#: src/ui/gui/data-editor.glade:425 src/ui/gui/data-editor.glade:765 +#: src/ui/gui/data-editor.glade:341 src/ui/gui/data-editor.glade:589 msgid "Split File" msgstr "" -#: src/ui/gui/data-editor.glade:434 src/ui/gui/data-editor.glade:801 +#: src/ui/gui/data-editor.glade:349 src/ui/gui/data-editor.glade:613 msgid "Select Cases" msgstr "" -#: src/ui/gui/data-editor.glade:443 src/ui/gui/data-editor.glade:783 +#: src/ui/gui/data-editor.glade:357 src/ui/gui/data-editor.glade:601 msgid "Weight Cases" msgstr "" -#: src/ui/gui/data-editor.glade:455 src/ui/gui/syntax-editor.glade:232 +#: src/ui/gui/data-editor.glade:368 src/ui/gui/syntax-editor.glade:232 msgid "_Windows" msgstr "" -#: src/ui/gui/data-editor.glade:465 src/ui/gui/syntax-editor.glade:242 +#: src/ui/gui/data-editor.glade:376 src/ui/gui/syntax-editor.glade:242 msgid "_Minimise All Windows" msgstr "" -#: src/ui/gui/data-editor.glade:478 src/ui/gui/syntax-editor.glade:254 +#: src/ui/gui/data-editor.glade:388 src/ui/gui/syntax-editor.glade:254 msgid "_Help" msgstr "" -#: src/ui/gui/data-editor.glade:487 src/ui/gui/syntax-editor.glade:263 +#: src/ui/gui/data-editor.glade:395 src/ui/gui/syntax-editor.glade:263 msgid "_Reference Manual" msgstr "" -#: src/ui/gui/data-editor.glade:495 src/ui/gui/syntax-editor.glade:271 +#: src/ui/gui/data-editor.glade:402 src/ui/gui/syntax-editor.glade:271 msgid "_About" msgstr "" -#: src/ui/gui/data-editor.glade:547 +#: src/ui/gui/data-editor.glade:439 msgid "Save" msgstr "" -#: src/ui/gui/data-editor.glade:564 +#: src/ui/gui/data-editor.glade:451 msgid "Print" msgstr "" -#: src/ui/gui/data-editor.glade:593 +#: src/ui/gui/data-editor.glade:471 msgid "Undo" msgstr "" -#: src/ui/gui/data-editor.glade:609 +#: src/ui/gui/data-editor.glade:482 msgid "Redo" msgstr "" -#: src/ui/gui/data-editor.glade:686 +#: src/ui/gui/data-editor.glade:535 msgid "Find" msgstr "" -#: src/ui/gui/data-editor.glade:715 +#: src/ui/gui/data-editor.glade:555 msgid "Insert Case" msgstr "" -#: src/ui/gui/data-editor.glade:851 +#: src/ui/gui/data-editor.glade:646 msgid "Use Sets" msgstr "" -#: src/ui/gui/data-editor.glade:983 +#: src/ui/gui/data-editor.glade:728 msgid "Data View" msgstr "" -#: src/ui/gui/data-editor.glade:1031 +#: src/ui/gui/data-editor.glade:755 msgid "Variable View" msgstr "" -#: src/ui/gui/data-editor.glade:1079 +#: src/ui/gui/data-editor.glade:785 msgid "Information Area" msgstr "" -#: src/ui/gui/data-editor.glade:1126 +#: src/ui/gui/data-editor.glade:804 msgid "Processor Area" msgstr "" -#: src/ui/gui/data-editor.glade:1169 +#: src/ui/gui/data-editor.glade:829 msgid "OMS Area" msgstr "" -#: src/ui/gui/data-editor.glade:1212 +#: src/ui/gui/data-editor.glade:854 msgid "Case Counter Area" msgstr "" -#: src/ui/gui/data-editor.glade:1255 +#: src/ui/gui/data-editor.glade:879 msgid "Filter Use Status Area" msgstr "" -#: src/ui/gui/data-editor.glade:1298 +#: src/ui/gui/data-editor.glade:904 msgid "Weight Status Area" msgstr "" -#: src/ui/gui/data-editor.glade:1341 +#: src/ui/gui/data-editor.glade:930 msgid "Split File Status Area" msgstr "" -#: src/ui/gui/data-editor.glade:1386 +#: src/ui/gui/data-editor.glade:959 msgid "Variable Type" msgstr "" -#: src/ui/gui/data-editor.glade:1438 src/ui/gui/psppire-var-store.c:476 +#: src/ui/gui/data-editor.glade:994 src/ui/gui/psppire-var-store.c:476 msgid "Comma" msgstr "" -#: src/ui/gui/data-editor.glade:1458 src/ui/gui/psppire-var-store.c:477 +#: src/ui/gui/data-editor.glade:1009 src/ui/gui/psppire-var-store.c:477 msgid "Dot" msgstr "" -#: src/ui/gui/data-editor.glade:1478 +#: src/ui/gui/data-editor.glade:1024 msgid "Scientific notation" msgstr "" -#: src/ui/gui/data-editor.glade:1498 src/ui/gui/psppire-var-store.c:479 +#: src/ui/gui/data-editor.glade:1039 src/ui/gui/psppire-var-store.c:479 msgid "Date" msgstr "" -#: src/ui/gui/data-editor.glade:1518 src/ui/gui/psppire-var-store.c:480 +#: src/ui/gui/data-editor.glade:1054 src/ui/gui/psppire-var-store.c:480 msgid "Dollar" msgstr "" -#: src/ui/gui/data-editor.glade:1538 +#: src/ui/gui/data-editor.glade:1069 msgid "Custom currency" msgstr "" -#: src/ui/gui/data-editor.glade:1683 +#: src/ui/gui/data-editor.glade:1161 msgid "positive" msgstr "" -#: src/ui/gui/data-editor.glade:1708 +#: src/ui/gui/data-editor.glade:1167 msgid "negative" msgstr "" -#: src/ui/gui/data-editor.glade:1737 +#: src/ui/gui/data-editor.glade:1180 msgid "Sample" msgstr "" -#: src/ui/gui/data-editor.glade:1815 -msgid "Decimal Places:" -msgstr "" - -#: src/ui/gui/data-editor.glade:1892 +#: src/ui/gui/data-editor.glade:1230 msgid "Width:" msgstr "" -#: src/ui/gui/data-editor.glade:2111 -msgid "Value:" +#: src/ui/gui/data-editor.glade:1274 +msgid "Decimal Places:" msgstr "" -#: src/ui/gui/data-editor.glade:2139 +#: src/ui/gui/data-editor.glade:1441 msgid "Value Label:" msgstr "" -#: src/ui/gui/data-editor.glade:2355 -msgid "Missing Values" -msgstr "" - -#: src/ui/gui/data-editor.glade:2441 -msgid "_No missing values" +#: src/ui/gui/data-editor.glade:1454 +msgid "Value:" msgstr "" -#: src/ui/gui/data-editor.glade:2466 -msgid "_Discrete missing values" +#: src/ui/gui/data-editor.glade:1587 +msgid "Missing Values" msgstr "" -#: src/ui/gui/data-editor.glade:2595 +#: src/ui/gui/data-editor.glade:1605 msgid "_Range plus one optional discrete missing value" msgstr "" -#: src/ui/gui/data-editor.glade:2632 +#: src/ui/gui/data-editor.glade:1629 msgid "_Low:" msgstr "" -#: src/ui/gui/data-editor.glade:2691 +#: src/ui/gui/data-editor.glade:1658 msgid "_High:" msgstr "" -#: src/ui/gui/data-editor.glade:2765 +#: src/ui/gui/data-editor.glade:1699 msgid "Di_screte value:" msgstr "" -#: src/ui/gui/data-editor.glade:2891 +#: src/ui/gui/data-editor.glade:1746 +msgid "_No missing values" +msgstr "" + +#: src/ui/gui/data-editor.glade:1763 +msgid "_Discrete missing values" +msgstr "" + +#: src/ui/gui/data-editor.glade:1908 msgid "Case Number:" msgstr "" -#: src/ui/gui/data-editor.glade:3063 src/ui/gui/sort-cases-dialog.c:279 +#: src/ui/gui/data-editor.glade:2017 +msgid "Sort by:" +msgstr "" + +#: src/ui/gui/data-editor.glade:2066 src/ui/gui/sort-cases-dialog.c:279 msgid "Ascending" msgstr "" -#: src/ui/gui/data-editor.glade:3082 src/ui/gui/sort-cases-dialog.c:281 +#: src/ui/gui/data-editor.glade:2079 src/ui/gui/sort-cases-dialog.c:281 msgid "Descending" msgstr "" -#: src/ui/gui/data-editor.glade:3103 +#: src/ui/gui/data-editor.glade:2095 msgid "Sort Order" msgstr "" -#: src/ui/gui/data-editor.glade:3140 -msgid "Sort by:" -msgstr "" - #: src/ui/gui/helper.c:105 msgid "Sorry. The help system hasn't yet been implemented." msgstr "" @@ -4470,11 +4479,11 @@ msgstr "" msgid "%d" msgstr "" -#: src/ui/gui/psppire.glade:10 -msgid "This is pre-alpha software. It probably will not work." +#: src/ui/gui/psppire.glade:9 +msgid "This is pre-alpha software. Use at your own risk." msgstr "" -#: src/ui/gui/psppire.glade:11 +#: src/ui/gui/psppire.glade:10 msgid "" " This program is free software; you can redistribute it and/or modify\n" " it under the terms of the GNU General Public License as published by\n" @@ -4492,6 +4501,27 @@ msgid "" " 02110-1301, USA.\n" msgstr "" +#: src/ui/gui/psppire.glade:87 src/ui/gui/psppire.glade:170 +#: src/ui/gui/weight-cases-dialog.c:87 +msgid "Do not weight cases" +msgstr "" + +#: src/ui/gui/psppire.glade:96 +msgid "Weight cases by" +msgstr "" + +#: src/ui/gui/psppire.glade:125 +msgid "Frequency Variable" +msgstr "" + +#: src/ui/gui/psppire.glade:163 +msgid "Current Status: " +msgstr "" + +#: src/ui/gui/psppire-var-select.c:260 src/ui/gui/sort-cases-dialog.c:339 +msgid "Var" +msgstr "" + #: src/ui/gui/psppire-var-store.c:471 msgid "None" msgstr "" @@ -4504,28 +4534,24 @@ msgstr "" msgid "Custom" msgstr "" -#: src/ui/gui/sort-cases-dialog.c:339 -msgid "Var" -msgstr "" - #: src/ui/gui/sort-cases-dialog.c:367 msgid "Criteria" msgstr "" -#: src/ui/gui/syntax-editor.c:79 +#: src/ui/gui/syntax-editor.c:80 #, c-format msgid "Save contents of syntax editor to %s?" msgstr "" -#: src/ui/gui/syntax-editor.c:126 +#: src/ui/gui/syntax-editor.c:127 msgid "Save Syntax" msgstr "" -#: src/ui/gui/syntax-editor.c:134 src/ui/gui/syntax-editor.c:532 +#: src/ui/gui/syntax-editor.c:135 src/ui/gui/syntax-editor.c:538 msgid "Syntax Files (*.sps) " msgstr "" -#: src/ui/gui/syntax-editor.c:524 +#: src/ui/gui/syntax-editor.c:530 msgid "Open Syntax" msgstr "" diff --git a/src/data/automake.mk b/src/data/automake.mk index f623b1f7..0b9ab885 100644 --- a/src/data/automake.mk +++ b/src/data/automake.mk @@ -17,6 +17,7 @@ src_data_libdata_a_SOURCES = \ src/data/casefilter.h \ src/data/casefile.h \ src/data/casefile.c \ + src/data/casefile-factory.h \ src/data/casefile-private.h \ src/data/fastfile.c \ src/data/fastfile.h \ diff --git a/src/ui/gui/about.c b/src/ui/gui/about.c index 7ab9a288..34a3ccbe 100644 --- a/src/ui/gui/about.c +++ b/src/ui/gui/about.c @@ -1,3 +1,23 @@ +/* + PSPPIRE --- A Graphical User Interface for PSPP + Copyright (C) 2006, 2007 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. */ + + #include #include @@ -36,8 +56,7 @@ about_new (GtkMenuItem *m, GtkWindow *parent) gtk_window_set_keep_above (GTK_WINDOW (about), TRUE); - - gtk_dialog_run (about); + gtk_dialog_run (GTK_DIALOG (about)); gtk_widget_hide (about); } diff --git a/src/ui/gui/automake.mk b/src/ui/gui/automake.mk index e35af365..11a27925 100644 --- a/src/ui/gui/automake.mk +++ b/src/ui/gui/automake.mk @@ -1,13 +1,25 @@ ## Process this file with automake to produce Makefile.in -*- makefile -*- -bin_PROGRAMS += src/ui/gui/psppire + + +bin_PROGRAMS += src/ui/gui/psppire + src_ui_gui_psppire_CFLAGS = $(GTK_CFLAGS) $(GLADE_CFLAGS) -Wall src_ui_gui_psppire_LDFLAGS = \ - -export-dynamic + -export-dynamic \ + -rpath $(pkglibdir) + +pkglib_LTLIBRARIES = src/ui/gui/libpsppire.la + +src_ui_gui_libpsppire_la_CFLAGS = $(GLADE_CFLAGS) + +src_ui_gui_libpsppire_la_SOURCES = \ + src/ui/gui/glade-register.c src_ui_gui_psppire_LDADD = \ + -dlopen src/ui/gui/libpsppire.la \ lib/gtksheet/libgtksheet.a \ src/language/liblanguage.a \ src/ui/libuicommon.a \ @@ -21,7 +33,7 @@ src_ui_gui_psppire_LDADD = \ src/libpspp/libpspp.a \ $(GTK_LIBS) \ $(GLADE_LIBS) \ - $(top_builddir)/gl/libgl.a \ + gl/libgl.la \ @LIBINTL@ @LIBREADLINE@ src_ui_gui_psppiredir = $(pkgdatadir) @@ -65,10 +77,16 @@ src_ui_gui_psppire_SOURCES = \ src/ui/gui/psppire-data-store.h \ src/ui/gui/psppire-dict.c \ src/ui/gui/psppire-dict.h \ + src/ui/gui/psppire-dialog.c \ + src/ui/gui/psppire-dialog.h \ + src/ui/gui/psppire-buttonbox.c \ + src/ui/gui/psppire-buttonbox.h \ src/ui/gui/psppire-object.c \ src/ui/gui/psppire-object.h \ src/ui/gui/psppire-var-store.c \ src/ui/gui/psppire-var-store.h \ + src/ui/gui/psppire-var-select.h \ + src/ui/gui/psppire-var-select.c \ src/ui/gui/sort-cases-dialog.c \ src/ui/gui/sort-cases-dialog.h \ src/ui/gui/syntax-editor.c \ @@ -81,4 +99,8 @@ src_ui_gui_psppire_SOURCES = \ src/ui/gui/var-sheet.h \ src/ui/gui/var-type-dialog.c \ src/ui/gui/var-type-dialog.h \ - src/ui/gui/window-manager.c + src/ui/gui/weight-cases-dialog.c \ + src/ui/gui/weight-cases-dialog.h \ + src/ui/gui/window-manager.c \ + src/ui/gui/window-manager.h + diff --git a/src/ui/gui/data-editor.c b/src/ui/gui/data-editor.c index 7e320bbd..33d5a3e4 100644 --- a/src/ui/gui/data-editor.c +++ b/src/ui/gui/data-editor.c @@ -1,6 +1,6 @@ /* PSPPIRE --- A Graphical User Interface for PSPP - Copyright (C) 2006 Free Software Foundation + Copyright (C) 2006, 2007 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 @@ -29,6 +29,8 @@ #include "helper.h" #include "about.h" +#include "psppire-dialog.h" +#include "psppire-var-select.h" #define _(msgid) gettext (msgid) #define N_(msgid) msgid @@ -40,6 +42,8 @@ #include "psppire-data-store.h" #include "psppire-var-store.h" +#include "weight-cases-dialog.h" + static void insert_variable (GtkCheckMenuItem *m, gpointer data); @@ -55,6 +59,9 @@ static gboolean click2row (GtkWidget *w, gint row, gpointer data); static void select_sheet (struct data_editor *de, guint page_num); +/* Callback for when the dictionary changes its weights */ +static void on_weight_change (GObject *, gint, gpointer); + static void data_var_select (GtkNotebook *notebook, GtkNotebookPage *page, guint page_num, @@ -100,37 +107,7 @@ disable_edit_clear (GtkWidget *w, gint x, gint y, gpointer data) return FALSE; } - -/* Callback for when the dictionary changes its weights */ -static void -on_weight_change (GObject *o, gint weight_index, gpointer data) -{ - struct data_editor *de = data; - GtkWidget *weight_status_area = - get_widget_assert (de->xml, "weight-status-area"); - - if ( weight_index == -1 ) - { - gtk_label_set_text (GTK_LABEL (weight_status_area), _("Weights off")); - } - else - { - GtkSheet *var_sheet = - GTK_SHEET (get_widget_assert (de->xml, "variable_sheet")); - - PsppireVarStore *vs = PSPPIRE_VAR_STORE - (gtk_sheet_get_model (var_sheet) ); - - struct variable *var = psppire_dict_get_variable (vs->dict, - weight_index); - - gchar *text = g_strdup_printf (_("Weight by %s"), var_get_name (var)); - - gtk_label_set_text (GTK_LABEL (weight_status_area), text); - - g_free (text); - } -} +static void weight_cases_dialog (GObject *o, gpointer data); /* @@ -161,6 +138,16 @@ new_data_editor (void) connect_help (de->xml); + de->invoke_weight_cases_dialog = + gtk_action_new ("weight-cases-dialog", + _("Weights"), + _("Weight cases by variable"), + "pspp-weight-cases"); + + + g_signal_connect (de->invoke_weight_cases_dialog, "activate", + G_CALLBACK (weight_cases_dialog), de); + e->window = GTK_WINDOW (get_widget_assert (de->xml, "data_editor")); g_signal_connect (get_widget_assert (de->xml,"file_new_data"), @@ -195,6 +182,17 @@ new_data_editor (void) G_CALLBACK (insert_variable), de); + gtk_action_connect_proxy (de->invoke_weight_cases_dialog, + get_widget_assert (de->xml, "data_weight-cases") + ); + + /* + g_signal_connect (get_widget_assert (de->xml,"data_weight-cases"), + "activate", + G_CALLBACK (weight_cases_dialog), + de); + */ + g_signal_connect (get_widget_assert (de->xml,"help_about"), "activate", @@ -275,6 +273,10 @@ new_data_editor (void) G_CALLBACK (value_labels_toggled), de); + gtk_action_connect_proxy (de->invoke_weight_cases_dialog, + get_widget_assert (de->xml, "button-weight-cases") + ); + g_signal_connect (get_widget_assert (de->xml, "file_quit"), "activate", G_CALLBACK (file_quit), de); @@ -644,12 +646,9 @@ insert_variable (GtkCheckMenuItem *m, gpointer data) GtkSheet *var_sheet = GTK_SHEET (get_widget_assert (de->xml, "variable_sheet")); - - PsppireVarStore *vs = PSPPIRE_VAR_STORE (gtk_sheet_get_model (var_sheet) ); - switch ( gtk_notebook_get_current_page ( GTK_NOTEBOOK (notebook)) ) { case PAGE_VAR_SHEET: @@ -671,7 +670,85 @@ insert_variable (GtkCheckMenuItem *m, gpointer data) } psppire_dict_insert_variable (vs->dict, posn, NULL); +} + + +/* Callback for when the dictionary changes its weights */ +static void +on_weight_change (GObject *o, gint weight_index, gpointer data) +{ + struct data_editor *de = data; + GtkWidget *weight_status_area = + get_widget_assert (de->xml, "weight-status-area"); + + if ( weight_index == -1 ) + { + gtk_label_set_text (GTK_LABEL (weight_status_area), _("Weights off")); + } + else + { + GtkSheet *var_sheet = + GTK_SHEET (get_widget_assert (de->xml, "variable_sheet")); + + PsppireVarStore *vs = PSPPIRE_VAR_STORE + (gtk_sheet_get_model (var_sheet) ); + + struct variable *var = psppire_dict_get_variable (vs->dict, + weight_index); + gchar *text = g_strdup_printf (_("Weight by %s"), var_get_name (var)); + + gtk_label_set_text (GTK_LABEL (weight_status_area), text); + + g_free (text); + } +} + + +static void +weight_cases_dialog (GObject *o, gpointer data) +{ + gint response; + struct data_editor *de = data; + GtkSheet *var_sheet = + GTK_SHEET (get_widget_assert (de->xml, "variable_sheet")); + + + GladeXML *xml = glade_xml_new (PKGDATADIR "/psppire.glade", + "weight-cases-dialog", NULL); + + + GtkWidget *treeview = get_widget_assert (xml, "treeview"); + GtkWidget *entry = get_widget_assert (xml, "entry1"); + + + PsppireVarStore *vs = PSPPIRE_VAR_STORE (gtk_sheet_get_model (var_sheet)); + + PsppireVarSelect *select = psppire_var_select_new (treeview, + entry, vs->dict); + + + PsppireDialog *dialog = create_weight_dialog (select, xml); + + response = psppire_dialog_run (dialog); + + g_object_unref (xml); + + if (response == GTK_RESPONSE_OK) + { + const GList *list = psppire_var_select_get_variables (select); + + g_assert ( g_list_length (list) <= 1 ); + + if ( list == NULL) + psppire_dict_set_weight_variable (select->dict, NULL); + else + { + struct variable *var = list->data; + + psppire_dict_set_weight_variable (select->dict, var); + } + } } diff --git a/src/ui/gui/data-editor.glade b/src/ui/gui/data-editor.glade index 399e9539..fbf56241 100644 --- a/src/ui/gui/data-editor.glade +++ b/src/ui/gui/data-editor.glade @@ -351,9 +351,9 @@ - + True - False + True Weight Cases True @@ -597,7 +597,7 @@ True - False + True Weight Cases True pspp-weight-cases @@ -1228,9 +1228,9 @@ True Width: - GTK_JUSTIFY_RIGHT - - + GTK_JUSTIFY_RIGHT + + False False GTK_PACK_END @@ -1269,12 +1269,12 @@ - True + True 0 Decimal Places: - GTK_JUSTIFY_RIGHT - - + GTK_JUSTIFY_RIGHT + + 1 2 GTK_FILL @@ -1367,8 +1367,8 @@ 5 - True - True + True + True GTK_POLICY_NEVER GTK_POLICY_AUTOMATIC GTK_SHADOW_ETCHED_IN @@ -1406,13 +1406,13 @@ 85 True True - - + + False False 1 - - + + 1 @@ -1436,17 +1436,17 @@ - True + True 0 Value Label: - - + + 1 2 GTK_FILL - - + + True @@ -1470,9 +1470,9 @@ 5 - True + True False - True + True True gtk-add True @@ -1629,60 +1629,60 @@ _Low: True mv-low - - + + False False 20 - - - + + + 75 - True - True - - + True + True + + False 1 - - - - - + + + + + - True - + True + - True + True _High: - True + True mv-high - - - False - False - - - + + + False + False + + + 75 - True - True - - + True + True + + 5 1 - False + False 20 1 - - - + + + @@ -1692,49 +1692,49 @@ - True - - True + + + True Di_screte value: True mv-discrete - - - False - False + + + False + False 20 - - - + + + - 75 - True - True + 75 + True + True + + + False + 1 + + + + + 1 + + - False - 1 + 1 - 1 - - - - - 1 - - - - 2 1 2 GTK_FILL - - + + True @@ -1751,27 +1751,27 @@ False False - - - + + + - True - + True + - True - True + True + True _Discrete missing values - True - False - True - no_missing - - - False - False - - - + True + False + True + no_missing + + + False + False + + + True @@ -1818,54 +1818,54 @@ 20 + + + + + 1 + + + + + False + False + 1 - - 1 - - - - - False - False - 1 - - - GTK_FILL - - + + - True + True 5 5 GTK_BUTTONBOX_START - + - True + True True True gtk-ok True - - - + + + - True - True + True + True True gtk-cancel True - - - 1 - - + + + 1 + + True diff --git a/src/ui/gui/data-editor.h b/src/ui/gui/data-editor.h index 63b82a4a..67784021 100644 --- a/src/ui/gui/data-editor.h +++ b/src/ui/gui/data-editor.h @@ -1,6 +1,6 @@ /* PSPPIRE --- A Graphical User Interface for PSPP - Copyright (C) 2006 Free Software Foundation + Copyright (C) 2006, 2007 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 @@ -28,6 +28,7 @@ struct data_editor { struct editor_window parent; + GtkAction *invoke_weight_cases_dialog; GladeXML *xml; }; diff --git a/src/ui/gui/glade-register.c b/src/ui/gui/glade-register.c new file mode 100644 index 00000000..b4b3a5b9 --- /dev/null +++ b/src/ui/gui/glade-register.c @@ -0,0 +1,34 @@ +#include +#include "psppire-dialog.h" +#include "psppire-buttonbox.h" + +GLADE_MODULE_CHECK_INIT + +/* Glade registration functions for PSPPIRE custom widgets */ + +static GtkWidget * +dialog_find_internal_child (GladeXML *xml, + GtkWidget *parent, + const gchar *childname) +{ + if (!strcmp(childname, "hbox")) + return PSPPIRE_DIALOG (parent)->box; + + return NULL; +} + +void +glade_module_register_widgets (void) +{ + glade_register_widget (PSPPIRE_DIALOG_TYPE, NULL, + glade_standard_build_children, + dialog_find_internal_child); + + + glade_register_widget (PSPPIRE_BUTTONBOX_TYPE, NULL, + glade_standard_build_children, + NULL); +} + + + diff --git a/src/ui/gui/psppire-buttonbox.c b/src/ui/gui/psppire-buttonbox.c new file mode 100644 index 00000000..bab2b528 --- /dev/null +++ b/src/ui/gui/psppire-buttonbox.c @@ -0,0 +1,139 @@ +/* + PSPPIRE --- A Graphical User Interface for PSPP + Copyright (C) 2007 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. */ + + +#include +#include +#include +#include "psppire-buttonbox.h" +#include "psppire-dialog.h" + +static void psppire_buttonbox_class_init (PsppireButtonBoxClass *); +static void psppire_buttonbox_init (PsppireButtonBox *); + + +GType +psppire_button_box_get_type (void) +{ + static GType buttonbox_type = 0; + + if (!buttonbox_type) + { + static const GTypeInfo buttonbox_info = + { + sizeof (PsppireButtonBoxClass), + NULL, /* base_init */ + NULL, /* base_finalize */ + (GClassInitFunc) psppire_buttonbox_class_init, + NULL, /* class_finalize */ + NULL, /* class_data */ + sizeof (PsppireButtonBox), + 0, + (GInstanceInitFunc) psppire_buttonbox_init, + }; + + buttonbox_type = g_type_register_static (GTK_TYPE_VBUTTON_BOX, + "PsppireButtonBox", &buttonbox_info, 0); + } + + return buttonbox_type; +} + +static GObjectClass *parent_class = NULL; + + +static void +psppire_buttonbox_class_init (PsppireButtonBoxClass *class) +{ +} + +static void +close_dialog (GtkWidget *w, gpointer data) +{ + PsppireDialog *dialog; + + dialog = PSPPIRE_DIALOG (gtk_widget_get_toplevel (w)); + + dialog->response = GTK_RESPONSE_CANCEL; + + psppire_dialog_close (dialog); +} + +static void +ok_button_clicked (GtkWidget *w, gpointer data) +{ + PsppireDialog *dialog; + + dialog = PSPPIRE_DIALOG (gtk_widget_get_toplevel (w)); + + dialog->response = GTK_RESPONSE_OK; + + psppire_dialog_close (dialog); +} + + +static void +refresh_clicked (GtkWidget *w, gpointer data) +{ + PsppireDialog *dialog; + + dialog = PSPPIRE_DIALOG (gtk_widget_get_toplevel (w)); + + psppire_dialog_reload (dialog, data); +} + + +static void +psppire_buttonbox_init (PsppireButtonBox *buttonbox) +{ + GtkWidget *button ; + + button = gtk_button_new_from_stock (GTK_STOCK_OK); + gtk_box_pack_start_defaults (GTK_BOX (buttonbox), button); + g_signal_connect (button, "clicked", G_CALLBACK (ok_button_clicked), NULL); + gtk_widget_show (button); + + button = gtk_button_new_from_stock (GTK_STOCK_CANCEL); + g_signal_connect (button, "clicked", G_CALLBACK (close_dialog), NULL); + gtk_box_pack_start_defaults (GTK_BOX (buttonbox), button); + gtk_widget_show (button); + + button = gtk_button_new_from_stock (GTK_STOCK_REFRESH); + g_signal_connect (button, "clicked", G_CALLBACK (refresh_clicked), NULL); + gtk_box_pack_start_defaults (GTK_BOX (buttonbox), button); + gtk_widget_show (button); + + button = gtk_button_new_from_stock (GTK_STOCK_HELP); + gtk_box_pack_start_defaults (GTK_BOX (buttonbox), button); + gtk_widget_show (button); + + gtk_widget_show (buttonbox); +} + + +GtkWidget* +psppire_buttonbox_new (void) +{ + PsppireButtonBox *buttonbox ; + + buttonbox = g_object_new (psppire_button_box_get_type (), NULL); + + return GTK_WIDGET (buttonbox) ; +} + diff --git a/src/ui/gui/psppire-buttonbox.h b/src/ui/gui/psppire-buttonbox.h new file mode 100644 index 00000000..3e589c85 --- /dev/null +++ b/src/ui/gui/psppire-buttonbox.h @@ -0,0 +1,38 @@ +#ifndef __PSPPIRE_BUTTONBOX_H__ +#define __PSPPIRE_BUTTONBOX_H__ + + +#include +#include +#include + + +G_BEGIN_DECLS + +#define PSPPIRE_BUTTONBOX_TYPE (psppire_button_box_get_type ()) +#define PSPPIRE_BUTTONBOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PSPPIRE_BUTTONBOX_TYPE, PsppireButtonBox)) +#define PSPPIRE_BUTTONBOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PSPPIRE_BUTTONBOX_TYPE, PsppireButtonBoxClass)) +#define PSPPIRE_IS_BUTTONBOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PSPPIRE_BUTTONBOX_TYPE)) +#define PSPPIRE_IS_BUTTONBOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PSPPIRE_BUTTONBOX_TYPE)) + + +typedef struct _PsppireButtonBox PsppireButtonBox; +typedef struct _PsppireButtonBoxClass PsppireButtonBoxClass; + +struct _PsppireButtonBox +{ + GtkVButtonBox parent; +}; + +struct _PsppireButtonBoxClass +{ + GtkVButtonBoxClass parent_class; +}; + +GType psppire_button_box_get_type (void); +GtkWidget* psppire_buttonbox_new (void); + +G_END_DECLS + +#endif /* __PSPPIRE_BUTTONBOX_H__ */ + diff --git a/src/ui/gui/psppire-dialog.c b/src/ui/gui/psppire-dialog.c new file mode 100644 index 00000000..8bb78358 --- /dev/null +++ b/src/ui/gui/psppire-dialog.c @@ -0,0 +1,171 @@ +/* + PSPPIRE --- A Graphical User Interface for PSPP + Copyright (C) 2007 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. */ + + +#include +#include +#include "psppire-dialog.h" + +static void psppire_dialog_class_init (PsppireDialogClass *); +static void psppire_dialog_init (PsppireDialog *); + + +enum {DIALOG_REFRESH, + n_SIGNALS}; + +static guint signal [n_SIGNALS]; + + +GType +psppire_dialog_get_type (void) +{ + static GType dialog_type = 0; + + if (!dialog_type) + { + static const GTypeInfo dialog_info = + { + sizeof (PsppireDialogClass), + NULL, /* base_init */ + NULL, /* base_finalize */ + (GClassInitFunc) psppire_dialog_class_init, + NULL, /* class_finalize */ + NULL, /* class_data */ + sizeof (PsppireDialog), + 0, + (GInstanceInitFunc) psppire_dialog_init, + }; + + dialog_type = g_type_register_static (GTK_TYPE_WINDOW, + "PsppireDialog", &dialog_info, 0); + } + + return dialog_type; +} + + + +static GObjectClass *parent_class = NULL; + + +static void +psppire_dialog_finalize (GObject *object) +{ + PsppireDialog *dialog ; + + g_return_if_fail (object != NULL); + g_return_if_fail (PSPPIRE_IS_DIALOG (object)); + + dialog = PSPPIRE_DIALOG (object); + + if (G_OBJECT_CLASS (parent_class)->finalize) + G_OBJECT_CLASS (parent_class)->finalize (object); +} + + +static void +psppire_dialog_class_init (PsppireDialogClass *class) +{ + GObjectClass *object_class = (GObjectClass *) class; + + signal [DIALOG_REFRESH] = + g_signal_new ("refresh", + G_TYPE_FROM_CLASS (class), + G_SIGNAL_RUN_FIRST, + 0, + NULL, NULL, + g_cclosure_marshal_VOID__VOID, + G_TYPE_NONE, + 0); + + + object_class->finalize = psppire_dialog_finalize; +} + + + + +static void +close_dialog (GtkWidget *w, gpointer data) +{ + PsppireDialog *dialog = data; + + psppire_dialog_close (dialog); +} + +void +psppire_dialog_close (PsppireDialog *dialog) +{ + g_main_loop_quit (dialog->loop); + gtk_widget_hide (GTK_WIDGET (dialog)); +} + + +static void +delete_event_callback (GtkWidget *w, GdkEvent *e, gpointer data) +{ + close_dialog (w, data); +} + + +static void +psppire_dialog_init (PsppireDialog *dialog) +{ + dialog->box = gtk_hbox_new (FALSE, 5); + + + gtk_container_add (GTK_CONTAINER (dialog), dialog->box); + + + g_signal_connect (G_OBJECT (dialog), "delete-event", + G_CALLBACK (delete_event_callback), + dialog); + + gtk_widget_show_all (dialog->box); +} + + +GtkWidget* +psppire_dialog_new (void) +{ + PsppireDialog *dialog ; + + dialog = g_object_new (psppire_dialog_get_type (), NULL); + + return GTK_WIDGET (dialog) ; +} + +gint +psppire_dialog_run (PsppireDialog *dialog) +{ + dialog->loop = g_main_loop_new (NULL, FALSE); + + gtk_widget_show (GTK_WIDGET (dialog)); + + g_main_loop_run (dialog->loop); + + return dialog->response; +} + + +void +psppire_dialog_reload (PsppireDialog *dialog, gpointer data) +{ + g_signal_emit (dialog, signal [DIALOG_REFRESH], 0, data); +} diff --git a/src/ui/gui/psppire-dialog.h b/src/ui/gui/psppire-dialog.h new file mode 100644 index 00000000..94c6c3db --- /dev/null +++ b/src/ui/gui/psppire-dialog.h @@ -0,0 +1,47 @@ +#ifndef __PSPPIRE_DIALOG_H__ +#define __PSPPIRE_DIALOG_H__ + + +#include +#include +#include + + +G_BEGIN_DECLS + +#define PSPPIRE_DIALOG_TYPE (psppire_dialog_get_type ()) +#define PSPPIRE_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PSPPIRE_DIALOG_TYPE, PsppireDialog)) +#define PSPPIRE_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PSPPIRE_DIALOG_TYPE, PsppireDialogClass)) +#define PSPPIRE_IS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PSPPIRE_DIALOG_TYPE)) +#define PSPPIRE_IS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PSPPIRE_DIALOG_TYPE)) + + +typedef struct _PsppireDialog PsppireDialog; +typedef struct _PsppireDialogClass PsppireDialogClass; + +struct _PsppireDialog +{ + GtkWindow window; + GtkWidget *box; + + /* Private */ + GMainLoop *loop; + gint response; +}; + +struct _PsppireDialogClass +{ + GtkWindowClass parent_class; +}; + +GType psppire_dialog_get_type (void); +GtkWidget* psppire_dialog_new (void); +void psppire_dialog_close (PsppireDialog *); +void psppire_dialog_reload (PsppireDialog *, gpointer data); +gint psppire_dialog_run (PsppireDialog *); + + +G_END_DECLS + +#endif /* __PSPPIRE_DIALOG_H__ */ + diff --git a/src/ui/gui/psppire-dict.c b/src/ui/gui/psppire-dict.c index 6391222c..4fc9c372 100644 --- a/src/ui/gui/psppire-dict.c +++ b/src/ui/gui/psppire-dict.c @@ -331,7 +331,7 @@ psppire_dict_set_name (PsppireDict* d, gint idx, const gchar *name) /* Return the IDXth variable */ struct variable * -psppire_dict_get_variable (PsppireDict *d, gint idx) +psppire_dict_get_variable (const PsppireDict *d, gint idx) { g_return_val_if_fail (d, NULL); g_return_val_if_fail (d->dict, NULL); @@ -645,3 +645,18 @@ psppire_dict_rename_var (PsppireDict *dict, struct variable *v, { dict_rename_var (dict->dict, v, text); } + + +void +psppire_dict_set_weight_variable (PsppireDict *dict, struct variable *v) +{ + g_return_if_fail (v == NULL || var_is_numeric (v)); + dict_set_weight (dict->dict, v); +} + + +struct variable * +psppire_dict_get_weight_variable (const PsppireDict *dict) +{ + return dict_get_weight (dict->dict); +} diff --git a/src/ui/gui/psppire-dict.h b/src/ui/gui/psppire-dict.h index b6b1bc88..bcf31da3 100644 --- a/src/ui/gui/psppire-dict.h +++ b/src/ui/gui/psppire-dict.h @@ -82,7 +82,7 @@ struct variable * psppire_dict_lookup_var (const PsppireDict *d, const gchar *na void psppire_dict_clear (PsppireDict *d); /* Return the IDXth variable */ -struct variable * psppire_dict_get_variable (PsppireDict *d, gint idx); +struct variable * psppire_dict_get_variable (const PsppireDict *d, gint idx); /* Delete N variables beginning at FIRST */ void psppire_dict_delete_variables (PsppireDict *d, gint first, gint n); @@ -104,6 +104,9 @@ void psppire_dict_rename_var (PsppireDict *dict, struct variable *v, void psppire_dict_replace_dictionary (PsppireDict *, struct dictionary *); +void psppire_dict_set_weight_variable (PsppireDict *, struct variable *); +struct variable * psppire_dict_get_weight_variable (const PsppireDict *); + G_END_DECLS diff --git a/src/ui/gui/psppire-var-select.c b/src/ui/gui/psppire-var-select.c new file mode 100644 index 00000000..64edfc6f --- /dev/null +++ b/src/ui/gui/psppire-var-select.c @@ -0,0 +1,289 @@ +/* + PSPPIRE --- A Graphical User Interface for PSPP + Copyright (C) 2007 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. */ + +#include + +#include "psppire-var-select.h" +#include "psppire-object.h" + +#include "psppire-dict.h" + +#include + +#define _(msgid) gettext (msgid) +#define N_(msgid) msgid + + +/* This object is an attempt to abstract a situation commonly found in PSPP + dialogs, where two widgets (typically GtkTreeViews) contain a list + of variables, and the variables may be selected by the user and + transfered to between the widgets, in preparation for some + operation. + + Currently it assumes that the first widget is GtkTreeView and the + second is a GtkEntry (as required for the Weight Cases dialog). + It needs to be generalized further to make it useful. +*/ + +static void setup_dictionary_treeview (GtkTreeView *, + const PsppireDict *, + GtkSelectionMode); + + +/* --- prototypes --- */ +static void psppire_var_select_class_init (PsppireVarSelectClass *); +static void psppire_var_select_init (PsppireVarSelect *); +static void psppire_var_select_finalize (GObject *); + + +enum {VARIABLE_SELECTED, + DESELECT_ALL, + n_SIGNALS}; + +static guint signal[n_SIGNALS]; + + +/* --- variables --- */ +static GObjectClass *parent_class = NULL; + +/* --- functions --- */ +/** + * psppire_var_select_get_type: + * @returns: the type ID for accelerator groups. + */ +GType +psppire_var_select_get_type (void) +{ + static GType object_type = 0; + + if (!object_type) + { + static const GTypeInfo object_info = { + sizeof (PsppireVarSelectClass), + (GBaseInitFunc) NULL, + (GBaseFinalizeFunc) NULL, + (GClassInitFunc) psppire_var_select_class_init, + NULL, /* class_finalize */ + NULL, /* class_data */ + sizeof (PsppireVarSelect), + 0, /* n_preallocs */ + (GInstanceInitFunc) psppire_var_select_init, + }; + + object_type = g_type_register_static (G_TYPE_PSPPIRE_OBJECT, + "PsppireVarSelect", + &object_info, 0); + } + + return object_type; +} + + +static void +psppire_var_select_class_init (PsppireVarSelectClass *class) +{ + GObjectClass *object_class = G_OBJECT_CLASS (class); + + parent_class = g_type_class_peek_parent (class); + + + signal [VARIABLE_SELECTED] = + g_signal_new ("variable_selected", + G_TYPE_FROM_CLASS (class), + G_SIGNAL_RUN_FIRST, + 0, + NULL, NULL, + g_cclosure_marshal_VOID__INT, + G_TYPE_NONE, + 1, + G_TYPE_INT); + + + signal [DESELECT_ALL] = + g_signal_new ("deselect_all", + G_TYPE_FROM_CLASS (class), + G_SIGNAL_RUN_FIRST, + 0, + NULL, NULL, + g_cclosure_marshal_VOID__VOID, + G_TYPE_NONE, + 0); + + object_class->finalize = psppire_var_select_finalize; +} + +static void +psppire_var_select_finalize (GObject *object) +{ + PsppireVarSelect *vs = PSPPIRE_VAR_SELECT (object); + + g_list_free (vs->list); + + G_OBJECT_CLASS (parent_class)->finalize (object); +} + +static void +psppire_var_select_init (PsppireVarSelect *vs) +{ + vs->list = NULL; + vs->mode = GTK_SELECTION_SINGLE; +} + +/* Return list of all the currently selected variables */ +const GList * +psppire_var_select_get_variables (PsppireVarSelect *vs) +{ + return vs->list; +} + + +static void +add_variable_to_selection (PsppireVarSelect *vs, struct variable *var) +{ + gtk_entry_set_text (GTK_ENTRY (vs->dest), var_get_name (var) ); + + if ( vs->mode == GTK_SELECTION_SINGLE) + { + g_list_free (vs->list); + vs->list = NULL; + } + vs->list = g_list_append (vs->list, var); + + g_signal_emit (vs, signal [VARIABLE_SELECTED], 0, var_get_dict_index (var)); +} + + +/* Add VAR to the list of selected variables */ +void +psppire_var_select_set_variable (PsppireVarSelect *vs, + struct variable *var) +{ + add_variable_to_selection (vs, var); +} + + +static void +on_source_activate (GtkTreeView *tree_view, + GtkTreePath *path, + GtkTreeViewColumn *column, + gpointer user_data) + +{ + PsppireVarSelect *vs = user_data; + GtkTreeModel *model = gtk_tree_view_get_model (tree_view); + + GtkTreeSelection *selection = gtk_tree_view_get_selection (tree_view); + + GList *list = gtk_tree_selection_get_selected_rows (selection, &model); + + while (list) + { + struct variable *var; + GtkTreeIter iter; + GtkTreePath *path = list->data; + + gtk_tree_model_get_iter (model, &iter, path); + + gtk_tree_model_get (model, &iter, DICT_TVM_COL_VAR, &var, -1); + + add_variable_to_selection (vs, var); + + list = list->next; + } +} + + +/** + * psppire_var_select_new: + * @returns: a new #PsppireVarSelect object + * + * Creates a new #PsppireVarSelect. + */ +PsppireVarSelect* +psppire_var_select_new (GtkWidget *source, GtkWidget *dest, + const PsppireDict *dict) +{ + PsppireVarSelect *vs + = g_object_new (G_TYPE_PSPPIRE_VAR_SELECT, NULL); + + GtkTreeSelection *src_selection; + + vs->source = source; + vs->dest = dest; + vs->dict = dict; + + + setup_dictionary_treeview ( GTK_TREE_VIEW (source), + vs->dict, vs->mode); + + + src_selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (vs->source)); + + g_signal_connect (source, "row-activated", + G_CALLBACK (on_source_activate), vs); + + return vs; +} + +void +psppire_var_select_deselect_all (PsppireVarSelect *vs) +{ + g_list_free (vs->list); + vs->list = NULL; + + gtk_entry_set_text ( GTK_ENTRY(vs->dest), ""); + + g_signal_emit (vs, signal [DESELECT_ALL], 0); +} + + +static void +setup_dictionary_treeview (GtkTreeView *treeview, const PsppireDict *dict, + GtkSelectionMode mode) +{ + /* Set up the dictionary treeview */ + GtkTreeViewColumn *col; + + GtkTreeSelection *selection = + gtk_tree_view_get_selection (treeview); + + GtkCellRenderer *renderer = gtk_cell_renderer_text_new (); + + + gtk_tree_view_set_model (GTK_TREE_VIEW (treeview), GTK_TREE_MODEL (dict)); + + 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 (treeview, col); + + gtk_tree_selection_set_mode (selection, mode); +} + + + + diff --git a/src/ui/gui/psppire-var-select.h b/src/ui/gui/psppire-var-select.h new file mode 100644 index 00000000..b169b52b --- /dev/null +++ b/src/ui/gui/psppire-var-select.h @@ -0,0 +1,87 @@ +/* + PSPPIRE --- A Graphical User Interface for PSPP + Copyright (C) 2007 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. */ + + +#ifndef __PSPPIRE_VAR_SELECT_H__ +#define __PSPPIRE_VAR_SELECT_H__ + + +#include +#include + +#include +#include "psppire-dict.h" + +G_BEGIN_DECLS + + +/* --- type macros --- */ +#define G_TYPE_PSPPIRE_VAR_SELECT (psppire_var_select_get_type ()) +#define PSPPIRE_VAR_SELECT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), G_TYPE_PSPPIRE_VAR_SELECT, PsppireVarSelect)) +#define PSPPIRE_VAR_SELECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G_TYPE_PSPPIRE_VAR_SELECT, PsppireVarSelectClass)) +#define G_IS_PSPPIRE_VAR_SELECT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), G_TYPE_PSPPIRE_VAR_SELECT)) +#define G_IS_PSPPIRE_VAR_SELECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), G_TYPE_PSPPIRE_VAR_SELECT)) +#define PSPPIRE_VAR_SELECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), G_TYPE_PSPPIRE_VAR_SELECT, PsppireVarSelectClass)) + + + +/* --- typedefs & structures --- */ +typedef struct _PsppireVarSelect PsppireVarSelect; +typedef struct _PsppireVarSelectClass PsppireVarSelectClass; + +struct _PsppireVarSelect +{ + GObject parent; + const PsppireDict *dict; + + + /* */ + GtkSelectionMode mode; + GtkWidget *source; + GtkWidget *dest; + GList *list; +}; + +struct _PsppireVarSelectClass +{ + GObjectClass parent_class; +}; + + +/* -- PsppireVarSelect --- */ +GType psppire_var_select_get_type (void); + + +PsppireVarSelect* psppire_var_select_new (GtkWidget *, + GtkWidget *, + const PsppireDict *); + +/* Remove all variables from the selection */ +void psppire_var_select_deselect_all (PsppireVarSelect *); + +/* Return a list of all the currently selected variables */ +const GList *psppire_var_select_get_variables (PsppireVarSelect *); + +/* Append VAR to the list of selected variables */ +void psppire_var_select_set_variable (PsppireVarSelect *, + struct variable *var); + +G_END_DECLS + +#endif /* __PSPPIRE_VAR_SELECT_H__ */ diff --git a/src/ui/gui/psppire.glade b/src/ui/gui/psppire.glade index a8bee600..80a4dfc2 100644 --- a/src/ui/gui/psppire.glade +++ b/src/ui/gui/psppire.glade @@ -1,14 +1,13 @@ - - - + + + - - - False - PSPPire - Free Software Foundation - This is pre-alpha software. Use at your own risk. - This program is free software; you can redistribute it and/or modify + + + PSPPire + Free Software Foundation + This is pre-alpha software. Use at your own risk. + 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. @@ -23,10 +22,204 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - False - Patrick Brunier - - pspplogo.png - - + Patrick Brunier + pspplogo.png + + + True + + + + + + True + + + False + GTK_PACK_END + + + + + + + 5 + Weight Case + 363 + 188 + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK + 2 + + + True + + + True + GTK_POLICY_NEVER + GTK_POLICY_AUTOMATIC + GTK_SHADOW_ETCHED_IN + + + True + False + True + False + + + + + + + True + + + True + 5 + 0 + + + True + 5 + + + True + Do not weight cases + False + True + True + + + + + True + Weight cases by + False + True + radiobutton1 + + + 1 + + + + + True + + + True + + + True + 0 + GTK_SHADOW_NONE + + + 40 + 40 + True + + + True + + + + + + + + + False + False + + + + + True + + + True + Frequency Variable + + + + + True + + + 1 + + + + + 1 + + + + + False + False + 2 + + + + + + + + label_item + + + + + + + True + + + True + 1 + Current Status: + + + + + True + 0 + Do not weight cases + + + 1 + + + + + 1 + + + + + False + False + 1 + + + + + + + 5 + + + False + False + GTK_PACK_END + 1 + + + + + diff --git a/src/ui/gui/weight-cases-dialog.c b/src/ui/gui/weight-cases-dialog.c new file mode 100644 index 00000000..50294de7 --- /dev/null +++ b/src/ui/gui/weight-cases-dialog.c @@ -0,0 +1,127 @@ +/* + PSPPIRE --- A Graphical User Interface for PSPP + Copyright (C) 2007 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. */ + + +#include + +#include "psppire-var-select.h" +#include +#include "helper.h" +#include + +#include "psppire-var-store.h" +#include "weight-cases-dialog.h" + +#include "psppire-dialog.h" + +#define _(msgid) gettext (msgid) +#define N_(msgid) msgid + +static void +refresh_var_select (PsppireVarSelect *vs) +{ + struct variable *weight; + + psppire_var_select_deselect_all (vs); + + weight = psppire_dict_get_weight_variable (vs->dict); + + if ( weight ) + psppire_var_select_set_variable (vs, weight); +} + + +static void +on_refresh (GtkWidget *dialog, gpointer data) +{ + refresh_var_select (data); +} + + +static void +on_radiobutton_toggle (GtkToggleButton *button, gpointer data) +{ + PsppireVarSelect *vs = data; + if ( gtk_toggle_button_get_active (button) ) + { + psppire_var_select_deselect_all (vs); + } +} + + +/* Callback for when new variable is selected. + IDX is the dict index of the variable selected. + Updates the label and toggle buttons in the dialog box + to reflect this new selection. */ +static void +select_var_callback (PsppireVarSelect *vs, gint idx, gpointer data) +{ + GladeXML * xml = data; + + GtkWidget *label = get_widget_assert (xml, "weight-status-label"); + + GtkWidget *radiobutton2 = get_widget_assert (xml, "radiobutton2"); + + struct variable *var = psppire_dict_get_variable (vs->dict, idx); + + gtk_label_set_text (GTK_LABEL (label), var_get_name(var)); + + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radiobutton2), TRUE); +} + + + +static void +deselect_all (PsppireVarSelect *vs, gpointer data) +{ + GladeXML * xml = data; + + GtkWidget *label = get_widget_assert (xml, "weight-status-label"); + + GtkWidget *radiobutton1 = get_widget_assert (xml, "radiobutton1"); + + gtk_label_set_text (GTK_LABEL (label), _("Do not weight cases")); + + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radiobutton1), TRUE); +} + + + +PsppireDialog * +create_weight_dialog (PsppireVarSelect *select, GladeXML *xml) +{ + GtkWidget *dialog = get_widget_assert (xml, "weight-cases-dialog"); + GtkWidget *radiobutton1 = get_widget_assert (xml, "radiobutton1"); + + g_signal_connect (dialog, "refresh", G_CALLBACK (on_refresh), select); + + g_signal_connect (select, "variable-selected", + G_CALLBACK (select_var_callback), xml); + + g_signal_connect (select, "deselect-all", + G_CALLBACK (deselect_all), xml); + + g_signal_connect (radiobutton1, "toggled", + G_CALLBACK (on_radiobutton_toggle), + select); + + refresh_var_select (select); + + return PSPPIRE_DIALOG (dialog); +} diff --git a/src/ui/gui/weight-cases-dialog.h b/src/ui/gui/weight-cases-dialog.h new file mode 100644 index 00000000..b193fef4 --- /dev/null +++ b/src/ui/gui/weight-cases-dialog.h @@ -0,0 +1,28 @@ +/* + PSPPIRE --- A Graphical User Interface for PSPP + Copyright (C) 2007 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. */ + + +#ifndef WEIGHT_CASES_DIALOG_H +#define WEIGHT_CASES_DIALOG_H + +#include "psppire-dialog.h" + +PsppireDialog * create_weight_dialog (PsppireVarSelect *, GladeXML *); + +#endif diff --git a/src/ui/gui/window-manager.c b/src/ui/gui/window-manager.c index d7c543a4..51fc95a9 100644 --- a/src/ui/gui/window-manager.c +++ b/src/ui/gui/window-manager.c @@ -1,3 +1,23 @@ +/* + PSPPIRE --- A Graphical User Interface for PSPP + Copyright (C) 2006, 2007 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. */ + + #include #include "syntax-editor.h" #include "data-editor.h" diff --git a/src/ui/terminal/.cvsignore b/src/ui/terminal/.cvsignore index 0b08a275..278245a1 100644 --- a/src/ui/terminal/.cvsignore +++ b/src/ui/terminal/.cvsignore @@ -1 +1,2 @@ pspp +.libs diff --git a/src/ui/terminal/automake.mk b/src/ui/terminal/automake.mk index ef56b7e9..cfc06bf1 100644 --- a/src/ui/terminal/automake.mk +++ b/src/ui/terminal/automake.mk @@ -14,6 +14,7 @@ src_ui_terminal_libui_a_SOURCES = \ bin_PROGRAMS += src/ui/terminal/pspp + src_ui_terminal_pspp_SOURCES = src_ui_terminal_pspp_LDADD = \ @@ -28,7 +29,7 @@ src_ui_terminal_pspp_LDADD = \ lib/gsl-extras/libgsl-extras.a \ src/data/libdata.a \ src/libpspp/libpspp.a \ - gl/libgl.a \ $(LIBICONV) \ + gl/libgl.la \ @LIBINTL@ @LIBREADLINE@ diff --git a/tests/formats/.cvsignore b/tests/formats/.cvsignore index 4f910ea9..2fc41cd9 100644 --- a/tests/formats/.cvsignore +++ b/tests/formats/.cvsignore @@ -1 +1,2 @@ inexactify +.libs diff --git a/tests/libpspp/.cvsignore b/tests/libpspp/.cvsignore index 6bdc8ab6..d19e4225 100644 --- a/tests/libpspp/.cvsignore +++ b/tests/libpspp/.cvsignore @@ -1,2 +1,3 @@ ll-test llx-test +.libs -- 2.30.2