Added psppire-dialog and psppire-buttonbox widgets.
authorJohn Darrington <john@darrington.wattle.id.au>
Thu, 4 Jan 2007 08:15:26 +0000 (08:15 +0000)
committerJohn Darrington <john@darrington.wattle.id.au>
Thu, 4 Jan 2007 08:15:26 +0000 (08:15 +0000)
Added framework for variable selection using treeview widgets.
Added weight cases dialog box.

32 files changed:
Makefile.am
Smake
configure.ac
glade/automake.mk [new file with mode: 0644]
glade/bbox.c [new file with mode: 0644]
glade/dialog.c [new file with mode: 0644]
glade/psppire.xml [new file with mode: 0644]
po/de.po
po/pspp.pot
src/data/automake.mk
src/ui/gui/about.c
src/ui/gui/automake.mk
src/ui/gui/data-editor.c
src/ui/gui/data-editor.glade
src/ui/gui/data-editor.h
src/ui/gui/glade-register.c [new file with mode: 0644]
src/ui/gui/psppire-buttonbox.c [new file with mode: 0644]
src/ui/gui/psppire-buttonbox.h [new file with mode: 0644]
src/ui/gui/psppire-dialog.c [new file with mode: 0644]
src/ui/gui/psppire-dialog.h [new file with mode: 0644]
src/ui/gui/psppire-dict.c
src/ui/gui/psppire-dict.h
src/ui/gui/psppire-var-select.c [new file with mode: 0644]
src/ui/gui/psppire-var-select.h [new file with mode: 0644]
src/ui/gui/psppire.glade
src/ui/gui/weight-cases-dialog.c [new file with mode: 0644]
src/ui/gui/weight-cases-dialog.h [new file with mode: 0644]
src/ui/gui/window-manager.c
src/ui/terminal/.cvsignore
src/ui/terminal/automake.mk
tests/formats/.cvsignore
tests/libpspp/.cvsignore

index dd3b1cb80e2273004b1268a5686da6ed31719e8e..ad84db7deda6b2ea93c89adfdaa0a295495292f0 100644 (file)
@@ -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 d92510bd567e5485d860ffb7d42e6cf8cfbfbb2b..35dd3285f17fea957427c41381d44fb43c9d4bd8 100644 (file)
--- 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
index 38eee6915410f2bfdaeae1a3a41bf2665ee72bd2..9faf2983d4ea454807b538e0f1994bf0137f04b7 100644 (file)
@@ -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 (file)
index 0000000..144cb6d
--- /dev/null
@@ -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 (file)
index 0000000..9ce8c34
--- /dev/null
@@ -0,0 +1,76 @@
+#include <glade.h>
+#include <gtk/gtk.h>
+
+#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 (file)
index 0000000..ab38c70
--- /dev/null
@@ -0,0 +1,106 @@
+#include <glib.h>
+#include <gtk/gtk.h>
+
+#include "psppire-dialog.h"
+
+#include <glade-gtk.h>
+
+
+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 (file)
index 0000000..10960e5
--- /dev/null
@@ -0,0 +1,54 @@
+<glade-catalog name="psppire" library="glade-psppire">
+
+  <init-function>my_catalog_init</init-function>
+
+  <glade-widget-classes>
+
+    <glade-widget-class toplevel="True" name="PsppireDialog" generic-name="psppire-dialog" title="Psppire Dialog Box">
+      <post-create-function>glade_psppire_dialog_post_create</post-create-function>
+      <get-internal-child-function>glade_psppire_dialog_get_internal_child</get-internal-child-function>
+
+      <get-children-function>glade_psppire_dialog_get_children</get-children-function>
+
+
+      <set-property-function>glade_psppire_dialog_set_property</set-property-function>
+
+      <properties>
+       <property optional-default="False" optional="True" id="default-width" 
+       default="0"/>
+       <property optional-default="False" optional="True" id="default-height" 
+       default="0"/>
+       <property id="has-separator" default="False"/>
+      </properties>
+
+    </glade-widget-class>
+
+
+    <glade-widget-class name="PsppireButtonBox" generic-name="psppire-buttonbox" title="Psppire Button Box">
+
+          <post-create-function>glade_psppire_button_box_post_create</post-create-function>
+          <get-children-function>glade_psppire_button_box_get_children</get-children-function>
+
+      <get-internal-child-function>glade_psppire_button_box_get_internal_child</get-internal-child-function>
+
+      <set-property-function>glade_psppire_button_box_set_property</set-property-function>
+
+
+          <packing-defaults>
+           <parent-class name="GtkHBox">
+             <child-property id="expand" default="False"/>
+             <child-property id="fill" default="False"/>
+             <child-property id="pack-type" default="GTK_PACK_END"/>
+           </parent-class>
+          </packing-defaults>
+    </glade-widget-class>
+
+  </glade-widget-classes>
+
+  <glade-widget-group name="psppire-widgets" title="PSPPIRE Specific Widgets">
+    <glade-widget-class-ref name="PsppireDialog"/>
+    <glade-widget-class-ref name="PsppireButtonBox"/>
+  </glade-widget-group>
+
+</glade-catalog>
+
index 63f204a9f5e1d6e753f9a73c4e64181e35e574fd..7cb2f7e14f1194f7f506f781c65dea044782c266 100644 (file)
--- 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 <john@darrington.wattle.id.au>\n"
 "Language-Team: German <pspp-dev@gnu.org>\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 ""
 
