From: John Darrington Date: Fri, 20 Feb 2009 01:22:49 +0000 (+0900) Subject: Merge commit 'HEAD'; commit 'savannah/master' X-Git-Tag: v0.7.3~296^2~9 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8953baa61127d6d3b91f763663ea647bf3e4e793;p=pspp-builds.git Merge commit 'HEAD'; commit 'savannah/master' Conflicts: src/ui/gui/crosstabs-dialog.c src/ui/gui/goto-case-dialog.c src/ui/gui/helper.c src/ui/gui/output-viewer.c src/ui/gui/output-viewer.h src/ui/gui/psppire.c src/ui/gui/regression-dialog.c --- 8953baa61127d6d3b91f763663ea647bf3e4e793 diff --cc src/ui/gui/comments-dialog.c index 34c9957d,f425fac2..49d143cb --- a/src/ui/gui/comments-dialog.c +++ b/src/ui/gui/comments-dialog.c @@@ -96,10 -94,10 +95,10 @@@ comments_dialog (GObject *o, gpointer d { 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"); diff --cc src/ui/gui/crosstabs-dialog.c index 9654a27c,2c50b461..a3498d1f --- a/src/ui/gui/crosstabs-dialog.c +++ b/src/ui/gui/crosstabs-dialog.c @@@ -23,13 -23,13 +23,13 @@@ #include #include -#include +#include #include #include - #include + #include "helper.h" #include #include -#include +#include #include "gettext.h" #define _(msgid) gettext (msgid) @@@ -385,15 -385,13 +385,15 @@@ voi 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"); diff --cc src/ui/gui/find-dialog.c index ad9bf842,985e73fb..130b25cf --- a/src/ui/gui/find-dialog.c +++ b/src/ui/gui/find-dialog.c @@@ -52,10 -51,10 +51,10 @@@ which match particular strings * 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; diff --cc src/ui/gui/goto-case-dialog.c index 57db5865,a22b5cb0..9a523943 --- a/src/ui/gui/goto-case-dialog.c +++ b/src/ui/gui/goto-case-dialog.c @@@ -24,7 -24,7 +24,7 @@@ 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 ; @@@ -43,8 -43,8 +43,8 @@@ voi 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"); diff --cc src/ui/gui/helper.c index 12003e2a,fc9105d7..6a3a0f9e --- a/src/ui/gui/helper.c +++ b/src/ui/gui/helper.c @@@ -300,13 -320,3 +322,12 @@@ clone_list_store (const GtkListStore *s - +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); +} diff --cc src/ui/gui/oneway-anova-dialog.c index 45e88807,59b65b4a..d41b2760 --- a/src/ui/gui/oneway-anova-dialog.c +++ b/src/ui/gui/oneway-anova-dialog.c @@@ -166,9 -166,9 +166,9 @@@ oneway_anova_dialog (GObject *o, gpoint 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, diff --cc src/ui/gui/psppire.c index 62117a01,9dd3b713..bdd5ad53 --- a/src/ui/gui/psppire.c +++ b/src/ui/gui/psppire.c @@@ -80,6 -77,6 +79,10 @@@ replace_casereader (struct casereader * #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) { @@@ -119,24 -116,33 +122,33 @@@ 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); @@@ -295,3 -298,3 +307,17 @@@ parse_non_options (int key, char *arg, 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; ++} diff --cc src/ui/gui/recode-dialog.c index 642dae02,9d1ad79d..859737f6 --- a/src/ui/gui/recode-dialog.c +++ b/src/ui/gui/recode-dialog.c @@@ -963,40 -962,40 +962,40 @@@ recode_dialog (PsppireDataWindow *de, g /* 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); diff --cc src/ui/gui/regression-dialog.c index b0c11b07,3e0e0fbc..2d8aca3e --- a/src/ui/gui/regression-dialog.c +++ b/src/ui/gui/regression-dialog.c @@@ -223,11 -223,11 +223,10 @@@ voi 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"); diff --cc src/ui/gui/select-cases-dialog.c index 58b2879d,143f7a6d..d953308a --- a/src/ui/gui/select-cases-dialog.c +++ b/src/ui/gui/select-cases-dialog.c @@@ -18,10 -18,9 +18,9 @@@ #include "select-cases-dialog.h" #include - #include #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" diff --cc src/ui/gui/t-test-paired-samples.c index 58b68b2f,ec709603..ca1d776a --- a/src/ui/gui/t-test-paired-samples.c +++ b/src/ui/gui/t-test-paired-samples.c @@@ -17,10 -17,9 +17,9 @@@ #include #include - #include #include -#include "data-editor.h" +#include "psppire-data-window.h" #include "psppire-dict.h" #include "psppire-var-store.h" diff --cc src/ui/gui/transpose-dialog.c index 9e8c18f4,272ef1b3..09756d37 --- a/src/ui/gui/transpose-dialog.c +++ b/src/ui/gui/transpose-dialog.c @@@ -80,9 -79,9 +79,9 @@@ voi 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; diff --cc src/ui/gui/weight-cases-dialog.c index 9d103e1c,8b46ca5e..a464646f --- a/src/ui/gui/weight-cases-dialog.c +++ b/src/ui/gui/weight-cases-dialog.c @@@ -20,13 -20,12 +20,12 @@@ #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 -#include "syntax-editor.h" +#include "helper.h" #include - #include #include #define _(msgid) gettext (msgid) @@@ -104,10 -103,10 +103,10 @@@ voi 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");