include $(top_srcdir)/examples/automake.mk
include $(top_srcdir)/src/automake.mk
include $(top_srcdir)/utilities/automake.mk
-
include $(top_srcdir)/tests/automake.mk
if WITH_GUI_TOOLS
$(AM_V_GEN)echo "@set example-dir $(examplesdir)" > $@
-# The SED and AWK filters in this rule, are to work-around some nasty bugs in makeinfo version 4.13, which produces
-# broken docbook xml. These workarounds are rather horrible and must be removed asap.
-$(srcdir)/doc/pspp.xml: doc/pspp.texi $(doc_pspp_TEXINFOS)
+# The SED and AWK filters in this rule, are to work-around some nasty bugs in
+# makeinfo version 4.13, which produces broken docbook xml. These workarounds
+# are rather horrible and must be removed asap.
+$(srcdir)/doc/pspp.xml: doc/pspp.texi $(doc_pspp_TEXINFOS) doc/help-pages-list
@$(MKDIR_P) doc
$(AM_V_GEN)$(MAKEINFO) $(AM_MAKEINFOFLAGS) --docbook -I $(top_srcdir) \
$(top_srcdir)/doc/pspp.texi -o - \
| $(AWK) '/<para>.*<table.*>.*<\/para>/{x=sub("</para>",""); print; s=1;next}/<\/table>/{print; if (s==1) print "</para>"; s=0; next}1' \
> $@,tmp
$(AM_V_at)$(XMLLINT) --output /dev/null $@,tmp
+ cat doc/help-pages-list | while read node ; do \
+ $(AM_V_at)$(XMLLINT) --xpath "$$node" $@,tmp > /dev/null; \
+ if test $$? -ne 0 ; then echo "$$node does not appear in $@" ; exit 1; fi ; \
+ done
mv $@,tmp $@
docbookdir = $(docdir)
dist_docbook_DATA = doc/pspp.xml
-
+
CLEANFILES += pspp-dev.dvi $(docbook_DATA)
<property name="title" translatable="yes">Aggregate Data</property>
<property name="modal">True</property>
<property name="orientation">Vertical</property>
+ <property name="help-page">AGGREGATE</property>
<child internal-child="hbox">
<object class="GtkVBox" id="dialog-hbox1">
<property name="visible">True</property>
src/ui/gui/var-sheet.ui \
src/ui/gui/var-type-dialog.ui
+
+doc/help-pages-list: $(UI_FILES)
+ cat $^ | grep '"help-page"' | \
+ sed -e 's% *<property name="help-page">\([^<]*\)</property>%//*[@id='"'"'\1'"'"']%' \
+ -e 's%#%'"'"']/*[@id='"'"'%g' > $@
+
+
EXTRA_DIST += \
src/ui/gui/artwork/actions/.empty \
src/ui/gui/artwork/apps/scalable/.empty \
if HAVE_GUI
bin_PROGRAMS += src/ui/gui/psppire
-noinst_PROGRAMS += src/ui/gui/spreadsheet-test
+noinst_PROGRAMS += src/ui/gui/spreadsheet-test
src_ui_gui_psppire_CFLAGS = $(GTK_CFLAGS) $(GTKSOURCEVIEW_CFLAGS) -Wall -DGDK_MULTIHEAD_SAFE=1
src_ui_gui_spreadsheet_test_CFLAGS = $(GTK_CFLAGS) -Wall -DGDK_MULTIHEAD_SAFE=1
src_ui_gui_spreadsheet_test_SOURCES = src/ui/gui/spreadsheet-test.c src/ui/gui/psppire-spreadsheet-model.c
-
src_ui_gui_psppiredir = $(pkgdatadir)
<object class="PsppireDialog" id="autorecode-dialog">
<property name="title" translatable="yes">Automatic Recode</property>
<property name="modal">True</property>
+ <property name="help-page">AUTORECODE</property>
<child internal-child="hbox">
<object 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</property>
<property name="title" translatable="yes">Binomial Test</property>
<property name="modal">True</property>
+ <property name="help-page">NPAR-TESTS#BINOMIAL</property>
<child internal-child="hbox">
<object class="GtkHBox" id="dialog-hbox13">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="title" translatable="yes">Chi-Square Test</property>
<property name="modal">True</property>
+ <property name="help-page">NPAR-TESTS#CHISQUARE</property>
<child internal-child="hbox">
<object class="GtkHBox" id="dialog-hbox13">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="title" translatable="yes">Compute Variable</property>
<property name="modal">True</property>
+ <property name="help-page">COMPUTE</property>
<child internal-child="hbox">
<object class="GtkHBox" id="dialog-hbox5">
<property name="visible">True</property>
<object class="PsppireDialog" id="correlation-dialog">
<property name="title" translatable="yes">Bivariate Correlations</property>
<property name="modal">True</property>
+ <property name="help-page">CORRELATIONS</property>
<child internal-child="hbox">
<object class="GtkHBox" id="dialog-hbox1">
<property name="visible">True</property>
<object class="PsppireDialog" id="count-dialog">
<property name="title" translatable="yes">Count Occurrences of Values within Cases</property>
<property name="modal">True</property>
+ <property name="help-page">COUNT</property>
<child internal-child="hbox">
<object class="GtkHBox" id="dialog-hbox5">
<property name="visible">True</property>
<object class="PsppireDialog" id="crosstabs-dialog">
<property name="title" translatable="yes">Crosstabs</property>
<property name="modal">True</property>
+ <property name="help-page">CROSSTABS</property>
<child internal-child="hbox">
<object 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</property>
<property name="title" translatable="yes">Descriptives</property>
<property name="modal">True</property>
+ <property name="help-page">DESCRIPTIVES</property>
<child internal-child="hbox">
<object class="GtkHBox" id="dialog-hbox16">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="title" translatable="yes">Explore</property>
<property name="modal">True</property>
+ <property name="help-page">EXAMINE</property>
<child internal-child="hbox">
<object class="GtkHBox" id="dialog-hbox1">
<property name="visible">True</property>
<property name="title" translatable="yes">Factor Analysis</property>
<property name="modal">True</property>
<property name="orientation">Tabular</property>
+ <property name="help-page">FACTOR</property>
<child internal-child="hbox">
<object class="GtkTable" 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</property>
<property name="title" translatable="yes">Frequencies</property>
<property name="modal">True</property>
+ <property name="help-page">FREQUENCIES</property>
<child internal-child="hbox">
<object class="GtkHBox" id="dialog-hbox1">
<property name="visible">True</property>
void online_help (const char *page);
+enum index
+ {
+ hi_DESCRIPTIVES,
+ hi_EXAMINE,
+ hi_FREQUENCIES,
+ hi_LOGISTIC_REGRESSION,
+ n_hi
+ };
+
+void set_help_page (GtkWidget *w, enum index idx);
+
+
+
#endif
<property name="title" translatable="yes">K-Means Cluster Analysis</property>
<property name="modal">True</property>
<property name="orientation">Vertical</property>
+ <property name="help-page">QUICK-CLUSTER</property>
<child internal-child="hbox">
<object class="GtkVBox" id="dialog-hbox1">
<property name="visible">True</property>
<object class="PsppireDialog" id="logistic-dialog">
<property name="title" translatable="yes">Logistic Regression</property>
<property name="modal">True</property>
+ <property name="help-page">LOGISTIC-REGRESSION</property>
<child internal-child="hbox">
<object 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</property>
<property name="title" translatable="yes">Means</property>
<property name="modal">True</property>
+ <property name="help-page">MEANS</property>
<child internal-child="hbox">
<object class="GtkHBox" id="dialog-hbox16">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="title" translatable="yes">One-Way ANOVA</property>
<property name="modal">True</property>
+ <property name="help-page">ONEWAY</property>
<child internal-child="hbox">
<object class="GtkHBox" id="dialog-hbox15">
<property name="visible">True</property>
static guint signals [n_SIGNALS];
+static GObjectClass *parent_class = NULL;
+
static void psppire_dialog_buildable_init (GtkBuildableIface *iface);
+static void
+psppire_dialog_finalize (GObject *object)
+{
+ PsppireDialog *dialog = PSPPIRE_DIALOG (object);
+
+ g_free (dialog->help_page);
+
+ if (G_OBJECT_CLASS (parent_class)->finalize)
+ G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static void
+psppire_dialog_base_init (PsppireDialogClass *class)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (class);
+
+ object_class->finalize = psppire_dialog_finalize;
+}
GType
psppire_dialog_get_type (void)
static const GTypeInfo dialog_info =
{
sizeof (PsppireDialogClass),
- NULL, /* base_init */
+ psppire_dialog_base_init,
NULL, /* base_finalize */
(GClassInitFunc) psppire_dialog_class_init,
NULL, /* class_finalize */
-static GObjectClass *parent_class = NULL;
-
-
/* Properties */
enum
{
PROP_0,
PROP_ORIENTATION,
- PROP_SLIDING
+ PROP_SLIDING,
+ PROP_HELP_PAGE,
};
case PROP_SLIDING:
g_value_set_boolean (value, dialog->slidable);
break;
+ case PROP_HELP_PAGE:
+ g_value_set_string (value, dialog->help_page);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
case PROP_ORIENTATION:
dialog->orientation = g_value_get_enum (value);
break;
+ case PROP_HELP_PAGE:
+ dialog->help_page = g_value_dup_string (value);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
GObjectClass *object_class = (GObjectClass *) class;
GParamSpec *sliding_spec ;
+ GParamSpec *help_page_spec ;
+
+ help_page_spec =
+ g_param_spec_string ("help-page",
+ "Help Page",
+ "The section of the manual to load when the Help button is clicked",
+ NULL,
+ G_PARAM_READWRITE);
orientation_spec =
g_param_spec_enum ("orientation",
PROP_SLIDING,
sliding_spec);
+ g_object_class_install_property (object_class,
+ PROP_HELP_PAGE,
+ help_page_spec);
+
+
signals [DIALOG_REFRESH] =
g_signal_new ("refresh",
G_TYPE_FROM_CLASS (class),
dialog->contents_are_acceptable = NULL;
dialog->acceptable_data = NULL;
dialog->slidable = FALSE;
+ dialog->help_page = NULL;
g_value_init (&value, orientation_spec->value_type);
g_param_value_set_default (orientation_spec, &value);
void
psppire_dialog_help (PsppireDialog *dialog)
{
- char *name = NULL;
- g_object_get (dialog, "name", &name, NULL);
+ const char *page = NULL;
+
+ g_object_get (dialog, "help-page", &page, NULL);
- online_help (name);
+ online_help (page);
- g_signal_emit (dialog, signals [DIALOG_HELP], 0, name);
+ g_signal_emit (dialog, signals [DIALOG_HELP], 0, page);
}
gpointer acceptable_data;
gboolean slidable;
PsppireOrientation orientation;
+
+ gchar *help_page;
+
};
struct _PsppireDialogClass
<object class="PsppireDialog" id="weight-cases-dialog">
<property name="title" translatable="yes">Weight Cases</property>
<property name="modal">True</property>
+ <property name="help-page">WEIGHT</property>
<child internal-child="hbox">
<object class="GtkHBox" id="dialog-hbox2">
<property name="visible">True</property>
<object class="PsppireDialog" id="transpose-dialog">
<property name="title" translatable="yes">Transpose</property>
<property name="modal">True</property>
+ <property name="help-page">FLIP</property>
<child internal-child="hbox">
<object 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</property>
<property name="title" translatable="yes">Data File Comments</property>
<property name="modal">True</property>
+ <property name="help-page">DOCUMENT</property>
<property name="orientation">Vertical</property>
<child internal-child="hbox">
<object class="GtkVBox" id="dialog-hbox7">
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="title" translatable="yes">Rank Cases</property>
<property name="modal">True</property>
+ <property name="help-page">RANK</property>
<child internal-child="hbox">
<object class="GtkHBox" id="dialog-hbox1">
<property name="visible">True</property>
<object class="PsppireDialog" id="regression-dialog">
<property name="title" translatable="yes">Regression</property>
<property name="modal">True</property>
+ <property name="help-page">REGRESSION</property>
<child internal-child="hbox">
<object class="GtkHBox" id="dialog-hbox1">
<property name="visible">True</property>
<object class="PsppireDialog" id="reliability-dialog">
<property name="title" translatable="yes">Reliability Analysis</property>
<property name="modal">True</property>
+ <property name="help-page">RELIABILITY</property>
<child internal-child="hbox">
<object class="GtkHBox" id="dialog-hbox5">
<property name="visible">True</property>
<object class="PsppireDialog" id="roc-dialog">
<property name="title" translatable="yes">ROC Curve</property>
<property name="modal">True</property>
+ <property name="help-page">ROC</property>
<child internal-child="hbox">
<object class="GtkHBox" id="dialog-hbox1">
<property name="visible">True</property>
<property name="title" translatable="yes">Runs Test</property>
<property name="modal">True</property>
<property name="orientation">Vertical</property>
+ <property name="help-page">NPAR-TESTS#RUNS</property>
<child internal-child="hbox">
<object class="GtkVBox" id="dialog-hbox1">
<property name="visible">True</property>
<property name="title" translatable="yes">Select Cases</property>
<property name="modal">True</property>
<property name="orientation">Vertical</property>
+ <property name="help-page">SELECT-IF</property>
<child internal-child="hbox">
<object class="GtkVBox" id="dialog-hbox6">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="title" translatable="yes">Sort Cases</property>
<property name="modal">True</property>
+ <property name="help-page">SORT-CASES</property>
<child internal-child="hbox">
<object class="GtkHBox" id="dialog-hbox4">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="title" translatable="yes">Split File</property>
<property name="modal">True</property>
+ <property name="help-page">SPLIT-FILE</property>
<child internal-child="hbox">
<object class="GtkHBox" id="dialog-hbox3">
<property name="visible">True</property>