index b3ef4a6d48fe0a8d7335db97ab4239d169e1cb83..b8febd4b1655e289e780c0e00720599d25bc3b38 100644 (file)
@@ -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 <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\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 ""
 
index f623b1f70772e2d016a4e7409089302f98038f55..0b9ab88544d8eced4dc0e28a5ab1c03d6b362746 100644 (file)
@@ -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 \
index 7ab9a288398d7d3dfce74f6325ef7eb1cb8b2f0b..34a3ccbe0b52eb815eed98a4297a23c8ae6554a6 100644 (file)
@@ -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 <gtk/gtk.h>
 #include <glade/glade.h>
 
@@ -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);
 }
index e35af3654994e4f81bdfd05dac6de87a9972b13f..11a27925ddba9c5a7663ac36d1f448f4acd87144 100644 (file)
@@ -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
+
index 7e320bbdfd1603826225a7a972f576510b737384..33d5a3e4c883840f6989c3a9e2fb981eb555e809 100644 (file)
@@ -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);
+       }
+    }
 }
 
 
index 399e9539323d9a6c1e2536960fa470a95244cb89..fbf56241ecec33d84edd41b448ad6d0f8ec5a068 100644 (file)
                       </widget>
                     </child>
                     <child>
-                      <widget class="GtkMenuItem" id="weight_cases1">
+                      <widget class="GtkMenuItem" id="data_weight-cases">
                         <property name="visible">True</property>
-                        <property name="sensitive">False</property>
+                        <property name="sensitive">True</property>
                         <property name="label" translatable="yes">Weight Cases</property>
                         <property name="use_underline">True</property>
                       </widget>
                 <child>
                   <widget class="GtkToolButton" id="button-weight-cases">
                     <property name="visible">True</property>
-                    <property name="sensitive">False</property>
+                    <property name="sensitive">True</property>
                     <property name="tooltip" translatable="yes">Weight Cases</property>
                     <property name="use_underline">True</property>
                     <property name="stock_id">pspp-weight-cases</property>
                       <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="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>
                 </child>
                 <child>
                   <widget class="GtkLabel" id="decimals_label">
-                    <property name="visible">True</property>
+                        <property name="visible">True</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="justify">GTK_JUSTIFY_RIGHT</property>
+                      </widget>
+                      <packing>
                     <property name="top_attach">1</property>
                     <property name="bottom_attach">2</property>
                     <property name="x_options">GTK_FILL</property>
                     <property name="row_spacing">5</property>
                     <child>
                       <widget class="GtkScrolledWindow" id="scrolledwindow3">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
+                            <property name="visible">True</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="width_request">85</property>
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
-                              </widget>
-                              <packing>
+                          </widget>
+                          <packing>
                                 <property name="expand">False</property>
                                 <property name="fill">False</property>
                                 <property name="padding">1</property>
-                              </packing>
-                            </child>
+                          </packing>
+                        </child>
                           </widget>
                           <packing>
                             <property name="left_attach">1</property>
                         </child>
                         <child>
                           <widget class="GtkLabel" id="label6">
-                            <property name="visible">True</property>
+                                <property name="visible">True</property>
                             <property name="xalign">0</property>
                             <property name="label" translatable="yes">Value Label:</property>
-                          </widget>
-                          <packing>
+                              </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"></property>
-                          </packing>
-                        </child>
+                              </packing>
+                            </child>
                         <child>
                           <widget class="GtkLabel" id="label5">
                             <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="visible">True</property>
                             <property name="sensitive">False</property>
-                            <property name="can_focus">True</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>
                             <property name="label" translatable="yes">_Low:</property>
                             <property name="use_underline">True</property>
                             <property name="mnemonic_widget">mv-low</property>
