From: John Darrington Date: Tue, 3 Jan 2012 19:41:35 +0000 (+0100) Subject: New file: builder-wrapper.h and builder-wrapper.c X-Git-Tag: v0.7.9~49 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?p=pspp-builds.git;a=commitdiff_plain;h=d46430e7458fcd65dfdf7928f52f2d06fa60127d New file: builder-wrapper.h and builder-wrapper.c Move the functions wrapping GtkBuilder out of helper.c and into their own file. --- diff --git a/src/ui/gui/aggregate-dialog.c b/src/ui/gui/aggregate-dialog.c index b3ea30cc..7fce9f55 100644 --- a/src/ui/gui/aggregate-dialog.c +++ b/src/ui/gui/aggregate-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2010, 2011 Free Software Foundation + Copyright (C) 2010, 2011, 2012 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 @@ -35,6 +35,7 @@ #include "dict-display.h" #include "executor.h" +#include "builder-wrapper.h" #include "helper.h" #include diff --git a/src/ui/gui/autorecode-dialog.c b/src/ui/gui/autorecode-dialog.c index 6780bc7b..f303e18d 100644 --- a/src/ui/gui/autorecode-dialog.c +++ b/src/ui/gui/autorecode-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2011 Free Software Foundation + Copyright (C) 2011, 2012 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 @@ -27,6 +27,7 @@ #include "psppire-var-view.h" #include "executor.h" +#include "builder-wrapper.h" #include "helper.h" #include diff --git a/src/ui/gui/binomial-dialog.c b/src/ui/gui/binomial-dialog.c index 195c4201..ee3fbd7b 100644 --- a/src/ui/gui/binomial-dialog.c +++ b/src/ui/gui/binomial-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2010, 2011 Free Software Foundation + Copyright (C) 2010, 2011, 2012 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 @@ -23,9 +23,9 @@ #include "psppire-acr.h" #include "dialog-common.h" -#include "helper.h" +#include "builder-wrapper.h" #include "executor.h" - +#include "helper.h" #include diff --git a/src/ui/gui/builder-wrapper.c b/src/ui/gui/builder-wrapper.c new file mode 100644 index 00000000..5db4c824 --- /dev/null +++ b/src/ui/gui/builder-wrapper.c @@ -0,0 +1,91 @@ +/* PSPPIRE - a graphical user interface for PSPP. + Copyright (C) 2004, 2009, 2010, 2011, 2012 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 3 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, see . + */ + + +#include + +#include "builder-wrapper.h" + + +GtkBuilder * +builder_new_real (const gchar *name) +{ + GtkBuilder *builder = gtk_builder_new (); + + GError *err = NULL; + if ( ! gtk_builder_add_from_file (builder, name, &err)) + { + g_critical ("Couldn\'t open user interface file %s: %s", name, err->message); + g_clear_error (&err); + } + + return builder; +} + + +GtkBuilder * +builder_new_x (const gchar *obj_name) +{ + GtkBuilder *b; + GString *str = g_string_new (PKGDATADIR); + g_string_append (str, "/"); + g_string_append (str, obj_name); + + b = builder_new_real (relocate (str->str)); + + g_string_free (str, TRUE); + + return b; +} + + + +GObject * +get_object_assert (GtkBuilder *builder, const gchar *name, GType type) +{ + GObject *o = NULL; + g_assert (name); + + o = gtk_builder_get_object (builder, name); + + if ( !o ) + g_critical ("Object `%s' could not be found\n", name); + else if ( ! g_type_is_a (G_OBJECT_TYPE (o), type)) + { + g_critical ("Object `%s' was expected to have type %s, but in fact has type %s", + name, g_type_name (type), G_OBJECT_TYPE_NAME (o)); + } + + return o; +} + + +GtkAction * +get_action_assert (GtkBuilder *builder, const gchar *name) +{ + return GTK_ACTION (get_object_assert (builder, name, GTK_TYPE_ACTION)); +} + +GtkWidget * +get_widget_assert (GtkBuilder *builder, const gchar *name) +{ + GtkWidget *w = GTK_WIDGET (get_object_assert (builder, name, GTK_TYPE_WIDGET)); + + g_object_set (w, "name", name, NULL); + + return w; +} diff --git a/src/ui/gui/builder-wrapper.h b/src/ui/gui/builder-wrapper.h new file mode 100644 index 00000000..c5a6734e --- /dev/null +++ b/src/ui/gui/builder-wrapper.h @@ -0,0 +1,38 @@ +/* PSPPIRE - a graphical user interface for PSPP. + Copyright (C) 2004, 2009, 2010, 2011, 2012 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 3 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, see . + */ + +#ifndef _BUILDER_WRAPPER_H +#define _BUILDER_WRAPPER_H + +#include + +#include "relocatable.h" +#include "gl/configmake.h" + + +GtkBuilder *builder_new_real (const gchar *name); + +GtkBuilder * builder_new_x (const gchar *obj_name); + +#define builder_new(NAME) (builder_new_real (relocate (PKGDATADIR "/" NAME))) + +GObject *get_object_assert (GtkBuilder *builder, const gchar *name, GType type); +GtkAction * get_action_assert (GtkBuilder *builder, const gchar *name); +GtkWidget * get_widget_assert (GtkBuilder *builder, const gchar *name); + + +#endif diff --git a/src/ui/gui/chi-square-dialog.c b/src/ui/gui/chi-square-dialog.c index c7aaf52b..7666cb59 100644 --- a/src/ui/gui/chi-square-dialog.c +++ b/src/ui/gui/chi-square-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2010, 2011 Free Software Foundation + Copyright (C) 2010, 2011, 2012 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 @@ -23,9 +23,9 @@ #include "psppire-acr.h" #include "dialog-common.h" -#include "helper.h" +#include "builder-wrapper.h" #include "executor.h" - +#include "helper.h" #include diff --git a/src/ui/gui/comments-dialog.c b/src/ui/gui/comments-dialog.c index 69a8096b..68249afd 100644 --- a/src/ui/gui/comments-dialog.c +++ b/src/ui/gui/comments-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2007, 2010, 2011 Free Software Foundation + Copyright (C) 2007, 2010, 2011, 2012 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 @@ -17,10 +17,11 @@ #include #include "psppire-dialog.h" -#include "helper.h" +#include "builder-wrapper.h" #include "psppire-data-window.h" #include "psppire-data-editor.h" #include "executor.h" +#include "helper.h" #include "psppire-var-store.h" #include diff --git a/src/ui/gui/compute-dialog.c b/src/ui/gui/compute-dialog.c index 6f9ec222..b9bfa2a9 100644 --- a/src/ui/gui/compute-dialog.c +++ b/src/ui/gui/compute-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2007, 2010, 2011 Free Software Foundation + Copyright (C) 2007, 2010, 2011, 2012 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 @@ -17,7 +17,7 @@ #include #include #include "compute-dialog.h" -#include "helper.h" +#include "builder-wrapper.h" #include "psppire-dialog.h" #include "psppire-keypad.h" #include "psppire-data-window.h" @@ -26,8 +26,11 @@ #include "dialog-common.h" #include + #include #include "executor.h" +#include "helper.h" + static void function_list_populate (GtkTreeView *tv); diff --git a/src/ui/gui/correlation-dialog.c b/src/ui/gui/correlation-dialog.c index 2e715039..78510dcd 100644 --- a/src/ui/gui/correlation-dialog.c +++ b/src/ui/gui/correlation-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2009, 2010, 2011 Free Software Foundation + Copyright (C) 2009, 2010, 2011, 2012 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,7 @@ #include "psppire-var-view.h" #include "executor.h" +#include "builder-wrapper.h" #include "helper.h" #include diff --git a/src/ui/gui/count-dialog.c b/src/ui/gui/count-dialog.c index 39a99dbd..43875f96 100644 --- a/src/ui/gui/count-dialog.c +++ b/src/ui/gui/count-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2011 Free Software Foundation + Copyright (C) 2011, 2012 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 @@ -20,7 +20,7 @@ #include "count-dialog.h" #include -#include "helper.h" +#include "builder-wrapper.h" #include "psppire-dialog.h" #include "psppire-selector.h" #include "psppire-val-chooser.h" @@ -28,8 +28,10 @@ #include "psppire-acr.h" #include "dialog-common.h" + #include #include "executor.h" +#include "helper.h" struct cnt_dialog { diff --git a/src/ui/gui/crosstabs-dialog.c b/src/ui/gui/crosstabs-dialog.c index acac2b67..fa3930dc 100644 --- a/src/ui/gui/crosstabs-dialog.c +++ b/src/ui/gui/crosstabs-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2008, 2010, 2011 Free Software Foundation + Copyright (C) 2008, 2010, 2011, 2012 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,7 +29,8 @@ #include "executor.h" #include #include -#include +#include +#include "helper.h" #include "gettext.h" #define _(msgid) gettext (msgid) diff --git a/src/ui/gui/descriptives-dialog.c b/src/ui/gui/descriptives-dialog.c index c6343d5b..670f14ba 100644 --- a/src/ui/gui/descriptives-dialog.c +++ b/src/ui/gui/descriptives-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2007, 2010, 2011 Free Software Foundation + Copyright (C) 2007, 2010, 2011, 2012 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 @@ -26,10 +26,11 @@ #include #include #include -#include +#include #include #include #include "executor.h" +#include "helper.h" #include "gettext.h" #define _(msgid) gettext (msgid) diff --git a/src/ui/gui/entry-dialog.c b/src/ui/gui/entry-dialog.c index 148af744..b832c867 100644 --- a/src/ui/gui/entry-dialog.c +++ b/src/ui/gui/entry-dialog.c @@ -18,7 +18,7 @@ #include "ui/gui/entry-dialog.h" -#include "ui/gui/helper.h" +#include "ui/gui/builder-wrapper.h" #include "ui/gui/psppire-dialog.h" #include "gl/xalloc.h" diff --git a/src/ui/gui/examine-dialog.c b/src/ui/gui/examine-dialog.c index 7b33ac45..857394fb 100644 --- a/src/ui/gui/examine-dialog.c +++ b/src/ui/gui/examine-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation + Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012 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 @@ -25,10 +25,11 @@ #include #include #include -#include +#include #include #include #include "executor.h" +#include "helper.h" #include "gettext.h" #define _(msgid) gettext (msgid) diff --git a/src/ui/gui/factor-dialog.c b/src/ui/gui/factor-dialog.c index 26702450..3385505f 100644 --- a/src/ui/gui/factor-dialog.c +++ b/src/ui/gui/factor-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2009, 2010, 2011 Free Software Foundation + Copyright (C) 2009, 2010, 2011, 2012 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 @@ -32,6 +32,7 @@ #include "executor.h" #include "helper.h" +#include "builder-wrapper.h" #include diff --git a/src/ui/gui/find-dialog.c b/src/ui/gui/find-dialog.c index 51645d6f..0f856f94 100644 --- a/src/ui/gui/find-dialog.c +++ b/src/ui/gui/find-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2007, 2009, 2011 Free Software Foundation + Copyright (C) 2007, 2009, 2011, 2012 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 @@ -23,6 +23,7 @@ which match particular strings */ #include "find-dialog.h" #include "psppire-selector.h" #include "psppire-dialog.h" +#include "builder-wrapper.h" #include "helper.h" #include "psppire-data-window.h" #include "dict-display.h" diff --git a/src/ui/gui/frequencies-dialog.c b/src/ui/gui/frequencies-dialog.c index 016682e4..8db8ddc8 100644 --- a/src/ui/gui/frequencies-dialog.c +++ b/src/ui/gui/frequencies-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2007, 2010, 2011 Free Software Foundation + Copyright (C) 2007, 2010, 2011, 2012 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 @@ -26,10 +26,11 @@ #include #include #include -#include +#include #include #include #include "executor.h" +#include "helper.h" #include "gettext.h" #define _(msgid) gettext (msgid) diff --git a/src/ui/gui/goto-case-dialog.c b/src/ui/gui/goto-case-dialog.c index 832e1f2d..1b85a536 100644 --- a/src/ui/gui/goto-case-dialog.c +++ b/src/ui/gui/goto-case-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2007 Free Software Foundation + Copyright (C) 2007, 2012 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 @@ -17,7 +17,7 @@ #include #include "goto-case-dialog.h" -#include "helper.h" +#include "builder-wrapper.h" #include "psppire-dialog.h" #include "psppire-data-window.h" #include "psppire-data-store.h" diff --git a/src/ui/gui/helper.c b/src/ui/gui/helper.c index 3c7d7bcf..30f7da1f 100644 --- a/src/ui/gui/helper.c +++ b/src/ui/gui/helper.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2007, 2009, 2010, 2011 Free Software Foundation + Copyright (C) 2007, 2009, 2010, 2011, 2012 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 @@ -111,58 +111,6 @@ text_to_value (const gchar *text, } -GtkBuilder * -builder_new_real (const gchar *name) -{ - GtkBuilder *builder = gtk_builder_new (); - - GError *err = NULL; - if ( ! gtk_builder_add_from_file (builder, name, &err)) - { - g_critical ("Couldnt open user interface file %s: %s", name, err->message); - g_clear_error (&err); - } - - return builder; -} - - -GObject * -get_object_assert (GtkBuilder *builder, const gchar *name, GType type) -{ - GObject *o = NULL; - g_assert (name); - - o = gtk_builder_get_object (builder, name); - - if ( !o ) - g_critical ("Object `%s' could not be found\n", name); - else if ( ! g_type_is_a (G_OBJECT_TYPE (o), type)) - { - g_critical ("Object `%s' was expected to have type %s, but in fact has type %s", - name, g_type_name (type), G_OBJECT_TYPE_NAME (o)); - } - - return o; -} - - -GtkAction * -get_action_assert (GtkBuilder *builder, const gchar *name) -{ - return GTK_ACTION (get_object_assert (builder, name, GTK_TYPE_ACTION)); -} - -GtkWidget * -get_widget_assert (GtkBuilder *builder, const gchar *name) -{ - GtkWidget *w = GTK_WIDGET (get_object_assert (builder, name, GTK_TYPE_WIDGET)); - - g_object_set (w, "name", name, NULL); - - return w; -} - /* This function must be used whenever a filename generated by glib, (eg, from gtk_file_chooser_get_filename) and passed to the C library, (eg through a pspp syntax string). diff --git a/src/ui/gui/helper.h b/src/ui/gui/helper.h index 597fdd78..25b9d50a 100644 --- a/src/ui/gui/helper.h +++ b/src/ui/gui/helper.h @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2004, 2009, 2010, 2011 Free Software Foundation + Copyright (C) 2004, 2009, 2010, 2011, 2012 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 @@ -18,7 +18,6 @@ #ifndef __MISC_H__ #define __MISC_H__ -#include "relocatable.h" #include #include @@ -27,8 +26,6 @@ #include "psppire-dict.h" -#include "gl/configmake.h" - gchar *paste_syntax_to_window (gchar *syntax); struct fmt_spec; @@ -56,19 +53,11 @@ text_to_value (const gchar *text, const struct variable *var, union value *); -GObject *get_object_assert (GtkBuilder *builder, const gchar *name, GType type); -GtkAction * get_action_assert (GtkBuilder *builder, const gchar *name); -GtkWidget * get_widget_assert (GtkBuilder *builder, const gchar *name); - gchar * convert_glib_filename_to_system_filename (const gchar *fname, GError **err); void connect_help (GtkBuilder *); -#define builder_new(NAME) builder_new_real (relocate (PKGDATADIR "/" NAME)) - -GtkBuilder *builder_new_real (const gchar *name); - /* Create a deep copy of SRC */ GtkListStore * clone_list_store (const GtkListStore *src); diff --git a/src/ui/gui/k-means-dialog.c b/src/ui/gui/k-means-dialog.c index 0b2f00fa..329602b3 100644 --- a/src/ui/gui/k-means-dialog.c +++ b/src/ui/gui/k-means-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2011 Free Software Foundation + Copyright (C) 2011, 2012 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 @@ -30,6 +30,7 @@ #include "executor.h" #include "helper.h" +#include "builder-wrapper.h" #include diff --git a/src/ui/gui/k-related-dialog.c b/src/ui/gui/k-related-dialog.c index fd849005..17189452 100644 --- a/src/ui/gui/k-related-dialog.c +++ b/src/ui/gui/k-related-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2010, 2011 Free Software Foundation + Copyright (C) 2010, 2011, 2012 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 @@ -23,9 +23,9 @@ #include "psppire-acr.h" #include "dialog-common.h" -#include "helper.h" +#include "builder-wrapper.h" #include "executor.h" - +#include "helper.h" #include diff --git a/src/ui/gui/ks-one-sample-dialog.c b/src/ui/gui/ks-one-sample-dialog.c index c9a1bcbd..afdac081 100644 --- a/src/ui/gui/ks-one-sample-dialog.c +++ b/src/ui/gui/ks-one-sample-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2011 Free Software Foundation + Copyright (C) 2011, 2012 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,7 +28,9 @@ #include "psppire-var-view.h" #include "executor.h" +#include "builder-wrapper.h" #include "helper.h" + #include "dialog-common.h" #include diff --git a/src/ui/gui/missing-val-dialog.c b/src/ui/gui/missing-val-dialog.c index dbb80a2d..3e42036c 100644 --- a/src/ui/gui/missing-val-dialog.c +++ b/src/ui/gui/missing-val-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2005, 2006, 2009, 2011 Free Software Foundation + Copyright (C) 2005, 2006, 2009, 2011, 2012 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 @@ -23,6 +23,7 @@ #define N_(msgid) msgid +#include "builder-wrapper.h" #include "helper.h" #include #include "missing-val-dialog.h" diff --git a/src/ui/gui/oneway-anova-dialog.c b/src/ui/gui/oneway-anova-dialog.c index 8b91a513..387fa4f2 100644 --- a/src/ui/gui/oneway-anova-dialog.c +++ b/src/ui/gui/oneway-anova-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2007, 2010, 2011 Free Software Foundation + Copyright (C) 2007, 2010, 2011, 2012 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 @@ -21,7 +21,7 @@ #include "psppire-dict.h" #include "psppire-var-store.h" #include "psppire-var-view.h" -#include "helper.h" +#include "builder-wrapper.h" #include "psppire-data-window.h" #include "psppire-dialog.h" #include "dialog-common.h" @@ -30,7 +30,7 @@ #include "dict-display.h" #include "executor.h" - +#include "helper.h" #include "gettext.h" #define _(msgid) gettext (msgid) diff --git a/src/ui/gui/paired-dialog.c b/src/ui/gui/paired-dialog.c index 39a8ae91..2b61903f 100644 --- a/src/ui/gui/paired-dialog.c +++ b/src/ui/gui/paired-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2011 Free Software Foundation + Copyright (C) 2011, 2012 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 @@ -35,7 +35,7 @@ #include "psppire-var-ptr.h" -#include "helper.h" +#include "builder-wrapper.h" diff --git a/src/ui/gui/psppire-data-window.c b/src/ui/gui/psppire-data-window.c index 64e044b0..b2607a0c 100644 --- a/src/ui/gui/psppire-data-window.c +++ b/src/ui/gui/psppire-data-window.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation + Copyright (C) 2008, 2009, 2010, 2011, 2012 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 @@ -27,6 +27,7 @@ #include "ui/gui/aggregate-dialog.h" #include "ui/gui/autorecode-dialog.h" #include "ui/gui/binomial-dialog.h" +#include "ui/gui/builder-wrapper.h" #include "ui/gui/chi-square-dialog.h" #include "ui/gui/comments-dialog.h" #include "ui/gui/compute-dialog.h" @@ -43,6 +44,7 @@ #include "ui/gui/goto-case-dialog.h" #include "ui/gui/help-menu.h" #include "ui/gui/helper.h" +#include "ui/gui/helper.h" #include "ui/gui/k-means-dialog.h" #include "ui/gui/k-related-dialog.h" #include "ui/gui/npar-two-sample-related.h" diff --git a/src/ui/gui/psppire-dialog.c b/src/ui/gui/psppire-dialog.c index de2490a0..c5ac30b2 100644 --- a/src/ui/gui/psppire-dialog.c +++ b/src/ui/gui/psppire-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2007, 2010, 2011 Free Software Foundation + Copyright (C) 2007, 2010, 2011, 2012 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 @@ -23,7 +23,7 @@ #include "psppire-selector.h" #include "psppire-conf.h" #include -#include "helper.h" +#include "builder-wrapper.h" #include "help-menu.h" static void psppire_dialog_class_init (PsppireDialogClass *); diff --git a/src/ui/gui/psppire-output-window.c b/src/ui/gui/psppire-output-window.c index 99a11ed5..29b84903 100644 --- a/src/ui/gui/psppire-output-window.c +++ b/src/ui/gui/psppire-output-window.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation + Copyright (C) 2008, 2009, 2010, 2011, 2012 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 @@ -35,13 +35,15 @@ #include "output/table-item.h" #include "output/text-item.h" #include "ui/gui/help-menu.h" -#include "ui/gui/helper.h" +#include "ui/gui/builder-wrapper.h" #include "ui/gui/psppire-output-window.h" #include "gl/error.h" #include "gl/tmpdir.h" #include "gl/xalloc.h" +#include "helper.h" + #include #define _(msgid) gettext (msgid) #define N_(msgid) msgid @@ -180,10 +182,8 @@ expose_event_callback (GtkWidget *widget, GdkEventExpose *event, gpointer data) const GtkStyle *style = gtk_widget_get_style (GTK_WIDGET (viewer)); - struct text_item *text_item; PangoFontDescription *font_desc; char *font_name; - int font_width; gchar *fgc = gdk_color_to_string (&style->text[gtk_widget_get_state (GTK_WIDGET (widget))]); diff --git a/src/ui/gui/psppire-syntax-window.c b/src/ui/gui/psppire-syntax-window.c index 1ad906a1..c68ad445 100644 --- a/src/ui/gui/psppire-syntax-window.c +++ b/src/ui/gui/psppire-syntax-window.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation + Copyright (C) 2008, 2009, 2010, 2011, 2012 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 @@ -31,6 +31,7 @@ #include "ui/gui/executor.h" #include "ui/gui/help-menu.h" #include "ui/gui/helper.h" +#include "ui/gui/builder-wrapper.h" #include "ui/gui/psppire-data-window.h" #include "ui/gui/psppire-encoding-selector.h" #include "ui/gui/psppire-lex-reader.h" diff --git a/src/ui/gui/psppire-var-sheet.c b/src/ui/gui/psppire-var-sheet.c index dcec70bd..648d9fd7 100644 --- a/src/ui/gui/psppire-var-sheet.c +++ b/src/ui/gui/psppire-var-sheet.c @@ -18,6 +18,7 @@ #include "psppire-var-sheet.h" #include +#include "builder-wrapper.h" #include "helper.h" #include "customentry.h" diff --git a/src/ui/gui/rank-dialog.c b/src/ui/gui/rank-dialog.c index 58e4f511..23de30c0 100644 --- a/src/ui/gui/rank-dialog.c +++ b/src/ui/gui/rank-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2007, 2010, 2011 Free Software Foundation + Copyright (C) 2007, 2010, 2011, 2012 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 @@ -24,11 +24,12 @@ #include #include #include -#include +#include #include #include #include #include "executor.h" +#include "helper.h" #include "gettext.h" #define _(msgid) gettext (msgid) diff --git a/src/ui/gui/recode-dialog.c b/src/ui/gui/recode-dialog.c index dc14067d..7e85eca3 100644 --- a/src/ui/gui/recode-dialog.c +++ b/src/ui/gui/recode-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2007, 2009, 2010, 2011 Free Software Foundation + Copyright (C) 2007, 2009, 2010, 2011, 2012 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 @@ -34,7 +34,8 @@ #include #include #include -#include +#include +#include "helper.h" #include #include diff --git a/src/ui/gui/regression-dialog.c b/src/ui/gui/regression-dialog.c index 7bea89e1..ac23fb1d 100644 --- a/src/ui/gui/regression-dialog.c +++ b/src/ui/gui/regression-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2008, 2010, 2011 Free Software Foundation + Copyright (C) 2008, 2010, 2011, 2012 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 @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include diff --git a/src/ui/gui/reliability-dialog.c b/src/ui/gui/reliability-dialog.c index c60f0df5..c6433c1f 100644 --- a/src/ui/gui/reliability-dialog.c +++ b/src/ui/gui/reliability-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2009, 2010, 2011 Free Software Foundation + Copyright (C) 2009, 2010, 2011, 2012 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 @@ -26,6 +26,7 @@ #include "psppire-var-view.h" #include "executor.h" +#include "builder-wrapper.h" #include "helper.h" #include diff --git a/src/ui/gui/roc-dialog.c b/src/ui/gui/roc-dialog.c index a024c9c4..2ecb47e9 100644 --- a/src/ui/gui/roc-dialog.c +++ b/src/ui/gui/roc-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2009, 2010, 2011 Free Software Foundation + Copyright (C) 2009, 2010, 2011, 2012 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,7 @@ #include "psppire-var-view.h" #include "executor.h" +#include "builder-wrapper.h" #include "helper.h" #include diff --git a/src/ui/gui/runs-dialog.c b/src/ui/gui/runs-dialog.c index 2e219373..6f877e82 100644 --- a/src/ui/gui/runs-dialog.c +++ b/src/ui/gui/runs-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2011 Free Software Foundation + Copyright (C) 2011, 2012 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,7 @@ #include "psppire-var-view.h" #include "executor.h" +#include "builder-wrapper.h" #include "helper.h" #include diff --git a/src/ui/gui/select-cases-dialog.c b/src/ui/gui/select-cases-dialog.c index 9febcafa..be0a957f 100644 --- a/src/ui/gui/select-cases-dialog.c +++ b/src/ui/gui/select-cases-dialog.c @@ -26,7 +26,9 @@ #include "dialog-common.h" #include "widget-io.h" #include "psppire-scanf.h" +#include "builder-wrapper.h" #include "helper.h" + #include diff --git a/src/ui/gui/sort-cases-dialog.c b/src/ui/gui/sort-cases-dialog.c index 6977469b..62d738c9 100644 --- a/src/ui/gui/sort-cases-dialog.c +++ b/src/ui/gui/sort-cases-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2007, 2010, 2011 Free Software Foundation + Copyright (C) 2007, 2010, 2011, 2012 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 @@ -26,14 +26,15 @@ #include "dict-display.h" #include "psppire-var-view.h" +#include "builder-wrapper.h" #include "helper.h" + static void refresh (PsppireDialog *dialog, GtkTreeView *dest) { GtkTreeModel *liststore = gtk_tree_view_get_model (dest); - gtk_list_store_clear (GTK_LIST_STORE (liststore)); } diff --git a/src/ui/gui/split-file-dialog.c b/src/ui/gui/split-file-dialog.c index 46758ed5..6e9259ee 100644 --- a/src/ui/gui/split-file-dialog.c +++ b/src/ui/gui/split-file-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2007, 2010, 2011 Free Software Foundation + Copyright (C) 2007, 2010, 2011, 2012 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 @@ -22,7 +22,9 @@ #include "executor.h" #include "psppire-data-window.h" #include "dict-display.h" +#include "builder-wrapper.h" #include "helper.h" + #include #include "psppire-var-view.h" diff --git a/src/ui/gui/t-test-independent-samples-dialog.c b/src/ui/gui/t-test-independent-samples-dialog.c index d4adf587..f83f9e0d 100644 --- a/src/ui/gui/t-test-independent-samples-dialog.c +++ b/src/ui/gui/t-test-independent-samples-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2007, 2009, 2010, 2011 Free Software Foundation + Copyright (C) 2007, 2009, 2010, 2011, 2012 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 @@ -31,6 +31,7 @@ #include "t-test-options.h" #include +#include "builder-wrapper.h" #include "helper.h" #include diff --git a/src/ui/gui/t-test-one-sample.c b/src/ui/gui/t-test-one-sample.c index 477d1de5..02d3eff3 100644 --- a/src/ui/gui/t-test-one-sample.c +++ b/src/ui/gui/t-test-one-sample.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2007, 2010, 2011 Free Software Foundation + Copyright (C) 2007, 2010, 2011, 2012 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 @@ -22,7 +22,7 @@ #include "psppire-dict.h" #include "psppire-var-store.h" #include "psppire-var-view.h" -#include "helper.h" +#include "builder-wrapper.h" #include "psppire-data-window.h" #include "psppire-dialog.h" #include "dialog-common.h" @@ -31,6 +31,7 @@ #include "executor.h" #include "t-test-options.h" +#include "helper.h" #include #define _(msgid) gettext (msgid) diff --git a/src/ui/gui/t-test-options.c b/src/ui/gui/t-test-options.c index d4656bf4..1caac9c0 100644 --- a/src/ui/gui/t-test-options.c +++ b/src/ui/gui/t-test-options.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2007 Free Software Foundation + Copyright (C) 2007, 2012 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 @@ -21,6 +21,7 @@ #include "psppire-dialog.h" #include +#include "builder-wrapper.h" #include "helper.h" #include "t-test-options.h" diff --git a/src/ui/gui/text-data-import-dialog.c b/src/ui/gui/text-data-import-dialog.c index a6aba1e8..3f6babdf 100644 --- a/src/ui/gui/text-data-import-dialog.c +++ b/src/ui/gui/text-data-import-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation + Copyright (C) 2008, 2009, 2010, 2011, 2012 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 @@ -39,6 +39,7 @@ #include "ui/gui/dialog-common.h" #include "ui/gui/executor.h" #include "ui/gui/helper.h" +#include "ui/gui/builder-wrapper.h" #include "ui/gui/psppire-data-window.h" #include "ui/gui/psppire-dialog.h" #include "ui/gui/psppire-var-sheet.h" diff --git a/src/ui/gui/transpose-dialog.c b/src/ui/gui/transpose-dialog.c index 87e3b1e4..f91b5525 100644 --- a/src/ui/gui/transpose-dialog.c +++ b/src/ui/gui/transpose-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2007, 2010, 2011 Free Software Foundation + Copyright (C) 2007, 2010, 2011, 2012 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 @@ -23,6 +23,7 @@ #include "executor.h" #include "psppire-data-window.h" #include "dict-display.h" +#include "builder-wrapper.h" #include "helper.h" #include "dialog-common.h" diff --git a/src/ui/gui/univariate-dialog.c b/src/ui/gui/univariate-dialog.c index 2692e488..44e341a2 100644 --- a/src/ui/gui/univariate-dialog.c +++ b/src/ui/gui/univariate-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2011 Free Software Foundation + Copyright (C) 2011, 2012 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 @@ -17,7 +17,7 @@ #include #include -#include +#include #include "psppire-dialog.h" #include "dict-display.h" @@ -27,6 +27,7 @@ #include #include "executor.h" +#include "helper.h" #include "univariate-dialog.h" diff --git a/src/ui/gui/val-labs-dialog.c b/src/ui/gui/val-labs-dialog.c index 6126afc1..6b556d6d 100644 --- a/src/ui/gui/val-labs-dialog.c +++ b/src/ui/gui/val-labs-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2005, 2009, 2010, 2011 Free Software Foundation + Copyright (C) 2005, 2009, 2010, 2011, 2012 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 @@ -22,7 +22,7 @@ #include -#include "helper.h" +#include "builder-wrapper.h" #include "val-labs-dialog.h" #include #include @@ -30,6 +30,8 @@ #include "psppire-var-store.h" #include +#include "helper.h" + #include #define _(msgid) gettext (msgid) #define N_(msgid) msgid diff --git a/src/ui/gui/var-type-dialog.c b/src/ui/gui/var-type-dialog.c index a4c2a227..fb9fc6d9 100644 --- a/src/ui/gui/var-type-dialog.c +++ b/src/ui/gui/var-type-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2005, 2006, 2010, 2011 Free Software Foundation + Copyright (C) 2005, 2006, 2010, 2011, 2012 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,7 +28,7 @@ #include "data/settings.h" #include "data/variable.h" #include "libpspp/message.h" -#include "ui/gui/helper.h" +#include "ui/gui/builder-wrapper.h" #include "ui/gui/var-type-dialog.h" struct tgs diff --git a/src/ui/gui/variable-info-dialog.c b/src/ui/gui/variable-info-dialog.c index d5b41a98..1cd9b1d7 100644 --- a/src/ui/gui/variable-info-dialog.c +++ b/src/ui/gui/variable-info-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2007, 2009, 2010, 2011 Free Software Foundation + Copyright (C) 2007, 2009, 2010, 2011, 2012 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,7 @@ #include "psppire-dialog.h" #include "psppire-dictview.h" #include "psppire-var-store.h" +#include "builder-wrapper.h" #include "helper.h" diff --git a/src/ui/gui/weight-cases-dialog.c b/src/ui/gui/weight-cases-dialog.c index fa85ae4a..c19eda0d 100644 --- a/src/ui/gui/weight-cases-dialog.c +++ b/src/ui/gui/weight-cases-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2007, 2010, 2011 Free Software Foundation + Copyright (C) 2007, 2010, 2011, 2012 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 @@ -22,6 +22,7 @@ #include "executor.h" #include "psppire-data-window.h" #include "dict-display.h" +#include "builder-wrapper.h" #include "helper.h" #include