Set the window title when opening a file on the command line
[pspp-builds.git] / src / ui / gui / psppire-syntax-window.c
index c8fede093ae7b60144d991f09e3b74a3691775b5..37bfd35cabe3b086ae6f43edc18763e7a4f0b1c0 100644 (file)
@@ -106,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));
 }
 
 
@@ -517,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",