-                          </widget>
-                          <packing>
+              </widget>
+              <packing>
                             <property name="expand">False</property>
                             <property name="fill">False</property>
                             <property name="padding">20</property>
-                          </packing>
-                        </child>
-                        <child>
+              </packing>
+            </child>
+            <child>
                           <widget class="GtkEntry" id="mv-low">
                             <property name="width_request">75</property>
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                          </widget>
-                          <packing>
+                <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>
-                      </widget>
-                    </child>
-                    <child>
+              </packing>
+            </child>
+          </widget>
+        </child>
+        <child>
                       <widget class="GtkHBox" id="hbox9">
-                        <property name="visible">True</property>
-                        <child>
+            <property name="visible">True</property>
+            <child>
                           <widget class="GtkLabel" id="label12">
-                            <property name="visible">True</property>
+                <property name="visible">True</property>
                             <property name="label" translatable="yes">_High:</property>
-                            <property name="use_underline">True</property>
+                <property name="use_underline">True</property>
                             <property name="mnemonic_widget">mv-high</property>
-                          </widget>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                          </packing>
-                        </child>
-                        <child>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</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="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="fill">False</property>
+                    <property name="fill">False</property>
                         <property name="padding">20</property>
                         <property name="position">1</property>
-                      </packing>
-                    </child>
-                    <child>
+                  </packing>
+                </child>
+                <child>
                       <placeholder/>
                     </child>
                     <child>
                 </child>
                 <child>
                   <widget class="GtkHBox" id="hbox6">
-                    <property name="visible">True</property>
-                    <child>
-                      <widget class="GtkLabel" id="label10">
                         <property name="visible">True</property>
+                        <child>
+                      <widget class="GtkLabel" id="label10">
+                            <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>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
                         <property name="padding">20</property>
-                      </packing>
-                    </child>
-                    <child>
+                          </packing>
+                        </child>
+                        <child>
                       <widget class="GtkEntry" id="mv-discrete">
-                        <property name="width_request">75</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
+                            <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="position">1</property>
+                          </packing>
+                        </child>
+                          </widget>
+                          <packing>
+                    <property name="position">1</property>
+                          </packing>
+                        </child>
                       </widget>
                       <packing>
-                        <property name="expand">False</property>
-                        <property name="position">1</property>
+                <property name="position">1</property>
                       </packing>
                     </child>
                   </widget>
                   <packing>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
             <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>
+                  </packing>
+                </child>
         <child>
           <widget class="GtkVBox" id="vbox5">
             <property name="visible">True</property>
               <packing>
                 <property name="expand">False</property>
                 <property name="fill">False</property>
-              </packing>
-            </child>
-            <child>
+          </packing>
+        </child>
+        <child>
               <widget class="GtkVBox" id="vbox6">
-                <property name="visible">True</property>
-                <child>
+            <property name="visible">True</property>
+            <child>
                   <widget class="GtkRadioButton" id="discrete_missing">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</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="fill">False</property>
-                  </packing>
-                </child>
-                <child>
+                <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="GtkHBox" id="hbox10">
                     <property name="visible">True</property>
                     <child>
                       </widget>
                       <packing>
                         <property name="padding">20</property>
+                          </packing>
+                        </child>
+                          </widget>
+                          <packing>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </widget>
+                      <packing>
+                <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">1</property>
                       </packing>
                     </child>
                   </widget>
-                  <packing>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </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>
+                </child>
+                <child>
           <widget class="GtkVButtonBox" id="vbuttonbox5">
-            <property name="visible">True</property>
+                    <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>
+                    <child>
               <widget class="GtkButton" id="missing_val_ok">
-                <property name="visible">True</property>
+                        <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"/>
-              </widget>
-            </child>
-            <child>
+                      </widget>
+                    </child>
+                    <child>
               <widget class="GtkButton" id="missing_val_cancel">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
+                        <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"/>
-              </widget>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
+                  </widget>
+                  <packing>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
             <child>
               <widget class="GtkButton" id="help_button_missing_values">
                 <property name="visible">True</property>
