X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpsppire-syntax-window.c;h=37bfd35cabe3b086ae6f43edc18763e7a4f0b1c0;hb=76160320343cb402ed54024f8ea258e548c0b0c5;hp=5b3267441dc50140f495ee2883531e555382688f;hpb=c7b5e2dcfaeb0221b801dc3cc9fa1ab9a4ec5861;p=pspp-builds.git diff --git a/src/ui/gui/psppire-syntax-window.c b/src/ui/gui/psppire-syntax-window.c index 5b326744..37bfd35c 100644 --- a/src/ui/gui/psppire-syntax-window.c +++ b/src/ui/gui/psppire-syntax-window.c @@ -24,10 +24,10 @@ #include #include - #include "psppire-syntax-window.h" #include "psppire-data-window.h" +#include "psppire-window-register.h" #include "about.h" #include "psppire-syntax-window.h" #include "syntax-editor-source.h" @@ -37,14 +37,11 @@ #define _(msgid) gettext (msgid) #define N_(msgid) msgid - - static void psppire_syntax_window_base_finalize (PsppireSyntaxWindowClass *, gpointer); static void psppire_syntax_window_base_init (PsppireSyntaxWindowClass *class); static void psppire_syntax_window_class_init (PsppireSyntaxWindowClass *class); static void psppire_syntax_window_init (PsppireSyntaxWindow *syntax_editor); - GType psppire_syntax_window_get_type (void) { @@ -73,7 +70,6 @@ psppire_syntax_window_get_type (void) return psppire_syntax_window_type; } - static void psppire_syntax_window_finalize (GObject *object) { @@ -110,10 +106,12 @@ psppire_syntax_window_base_finalize (PsppireSyntaxWindowClass *class, static void -editor_execute_syntax (const PsppireSyntaxWindow *se, GtkTextIter start, - GtkTextIter stop) +editor_execute_syntax (const PsppireSyntaxWindow *sw, GtkTextIter start, + GtkTextIter stop) { - execute_syntax (create_syntax_editor_source (se->buffer, start, stop)); + PsppireWindow *win = PSPPIRE_WINDOW (sw); + const gchar *name = psppire_window_get_filename (win); + execute_syntax (create_syntax_editor_source (sw->buffer, start, stop, name)); } @@ -474,6 +472,7 @@ open_syntax_window (GtkMenuItem *menuitem, gpointer parent) } + extern struct source_stream *the_source_stream ; static void @@ -520,11 +519,12 @@ psppire_syntax_window_init (PsppireSyntaxWindow *window) G_CALLBACK (open_syntax_window), window); - +#if 0 g_signal_connect (get_widget_assert (xml,"file_new_data"), "activate", G_CALLBACK (create_data_window), window); +#endif g_signal_connect (get_widget_assert (xml,"help_about"), "activate", @@ -574,8 +574,9 @@ psppire_syntax_window_init (PsppireSyntaxWindow *window) g_signal_connect (get_widget_assert (xml,"windows_minimise_all"), "activate", - G_CALLBACK (psppire_window_minimise_all), - NULL); + G_CALLBACK (psppire_window_minimise_all), NULL); + + PSPPIRE_WINDOW (window)->menu = GTK_MENU_SHELL (get_widget_assert (xml,"windows_menu")); g_object_unref (xml);