You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

503 lines
19 KiB

8 years ago
  1. /*
  2. * This program source code file is part of KiCad, a free EDA CAD application.
  3. *
  4. * Copyright (C) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
  5. * Copyright (C) 2015 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
  6. * Copyright (C) 2015 Wayne Stambaugh <stambaughw@gmail.com>
  7. * Copyright (C) 1992-2018 KiCad Developers, see AUTHORS.txt for contributors.
  8. *
  9. * This program is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU General Public License
  11. * as published by the Free Software Foundation; either version 2
  12. * of the License, or (at your option) any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this program; if not, you may find one here:
  21. * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
  22. * or you may search the http://www.gnu.org website for the version 2 license,
  23. * or you may write to the Free Software Foundation, Inc.,
  24. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
  25. */
  26. /**
  27. * @file pcbnew/menubar_footprint_editor.cpp
  28. * @brief (Re)Create the main menubar for the footprint editor
  29. */
  30. #include <menus_helpers.h>
  31. #include <pgm_base.h>
  32. #include "help_common_strings.h"
  33. #include "hotkeys.h"
  34. #include "footprint_edit_frame.h"
  35. #include "pcbnew.h"
  36. #include "pcbnew_id.h"
  37. void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
  38. {
  39. // wxWidgets handles the Mac Application menu behind the scenes, but that means
  40. // we always have to start from scratch with a new wxMenuBar.
  41. wxMenuBar* oldMenuBar = GetMenuBar();
  42. wxMenuBar* menuBar = new wxMenuBar();
  43. wxString text;
  44. // Recreate all menus:
  45. // Menu File:
  46. wxMenu* fileMenu = new wxMenu;
  47. // Active library selection
  48. AddMenuItem( fileMenu, ID_MODEDIT_SELECT_CURRENT_LIB,
  49. _("Set Acti&ve Library..."),
  50. _( "Select active library" ),
  51. KiBitmap( open_library_xpm ) );
  52. fileMenu->AppendSeparator();
  53. // New module
  54. text = AddHotkeyName( _( "&New Footprint..." ), m_hotkeysDescrList, HK_NEW );
  55. AddMenuItem( fileMenu, ID_MODEDIT_NEW_MODULE,
  56. text, _( "Create new footprint" ),
  57. KiBitmap( new_footprint_xpm ) );
  58. text = AddHotkeyName( _( "&Open Footprint..." ), m_hotkeysDescrList, HK_OPEN );
  59. AddMenuItem( fileMenu, ID_MODEDIT_LOAD_MODULE, text,
  60. _( "Open a footprint from a library" ),
  61. KiBitmap( module_xpm ) );
  62. fileMenu->AppendSeparator();
  63. // Save module
  64. text = AddHotkeyName( _( "&Save" ), m_hotkeysDescrList, HK_SAVE );
  65. AddMenuItem( fileMenu, ID_MODEDIT_SAVE_LIBMODULE, text,
  66. _( "Save footprint" ),
  67. KiBitmap( save_library_xpm ) );
  68. fileMenu->AppendSeparator();
  69. wxMenu* importSubMenu = new wxMenu();
  70. // from current Board
  71. AddMenuItem( importSubMenu, ID_MODEDIT_LOAD_MODULE_FROM_BOARD,
  72. _( "Footprint from &Current Board..." ),
  73. _( "Import a footprint from the current board" ),
  74. KiBitmap( load_module_board_xpm ) );
  75. AddMenuItem( importSubMenu, ID_MODEDIT_IMPORT_PART,
  76. _( "Footprint from &KiCad File..." ),
  77. _( "Import a footprint from an existing footprint file" ),
  78. KiBitmap( import_module_xpm ) );
  79. AddMenuItem( importSubMenu, ID_GEN_IMPORT_DXF_FILE,
  80. _( "Footprint Outlines from &DXF File..." ),
  81. _( "Import 2D Drawing DXF file to Footprint Editor on Drawings layer" ),
  82. KiBitmap( import_xpm ) );
  83. AddMenuItem( fileMenu, importSubMenu, -1,
  84. _( "&Import" ),
  85. _( "Import files" ),
  86. KiBitmap( import_xpm ) );
  87. wxMenu* exportSubMenu = new wxMenu();
  88. AddMenuItem( exportSubMenu, ID_MODEDIT_SAVE_LIBRARY_AS,
  89. _( "&Active Library..." ),
  90. _( "Export active library" ),
  91. KiBitmap( library_archive_xpm ) );
  92. AddMenuItem( exportSubMenu, ID_MODEDIT_EXPORT_PART,
  93. _( "&Footprint..." ),
  94. _( "Export current footprint to a file" ),
  95. KiBitmap( export_module_xpm ) );
  96. AddMenuItem( fileMenu, exportSubMenu, -1,
  97. _( "E&xport" ),
  98. _( "Export files" ),
  99. KiBitmap( export_xpm ) );
  100. fileMenu->AppendSeparator();
  101. // Print
  102. text = AddHotkeyName( _( "&Print..." ), m_hotkeysDescrList, HK_PRINT );
  103. AddMenuItem( fileMenu, wxID_PRINT, text,
  104. _( "Print current footprint" ),
  105. KiBitmap( print_button_xpm ) );
  106. // Separator
  107. fileMenu->AppendSeparator();
  108. // Properties
  109. AddMenuItem( fileMenu, ID_MODEDIT_EDIT_MODULE_PROPERTIES,
  110. _( "P&roperties..." ),
  111. _( "Edit footprint properties" ),
  112. KiBitmap( module_options_xpm ) );
  113. fileMenu->AppendSeparator();
  114. // Close editor
  115. AddMenuItem( fileMenu, wxID_EXIT,
  116. _( "&Exit" ),
  117. _( "Close footprint editor" ),
  118. KiBitmap( exit_xpm ) );
  119. //----- Edit menu ------------------
  120. wxMenu* editMenu = new wxMenu;
  121. // Undo
  122. text = AddHotkeyName( _( "&Undo" ), m_hotkeysDescrList, HK_UNDO );
  123. AddMenuItem( editMenu, wxID_UNDO,
  124. text, _( "Undo last action" ),
  125. KiBitmap( undo_xpm ) );
  126. // Redo
  127. text = AddHotkeyName( _( "&Redo" ), m_hotkeysDescrList, HK_REDO );
  128. AddMenuItem( editMenu, wxID_REDO,
  129. text, _( "Redo last action" ),
  130. KiBitmap( redo_xpm ) );
  131. // Separator
  132. editMenu->AppendSeparator();
  133. if( IsGalCanvasActive() )
  134. {
  135. text = AddHotkeyName( _( "Cu&t" ), m_hotkeysDescrList, HK_EDIT_CUT );
  136. AddMenuItem( editMenu, ID_EDIT_CUT, text,
  137. _( "Cuts the selected item(s) to the Clipboard" ), KiBitmap( cut_xpm ) );
  138. text = AddHotkeyName( _( "&Copy" ), m_hotkeysDescrList, HK_EDIT_COPY );
  139. AddMenuItem( editMenu, ID_EDIT_COPY, text,
  140. _( "Copies the selected item(s) to the Clipboard" ), KiBitmap( copy_xpm ) );
  141. text = AddHotkeyName( _( "&Paste" ), m_hotkeysDescrList, HK_EDIT_PASTE );
  142. AddMenuItem( editMenu, ID_EDIT_PASTE, text,
  143. _( "Pastes item(s) from the Clipboard" ), KiBitmap( paste_xpm ) );
  144. editMenu->AppendSeparator();
  145. }
  146. // Delete items tool
  147. AddMenuItem( editMenu, ID_MODEDIT_DELETE_TOOL,
  148. _( "&Delete" ), _( "Delete items" ),
  149. KiBitmap( delete_xpm ) );
  150. //--------- View menu ----------------
  151. wxMenu* viewMenu = new wxMenu;
  152. AddMenuItem( viewMenu, ID_OPEN_MODULE_VIEWER,
  153. _( "&Library Browser" ),
  154. _( "Open the Library Browser" ),
  155. KiBitmap( modview_icon_xpm ) );
  156. text = AddHotkeyName( _( "&3D Viewer" ), m_hotkeysDescrList, HK_3D_VIEWER );
  157. AddMenuItem( viewMenu, ID_MENU_PCB_SHOW_3D_FRAME,
  158. text, _( "Show footprint in 3D viewer" ),
  159. KiBitmap( three_d_xpm ) );
  160. viewMenu->AppendSeparator();
  161. /* Important Note for ZOOM IN and ZOOM OUT commands from menubar:
  162. * we cannot add hotkey info here, because the hotkey HK_ZOOM_IN and HK_ZOOM_OUT
  163. * events(default = WXK_F1 and WXK_F2) are *NOT* equivalent to this menu command:
  164. * zoom in and out from hotkeys are equivalent to the pop up menu zoom
  165. * From here, zooming is made around the screen center
  166. * From hotkeys, zooming is made around the mouse cursor position
  167. * (obviously not possible from the toolbar or menubar command)
  168. *
  169. * in other words HK_ZOOM_IN and HK_ZOOM_OUT *are NOT* accelerators
  170. * for Zoom in and Zoom out sub menus
  171. */
  172. text = AddHotkeyName( _( "Zoom &In" ), m_hotkeysDescrList,
  173. HK_ZOOM_IN, IS_ACCELERATOR );
  174. AddMenuItem( viewMenu, ID_ZOOM_IN, text, HELP_ZOOM_IN, KiBitmap( zoom_in_xpm ) );
  175. text = AddHotkeyName( _( "Zoom &Out" ), m_hotkeysDescrList,
  176. HK_ZOOM_OUT, IS_ACCELERATOR );
  177. AddMenuItem( viewMenu, ID_ZOOM_OUT, text, HELP_ZOOM_OUT, KiBitmap( zoom_out_xpm ) );
  178. text = AddHotkeyName( _( "&Zoom to Fit" ), m_hotkeysDescrList,
  179. HK_ZOOM_AUTO );
  180. AddMenuItem( viewMenu, ID_ZOOM_PAGE, text, _( "Zoom to fit footprint" ),
  181. KiBitmap( zoom_fit_in_page_xpm ) );
  182. text = AddHotkeyName( _( "Zoom to Selection" ), m_hotkeysDescrList, HK_ZOOM_SELECTION );
  183. AddMenuItem( viewMenu, ID_ZOOM_SELECTION, text, KiBitmap( zoom_area_xpm ), wxITEM_CHECK );
  184. text = AddHotkeyName( _( "&Redraw" ), m_hotkeysDescrList, HK_ZOOM_REDRAW );
  185. AddMenuItem( viewMenu, ID_ZOOM_REDRAW, text,
  186. HELP_ZOOM_REDRAW, KiBitmap( zoom_redraw_xpm ) );
  187. viewMenu->AppendSeparator();
  188. AddMenuItem( viewMenu, ID_TB_OPTIONS_SHOW_GRID,
  189. _( "Show &Grid" ), wxEmptyString,
  190. KiBitmap( grid_xpm ), wxITEM_CHECK );
  191. AddMenuItem( viewMenu, ID_PCB_USER_GRID_SETUP,
  192. _( "Grid &Settings..." ),_( "Adjust custom user-defined grid dimensions" ),
  193. KiBitmap( grid_xpm ) );
  194. AddMenuItem( viewMenu, ID_TB_OPTIONS_SHOW_POLAR_COORD,
  195. _( "Display &Polar Coordinates" ), wxEmptyString,
  196. KiBitmap( polar_coord_xpm ), wxITEM_CHECK );
  197. // Units submenu
  198. wxMenu* unitsSubMenu = new wxMenu;
  199. AddMenuItem( unitsSubMenu, ID_TB_OPTIONS_SELECT_UNIT_INCH,
  200. _( "&Imperial" ), _( "Use imperial units" ),
  201. KiBitmap( unit_inch_xpm ), wxITEM_RADIO );
  202. AddMenuItem( unitsSubMenu, ID_TB_OPTIONS_SELECT_UNIT_MM,
  203. _( "&Metric" ), _( "Use metric units" ),
  204. KiBitmap( unit_mm_xpm ), wxITEM_RADIO );
  205. AddMenuItem( viewMenu, unitsSubMenu,
  206. -1, _( "&Units" ),
  207. _( "Select which units are displayed" ),
  208. KiBitmap( unit_mm_xpm ) );
  209. #ifndef __APPLE__
  210. AddMenuItem( viewMenu, ID_TB_OPTIONS_SELECT_CURSOR,
  211. _( "Full Window Crosshair" ),
  212. _( "Change cursor shape" ),
  213. KiBitmap( cursor_shape_xpm ), wxITEM_CHECK );
  214. #else
  215. AddMenuItem( viewMenu, ID_TB_OPTIONS_SELECT_CURSOR,
  216. _( "Full Window Crosshair" ),
  217. _( "Change cursor shape (not supported in Legacy Toolset)" ),
  218. KiBitmap( cursor_shape_xpm ), wxITEM_CHECK );
  219. #endif
  220. viewMenu->AppendSeparator();
  221. // Drawing Mode Submenu
  222. wxMenu* drawingModeSubMenu = new wxMenu;
  223. AddMenuItem( drawingModeSubMenu, ID_TB_OPTIONS_SHOW_PADS_SKETCH,
  224. _( "Sketch &Pads" ), _( "Show pads in outline mode" ),
  225. KiBitmap( pad_sketch_xpm ), wxITEM_CHECK );
  226. AddMenuItem( drawingModeSubMenu, ID_TB_OPTIONS_SHOW_MODULE_EDGE_SKETCH,
  227. _( "Sketch Footprint &Edges" ), _( "Show footprint edges in outline mode" ),
  228. KiBitmap( show_mod_edge_xpm ), wxITEM_CHECK );
  229. AddMenuItem( drawingModeSubMenu, ID_TB_OPTIONS_SHOW_MODULE_TEXT_SKETCH,
  230. _( "Sketch Footprint Te&xt" ), _( "Show footprint text in outline mode" ),
  231. KiBitmap( text_sketch_xpm ), wxITEM_CHECK );
  232. AddMenuItem( viewMenu, drawingModeSubMenu,
  233. -1, _( "&Drawing Mode" ),
  234. _( "Select how items are displayed" ),
  235. KiBitmap( add_zone_xpm ) );
  236. // Contrast Mode Submenu
  237. wxMenu* contrastModeSubMenu = new wxMenu;
  238. text = AddHotkeyName( _( "&High Contrast Mode" ), m_hotkeysDescrList,
  239. HK_SWITCH_HIGHCONTRAST_MODE );
  240. AddMenuItem( contrastModeSubMenu, ID_TB_OPTIONS_SHOW_HIGH_CONTRAST_MODE, text,
  241. _( "Use high contrast display mode" ),
  242. KiBitmap( contrast_mode_xpm ), wxITEM_CHECK );
  243. contrastModeSubMenu->AppendSeparator();
  244. text = AddHotkeyName( _( "&Decrease Layer Opacity" ), g_Pcbnew_Editor_Hotkeys_Descr,
  245. HK_DEC_LAYER_ALPHA );
  246. AddMenuItem( contrastModeSubMenu, ID_DEC_LAYER_ALPHA,
  247. text, _( "Make the current layer more transparent" ),
  248. KiBitmap( contrast_mode_xpm ) );
  249. text = AddHotkeyName( _( "&Increase Layer Opacity" ), g_Pcbnew_Editor_Hotkeys_Descr,
  250. HK_INC_LAYER_ALPHA );
  251. AddMenuItem( contrastModeSubMenu, ID_INC_LAYER_ALPHA,
  252. text, _( "Make the current layer less transparent" ),
  253. KiBitmap( contrast_mode_xpm ) );
  254. AddMenuItem( viewMenu, contrastModeSubMenu,
  255. -1, _( "&Contrast Mode" ),
  256. _( "Select how items are displayed" ),
  257. KiBitmap( contrast_mode_xpm ) );
  258. #ifdef __APPLE__
  259. viewMenu->AppendSeparator();
  260. #endif
  261. //-------- Place menu --------------------
  262. wxMenu* placeMenu = new wxMenu;
  263. // Pad
  264. AddMenuItem( placeMenu, ID_MODEDIT_PAD_TOOL,
  265. _( "&Pad" ), _( "Add pad" ),
  266. KiBitmap( pad_xpm ) );
  267. placeMenu->AppendSeparator();
  268. // Text
  269. text = AddHotkeyName( _( "&Text" ), m_hotkeysDescrList, HK_ADD_TEXT );
  270. AddMenuItem( placeMenu, ID_MODEDIT_TEXT_TOOL,
  271. text, _( "Add graphic text" ),
  272. KiBitmap( text_xpm ) );
  273. // Arc
  274. text = AddHotkeyName( _( "&Arc" ), m_hotkeysDescrList, HK_ADD_ARC );
  275. AddMenuItem( placeMenu, ID_MODEDIT_ARC_TOOL,
  276. text, _( "Add graphic arc" ),
  277. KiBitmap( add_arc_xpm ) );
  278. // Circle
  279. text = AddHotkeyName( _( "&Circle" ), m_hotkeysDescrList, HK_ADD_CIRCLE );
  280. AddMenuItem( placeMenu, ID_MODEDIT_CIRCLE_TOOL,
  281. text, _( "Add graphic circle" ),
  282. KiBitmap( add_circle_xpm ) );
  283. // Line
  284. text = AddHotkeyName( _( "&Line" ), m_hotkeysDescrList, HK_ADD_LINE );
  285. AddMenuItem( placeMenu, ID_MODEDIT_LINE_TOOL,
  286. text, _( "Add graphic line" ),
  287. KiBitmap( add_graphical_segments_xpm ) );
  288. // Polygon
  289. text = AddHotkeyName( _( "&Polygon" ), m_hotkeysDescrList, HK_ADD_POLYGON );
  290. AddMenuItem( placeMenu, ID_MODEDIT_POLYGON_TOOL,
  291. text, _( "Add graphic polygon" ),
  292. KiBitmap( add_graphical_polygon_xpm ) );
  293. placeMenu->AppendSeparator();
  294. // Anchor
  295. text = AddHotkeyName( _( "A&nchor" ), m_hotkeysDescrList, HK_ADD_ANCHOR );
  296. AddMenuItem( placeMenu, ID_MODEDIT_ANCHOR_TOOL,
  297. text, _( "Place footprint reference anchor" ),
  298. KiBitmap( anchor_xpm ) );
  299. // Origin
  300. AddMenuItem( placeMenu, ID_MODEDIT_PLACE_GRID_COORD,
  301. _( "&Grid Origin" ),
  302. _( "Set grid origin point" ),
  303. KiBitmap( grid_select_axis_xpm ) );
  304. //----- Inspect menu ---------------------
  305. wxMenu* inspectMenu = new wxMenu;
  306. text = AddHotkeyName( _( "&Measure" ), m_hotkeysDescrList, HK_MEASURE_TOOL );
  307. AddMenuItem( inspectMenu, ID_MODEDIT_MEASUREMENT_TOOL,
  308. text, _( "Measure distance" ),
  309. KiBitmap( measurement_xpm ) );
  310. //----- Tools menu ---------------------
  311. wxMenu* toolsMenu = new wxMenu;
  312. AddMenuItem( toolsMenu, ID_MODEDIT_UPDATE_MODULE_IN_BOARD,
  313. _( "&Update Footprint on PCB" ),
  314. _( "Push updated footprint through to current board" ),
  315. KiBitmap( update_module_board_xpm ) );
  316. AddMenuItem( toolsMenu, ID_MODEDIT_INSERT_MODULE_IN_BOARD,
  317. _( "&Insert Footprint on PCB" ),
  318. _( "Insert footprint onto current board" ),
  319. KiBitmap( insert_module_board_xpm ) );
  320. toolsMenu->AppendSeparator();
  321. AddMenuItem( toolsMenu, ID_MODEDIT_DELETE_PART,
  322. _( "&Delete a Footprint in Active Library" ),
  323. _( "Choose and delete a footprint from the active library" ),
  324. KiBitmap( delete_xpm ) );
  325. //----- Preferences menu -----------------
  326. wxMenu* prefs_menu = new wxMenu;
  327. // Path configuration edit dialog.
  328. AddMenuItem( prefs_menu,
  329. ID_PREFERENCES_CONFIGURE_PATHS,
  330. _( "&Configure Paths..." ),
  331. _( "Edit path configuration environment variables" ),
  332. KiBitmap( path_xpm ) );
  333. AddMenuItem( prefs_menu, ID_PCB_LIB_TABLE_EDIT,
  334. _( "Manage &Footprint Libraries..." ), _( "Configure footprint library table" ),
  335. KiBitmap( library_table_xpm ) );
  336. // Settings
  337. AddMenuItem( prefs_menu, wxID_PREFERENCES,
  338. _( "&Preferences..." ), _( "Show preferences for all open tools" ),
  339. KiBitmap( preference_xpm ) );
  340. prefs_menu->AppendSeparator();
  341. text = AddHotkeyName( _( "Legacy Tool&set" ), m_hotkeysDescrList, HK_CANVAS_LEGACY );
  342. AddMenuItem( prefs_menu, ID_MENU_CANVAS_LEGACY, text,
  343. _( "Use Legacy Toolset (not all features will be available)" ),
  344. KiBitmap( tools_xpm ), wxITEM_RADIO );
  345. text = AddHotkeyName( _( "Modern Toolset (&Accelerated)" ), m_hotkeysDescrList, HK_CANVAS_OPENGL );
  346. AddMenuItem( prefs_menu, ID_MENU_CANVAS_OPENGL, text,
  347. _( "Use Modern Toolset with hardware-accelerated graphics (recommended)" ),
  348. KiBitmap( tools_xpm ), wxITEM_RADIO );
  349. text = AddHotkeyName( _( "Modern Toolset (&Fallback)" ), m_hotkeysDescrList, HK_CANVAS_CAIRO );
  350. AddMenuItem( prefs_menu, ID_MENU_CANVAS_CAIRO, text,
  351. _( "Use Modern Toolset with software graphics (fall-back)" ),
  352. KiBitmap( tools_xpm ), wxITEM_RADIO );
  353. prefs_menu->AppendSeparator();
  354. // Language submenu
  355. Pgm().AddMenuLanguageList( prefs_menu );
  356. //----- Help menu --------------------
  357. wxMenu* helpMenu = new wxMenu;
  358. // Contents
  359. AddMenuItem( helpMenu, wxID_HELP,
  360. _( "Pcbnew &Manual" ),
  361. _( "Open the Pcbnew Manual" ),
  362. KiBitmap( online_help_xpm ) );
  363. AddMenuItem( helpMenu, wxID_INDEX,
  364. _( "&Getting Started in KiCad" ),
  365. _( "Open the \"Getting Started in KiCad\" guide for beginners" ),
  366. KiBitmap( help_xpm ) );
  367. text = AddHotkeyName( _( "&List Hotkeys..." ), m_hotkeysDescrList, HK_HELP );
  368. AddMenuItem( helpMenu, ID_PREFERENCES_HOTKEY_SHOW_CURRENT_LIST,
  369. text,
  370. _( "Displays current hotkeys table and corresponding commands" ),
  371. KiBitmap( hotkeys_xpm ) );
  372. helpMenu->AppendSeparator();
  373. AddMenuItem( helpMenu, ID_HELP_GET_INVOLVED,
  374. _( "Get &Involved" ),
  375. _( "Contribute to KiCad (opens a web browser)" ),
  376. KiBitmap( info_xpm ) );
  377. // About Pcbnew
  378. helpMenu->AppendSeparator();
  379. AddMenuItem( helpMenu, wxID_ABOUT, _( "&About KiCad" ), KiBitmap( about_xpm ) );
  380. // Append menus to the menubar
  381. menuBar->Append( fileMenu, _( "&File" ) );
  382. menuBar->Append( editMenu, _( "&Edit" ) );
  383. menuBar->Append( viewMenu, _( "&View" ) );
  384. menuBar->Append( placeMenu, _( "&Place" ) );
  385. menuBar->Append( inspectMenu, _( "&Inspect" ) );
  386. menuBar->Append( toolsMenu, _( "&Tools" ) );
  387. menuBar->Append( prefs_menu, _( "P&references" ) );
  388. menuBar->Append( helpMenu, _( "&Help" ) );
  389. SetMenuBar( menuBar );
  390. delete oldMenuBar;
  391. }