index 63b82a4a67e14c0f9243c0ab809b39fe3b75c2dd..67784021d8c3e0f9b576a515708caf323e697b3f 100644 (file)
@@ -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 (file)
index 0000000..b4b3a5b
--- /dev/null
@@ -0,0 +1,34 @@
+#include <glade/glade-build.h>
+#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 (file)
index 0000000..bab2b52
--- /dev/null
@@ -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 <glib.h>
+#include <gtk/gtk.h>
+#include <gtk/gtksignal.h>
+#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 (file)
index 0000000..3e589c8
--- /dev/null
@@ -0,0 +1,38 @@
+#ifndef __PSPPIRE_BUTTONBOX_H__
+#define __PSPPIRE_BUTTONBOX_H__
+
+
+#include <glib.h>
+#include <glib-object.h>
+#include <gtk/gtkvbbox.h>
+
+
+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 (file)
index 0000000..8bb7835
--- /dev/null
@@ -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 <gtk/gtk.h>
+#include <gtk/gtksignal.h>
+#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 (file)
index 0000000..94c6c3d
--- /dev/null
@@ -0,0 +1,47 @@
+#ifndef __PSPPIRE_DIALOG_H__
+#define __PSPPIRE_DIALOG_H__
+
+
+#include <glib.h>
+#include <glib-object.h>
+#include <gtk/gtkwindow.h>
+
+
+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__ */
+
index 6391222cc50744771c78c077f3bd42cf1ceb519a..4fc9c372c9af27ace50a7c2dfb924c858b4ebf7a 100644 (file)
@@ -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);
+}
index b6b1bc88283303979f76e198e295d5e8374ebe46..bcf31da3e95c7eb676308e3a4ae7fc0944ba64f4 100644 (file)
@@ -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 (file)
index 0000000..64edfc6
--- /dev/null
@@ -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 <config.h>
+
+#include "psppire-var-select.h"
+#include "psppire-object.h"
+
+#include "psppire-dict.h"
+
+#include <gettext.h>
+
+#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 (file)
index 0000000..b169b52
--- /dev/null
@@ -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 <glib-object.h>
+#include <glib.h>
+
+#include <gtk/gtk.h>
+#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;
+
+
+  /* <private> */
+  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__ */
index a8bee600e16a6f30b1ba89401d4f504dd456dafe..80a4dfc201f2efcbc238a62274a26de7511de71f 100644 (file)
@@ -1,14 +1,13 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
+<!--*- mode: xml -*-->
 <glade-interface>
-
-<widget class="GtkAboutDialog" id="aboutdialog1">
-  <property name="destroy_with_parent">False</property>
-  <property name="name">PSPPire</property>
-  <property name="copyright">Free Software Foundation</property>
-  <property name="comments" translatable="yes">This is pre-alpha software.  Use at your own risk.</property>
-  <property name="license" translatable="yes">    This program is free software; you can redistribute it and/or modify
+  <requires lib="psppire"/>
+  <widget class="GtkAboutDialog" id="aboutdialog1">
+    <property name="name">PSPPire</property>
+    <property name="copyright">Free Software Foundation</property>
+    <property name="comments" translatable="yes">This is pre-alpha software.  Use at your own risk.</property>
+    <property name="license" translatable="yes">    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.
     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
     02110-1301, USA.
 </property>
