Refactor the Help menu.
[pspp-builds.git] / src / ui / gui / psppire-syntax-window.c
index f9fe53ccc60268712d584ce981c1128baa7e4558..3541a165705b20dbed1b68cf366db4e17d1c0c51 100644 (file)
@@ -30,7 +30,7 @@
 #include "psppire-data-window.h"
 #include "psppire-window-register.h"
 #include "psppire.h"
-#include "about.h"
+#include "help-menu.h"
 #include "psppire-syntax-window.h"
 #include "syntax-editor-source.h"
 #include <language/lexer/lexer.h>
@@ -392,7 +392,7 @@ psppire_syntax_window_init (PsppireSyntaxWindow *window)
   GtkBuilder *xml = builder_new ("syntax-editor.ui");
   GtkWidget *box = gtk_vbox_new (FALSE, 0);
 
-  GtkWidget *menubar = get_widget_assert (xml, "menubar2");
+  GtkWidget *menubar = get_widget_assert (xml, "menubar");
   GtkWidget *sw = get_widget_assert (xml, "scrolledwindow8");
 
 
@@ -437,21 +437,6 @@ psppire_syntax_window_init (PsppireSyntaxWindow *window)
                    window);
 #endif
 
-  {
-    GtkAction *abt = get_action_assert (xml, "help_about");
-    g_object_set (abt, "stock-id", "gtk-about", NULL);
-
-    g_signal_connect (abt,
-                     "activate",
-                     G_CALLBACK (about_new),
-                     window);
-  }
-
-  g_signal_connect (get_action_assert (xml,"help_reference"),
-                   "activate",
-                   G_CALLBACK (reference_manual),
-                   NULL);
-
   g_signal_connect_swapped (get_action_assert (xml, "file_save"),
                    "activate",
                    G_CALLBACK (syntax_save),
@@ -496,8 +481,10 @@ psppire_syntax_window_init (PsppireSyntaxWindow *window)
   {
   GtkUIManager *uim = GTK_UI_MANAGER (get_object_assert (xml, "uimanager1", GTK_TYPE_UI_MANAGER));
 
+  merge_help_menu (uim);
+
   PSPPIRE_WINDOW (window)->menu =
-    GTK_MENU_SHELL (gtk_ui_manager_get_widget (uim,"/ui/menubar2/windows/windows_minimise_all")->parent);
+    GTK_MENU_SHELL (gtk_ui_manager_get_widget (uim,"/ui/menubar/windows/windows_minimise_all")->parent);
   }
 
   g_object_unref (xml);