#include "psppire-data-window.h"
#include "psppire-data-editor.h"
#include <language/syntax-string-source.h>
-#include "psppire-syntax-window.h"
+#include "helper.h"
#include "psppire-var-store.h"
#include <ui/syntax-gen.h>
case GTK_RESPONSE_OK:
{
gchar *syntax = generate_syntax (&cd);
+
struct getl_interface *sss = create_syntax_string_source (syntax);
execute_syntax (sss);
{
gchar *syntax = generate_syntax (&cd);
- GtkWidget *se = psppire_syntax_window_new ();
-
- gtk_text_buffer_insert_at_cursor (PSPPIRE_SYNTAX_WINDOW (se)->buffer, syntax, -1);
-
- gtk_widget_show (se);
+ paste_syntax_in_new_window (syntax);
g_free (syntax);
}
#include <language/expressions/public.h>
#include <language/syntax-string-source.h>
-#include "psppire-syntax-window.h"
+#include "helper.h"
static void function_list_populate (GtkTreeView *tv);
case GTK_RESPONSE_OK:
{
gchar *syntax = generate_syntax (&scd);
+
struct getl_interface *sss = create_syntax_string_source (syntax);
execute_syntax (sss);
{
gchar *syntax = generate_syntax (&scd);
- GtkWidget *se = psppire_syntax_window_new ();
-
- gtk_text_buffer_insert_at_cursor (PSPPIRE_SYNTAX_WINDOW (se)->buffer, syntax, -1);
-
- gtk_widget_show (se);
+ paste_syntax_in_new_window (syntax);
g_free (syntax);
}
#include <ui/gui/helper.h>
#include <ui/gui/psppire-dialog.h>
#include <ui/gui/psppire-var-store.h>
-#include <ui/gui/psppire-syntax-window.h>
+#include <ui/gui/helper.h>
#include "gettext.h"
#define _(msgid) gettext (msgid)
case GTK_RESPONSE_OK:
{
gchar *syntax = generate_syntax (&cd);
+
struct getl_interface *sss = create_syntax_string_source (syntax);
execute_syntax (sss);
{
gchar *syntax = generate_syntax (&cd);
- GtkWidget *se = psppire_syntax_window_new ();
-
- gtk_text_buffer_insert_at_cursor (PSPPIRE_SYNTAX_WINDOW (se)->buffer, syntax, -1);
-
- gtk_widget_show (se);
+ paste_syntax_in_new_window (syntax);
g_free (syntax);
}
#include <ui/gui/helper.h>
#include <ui/gui/psppire-dialog.h>
#include <ui/gui/psppire-var-store.h>
-#include <ui/gui/psppire-syntax-window.h>
+#include <ui/gui/helper.h>
#include "gettext.h"
#define _(msgid) gettext (msgid)
case GTK_RESPONSE_OK:
{
gchar *syntax = generate_syntax (&scd);
+
struct getl_interface *sss = create_syntax_string_source (syntax);
execute_syntax (sss);
case PSPPIRE_RESPONSE_PASTE:
{
gchar *syntax = generate_syntax (&scd);
-
- GtkWidget *se = psppire_syntax_window_new ();
-
- gtk_text_buffer_insert_at_cursor (PSPPIRE_SYNTAX_WINDOW (se)->buffer, syntax, -1);
-
- gtk_widget_show (se);
-
+ paste_syntax_in_new_window (syntax);
g_free (syntax);
}
break;
#include <ui/gui/helper.h>
#include <ui/gui/psppire-dialog.h>
#include <ui/gui/psppire-var-store.h>
-#include <ui/gui/psppire-syntax-window.h>
+#include <ui/gui/helper.h>
#include "gettext.h"
#define _(msgid) gettext (msgid)
case PSPPIRE_RESPONSE_PASTE:
{
gchar *syntax = generate_syntax (&ex_d);
-
- GtkWidget *se = psppire_syntax_window_new ();
-
- gtk_text_buffer_insert_at_cursor (PSPPIRE_SYNTAX_WINDOW (se)->buffer, syntax, -1);
-
- gtk_widget_show (se);
-
+ paste_syntax_in_new_window (syntax);
g_free (syntax);
}
break;
#include <ui/gui/helper.h>
#include <ui/gui/psppire-dialog.h>
#include <ui/gui/psppire-var-store.h>
-#include <ui/gui/psppire-syntax-window.h>
+#include <ui/gui/helper.h>
#include "gettext.h"
#define _(msgid) gettext (msgid)
case GTK_RESPONSE_OK:
{
gchar *syntax = generate_syntax (&fd);
+
struct getl_interface *sss = create_syntax_string_source (syntax);
execute_syntax (sss);
case PSPPIRE_RESPONSE_PASTE:
{
gchar *syntax = generate_syntax (&fd);
-
- GtkWidget *se = psppire_syntax_window_new ();
-
- gtk_text_buffer_insert_at_cursor (PSPPIRE_SYNTAX_WINDOW (se)->buffer, syntax, -1);
-
- gtk_widget_show (se);
-
+ paste_syntax_in_new_window (syntax);
g_free (syntax);
}
break;
*/
#include <config.h>
+#include "psppire-syntax-window.h"
+
#include <glib-object.h>
#include <glib.h>
}
+
+
+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);
+}
#include <gtk/gtk.h>
#include <glade/glade.h>
+
+
+void paste_syntax_in_new_window (const gchar *syntax);
+
/*
GtkRecentChooserMenu was added in 2.10.0
but it didn't support GtkRecentFilters until
#include <language/syntax-string-source.h>
-#include "psppire-syntax-window.h"
+#include "helper.h"
#include "gettext.h"
case GTK_RESPONSE_OK:
{
gchar *syntax = generate_syntax (&ow);
+
struct getl_interface *sss = create_syntax_string_source (syntax);
execute_syntax (sss);
case PSPPIRE_RESPONSE_PASTE:
{
gchar *syntax = generate_syntax (&ow);
-
- GtkWidget *se = psppire_syntax_window_new ();
-
- gtk_text_buffer_insert_at_cursor (PSPPIRE_SYNTAX_WINDOW (se)->buffer, syntax, -1);
-
- gtk_widget_show (se);
+ paste_syntax_in_new_window (syntax);
g_free (syntax);
}
#endif
}
-
-
static void
variable_changed_callback (GObject *obj, gint var_num, gpointer data)
{
psppire_sheet_column_columns_changed (PSPPIRE_SHEET_COLUMN (store),
var_num, 1);
-
psppire_sheet_model_range_changed (PSPPIRE_SHEET_MODEL (store),
-1, var_num,
-1, var_num);
de->data_sheet_cases_popup_menu =
GTK_MENU (create_data_sheet_cases_popup_menu (de));
- PSPPIRE_WINDOW (de)->menu = GTK_MENU (get_widget_assert (de->xml,"Windows_menu"));
- g_object_ref (PSPPIRE_WINDOW (de)->menu);
+ PSPPIRE_WINDOW (de)->menu = GTK_MENU_SHELL (get_widget_assert (de->xml,"Windows_menu"));
g_object_set (de->data_editor,
"datasheet-column-menu", de->data_sheet_variable_popup_menu,
{
GObjectClass *class = G_OBJECT_GET_CLASS (object);
- PsppireSyntaxWindow *window = PSPPIRE_SYNTAX_WINDOW (object);
-
GObjectClass *parent_class = g_type_class_peek_parent (class);
if (G_OBJECT_CLASS (parent_class)->finalize)
"activate",
G_CALLBACK (psppire_window_minimise_all), NULL);
- PSPPIRE_WINDOW (window)->menu = GTK_MENU (get_widget_assert (xml,"windows_menu"));
- g_object_ref (PSPPIRE_WINDOW (window)->menu);
+ PSPPIRE_WINDOW (window)->menu = GTK_MENU_SHELL (get_widget_assert (xml,"windows_menu"));
g_object_unref (xml);
#ifndef __PSPPIRE_SYNTAX_WINDOW_H__
#define __PSPPIRE_SYNTAX_WINDOW_H__
-
#include <glib.h>
#include <glib-object.h>
#include <gtk/gtkaction.h>
#include <ui/gui/helper.h>
#include <ui/gui/psppire-dialog.h>
#include <ui/gui/psppire-var-store.h>
-#include <ui/gui/psppire-syntax-window.h>
+#include <ui/gui/helper.h>
#include "gettext.h"
#define _(msgid) gettext (msgid)
case GTK_RESPONSE_OK:
{
gchar *syntax = generate_syntax (&rd);
+
struct getl_interface *sss = create_syntax_string_source (syntax);
execute_syntax (sss);
case PSPPIRE_RESPONSE_PASTE:
{
gchar *syntax = generate_syntax (&rd);
-
- GtkWidget *se = psppire_syntax_window_new ();
-
- gtk_text_buffer_insert_at_cursor (PSPPIRE_SYNTAX_WINDOW (se)->buffer, syntax, -1);
-
- gtk_widget_show (se);
-
+ paste_syntax_in_new_window (syntax);
g_free (syntax);
}
break;
#include <ui/gui/helper.h>
#include <ui/gui/psppire-dialog.h>
#include <ui/gui/psppire-var-store.h>
-#include <ui/gui/psppire-syntax-window.h>
+#include <ui/gui/helper.h>
#include <ui/syntax-gen.h>
#include "psppire-acr.h"
case GTK_RESPONSE_OK:
{
gchar *syntax = generate_syntax (&rd);
+
struct getl_interface *sss = create_syntax_string_source (syntax);
execute_syntax (sss);
case PSPPIRE_RESPONSE_PASTE:
{
gchar *syntax = generate_syntax (&rd);
-
- GtkWidget *se = psppire_syntax_window_new ();
-
- gtk_text_buffer_insert_at_cursor (PSPPIRE_SYNTAX_WINDOW (se)->buffer, syntax, -1);
-
- gtk_widget_show (se);
+ paste_syntax_in_new_window (syntax);
g_free (syntax);
}
#include <ui/gui/helper.h>
#include <ui/gui/psppire-dialog.h>
#include <ui/gui/psppire-var-store.h>
-#include <ui/gui/psppire-syntax-window.h>
+#include <ui/gui/helper.h>
#include "gettext.h"
#define _(msgid) gettext (msgid)
case GTK_RESPONSE_OK:
{
gchar *syntax = generate_syntax (&rd);
+
struct getl_interface *sss = create_syntax_string_source (syntax);
execute_syntax (sss);
case PSPPIRE_RESPONSE_PASTE:
{
gchar *syntax = generate_syntax (&rd);
-
- GtkWidget *se = psppire_syntax_window_new ();
-
- gtk_text_buffer_insert_at_cursor (PSPPIRE_SYNTAX_WINDOW (se)->buffer, syntax, -1);
-
- gtk_widget_show (se);
+ paste_syntax_in_new_window (syntax);
g_free (syntax);
}
#include "dict-display.h"
#include "widget-io.h"
#include <language/syntax-string-source.h>
-#include "psppire-syntax-window.h"
+#include "helper.h"
#include <gettext.h>
case GTK_RESPONSE_OK:
{
gchar *syntax = generate_syntax (&scd);
+
struct getl_interface *sss = create_syntax_string_source (syntax);
execute_syntax (sss);
case PSPPIRE_RESPONSE_PASTE:
{
gchar *syntax = generate_syntax (&scd);
-
- GtkWidget *se = psppire_syntax_window_new ();
-
- gtk_text_buffer_insert_at_cursor (PSPPIRE_SYNTAX_WINDOW (se)->buffer, syntax, -1);
-
- gtk_widget_show (se);
+ paste_syntax_in_new_window (syntax);
g_free (syntax);
}
#include "dict-display.h"
#include <language/syntax-string-source.h>
-#include "psppire-syntax-window.h"
+#include "helper.h"
static void
refresh (PsppireDialog *dialog, GtkTreeView *dest)
case GTK_RESPONSE_OK:
{
gchar *syntax = generate_syntax (&scd);
+
struct getl_interface *sss = create_syntax_string_source (syntax);
execute_syntax (sss);
case PSPPIRE_RESPONSE_PASTE:
{
gchar *syntax = generate_syntax (&scd);
-
- GtkWidget *se = psppire_syntax_window_new ();
-
- gtk_text_buffer_insert_at_cursor (PSPPIRE_SYNTAX_WINDOW (se)->buffer, syntax, -1);
-
- gtk_widget_show (se);
+ paste_syntax_in_new_window (syntax);
g_free (syntax);
}
#include "psppire-data-window.h"
#include "dict-display.h"
#include <language/syntax-string-source.h>
-#include "psppire-syntax-window.h"
+#include "helper.h"
#include <data/dictionary.h>
#include <gtk/gtk.h>
case GTK_RESPONSE_OK:
{
gchar *syntax = generate_syntax (&sfd);
+
struct getl_interface *sss = create_syntax_string_source (syntax);
execute_syntax (sss);
case PSPPIRE_RESPONSE_PASTE:
{
gchar *syntax = generate_syntax (&sfd);
-
- GtkWidget *se = psppire_syntax_window_new ();
-
- gtk_text_buffer_insert_at_cursor (PSPPIRE_SYNTAX_WINDOW (se)->buffer, syntax, -1);
-
- gtk_widget_show (se);
+ paste_syntax_in_new_window (syntax);
g_free (syntax);
}
#include <ui/syntax-gen.h>
#include <language/syntax-string-source.h>
-#include "psppire-syntax-window.h"
+#include "helper.h"
#include <gl/xalloc.h>
case GTK_RESPONSE_OK:
{
gchar *syntax = generate_syntax (&tt_d);
+
struct getl_interface *sss = create_syntax_string_source (syntax);
execute_syntax (sss);
case PSPPIRE_RESPONSE_PASTE:
{
gchar *syntax = generate_syntax (&tt_d);
-
- GtkWidget *se = psppire_syntax_window_new ();
-
- gtk_text_buffer_insert_at_cursor (PSPPIRE_SYNTAX_WINDOW (se)->buffer, syntax, -1);
-
- gtk_widget_show (se);
-
+ paste_syntax_in_new_window (syntax);
g_free (syntax);
}
break;
#include "t-test-options.h"
#include <language/syntax-string-source.h>
-#include "psppire-syntax-window.h"
#include <gettext.h>
#define _(msgid) gettext (msgid)
case GTK_RESPONSE_OK:
{
gchar *syntax = generate_syntax (&tt_d);
+
struct getl_interface *sss = create_syntax_string_source (syntax);
execute_syntax (sss);
{
gchar *syntax = generate_syntax (&tt_d);
- GtkWidget *se = psppire_syntax_window_new ();
-
- gtk_text_buffer_insert_at_cursor (PSPPIRE_SYNTAX_WINDOW (se)->buffer, syntax, -1);
-
- gtk_widget_show (se);
+ paste_syntax_in_new_window (syntax);
g_free (syntax);
}
#include "dialog-common.h"
#include "psppire-dialog.h"
-#include "psppire-syntax-window.h"
-
#include "helper.h"
#include "psppire-var-ptr.h"
case GTK_RESPONSE_OK:
{
gchar *syntax = generate_syntax (&tt_d);
+
struct getl_interface *sss = create_syntax_string_source (syntax);
execute_syntax (sss);
case PSPPIRE_RESPONSE_PASTE:
{
gchar *syntax = generate_syntax (&tt_d);
-
- GtkWidget *se = psppire_syntax_window_new ();
-
- gtk_text_buffer_insert_at_cursor (PSPPIRE_SYNTAX_WINDOW (se)->buffer, syntax, -1);
-
- gtk_widget_show (se);
+ paste_syntax_in_new_window (syntax);
g_free (syntax);
}
#include <ui/gui/psppire-dialog.h>
#include <ui/gui/psppire-var-sheet.h>
#include <ui/gui/psppire-var-store.h>
-#include <ui/gui/psppire-syntax-window.h>
+#include <ui/gui/helper.h>
#include "error.h"
#include "xalloc.h"
case PSPPIRE_RESPONSE_PASTE:
{
char *syntax = generate_syntax (ia);
-
- GtkWidget *se = psppire_syntax_window_new ();
-
- gtk_text_buffer_insert_at_cursor (PSPPIRE_SYNTAX_WINDOW (se)->buffer, syntax, -1);
-
- gtk_widget_show (se);
-
+ paste_syntax_in_new_window (syntax);
free (syntax);
}
break;
#include "psppire-data-window.h"
#include "dict-display.h"
#include <language/syntax-string-source.h>
-#include "psppire-syntax-window.h"
+#include "helper.h"
#include "dialog-common.h"
case GTK_RESPONSE_OK:
{
gchar *syntax = generate_syntax (vs->dict, xml);
+
struct getl_interface *sss = create_syntax_string_source (syntax);
execute_syntax (sss);
case PSPPIRE_RESPONSE_PASTE:
{
gchar *syntax = generate_syntax (vs->dict, xml);
-
- GtkWidget *se = psppire_syntax_window_new ();
-
- gtk_text_buffer_insert_at_cursor (PSPPIRE_SYNTAX_WINDOW (se)->buffer, syntax, -1);
-
- gtk_widget_show (se);
+ paste_syntax_in_new_window (syntax);
g_free (syntax);
}
#include "helper.h"
#include <language/syntax-string-source.h>
-#include "psppire-syntax-window.h"
+#include "helper.h"
#include <gettext.h>
case PSPPIRE_RESPONSE_PASTE:
{
gchar *syntax = generate_syntax (GTK_TREE_VIEW (treeview));
-
- GtkWidget *se = psppire_syntax_window_new ();
-
- gtk_text_buffer_insert_at_cursor (PSPPIRE_SYNTAX_WINDOW (se)->buffer, syntax, -1);
-
- gtk_widget_show (se);
+ paste_syntax_in_new_window (syntax);
g_free (syntax);
}
#include "psppire-data-window.h"
#include "dict-display.h"
#include <language/syntax-string-source.h>
-#include "psppire-syntax-window.h"
+#include "helper.h"
#include <gtk/gtk.h>
#include <glade/glade.h>
case PSPPIRE_RESPONSE_PASTE:
{
gchar *syntax = generate_syntax (&wcd);
-
- GtkWidget *se = psppire_syntax_window_new ();
-
- gtk_text_buffer_insert_at_cursor (PSPPIRE_SYNTAX_WINDOW (se)->buffer, syntax, -1);
-
- gtk_widget_show (se);
-
+ paste_syntax_in_new_window (syntax);
g_free (syntax);
}
break;