-  <property name="wrap_license">False</property>
-  <property name="artists">Patrick Brunier</property>
-  <property name="translator_credits"></property>
-  <property name="logo">pspplogo.png</property>
-</widget>
-
+    <property name="artists">Patrick Brunier</property>
+    <property name="logo">pspplogo.png</property>
+    <child internal-child="vbox">
+      <widget class="GtkVBox" id="dialog-vbox1">
+        <property name="visible">True</property>
+        <child>
+          <placeholder/>
+        </child>
+        <child internal-child="action_area">
+          <widget class="GtkHButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="pack_type">GTK_PACK_END</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+  </widget>
+  <widget class="PsppireDialog" id="weight-cases-dialog">
+    <property name="border_width">5</property>
+    <property name="title">Weight Case</property>
+    <property name="default_width">363</property>
+    <property name="default_height">188</property>
+    <child internal-child="hbox">
+      <widget class="GtkHBox" id="dialog-hbox1">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK</property>
+        <property name="spacing">2</property>
+        <child>
+          <widget class="GtkHBox" id="hbox1">
+            <property name="visible">True</property>
+            <child>
+              <widget class="GtkScrolledWindow" id="scrolledwindow1">
+                <property name="visible">True</property>
+                <property name="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="treeview">
+                    <property name="visible">True</property>
+                    <property name="headers_visible">False</property>
+                    <property name="fixed_height_mode">True</property>
+                    <property name="show_expanders">False</property>
+                  </widget>
+                </child>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkVBox" id="vbox1">
+                <property name="visible">True</property>
+                <child>
+                  <widget class="GtkFrame" id="frame1">
+                    <property name="visible">True</property>
+                    <property name="border_width">5</property>
+                    <property name="label_xalign">0</property>
+                    <child>
+                      <widget class="GtkVBox" id="vbox2">
+                        <property name="visible">True</property>
+                        <property name="border_width">5</property>
+                        <child>
+                          <widget class="GtkRadioButton" id="radiobutton1">
+                            <property name="visible">True</property>
+                            <property name="label" translatable="yes">Do not weight cases</property>
+                            <property name="focus_on_click">False</property>
+                            <property name="active">True</property>
+                            <property name="draw_indicator">True</property>
+                          </widget>
+                        </child>
+                        <child>
+                          <widget class="GtkRadioButton" id="radiobutton2">
+                            <property name="visible">True</property>
+                            <property name="label" translatable="yes">Weight cases by</property>
+                            <property name="focus_on_click">False</property>
+                            <property name="draw_indicator">True</property>
+                            <property name="group">radiobutton1</property>
+                          </widget>
+                          <packing>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkHBox" id="hbox3">
+                            <property name="visible">True</property>
+                            <child>
+                              <widget class="GtkAlignment" id="alignment1">
+                                <property name="visible">True</property>
+                                <child>
+                                  <widget class="GtkAspectFrame" id="aspectframe1">
+                                    <property name="visible">True</property>
+                                    <property name="label_xalign">0</property>
+                                    <property name="shadow_type">GTK_SHADOW_NONE</property>
+                                    <child>
+                                      <widget class="GtkButton" id="button1">
+                                        <property name="width_request">40</property>
+                                        <property name="height_request">40</property>
+                                        <property name="visible">True</property>
+                                        <child>
+                                          <widget class="GtkArrow" id="arrow1">
+                                            <property name="visible">True</property>
+                                          </widget>
+                                        </child>
+                                      </widget>
+                                    </child>
+                                  </widget>
+                                </child>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkVBox" id="vbox3">
+                                <property name="visible">True</property>
+                                <child>
+                                  <widget class="GtkLabel" id="label1">
+                                    <property name="visible">True</property>
+                                    <property name="label" translatable="yes">Frequency Variable</property>
+                                  </widget>
+                                </child>
+                                <child>
+                                  <widget class="GtkEntry" id="entry1">
+                                    <property name="visible">True</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </widget>
+                              <packing>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">2</property>
+                          </packing>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <placeholder/>
+                      <packing>
+                        <property name="type">label_item</property>
+                      </packing>
+                    </child>
+                  </widget>
+                </child>
+                <child>
+                  <widget class="GtkHBox" id="hbox2">
+                    <property name="visible">True</property>
+                    <child>
+                      <widget class="GtkLabel" id="label3">
+                        <property name="visible">True</property>
+                        <property name="xalign">1</property>
+                        <property name="label" translatable="yes">Current Status: </property>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="weight-status-label">
+                        <property name="visible">True</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">Do not weight cases</property>
+                      </widget>
+                      <packing>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </widget>
+        </child>
+        <child>
+          <widget class="PsppireButtonBox" id="psppire-buttonbox1">
+            <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>
diff --git a/src/ui/gui/weight-cases-dialog.c b/src/ui/gui/weight-cases-dialog.c
new file mode 100644 (file)
index 0000000..50294de
--- /dev/null
@@ -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 <config.h>
+
+#include "psppire-var-select.h"
+#include <glade/glade.h>
+#include "helper.h"
+#include <gettext.h>
+
+#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 (file)
index 0000000..b193fef
--- /dev/null
@@ -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
index d7c543a40e70d7944cc6f381491eb6959d4b06a1..51fc95a91de9df69f0f26b000a25c4a75f0880a2 100644 (file)
@@ -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 <glib.h>
 #include "syntax-editor.h"
 #include "data-editor.h"
index 0b08a275d74889227dc8786e6dcb51c82fdb5cb4..278245a10c4a6b3fbda42e347bbed95b82b11751 100644 (file)
@@ -1 +1,2 @@
 pspp
+.libs
index ef56b7e97f65c005be03065a11eeb74bd8e87583..cfc06bf1042498dcf0e80665071219a4e488c348 100644 (file)
@@ -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@
 
index 4f910ea97f01a77d492dac6855e3383c747871c2..2fc41cd925d3e2a64eec14d38c4eef605c46defc 100644 (file)
@@ -1 +1,2 @@
 inexactify
+.libs
index 6bdc8ab698569f9a1b363e4863431f5aa243ec3f..d19e422569914bd19725d7850e156b6b6ccc5a2c 100644 (file)
@@ -1,2 +1,3 @@
 ll-test
 llx-test
+.libs