Tomboy.NoteRecentChanges.CreateMenuBar C# (CSharp) Method

CreateMenuBar() private method

private CreateMenuBar ( ) : Gtk.MenuBar
return Gtk.MenuBar
		Gtk.MenuBar CreateMenuBar ()
		{
			ActionManager am = Tomboy.ActionManager;
			Gtk.MenuBar menubar =
				am.GetWidget ("/MainWindowMenubar") as Gtk.MenuBar;

			am ["OpenNoteAction"].Activated += OnOpenNote;
			am ["DeleteNoteAction"].Activated += OnDeleteNote;
			am ["NewNotebookNoteAction"].Activated += OnNewNotebookNote;
			am ["OpenNotebookTemplateNoteAction"].Activated += OnOpenNotebookTemplateNote;
			am ["NewNotebookAction"].Activated += OnNewNotebook;
			am ["DeleteNotebookAction"].Activated += OnDeleteNotebook;
			am ["CloseWindowAction"].Activated += OnCloseWindow;
			if (Tomboy.TrayIconShowing == false &&
			    (bool) Preferences.Get (Preferences.ENABLE_TRAY_ICON))
				am ["CloseWindowAction"].Visible = false;

			// Allow Escape to close the window as well as <Control>W
			// Should be able to add Escape to the CloseAction.  Can't do that
			// until someone fixes AccelGroup.Connect:
			//     http://bugzilla.ximian.com/show_bug.cgi?id=76988)
			//
			// am.UI.AccelGroup.Connect ((uint) Gdk.Key.Escape,
			//   0,
			//   Gtk.AccelFlags.Mask,
			//   OnCloseWindow);

			return menubar;
		}