{
GtkTextIter iter;
gint response ;
- struct data_editor *de = data;
+ PsppireDataWindow *de = PSPPIRE_DATA_WINDOW (data);
struct comment_dialog cd;
- GladeXML *xml = XML_NEW ("psppire.glade");
+ GtkBuilder *xml = builder_new ("psppire.ui");
GtkWidget *dialog = get_widget_assert (xml, "comments-dialog");
GtkWidget *textview = get_widget_assert (xml, "comments-textview1");
#include <stdlib.h>
#include <language/syntax-string-source.h>
-#include <ui/gui/data-editor.h>
+#include <ui/gui/psppire-data-window.h>
#include <ui/gui/dialog-common.h>
#include <ui/gui/dict-display.h>
- #include <ui/gui/helper.h>
+ #include "helper.h"
#include <ui/gui/psppire-dialog.h>
#include <ui/gui/psppire-var-store.h>
-#include <ui/gui/syntax-editor.h>
+#include <ui/gui/helper.h>
#include "gettext.h"
#define _(msgid) gettext (msgid)
crosstabs_dialog (GObject *o, gpointer data)
{
gint response;
- struct data_editor *de = data;
-
struct crosstabs_dialog cd;
- GladeXML *xml = XML_NEW ("crosstabs.glade");
+ GtkBuilder *xml = builder_new ("crosstabs.ui");
+
PsppireVarStore *vs = NULL;
+ PsppireDataWindow *de = PSPPIRE_DATA_WINDOW (data);
+
+
GtkWidget *dialog = get_widget_assert (xml, "crosstabs-dialog");
GtkWidget *source = get_widget_assert (xml, "dict-treeview");
GtkWidget *dest_rows = get_widget_assert (xml, "rows");
struct find_dialog
{
- GladeXML *xml;
+ GtkBuilder *xml;
PsppireDict *dict;
struct datasheet *data;
- struct data_editor *de;
+ PsppireDataWindow *de;
GtkWidget *variable_entry;
GtkWidget *value_entry;
GtkWidget *value_labels_checkbox;
static void
- refresh (const PsppireDataWindow *de, GladeXML *xml)
-refresh (const struct data_editor *de, GtkBuilder *xml)
++refresh (const PsppireDataWindow *de, GtkBuilder *xml)
{
PsppireDataStore *ds = NULL;
casenumber case_count ;
goto_case_dialog (GObject *o, gpointer data)
{
gint response;
- GladeXML *xml = XML_NEW ("psppire.glade");
+ GtkBuilder *xml = builder_new ("psppire.ui");
- struct data_editor *de = data;
+ PsppireDataWindow *de = PSPPIRE_DATA_WINDOW (data);
GtkWidget *dialog = get_widget_assert (xml, "goto-case-dialog");
-
+void
+paste_syntax_in_new_window (const gchar *syntax)
+{
+ GtkWidget *se = psppire_syntax_window_new ();
+
+ gtk_text_buffer_insert_at_cursor (PSPPIRE_SYNTAX_WINDOW (se)->buffer, syntax, -1);
+
+ gtk_widget_show (se);
+}
ow.dict = vs->dict;
ow.dialog =
- GTK_WINDOW (get_widget_assert (xml, "oneway-anova-dialog"));
+ GTK_WINDOW (get_widget_assert (builder, "oneway-anova-dialog"));
- gtk_window_set_transient_for (ow.dialog, de->parent.window);
+ gtk_window_set_transient_for (ow.dialog, GTK_WINDOW (de));
attach_dictionary_to_treeview (GTK_TREE_VIEW (dict_view),
vs->dict,
#define _(msgid) gettext (msgid)
#define N_(msgid) msgid
++
++const char * output_file_name (void);
++
++
void
initialize (struct command_line_processor *clp, int argc, char **argv)
{
the_data_store = psppire_data_store_new (dictionary);
replace_casereader (NULL);
-
-
create_icon_factory ();
- outp_configure_driver_line (
- ss_cstr ("gui:ascii:screen:squeeze=on headers=off top-margin=0 "
- "bottom-margin=0 paginate=off length=auto width=auto "
- "emphasis=none "
- "output-file=\"" OUTPUT_FILE_NAME "\" append=yes"));
+ {
+ const char *filename = output_file_name ();
+
+ struct string config_string;
+
+ ds_init_empty (&config_string);
+
+ ds_put_format (&config_string,
+ "gui:ascii:screen:squeeze=on headers=off top-margin=0 "
+ "bottom-margin=0 paginate=off length=auto width=auto "
+ "emphasis=none "
+ "output-file=\"%s\" append=yes", filename);
+
+ outp_configure_driver_line (ds_ss (&config_string));
+
+ unlink (filename);
- unlink (OUTPUT_FILE_NAME);
+ ds_destroy (&config_string);
+ }
journal_enable ();
textdomain (PACKAGE);
- /* Ignore alarm clock signals */
- signal (SIGALRM, SIG_IGN);
-
+ the_data_window = psppire_data_window_new ();
+
command_line_processor_replace_aux (clp, &post_init_argp, the_source_stream);
command_line_processor_replace_aux (clp, &non_option_argp, the_source_stream);
const struct argp non_option_argp = {NULL, parse_non_options, 0, 0, 0, 0, 0};
++
++
++const char *
++output_file_name (void)
++{
++ const char *dir = default_output_path ();
++ static char *filename = NULL;
++
++ if ( NULL == filename )
++ filename = xasprintf ("%s%s", dir, OUTPUT_FILE_NAME);
++
++
++ return filename;
++}
/* Set up the Old & New Values subdialog */
{
- rd.string_button = get_widget_assert (xml, "checkbutton1");
- rd.width_entry = get_widget_assert (xml, "spinbutton1");
+ rd.string_button = get_widget_assert (builder, "checkbutton1");
+ rd.width_entry = get_widget_assert (builder, "spinbutton1");
- rd.convert_button = get_widget_assert (xml, "checkbutton2");
+ rd.convert_button = get_widget_assert (builder, "checkbutton2");
- rd.ov_range_lower_entry = get_widget_assert (xml, "entry5");
- rd.ov_range_upper_entry = get_widget_assert (xml, "entry3");
- rd.ov_low_up_entry = get_widget_assert (xml, "entry6");
- rd.ov_high_down_entry = get_widget_assert (xml, "entry7");
+ rd.ov_range_lower_entry = get_widget_assert (builder, "entry5");
+ rd.ov_range_upper_entry = get_widget_assert (builder, "entry3");
+ rd.ov_low_up_entry = get_widget_assert (builder, "entry6");
+ rd.ov_high_down_entry = get_widget_assert (builder, "entry7");
- rd.new_value_entry = get_widget_assert (xml, "entry1");
- rd.ov_value_entry = get_widget_assert (xml, "entry2");
+ rd.new_value_entry = get_widget_assert (builder, "entry1");
+ rd.ov_value_entry = get_widget_assert (builder, "entry2");
- rd.toggle[BUTTON_NEW_VALUE] = get_widget_assert (xml, "radiobutton1");
- rd.toggle[BUTTON_NEW_SYSMIS] = get_widget_assert (xml, "radiobutton2");
- rd.toggle[BUTTON_NEW_COPY] = get_widget_assert (xml, "radiobutton3");
- rd.toggle[BUTTON_OLD_VALUE] = get_widget_assert (xml, "radiobutton4");
- rd.toggle[BUTTON_OLD_SYSMIS] = get_widget_assert (xml, "radiobutton6");
- rd.toggle[BUTTON_OLD_MISSING]= get_widget_assert (xml, "radiobutton7");
- rd.toggle[BUTTON_OLD_RANGE] = get_widget_assert (xml, "radiobutton8");
- rd.toggle[BUTTON_OLD_LOW_UP] = get_widget_assert (xml, "radiobutton10");
- rd.toggle[BUTTON_OLD_HIGH_DOWN] = get_widget_assert (xml, "radiobutton5");
- rd.toggle[BUTTON_OLD_ELSE] = get_widget_assert (xml, "radiobutton11");
+ rd.toggle[BUTTON_NEW_VALUE] = get_widget_assert (builder, "radiobutton1");
+ rd.toggle[BUTTON_NEW_SYSMIS] = get_widget_assert (builder, "radiobutton2");
+ rd.toggle[BUTTON_NEW_COPY] = get_widget_assert (builder, "radiobutton3");
+ rd.toggle[BUTTON_OLD_VALUE] = get_widget_assert (builder, "radiobutton4");
+ rd.toggle[BUTTON_OLD_SYSMIS] = get_widget_assert (builder, "radiobutton6");
+ rd.toggle[BUTTON_OLD_MISSING]= get_widget_assert (builder, "radiobutton7");
+ rd.toggle[BUTTON_OLD_RANGE] = get_widget_assert (builder, "radiobutton8");
+ rd.toggle[BUTTON_OLD_LOW_UP] = get_widget_assert (builder, "radiobutton10");
+ rd.toggle[BUTTON_OLD_HIGH_DOWN] = get_widget_assert (builder, "radiobutton5");
+ rd.toggle[BUTTON_OLD_ELSE] = get_widget_assert (builder, "radiobutton11");
- rd.new_copy_label = get_widget_assert (xml, "label3");
- rd.strings_box = get_widget_assert (xml, "table3");
+ rd.new_copy_label = get_widget_assert (builder, "label3");
+ rd.strings_box = get_widget_assert (builder, "table3");
rd.old_and_new_dialog =
- PSPPIRE_DIALOG (get_widget_assert (xml, "old-new-values-dialog"));
+ PSPPIRE_DIALOG (get_widget_assert (builder, "old-new-values-dialog"));
gtk_window_set_transient_for (GTK_WINDOW (rd.old_and_new_dialog),
- de->parent.window);
+ GTK_WINDOW (de));
- rd.acr = PSPPIRE_ACR (get_widget_assert (xml, "psppire-acr1"));
+ rd.acr = PSPPIRE_ACR (get_widget_assert (builder, "psppire-acr1"));
g_signal_connect_swapped (rd.toggle[BUTTON_NEW_VALUE], "toggled",
G_CALLBACK (set_acr), &rd);
regression_dialog (GObject *o, gpointer data)
{
gint response;
- struct data_editor *de = data;
-
struct regression_dialog rd;
- GladeXML *xml = XML_NEW ("regression.glade");
+ GtkBuilder *xml = builder_new ("regression.ui");
+ PsppireDataWindow *de = PSPPIRE_DATA_WINDOW (data);
-
PsppireVarStore *vs;
GtkWidget *dialog = get_widget_assert (xml, "regression-dialog");
#include "select-cases-dialog.h"
#include <gtk/gtk.h>
- #include <glade/glade.h>
#include "helper.h"
#include "psppire-dialog.h"
-#include "data-editor.h"
+#include "psppire-data-window.h"
#include "dialog-common.h"
#include "dict-display.h"
#include "widget-io.h"
#include <config.h>
#include <gtk/gtk.h>
- #include <glade/glade.h>
#include <language/syntax-string-source.h>
-#include "data-editor.h"
+#include "psppire-data-window.h"
#include "psppire-dict.h"
#include "psppire-var-store.h"
transpose_dialog (GObject *o, gpointer data)
{
gint response ;
- struct data_editor *de = data;
+ PsppireDataWindow *de = PSPPIRE_DATA_WINDOW (data);
- GladeXML *xml = XML_NEW ("psppire.glade");
+ GtkBuilder *xml = builder_new ("psppire.ui");
PsppireVarStore *vs = NULL;
#include "psppire-selector.h"
#include "psppire-dialog.h"
#include "helper.h"
-#include "data-editor.h"
+#include "psppire-data-window.h"
#include "dict-display.h"
#include <language/syntax-string-source.h>
-#include "syntax-editor.h"
+#include "helper.h"
#include <gtk/gtk.h>
- #include <glade/glade.h>
#include <gettext.h>
#define _(msgid) gettext (msgid)
weight_cases_dialog (GObject *o, gpointer data)
{
gint response;
- struct data_editor *de = data;
+ PsppireDataWindow *de = PSPPIRE_DATA_WINDOW (data);
struct weight_cases_dialog wcd;
- GladeXML *xml = XML_NEW ("psppire.glade");
+ GtkBuilder *xml = builder_new ("psppire.ui");
GtkWidget *dialog = get_widget_assert (xml, "weight-cases-dialog");
GtkWidget *source = get_widget_assert (xml, "weight-cases-treeview");