Replace "usage" property with a "description" property
[pspp-builds.git] / src / ui / gui / psppire-syntax-window.c
index 2b4c5b5e4ae871384bd6beb625e336b8c3411c8a..0da8851b1d2b0f7094ddfaa059f31e99a7d767b0 100644 (file)
@@ -248,7 +248,6 @@ save_editor_to_file (PsppireSyntaxWindow *se,
     {
       gchar *msg = g_strdup_printf (_("Saved file \"%s\""), filename);
       gtk_statusbar_push (GTK_STATUSBAR (se->sb), se->text_context, msg);
-      psppire_window_set_filename (PSPPIRE_WINDOW (se), filename);
       gtk_text_buffer_set_modified (buffer, FALSE);
       g_free (msg);
     }
@@ -304,6 +303,7 @@ save_if_modified (PsppireSyntaxWindow *se)
              msg (ME, err->message);
              g_error_free (err);
            }
+         psppire_window_set_filename (PSPPIRE_WINDOW (se), filename);
        }
 
       if ( response == GTK_RESPONSE_CANCEL )
@@ -500,7 +500,7 @@ psppire_syntax_window_init (PsppireSyntaxWindow *window)
 
   g_signal_connect (window->buffer, "changed", G_CALLBACK (on_text_changed), window);
 
-  //  connect_help (xml);
+  connect_help (xml);
 
   gtk_container_add (GTK_CONTAINER (window), box);
 
@@ -587,7 +587,7 @@ psppire_syntax_window_init (PsppireSyntaxWindow *window)
   GtkUIManager *uim = GTK_UI_MANAGER (get_object_assert (xml, "uimanager1"));
 
   PSPPIRE_WINDOW (window)->menu =
-    GTK_MENU_SHELL (GTK_WIDGET (gtk_ui_manager_get_widget (uim,"/ui/menubar2/windows/windows_minimise_all"))->parent);
+    GTK_MENU_SHELL (gtk_ui_manager_get_widget (uim,"/ui/menubar2/windows/windows_minimise_all")->parent);
 
 
   g_object_unref (xml);
@@ -601,7 +601,8 @@ GtkWidget*
 psppire_syntax_window_new (void)
 {
   return GTK_WIDGET (g_object_new (psppire_syntax_window_get_type (),
-                                  "usage", PSPPIRE_WINDOW_USAGE_SYNTAX,
+                                  "filename", "Syntax",
+                                  "description", _("Syntax Editor"),
                                   NULL));
 }