Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
fb475361
Commit
fb475361
authored
Apr 04, 2011
by
Jerry Jacobs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More native changes for OSX, see CHANGELOG.txt
parent
f3a923d4
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
177 additions
and
200 deletions
+177
-200
CHANGELOG.txt
CHANGELOG.txt
+13
-0
mac-osx.txt
Documentation/compiling/mac-osx.txt
+3
-1
hotkeys_basic.cpp
common/hotkeys_basic.cpp
+3
-9
eeschema.cpp
eeschema/eeschema.cpp
+1
-9
menubar.cpp
eeschema/menubar.cpp
+56
-56
schframe.cpp
eeschema/schframe.cpp
+2
-2
id.h
include/id.h
+1
-1
kicad.cpp
kicad/kicad.cpp
+0
-9
menubar.cpp
kicad/menubar.cpp
+8
-15
menubar_pcbframe.cpp
pcbnew/menubar_pcbframe.cpp
+87
-86
pcbframe.cpp
pcbnew/pcbframe.cpp
+2
-2
pcbnew.cpp
pcbnew/pcbnew.cpp
+0
-8
pcbnew_config.cpp
pcbnew/pcbnew_config.cpp
+1
-2
No files found.
CHANGELOG.txt
View file @
fb475361
...
...
@@ -4,6 +4,19 @@ KiCad ChangeLog 2010
Please add newer entries at the top, list the date and your name with
email address.
2011-Apr-4, UPDATE Jerry Jacobs <xor.gate.engineering@gmail.com>
================================================================================
More native OSX changes, this removes some WXMAC defines replaced by wxID
macros. These are handled by wxWidgets itself and reduces in-app platform
defines. More work needs to be done for CvPCB and Gerbview.
All:
Hotkey names in menu's all have tabs, this looks more uniform and pretty.
EESschema & PCBNew:
Fix about and preferences wxMenu to be more native (remove unneeded WXMAC )
Disable all icons in wxMenu on OSX with macro SETBITMAPS
2011-Mar-16, UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
================================================================================
Gerbview:
...
...
Documentation/compiling/mac-osx.txt
View file @
fb475361
...
...
@@ -36,7 +36,9 @@ At time of writing (2009-01-16) this is on line 18381
into this: OSX_UNIV_OPTS="-arch ppc -arch i386 -arch x86_64"
Building a universal monolib wxWidgets 2.9 with the following parameters:
./configure --enable-unicode=yes --enable-shared=no --enable-monolithic --with-opengl --with-expat=builtin --enable-universal_binary --enable-aui --enable-debug --with-osx_cocoa --with-macosx-sdk=/Developer/SDKs/MacOSX10.5.sdk/ --prefix=/opt/wxwidgets-svn
./configure --enable-unicode=yes --enable-shared=no --enable-monolithic --with-opengl --with-expat=builtin --enable-universal_binary --enable-aui --enable-debug --with-osx_cocoa --with-macosx-sdk=/Developer/SDKs/MacOSX10.5.sdk/ --prefix=/opt/wxwidgets/<rev>
<rev> Should be subsituded with the revision from SVN
Then you should a message like this:
...
...
common/hotkeys_basic.cpp
View file @
fb475361
...
...
@@ -189,12 +189,8 @@ wxString AddHotkeyName( const wxString& aText, Ki_HotkeyInfo** aList,
keyname
=
ReturnKeyNameFromCommandId
(
aList
,
aCommandId
);
if
(
!
keyname
.
IsEmpty
()
)
{
if
(
aIsShortCut
)
msg
<<
wxT
(
"
\t
"
)
<<
keyname
;
else
msg
<<
wxT
(
" <"
)
<<
keyname
<<
wxT
(
">"
);
}
return
msg
;
}
...
...
@@ -223,12 +219,10 @@ wxString AddHotkeyName( const wxString& aText,
{
List
=
aDescList
->
m_HK_InfoList
;
keyname
=
ReturnKeyNameFromCommandId
(
List
,
aCommandId
);
if
(
!
keyname
.
IsEmpty
()
)
{
if
(
aIsShortCut
)
msg
<<
wxT
(
"
\t
"
)
<<
keyname
;
else
msg
<<
wxT
(
" <"
)
<<
keyname
<<
wxT
(
">"
);
break
;
}
}
...
...
eeschema/eeschema.cpp
View file @
fb475361
...
...
@@ -24,7 +24,6 @@
// Global variables
bool
g_OptNetListUseNames
;
/* TRUE to use names rather than net
* The numbers (PSPICE netlist only) */
wxSize
g_RepeatStep
;
...
...
@@ -113,13 +112,6 @@ void WinEDA_App::MacOpenFile( const wxString &fileName )
bool
WinEDA_App
::
OnInit
()
{
/* WXMAC application specific */
#ifdef __WXMAC__
// wxApp::SetExitOnFrameDelete(false);
wxApp
::
s_macAboutMenuItemId
=
ID_KICAD_ABOUT
;
wxApp
::
s_macPreferencesMenuItemId
=
ID_OPTIONS_SETUP
;
#endif
/* __WXMAC__ */
wxFileName
filename
;
SCH_EDIT_FRAME
*
frame
=
NULL
;
...
...
@@ -134,7 +126,7 @@ bool WinEDA_App::OnInit()
if
(
argc
>
1
)
filename
=
argv
[
1
];
/
* init EESCHEMA */
/
/ Init EESchema
SeedLayers
();
// read current setup and reopen last directory if no filename to open in
...
...
eeschema/menubar.cpp
View file @
fb475361
...
...
@@ -16,6 +16,7 @@
#include "protos.h"
#include "eeschema_id.h"
#include "hotkeys.h"
#include "macros.h"
#include "help_common_strings.h"
...
...
@@ -46,13 +47,13 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
item
=
new
wxMenuItem
(
filesMenu
,
ID_NEW_PROJECT
,
_
(
"&New
\t
Ctrl+N"
),
_
(
"New schematic project"
)
);
item
->
SetBitmap
(
new_xpm
);
SETBITMAPS
(
new_xpm
);
filesMenu
->
Append
(
item
);
// Open
item
=
new
wxMenuItem
(
filesMenu
,
ID_LOAD_PROJECT
,
_
(
"&Open
\t
Ctrl+O"
),
_
(
"Open an existing schematic project"
)
);
item
->
SetBitmap
(
open_document_xpm
);
SETBITMAPS
(
open_document_xpm
);
filesMenu
->
Append
(
item
);
// Open Recent submenu
...
...
@@ -69,26 +70,26 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
item
=
new
wxMenuItem
(
filesMenu
,
ID_SAVE_PROJECT
,
_
(
"&Save Whole Schematic Project
\t
Ctrl+S"
),
_
(
"Save all sheets in the schematic project"
)
);
item
->
SetBitmap
(
save_project_xpm
);
SETBITMAPS
(
save_project_xpm
);
filesMenu
->
Append
(
item
);
item
=
new
wxMenuItem
(
filesMenu
,
ID_SAVE_ONE_SHEET
,
_
(
"Save &Current Sheet Only"
),
_
(
"Save only current schematic sheet"
)
);
item
->
SetBitmap
(
save_xpm
);
SETBITMAPS
(
save_xpm
);
filesMenu
->
Append
(
item
);
// Save as...
item
=
new
wxMenuItem
(
filesMenu
,
ID_SAVE_ONE_SHEET_AS
,
_
(
"Save Current Sheet &as"
),
_
(
"Save current schematic sheet as..."
)
);
item
->
SetBitmap
(
save_as_xpm
);
SETBITMAPS
(
save_as_xpm
);
filesMenu
->
Append
(
item
);
// Print
filesMenu
->
AppendSeparator
();
item
=
new
wxMenuItem
(
filesMenu
,
wxID_PRINT
,
_
(
"P&rint"
),
_
(
"Print schematic"
)
);
item
->
SetBitmap
(
print_button
);
SETBITMAPS
(
print_button
);
filesMenu
->
Append
(
item
);
// Plot submenu
...
...
@@ -96,25 +97,25 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
item
=
new
wxMenuItem
(
choice_plot_fmt
,
ID_GEN_PLOT_PS
,
_
(
"Plot PostScript"
),
_
(
"Plot schematic sheet in PostScript format"
)
);
item
->
SetBitmap
(
plot_PS_xpm
);
SETBITMAPS
(
plot_PS_xpm
);
choice_plot_fmt
->
Append
(
item
);
/* Plot HPGL */
item
=
new
wxMenuItem
(
choice_plot_fmt
,
ID_GEN_PLOT_HPGL
,
_
(
"Plot HPGL"
),
_
(
"Plot schematic sheet in HPGL format"
)
);
item
->
SetBitmap
(
plot_HPG_xpm
);
SETBITMAPS
(
plot_HPG_xpm
);
choice_plot_fmt
->
Append
(
item
);
// Plot SVG
item
=
new
wxMenuItem
(
choice_plot_fmt
,
ID_GEN_PLOT_SVG
,
_
(
"Plot SVG"
),
_
(
"Plot schematic sheet in SVG format"
)
);
item
->
SetBitmap
(
plot_xpm
);
SETBITMAPS
(
plot_xpm
);
choice_plot_fmt
->
Append
(
item
);
// Plot DXF
item
=
new
wxMenuItem
(
choice_plot_fmt
,
ID_GEN_PLOT_DXF
,
_
(
"Plot DXF"
),
_
(
"Plot schematic sheet in DXF format"
)
);
item
->
SetBitmap
(
plot_xpm
);
SETBITMAPS
(
plot_xpm
);
choice_plot_fmt
->
Append
(
item
);
// Under windows, one can draw to the clipboard
...
...
@@ -123,7 +124,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
item
=
new
wxMenuItem
(
choice_plot_fmt
,
ID_GEN_COPY_SHEET_TO_CLIPBOARD
,
_
(
"Plot to Clipboard"
),
_
(
"Export drawings to clipboard"
)
);
item
->
SetBitmap
(
copy_button
);
SETBITMAPS
(
copy_button
);
choice_plot_fmt
->
Append
(
item
);
#endif
...
...
@@ -133,15 +134,12 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
plot_xpm
);
// Quit on all platforms except WXMAC
#if !defined(__WXMAC__)
filesMenu
->
AppendSeparator
();
item
=
new
wxMenuItem
(
filesMenu
,
wxID_EXIT
,
_
(
"&Quit"
),
_
(
"Quit EESchema"
)
);
item
->
SetBitmap
(
exit_xpm
);
SETBITMAPS
(
exit_xpm
);
filesMenu
->
Append
(
item
);
#endif // !defined( __WXMAC__)
// Edit menu
wxMenu
*
editMenu
=
new
wxMenu
;
...
...
@@ -149,21 +147,21 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
text
=
AddHotkeyName
(
_
(
"Undo"
),
s_Schematic_Hokeys_Descr
,
HK_UNDO
);
item
=
new
wxMenuItem
(
editMenu
,
wxID_UNDO
,
text
,
HELP_UNDO
,
wxITEM_NORMAL
);
item
->
SetBitmap
(
undo_xpm
);
SETBITMAPS
(
undo_xpm
);
editMenu
->
Append
(
item
);
/* Redo */
text
=
AddHotkeyName
(
_
(
"Redo"
),
s_Schematic_Hokeys_Descr
,
HK_REDO
);
item
=
new
wxMenuItem
(
editMenu
,
wxID_REDO
,
text
,
HELP_REDO
,
wxITEM_NORMAL
);
item
->
SetBitmap
(
redo_xpm
);
SETBITMAPS
(
redo_xpm
);
editMenu
->
Append
(
item
);
/* Delete */
editMenu
->
AppendSeparator
();
item
=
new
wxMenuItem
(
editMenu
,
ID_SCHEMATIC_DELETE_ITEM_BUTT
,
_
(
"Delete"
),
HELP_DELETE_ITEMS
,
wxITEM_NORMAL
);
item
->
SetBitmap
(
delete_body_xpm
);
SETBITMAPS
(
delete_body_xpm
);
editMenu
->
Append
(
item
);
/* Separator */
...
...
@@ -172,7 +170,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
/* Find */
text
=
AddHotkeyName
(
_
(
"&Find"
),
s_Schematic_Hokeys_Descr
,
HK_FIND_ITEM
);
item
=
new
wxMenuItem
(
editMenu
,
ID_FIND_ITEMS
,
text
,
HELP_FIND
,
wxITEM_NORMAL
);
item
->
SetBitmap
(
find_xpm
);
SETBITMAPS
(
find_xpm
);
editMenu
->
Append
(
item
);
/* Separator */
...
...
@@ -182,7 +180,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
item
=
new
wxMenuItem
(
editMenu
,
ID_BACKANNO_ITEMS
,
_
(
"Backannotate"
),
_
(
"Back annotated footprint fields"
),
wxITEM_NORMAL
);
item
->
SetBitmap
(
backanno_xpm
);
SETBITMAPS
(
backanno_xpm
);
editMenu
->
Append
(
item
);
...
...
@@ -206,20 +204,20 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
text
=
AddHotkeyName
(
_
(
"Zoom In"
),
s_Schematic_Hokeys_Descr
,
ID_ZOOM_IN
,
false
);
// add comment, not a shortcut
item
=
new
wxMenuItem
(
viewMenu
,
ID_ZOOM_IN
,
text
,
HELP_ZOOM_IN
,
wxITEM_NORMAL
);
item
->
SetBitmap
(
zoom_in_xpm
);
SETBITMAPS
(
zoom_in_xpm
);
viewMenu
->
Append
(
item
);
/* Zoom out */
text
=
AddHotkeyName
(
_
(
"Zoom Out"
),
s_Schematic_Hokeys_Descr
,
ID_ZOOM_OUT
,
false
);
// add comment, not a shortcut
item
=
new
wxMenuItem
(
viewMenu
,
ID_ZOOM_OUT
,
text
,
HELP_ZOOM_OUT
,
wxITEM_NORMAL
);
item
->
SetBitmap
(
zoom_out_xpm
);
SETBITMAPS
(
zoom_out_xpm
);
viewMenu
->
Append
(
item
);
/* Fit on screen */
text
=
AddHotkeyName
(
_
(
"Fit on Screen"
),
s_Schematic_Hokeys_Descr
,
HK_ZOOM_AUTO
);
item
=
new
wxMenuItem
(
viewMenu
,
ID_ZOOM_PAGE
,
text
,
HELP_ZOOM_FIT
,
wxITEM_NORMAL
);
item
->
SetBitmap
(
zoom_fit_in_page_xpm
);
SETBITMAPS
(
zoom_fit_in_page_xpm
);
viewMenu
->
Append
(
item
);
viewMenu
->
AppendSeparator
();
...
...
@@ -227,7 +225,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
/* Redraw view */
text
=
AddHotkeyName
(
_
(
"Redraw"
),
s_Schematic_Hokeys_Descr
,
HK_ZOOM_REDRAW
);
item
=
new
wxMenuItem
(
viewMenu
,
ID_ZOOM_REDRAW
,
text
,
HELP_ZOOM_REDRAW
,
wxITEM_NORMAL
);
item
->
SetBitmap
(
zoom_redraw_xpm
);
SETBITMAPS
(
zoom_redraw_xpm
);
viewMenu
->
Append
(
item
);
...
...
@@ -242,7 +240,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
HK_ADD_NEW_COMPONENT
,
false
);
// add comment, not a shortcut
item
=
new
wxMenuItem
(
placeMenu
,
ID_SCH_PLACE_COMPONENT
,
text
,
HELP_PLACE_COMPONENTS
,
wxITEM_NORMAL
);
item
->
SetBitmap
(
add_component_xpm
);
SETBITMAPS
(
add_component_xpm
);
placeMenu
->
Append
(
item
);
/* Power port */
...
...
@@ -250,7 +248,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
HK_ADD_NEW_POWER
,
false
);
// add comment, not a shortcut
item
=
new
wxMenuItem
(
placeMenu
,
ID_PLACE_POWER_BUTT
,
text
,
HELP_PLACE_POWERPORT
,
wxITEM_NORMAL
);
item
->
SetBitmap
(
add_power_xpm
);
SETBITMAPS
(
add_power_xpm
);
placeMenu
->
Append
(
item
);
/* Wire */
...
...
@@ -258,7 +256,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
HK_BEGIN_WIRE
,
false
);
// add comment, not a shortcut
item
=
new
wxMenuItem
(
placeMenu
,
ID_WIRE_BUTT
,
text
,
HELP_PLACE_WIRE
,
wxITEM_NORMAL
);
item
->
SetBitmap
(
add_line_xpm
);
SETBITMAPS
(
add_line_xpm
);
placeMenu
->
Append
(
item
);
/* Bus */
...
...
@@ -266,7 +264,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
HK_BEGIN_BUS
,
false
);
// add comment, not a shortcut
item
=
new
wxMenuItem
(
placeMenu
,
ID_BUS_BUTT
,
text
,
HELP_PLACE_BUS
,
wxITEM_NORMAL
);
item
->
SetBitmap
(
add_bus_xpm
);
SETBITMAPS
(
add_bus_xpm
);
placeMenu
->
Append
(
item
);
/* Wire to Bus entry */
...
...
@@ -274,7 +272,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
HK_ADD_WIRE_ENTRY
,
false
);
// add comment, not a shortcut
item
=
new
wxMenuItem
(
placeMenu
,
ID_WIRETOBUS_ENTRY_BUTT
,
text
,
HELP_PLACE_WIRE2BUS_ENTRY
,
wxITEM_NORMAL
);
item
->
SetBitmap
(
add_line2bus_xpm
);
SETBITMAPS
(
add_line2bus_xpm
);
placeMenu
->
Append
(
item
);
/* Bus to Bus entry */
...
...
@@ -282,14 +280,14 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
HK_ADD_BUS_ENTRY
,
false
);
// add comment, not a shortcut
item
=
new
wxMenuItem
(
placeMenu
,
ID_BUSTOBUS_ENTRY_BUTT
,
text
,
HELP_PLACE_BUS2BUS_ENTRY
,
wxITEM_NORMAL
);
item
->
SetBitmap
(
add_bus2bus_xpm
);
SETBITMAPS
(
add_bus2bus_xpm
);
placeMenu
->
Append
(
item
);
/* No connect flag */
text
=
AddHotkeyName
(
_
(
"No connect flag"
),
s_Schematic_Hokeys_Descr
,
HK_ADD_NOCONN_FLAG
,
false
);
// add comment, not a shortcut
item
=
new
wxMenuItem
(
placeMenu
,
ID_NOCONN_BUTT
,
text
,
HELP_PLACE_NC_FLAG
,
wxITEM_NORMAL
);
item
->
SetBitmap
(
noconn_button
);
SETBITMAPS
(
noconn_button
);
placeMenu
->
Append
(
item
);
/* Net name */
...
...
@@ -297,7 +295,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
HK_ADD_LABEL
,
false
);
// add comment, not a shortcut
item
=
new
wxMenuItem
(
placeMenu
,
ID_LABEL_BUTT
,
text
,
HELP_PLACE_NETLABEL
,
wxITEM_NORMAL
);
item
->
SetBitmap
(
add_line_label_xpm
);
SETBITMAPS
(
add_line_label_xpm
);
placeMenu
->
Append
(
item
);
/* Global label */
...
...
@@ -305,7 +303,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
HK_ADD_GLABEL
,
false
);
// add comment, not a shortcut
item
=
new
wxMenuItem
(
placeMenu
,
ID_GLABEL_BUTT
,
text
,
HELP_PLACE_GLOBALLABEL
,
wxITEM_NORMAL
);
item
->
SetBitmap
(
add_glabel_xpm
);
SETBITMAPS
(
add_glabel_xpm
);
placeMenu
->
Append
(
item
);
/* Junction */
...
...
@@ -313,7 +311,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
HK_ADD_JUNCTION
,
false
);
// add comment, not a shortcut
item
=
new
wxMenuItem
(
placeMenu
,
ID_JUNCTION_BUTT
,
text
,
HELP_PLACE_JUNCTION
,
wxITEM_NORMAL
);
item
->
SetBitmap
(
add_junction_xpm
);
SETBITMAPS
(
add_junction_xpm
);
placeMenu
->
Append
(
item
);
/* Separator */
...
...
@@ -324,7 +322,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
HK_ADD_HLABEL
,
false
);
// add comment, not a shortcut
item
=
new
wxMenuItem
(
placeMenu
,
ID_HIERLABEL_BUTT
,
text
,
HELP_PLACE_HIER_LABEL
,
wxITEM_NORMAL
);
item
->
SetBitmap
(
add_hierarchical_label_xpm
);
SETBITMAPS
(
add_hierarchical_label_xpm
);
placeMenu
->
Append
(
item
);
/* Hierarchical sheet */
...
...
@@ -332,19 +330,19 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
HK_ADD_HIER_SHEET
,
false
);
// add comment, not a shortcut
item
=
new
wxMenuItem
(
placeMenu
,
ID_SHEET_SYMBOL_BUTT
,
text
,
HELP_PLACE_SHEET
,
wxITEM_NORMAL
);
item
->
SetBitmap
(
add_hierarchical_subsheet_xpm
);
SETBITMAPS
(
add_hierarchical_subsheet_xpm
);
placeMenu
->
Append
(
item
);
/* Import hierarchical sheet */
item
=
new
wxMenuItem
(
placeMenu
,
ID_IMPORT_HLABEL_BUTT
,
_
(
"Import Hierarchical Label"
),
HELP_IMPORT_SHEETPIN
,
wxITEM_NORMAL
);
item
->
SetBitmap
(
import_hierarchical_label_xpm
);
SETBITMAPS
(
import_hierarchical_label_xpm
);
placeMenu
->
Append
(
item
);
/* Add hierarchical Pin to Sheet */
item
=
new
wxMenuItem
(
placeMenu
,
ID_SHEET_PIN_BUTT
,
_
(
"Add Hierarchical Pin to Sheet"
),
HELP_PLACE_SHEETPIN
,
wxITEM_NORMAL
);
item
->
SetBitmap
(
add_hierar_pin_xpm
);
SETBITMAPS
(
add_hierar_pin_xpm
);
placeMenu
->
Append
(
item
);
/* Separator */
...
...
@@ -355,7 +353,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
HK_ADD_GRAPHIC_POLYLINE
,
false
);
// add comment, not a shortcut
item
=
new
wxMenuItem
(
placeMenu
,
ID_LINE_COMMENT_BUTT
,
text
,
HELP_PLACE_GRAPHICLINES
,
wxITEM_NORMAL
);
item
->
SetBitmap
(
add_dashed_line_xpm
);
SETBITMAPS
(
add_dashed_line_xpm
);
placeMenu
->
Append
(
item
);
/* Graphic text */
...
...
@@ -363,7 +361,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
HK_ADD_GRAPHIC_TEXT
,
false
);
// add comment, not a shortcut
item
=
new
wxMenuItem
(
placeMenu
,
ID_TEXT_COMMENT_BUTT
,
text
,
HELP_PLACE_GRAPHICTEXTS
,
wxITEM_NORMAL
);
item
->
SetBitmap
(
add_text_xpm
);
SETBITMAPS
(
add_text_xpm
);
placeMenu
->
Append
(
item
);
...
...
@@ -373,19 +371,26 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
/* Library */
item
=
new
wxMenuItem
(
configmenu
,
ID_CONFIG_REQ
,
_
(
"&Library"
),
_
(
"Library preferences"
)
);
item
->
SetBitmap
(
library_xpm
);
SETBITMAPS
(
library_xpm
);
configmenu
->
Append
(
item
);
/* Colors */
item
=
new
wxMenuItem
(
configmenu
,
ID_COLORS_SETUP
,
_
(
"&Colors"
),
_
(
"Color preferences"
)
);
item
->
SetBitmap
(
palette_xpm
);
SETBITMAPS
(
palette_xpm
);
configmenu
->
Append
(
item
);
/* Options */
item
=
new
wxMenuItem
(
configmenu
,
ID_OPTIONS_SETUP
,
_
(
"&Options"
),
_
(
"Eeschema general options and preferences"
)
);
item
->
SetBitmap
(
preference_xpm
);
item
=
new
wxMenuItem
(
configmenu
,
wxID_PREFERENCES
,
#ifdef __WXMAC__
_
(
"&Preferences..."
),
#else
_
(
"&Options"
),
#endif
_
(
"EESchema preferences"
)
);
SETBITMAPS
(
preference_xpm
);
configmenu
->
Append
(
item
);
/* Language submenu */
...
...
@@ -400,13 +405,13 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
/* Save preferences */
item
=
new
wxMenuItem
(
configmenu
,
ID_CONFIG_SAVE
,
_
(
"&Save preferences"
),
_
(
"Save application preferences"
)
);
item
->
SetBitmap
(
save_setup_xpm
);
SETBITMAPS
(
save_setup_xpm
);
configmenu
->
Append
(
item
);
/* Read preferences */
item
=
new
wxMenuItem
(
configmenu
,
ID_CONFIG_READ
,
_
(
"&Read preferences"
),
_
(
"Read application preferences"
)
);
item
->
SetBitmap
(
read_setup_xpm
);
SETBITMAPS
(
read_setup_xpm
);
configmenu
->
Append
(
item
);
...
...
@@ -417,20 +422,15 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
item
=
new
wxMenuItem
(
helpMenu
,
ID_GENERAL_HELP
,
_
(
"&Contents"
),
_
(
"Open the eeschema manual"
)
);
item
->
SetBitmap
(
online_help_xpm
);
SETBITMAPS
(
online_help_xpm
);
helpMenu
->
Append
(
item
);
/* About on all platforms except WXMAC */
#if !defined(__WXMAC__)
item
=
new
wxMenuItem
(
helpMenu
,
ID_KICAD_ABOUT
,
_
(
"&About"
),
item
=
new
wxMenuItem
(
helpMenu
,
wxID_ABOUT
,
_
(
"&About"
),
_
(
"About eeschema schematic designer"
)
);
item
->
SetBitmap
(
info_xpm
);
SETBITMAPS
(
info_xpm
);
helpMenu
->
Append
(
item
);
#endif
/* !defined(__WXMAC__) */
// Create the menubar and append all submenus
menuBar
->
Append
(
filesMenu
,
_
(
"&File"
)
);
menuBar
->
Append
(
editMenu
,
_
(
"&Edit"
)
);
...
...
eeschema/schframe.cpp
View file @
fb475361
...
...
@@ -74,7 +74,7 @@ BEGIN_EVENT_TABLE( SCH_EDIT_FRAME, EDA_DRAW_FRAME )
SCH_EDIT_FRAME
::
Process_Config
)
EVT_MENU
(
ID_COLORS_SETUP
,
SCH_EDIT_FRAME
::
OnColorConfig
)
EVT_TOOL
(
ID_OPTIONS_SETUP
,
SCH_EDIT_FRAME
::
OnSetOptions
)
EVT_TOOL
(
wxID_PREFERENCES
,
SCH_EDIT_FRAME
::
OnSetOptions
)
EVT_MENU_RANGE
(
ID_LANGUAGE_CHOICE
,
ID_LANGUAGE_CHOICE_END
,
SCH_EDIT_FRAME
::
SetLanguage
)
...
...
@@ -100,7 +100,7 @@ BEGIN_EVENT_TABLE( SCH_EDIT_FRAME, EDA_DRAW_FRAME )
EVT_TOOL
(
ID_BACKANNO_ITEMS
,
SCH_EDIT_FRAME
::
OnLoadStuffFile
)
EVT_MENU
(
ID_GENERAL_HELP
,
EDA_DRAW_FRAME
::
GetKicadHelp
)
EVT_MENU
(
ID_KICA
D_ABOUT
,
EDA_DRAW_FRAME
::
GetKicadAbout
)
EVT_MENU
(
wxI
D_ABOUT
,
EDA_DRAW_FRAME
::
GetKicadAbout
)
// Tools and buttons for vertical toolbar.
EVT_TOOL
(
ID_CANCEL_CURRENT_COMMAND
,
SCH_EDIT_FRAME
::
OnCancelCurrentCommand
)
...
...
include/id.h
View file @
fb475361
...
...
@@ -71,7 +71,7 @@ enum main_id
ID_GENERAL_HELP
,
ID_HELP_COPY_VERSION_STRING
,
ID_LOCAL_HELP
,
ID_KICAD_ABOUT
,
ID_KICAD_ABOUT
,
// @todo all handle by wxID_ABOUT
ID_EDIT
,
ID_NO_TOOL_SELECTED
,
...
...
kicad/kicad.cpp
View file @
fb475361
...
...
@@ -75,15 +75,6 @@ void WinEDA_App::MacOpenFile(const wxString &fileName) {
bool
WinEDA_App
::
OnInit
()
/*****************************************************************************/
{
/* WXMAC application specific */
/* TODO fix about dialog issue */
/* TODO fix SetExitOnFrameDelete */
#ifdef __WXMAC__
// wxApp::SetExitOnFrameDelete(false);
wxApp
::
s_macAboutMenuItemId
=
ID_KICAD_ABOUT
;
wxApp
::
s_macPreferencesMenuItemId
=
ID_OPTIONS_SETUP
;
#endif
/* __WXMAC__ */
WinEDA_MainFrame
*
frame
;
InitEDA_Appl
(
wxT
(
"KiCad"
),
APP_TYPE_KICAD
);
...
...
kicad/menubar.cpp
View file @
fb475361
...
...
@@ -42,7 +42,7 @@ EVT_MENU( ID_SAVE_AND_ZIP_FILES, WinEDA_MainFrame::OnArchiveFiles )
EVT_MENU
(
ID_READ_ZIP_ARCHIVE
,
WinEDA_MainFrame
::
OnUnarchiveFiles
)
EVT_MENU
(
ID_PROJECT_TREE_REFRESH
,
WinEDA_MainFrame
::
OnRefresh
)
EVT_MENU
(
ID_GENERAL_HELP
,
WinEDA_MainFrame
::
GetKicadHelp
)
EVT_MENU
(
ID_KICA
D_ABOUT
,
WinEDA_MainFrame
::
GetKicadAbout
)
EVT_MENU
(
wxI
D_ABOUT
,
WinEDA_MainFrame
::
GetKicadAbout
)
/* Range menu events */
EVT_MENU_RANGE
(
ID_LANGUAGE_CHOICE
,
ID_LANGUAGE_CHOICE_END
,
...
...
@@ -122,17 +122,13 @@ void WinEDA_MainFrame::ReCreateMenuBar()
_
(
"Unarchive project files from zip file"
),
unzip_xpm
);
/* Quit on all platforms except WXMAC */
#if !defined( __WXMAC__ )
// Quit
filesMenu
->
AppendSeparator
();
ADD_MENUITEM_WITH_HELP
(
filesMenu
,
wxID_EXIT
,
_
(
"&Quit"
),
_
(
"Quit KiCad"
),
exit_xpm
);
#endif
/* !defined( __WXMAC__ ) */
// Browse menu
wxMenu
*
browseMenu
=
new
wxMenu
();
...
...
@@ -142,7 +138,7 @@ void WinEDA_MainFrame::ReCreateMenuBar()
_
(
"Launch preferred text editor"
),
editor_xpm
);
/
* Browse files */
/
/ View file
ADD_MENUITEM_WITH_HELP
(
browseMenu
,
ID_BROWSE_AN_SELECT_FILE
,
_
(
"&View File"
),
_
(
"View, read or edit file with a text editor"
),
...
...
@@ -168,23 +164,20 @@ void WinEDA_MainFrame::ReCreateMenuBar()
_
(
"Use system default PDF viewer used to browse datasheets"
),
wxITEM_CHECK
);
#if !defined( __WXMAC__ )
SETBITMAPS
(
datasheet_xpm
);
#endif
/* !defined( __WXMAC__ ) */
SubMenuPdfBrowserChoice
->
Append
(
item
);
SubMenuPdfBrowserChoice
->
Check
(
ID_SELECT_DEFAULT_PDF_BROWSER
,
wxGetApp
().
m_PdfBrowserIsDefault
);
// Favourite
viewer
// Favourite
item
=
new
wxMenuItem
(
SubMenuPdfBrowserChoice
,
ID_SELECT_PREFERED_PDF_BROWSER
,
_
(
"Favourite"
),
_
(
"Use your favourite PDF viewer used to browse datasheets"
),
wxITEM_CHECK
);
#if !defined( __WXMAC__ )
SETBITMAPS
(
preference_xpm
);
#endif
/* !defined( __WXMAC__ ) */
SubMenuPdfBrowserChoice
->
Append
(
item
);
SubMenuPdfBrowserChoice
->
AppendSeparator
();
...
...
@@ -213,14 +206,14 @@ void WinEDA_MainFrame::ReCreateMenuBar()
AddHelpVersionInfoMenuEntry
(
helpMenu
);
/
* Contents */
/
/ Contents
ADD_MENUITEM_WITH_HELP
(
helpMenu
,
ID_GENERAL_HELP
,
_
(
"&Contents"
),
_
(
"Open the kicad manual"
),
online_help_xpm
);
// About
helpMenu
->
AppendSeparator
();
ADD_MENUITEM_WITH_HELP
(
helpMenu
,
ID_KICA
D_ABOUT
,
_
(
"&About"
),
ADD_MENUITEM_WITH_HELP
(
helpMenu
,
wxI
D_ABOUT
,
_
(
"&About"
),
_
(
"About kicad project manager"
),
info_xpm
);
...
...
pcbnew/menubar_pcbframe.cpp
View file @
fb475361
...
...
@@ -11,6 +11,7 @@
#include "protos.h"
#include "hotkeys.h"
#include "pcbnew_id.h"
#include "macros.h"
#include "help_common_strings.h"
...
...
@@ -41,14 +42,14 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
item
=
new
wxMenuItem
(
filesMenu
,
ID_NEW_BOARD
,
_
(
"&New"
),
_
(
"Clear current board and initialize a new one"
)
);
item
->
SetBitmap
(
new_xpm
);
SETBITMAPS
(
new_xpm
);
filesMenu
->
Append
(
item
);
// Open
item
=
new
wxMenuItem
(
filesMenu
,
ID_LOAD_FILE
,
_
(
"&Open
\t
Ctrl+O"
),
_
(
"Delete current board and load new board"
)
);
item
->
SetBitmap
(
open_document_xpm
);
SETBITMAPS
(
open_document_xpm
);
filesMenu
->
Append
(
item
);
// Load Recent submenu
...
...
@@ -64,7 +65,7 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
item
=
new
wxMenuItem
(
filesMenu
,
ID_APPEND_FILE
,
_
(
"&Append Board"
),
_
(
"Append another PCBNew board to the current loaded board"
)
);
item
->
SetBitmap
(
import_xpm
);
SETBITMAPS
(
import_xpm
);
filesMenu
->
Append
(
item
);
// Separator
...
...
@@ -74,14 +75,14 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
item
=
new
wxMenuItem
(
filesMenu
,
ID_SAVE_BOARD
,
_
(
"&Save
\t
Ctrl+S"
),
_
(
"Save current board"
)
);
item
->
SetBitmap
(
save_xpm
);
SETBITMAPS
(
save_xpm
);
filesMenu
->
Append
(
item
);
// Save As
item
=
new
wxMenuItem
(
filesMenu
,
ID_SAVE_BOARD_AS
,
_
(
"Save as..."
),
_
(
"Save the current board as.."
)
);
item
->
SetBitmap
(
save_as_xpm
);
SETBITMAPS
(
save_as_xpm
);
filesMenu
->
Append
(
item
);
filesMenu
->
AppendSeparator
();
...
...
@@ -89,13 +90,13 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
item
=
new
wxMenuItem
(
filesMenu
,
ID_MENU_READ_LAST_SAVED_VERSION_BOARD
,
_
(
"&Revert"
),
_
(
"Clear board and get previous saved version of board"
)
);
item
->
SetBitmap
(
jigsaw_xpm
);
SETBITMAPS
(
jigsaw_xpm
);
filesMenu
->
Append
(
item
);
// Rescue
item
=
new
wxMenuItem
(
filesMenu
,
ID_MENU_RECOVER_BOARD
,
_
(
"&Rescue"
),
_
(
"Clear old board and get last rescue file"
)
);
item
->
SetBitmap
(
hammer_xpm
);
SETBITMAPS
(
hammer_xpm
);
filesMenu
->
Append
(
item
);
filesMenu
->
AppendSeparator
();
...
...
@@ -105,77 +106,81 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
item
=
new
wxMenuItem
(
fabricationOutputsMenu
,
ID_PCB_GEN_POS_MODULES_FILE
,
_
(
"&Modules Position File"
),
_
(
"Generate modules position file for pick and place"
)
);
item
->
SetBitmap
(
post_compo_xpm
);
SETBITMAPS
(
post_compo_xpm
);
fabricationOutputsMenu
->
Append
(
item
);
item
=
new
wxMenuItem
(
fabricationOutputsMenu
,
ID_PCB_GEN_DRILL_FILE
,
_
(
"&Drill File"
),
_
(
"Generate excellon2 drill file"
)
);
item
->
SetBitmap
(
post_drill_xpm
);
SETBITMAPS
(
post_drill_xpm
);
fabricationOutputsMenu
->
Append
(
item
);
// Component File
item
=
new
wxMenuItem
(
fabricationOutputsMenu
,
ID_PCB_GEN_CMP_FILE
,
_
(
"&Component File"
),
_
(
"(Re)create components file (*.cmp) for CvPcb"
)
);
item
->
SetBitmap
(
create_cmp_file_xpm
);
SETBITMAPS
(
create_cmp_file_xpm
);
fabricationOutputsMenu
->
Append
(
item
);
// BOM File
item
=
new
wxMenuItem
(
fabricationOutputsMenu
,
ID_PCB_GEN_BOM_FILE_FROM_BOARD
,
_
(
"&BOM File"
),
_
(
"Create a bill of materials from schematic"
)
);
item
->
SetBitmap
(
tools_xpm
);
SETBITMAPS
(
tools_xpm
);
fabricationOutputsMenu
->
Append
(
item
);
/
* Fabrications Outputs submenu append */
/
/ Fabrications Outputs submenu append
ADD_MENUITEM_WITH_HELP_AND_SUBMENU
(
filesMenu
,
fabricationOutputsMenu
,
-
1
,
_
(
"Fabrication Outputs"
),
_
(
"Generate files for fabrication"
),
fabrication_xpm
);
/* Import submenu */
/** Import submenu **/
wxMenu
*
submenuImport
=
new
wxMenu
();
// Specctra Session
item
=
new
wxMenuItem
(
submenuImport
,
ID_GEN_IMPORT_SPECCTRA_SESSION
,
_
(
"&Specctra Session"
),
_
(
"Import a routed
\"
Specctra Session
\"
(*.ses) file"
)
);
item
->
SetBitmap
(
import_xpm
);
// @todo need better bitmap
SETBITMAPS
(
import_xpm
);
// @todo need better bitmap
submenuImport
->
Append
(
item
);
ADD_MENUITEM_WITH_HELP_AND_SUBMENU
(
filesMenu
,
submenuImport
,
ID_GEN_IMPORT_FILE
,
_
(
"Import"
),
_
(
"Import files"
),
import_xpm
);
/* Export submenu */
/** Export submenu **/
wxMenu
*
submenuexport
=
new
wxMenu
();
// Specctra DSN
item
=
new
wxMenuItem
(
submenuexport
,
ID_GEN_EXPORT_SPECCTRA
,
_
(
"&Specctra DSN"
),
_
(
"Export the current board to a
\"
Specctra DSN
\"
file"
)
);
item
->
SetBitmap
(
export_xpm
);
SETBITMAPS
(
export_xpm
);
submenuexport
->
Append
(
item
);
// GenCAD
item
=
new
wxMenuItem
(
submenuexport
,
ID_GEN_EXPORT_FILE_GENCADFORMAT
,
_
(
"&GenCAD"
),
_
(
"Export GenCAD format"
)
);
item
->
SetBitmap
(
export_xpm
);
SETBITMAPS
(
export_xpm
);
submenuexport
->
Append
(
item
);
// Module Report
item
=
new
wxMenuItem
(
submenuexport
,
ID_GEN_EXPORT_FILE_MODULE_REPORT
,
_
(
"&Module Report"
),
_
(
"Create a report of all modules on the current board"
)
);
item
->
SetBitmap
(
tools_xpm
);
SETBITMAPS
(
tools_xpm
);
submenuexport
->
Append
(
item
);
// VRML
item
=
new
wxMenuItem
(
submenuexport
,
ID_GEN_EXPORT_FILE_VRML
,
_
(
"&VRML"
),
_
(
"Export a VRML board representation"
)
);
item
->
SetBitmap
(
show_3d_xpm
);
SETBITMAPS
(
show_3d_xpm
);
submenuexport
->
Append
(
item
);
ADD_MENUITEM_WITH_HELP_AND_SUBMENU
(
filesMenu
,
submenuexport
,
...
...
@@ -188,21 +193,21 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
item
=
new
wxMenuItem
(
filesMenu
,
wxID_PRINT
,
_
(
"&Print
\t
Ctrl+P"
),
_
(
"Print board"
)
);
item
->
SetBitmap
(
print_button
);
SETBITMAPS
(
print_button
);
filesMenu
->
Append
(
item
);
// Create SVG file
item
=
new
wxMenuItem
(
filesMenu
,
ID_GEN_PLOT_SVG
,
_
(
"Print S&VG"
),
_
(
"Plot board in Scalable Vector Graphics format"
)
);
item
->
SetBitmap
(
print_button
);
SETBITMAPS
(
print_button
);
filesMenu
->
Append
(
item
);
// Plot
item
=
new
wxMenuItem
(
filesMenu
,
ID_GEN_PLOT
,
_
(
"&Plot"
),
_
(
"Plot board in HPGL, PostScript or Gerber RS-274X format)"
)
);
item
->
SetBitmap
(
plot_xpm
);
SETBITMAPS
(
plot_xpm
);
filesMenu
->
Append
(
item
);
filesMenu
->
AppendSeparator
();
...
...
@@ -212,14 +217,14 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
item
=
new
wxMenuItem
(
submenuarchive
,
ID_MENU_ARCHIVE_NEW_MODULES
,
_
(
"Archive New Footprints"
),
_
(
"Archive new footprints only in a library (keep other footprints in this lib)"
)
);
item
->
SetBitmap
(
library_update_xpm
);
SETBITMAPS
(
library_update_xpm
);
submenuarchive
->
Append
(
item
);
// Create FootPrint Archive
item
=
new
wxMenuItem
(
submenuarchive
,
ID_MENU_ARCHIVE_ALL_MODULES
,
_
(
"Create Footprint Archive"
),
_
(
"Archive all footprints in a library (old library will be deleted)"
)
);
item
->
SetBitmap
(
library_xpm
);
SETBITMAPS
(
library_xpm
);
submenuarchive
->
Append
(
item
);
ADD_MENUITEM_WITH_HELP_AND_SUBMENU
(
filesMenu
,
submenuarchive
,
...
...
@@ -229,15 +234,11 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
library_xpm
);
/* Quit */
#if !defined( __WXMAC__ )
filesMenu
->
AppendSeparator
();
item
=
new
wxMenuItem
(
filesMenu
,
wxID_EXIT
,
_
(
"&Quit"
),
_
(
"Quit PCBNew"
)
);
item
->
SetBitmap
(
exit_xpm
);
SETBITMAPS
(
exit_xpm
);
filesMenu
->
Append
(
item
);
#endif
/* !defined( __WXMAC__ ) */
/** Create Edit menu **/
wxMenu
*
editMenu
=
new
wxMenu
;
...
...
@@ -245,21 +246,21 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
text
=
AddHotkeyName
(
_
(
"Undo"
),
g_Pcbnew_Editor_Hokeys_Descr
,
HK_UNDO
);
item
=
new
wxMenuItem
(
editMenu
,
wxID_UNDO
,
text
,
HELP_UNDO
,
wxITEM_NORMAL
);
item
->
SetBitmap
(
undo_xpm
);
SETBITMAPS
(
undo_xpm
);
editMenu
->
Append
(
item
);
// Redo
text
=
AddHotkeyName
(
_
(
"Redo"
),
g_Pcbnew_Editor_Hokeys_Descr
,
HK_REDO
);
item
=
new
wxMenuItem
(
editMenu
,
wxID_REDO
,
text
,
HELP_REDO
,
wxITEM_NORMAL
);
item
->
SetBitmap
(
redo_xpm
);
SETBITMAPS
(
redo_xpm
);
editMenu
->
Append
(
item
);
// Delete
item
=
new
wxMenuItem
(
editMenu
,
ID_PCB_DELETE_ITEM_BUTT
,
_
(
"Delete"
),
_
(
"Delete items"
)
);
item
->
SetBitmap
(
delete_body_xpm
);
SETBITMAPS
(
delete_body_xpm
);
editMenu
->
Append
(
item
);
editMenu
->
AppendSeparator
();
...
...
@@ -267,7 +268,7 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
text
=
AddHotkeyName
(
_
(
"&Find"
),
g_Pcbnew_Editor_Hokeys_Descr
,
HK_FIND_ITEM
);
item
=
new
wxMenuItem
(
editMenu
,
ID_FIND_ITEMS
,
text
,
HELP_FIND
);
item
->
SetBitmap
(
find_xpm
);
SETBITMAPS
(
find_xpm
);
editMenu
->
Append
(
item
);
editMenu
->
AppendSeparator
();
...
...
@@ -275,21 +276,21 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
item
=
new
wxMenuItem
(
editMenu
,
ID_PCB_GLOBAL_DELETE
,
_
(
"Global &Deletions"
),
_
(
"Delete tracks, modules, texts... on board"
)
);
item
->
SetBitmap
(
general_deletions_xpm
);
SETBITMAPS
(
general_deletions_xpm
);
editMenu
->
Append
(
item
);
// Cleanup Tracks and Vias
item
=
new
wxMenuItem
(
editMenu
,
ID_MENU_PCB_CLEAN
,
_
(
"&Cleanup Tracks and Vias"
),
_
(
"Clean stubs, vias, delete break points, or connect dangling tracks to pads and vias"
)
);
item
->
SetBitmap
(
delete_body_xpm
);
SETBITMAPS
(
delete_body_xpm
);
editMenu
->
Append
(
item
);
// Swap Layers
item
=
new
wxMenuItem
(
editMenu
,
ID_MENU_PCB_SWAP_LAYERS
,
_
(
"&Swap Layers"
),
_
(
"Swap tracks on copper layers or drawings on other layers"
)
);
item
->
SetBitmap
(
swap_layer_xpm
);
SETBITMAPS
(
swap_layer_xpm
);
editMenu
->
Append
(
item
);
// Reset module reference sizes
...
...
@@ -297,7 +298,7 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
ID_MENU_PCB_RESET_TEXTMODULE_REFERENCE_SIZES
,
_
(
"Reset Module &Reference Sizes"
),
_
(
"Reset text size and width of all module references to current defaults"
)
);
item
->
SetBitmap
(
reset_text_xpm
);
SETBITMAPS
(
reset_text_xpm
);
editMenu
->
Append
(
item
);
// Reset module value sizes
...
...
@@ -305,7 +306,7 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
ID_MENU_PCB_RESET_TEXTMODULE_VALUE_SIZES
,
_
(
"Reset Module &Value Sizes"
),
_
(
"Reset text size and width of all module values to current defaults"
)
);
item
->
SetBitmap
(
reset_text_xpm
);
SETBITMAPS
(
reset_text_xpm
);
editMenu
->
Append
(
item
);
/** Create View menu **/
...
...
@@ -327,7 +328,7 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
HK_ZOOM_IN
,
false
);
item
=
new
wxMenuItem
(
viewMenu
,
ID_ZOOM_IN
,
text
,
HELP_ZOOM_IN
,
wxITEM_NORMAL
);
item
->
SetBitmap
(
zoom_in_xpm
);
SETBITMAPS
(
zoom_in_xpm
);
viewMenu
->
Append
(
item
);
// Zoom Out
...
...
@@ -336,7 +337,7 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
item
=
new
wxMenuItem
(
viewMenu
,
ID_ZOOM_OUT
,
text
,
HELP_ZOOM_OUT
,
wxITEM_NORMAL
);
item
->
SetBitmap
(
zoom_out_xpm
);
SETBITMAPS
(
zoom_out_xpm
);
viewMenu
->
Append
(
item
);
// Fit on Screen
...
...
@@ -345,7 +346,7 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
item
=
new
wxMenuItem
(
viewMenu
,
ID_ZOOM_PAGE
,
text
,
HELP_ZOOM_FIT
,
wxITEM_NORMAL
);
item
->
SetBitmap
(
zoom_fit_in_page_xpm
);
SETBITMAPS
(
zoom_fit_in_page_xpm
);
viewMenu
->
Append
(
item
);
viewMenu
->
AppendSeparator
();
...
...
@@ -357,7 +358,7 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
item
=
new
wxMenuItem
(
viewMenu
,
ID_ZOOM_REDRAW
,
text
,
HELP_ZOOM_REDRAW
,
wxITEM_NORMAL
);
item
->
SetBitmap
(
zoom_redraw_xpm
);
SETBITMAPS
(
zoom_redraw_xpm
);
viewMenu
->
Append
(
item
);
viewMenu
->
AppendSeparator
();
...
...
@@ -365,14 +366,14 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
item
=
new
wxMenuItem
(
viewMenu
,
ID_MENU_PCB_SHOW_3D_FRAME
,
_
(
"3D Display"
),
_
(
"Show board in 3D viewer"
)
);
item
->
SetBitmap
(
show_3d_xpm
);
SETBITMAPS
(
show_3d_xpm
);
viewMenu
->
Append
(
item
);
// List Nets
item
=
new
wxMenuItem
(
viewMenu
,
ID_MENU_LIST_NETS
,
_
(
"&List Nets"
),
_
(
"View a list of nets with names and id's"
)
);
item
->
SetBitmap
(
tools_xpm
);
SETBITMAPS
(
tools_xpm
);
viewMenu
->
Append
(
item
);
...
...
@@ -385,7 +386,7 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
item
=
new
wxMenuItem
(
placeMenu
,
ID_PCB_MODULE_BUTT
,
text
,
_
(
"Add modules"
),
wxITEM_NORMAL
);
item
->
SetBitmap
(
module_xpm
);
SETBITMAPS
(
module_xpm
);
placeMenu
->
Append
(
item
);
// Track
...
...
@@ -394,42 +395,42 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
item
=
new
wxMenuItem
(
placeMenu
,
ID_TRACK_BUTT
,
text
,
_
(
"Add tracks and vias"
),
wxITEM_NORMAL
);
item
->
SetBitmap
(
add_tracks_xpm
);
SETBITMAPS
(
add_tracks_xpm
);
placeMenu
->
Append
(
item
);
// Zone
item
=
new
wxMenuItem
(
placeMenu
,
ID_PCB_ZONES_BUTT
,
_
(
"Zone"
),
_
(
"Add filled zones"
));
item
->
SetBitmap
(
add_zone_xpm
);
SETBITMAPS
(
add_zone_xpm
);
placeMenu
->
Append
(
item
);
// Text
item
=
new
wxMenuItem
(
placeMenu
,
ID_PCB_ADD_TEXT_BUTT
,
_
(
"Text"
),
_
(
"Add text on copper layers or graphic text"
)
);
item
->
SetBitmap
(
add_text_xpm
);
SETBITMAPS
(
add_text_xpm
);
placeMenu
->
Append
(
item
);
// Graphic Arc
item
=
new
wxMenuItem
(
placeMenu
,
ID_PCB_ARC_BUTT
,
_
(
"Arc"
),
_
(
"Add graphic arc"
)
);
item
->
SetBitmap
(
add_arc_xpm
);
SETBITMAPS
(
add_arc_xpm
);
placeMenu
->
Append
(
item
);
// Graphic Circle
item
=
new
wxMenuItem
(
placeMenu
,
ID_PCB_CIRCLE_BUTT
,
_
(
"Circle"
),
_
(
"Add graphic circle"
));
item
->
SetBitmap
(
add_circle_xpm
);
SETBITMAPS
(
add_circle_xpm
);
placeMenu
->
Append
(
item
);
// Line or Polygon
item
=
new
wxMenuItem
(
placeMenu
,
ID_PCB_ADD_LINE_BUTT
,
_
(
"Line or Polygon"
),
_
(
"Add graphic line or polygon"
));
item
->
SetBitmap
(
add_dashed_line_xpm
);
SETBITMAPS
(
add_dashed_line_xpm
);
placeMenu
->
Append
(
item
);
placeMenu
->
AppendSeparator
();
...
...
@@ -437,14 +438,14 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
item
=
new
wxMenuItem
(
placeMenu
,
ID_PCB_DIMENSION_BUTT
,
_
(
"Dimension"
),
_
(
"Add dimension"
)
);
item
->
SetBitmap
(
add_dimension_xpm
);
SETBITMAPS
(
add_dimension_xpm
);
placeMenu
->
Append
(
item
);
// Layer alignment target
item
=
new
wxMenuItem
(
placeMenu
,
ID_PCB_MIRE_BUTT
,
_
(
"Layer alignment target"
),
_
(
"Add layer alignment target"
));
item
->
SetBitmap
(
add_mires_xpm
);
SETBITMAPS
(
add_mires_xpm
);
placeMenu
->
Append
(
item
);
placeMenu
->
AppendSeparator
();
...
...
@@ -452,14 +453,14 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
item
=
new
wxMenuItem
(
placeMenu
,
ID_PCB_PLACE_OFFSET_COORD_BUTT
,
_
(
"Drill and Place Offset"
),
_
(
"Place the origin point for drill and place files"
));
item
->
SetBitmap
(
pcb_offset_xpm
);
SETBITMAPS
(
pcb_offset_xpm
);
placeMenu
->
Append
(
item
);
// Grid Origin
item
=
new
wxMenuItem
(
placeMenu
,
ID_PCB_PLACE_GRID_COORD_BUTT
,
_
(
"Grid Origin"
),
_
(
"Set the origin point for the grid"
));
item
->
SetBitmap
(
grid_select_axis_xpm
);
SETBITMAPS
(
grid_select_axis_xpm
);
placeMenu
->
Append
(
item
);
...
...
@@ -471,7 +472,7 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
item
=
new
wxMenuItem
(
configmenu
,
ID_CONFIG_REQ
,
_
(
"&Library"
),
_
(
"Setting libraries, directories and others..."
)
);
item
->
SetBitmap
(
library_xpm
);
SETBITMAPS
(
library_xpm
);
configmenu
->
Append
(
item
);
// Colors and Visibility are also handled by the layers manager toolbar
...
...
@@ -479,52 +480,58 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
m_show_layer_manager_tools
?
_
(
"Hide &Layers Manager"
)
:
_
(
"Show &Layers Manager"
),
HELP_SHOW_HIDE_LAYERMANAGER
);
item
->
SetBitmap
(
layers_manager_xpm
);
SETBITMAPS
(
layers_manager_xpm
);
configmenu
->
Append
(
item
);
// General
item
=
new
wxMenuItem
(
configmenu
,
ID_OPTIONS_SETUP
,
item
=
new
wxMenuItem
(
configmenu
,
wxID_PREFERENCES
,
#ifdef __WXMAC__
_
(
"&Preferences..."
),
#else
_
(
"&General"
),
#endif
_
(
"Select general options for PCBnew"
)
);
item
->
SetBitmap
(
preference_xpm
);
SETBITMAPS
(
preference_xpm
);
configmenu
->
Append
(
item
);
//Display
//
Display
item
=
new
wxMenuItem
(
configmenu
,
ID_PCB_DISPLAY_OPTIONS_SETUP
,
_
(
"&Display"
),
_
(
"Select how items (pads, tracks texts ... ) are displayed"
)
);
item
->
SetBitmap
(
display_options_xpm
);
SETBITMAPS
(
display_options_xpm
);
configmenu
->
Append
(
item
);
/
* Create Dimensions submenu */
/
/ Create Dimensions submenu
wxMenu
*
dimensionsMenu
=
new
wxMenu
;
// Grid
item
=
new
wxMenuItem
(
dimensionsMenu
,
ID_PCB_USER_GRID_SETUP
,
_
(
"Grid"
),
_
(
"Adjust user grid dimensions"
)
);
item
->
SetBitmap
(
grid_xpm
);
SETBITMAPS
(
grid_xpm
);
dimensionsMenu
->
Append
(
item
);
// Text and Drawings
item
=
new
wxMenuItem
(
dimensionsMenu
,
ID_PCB_DRAWINGS_WIDTHS_SETUP
,
_
(
"Texts and Drawings"
),
_
(
"Adjust dimensions for texts and drawings"
)
);
item
->
SetBitmap
(
options_text_xpm
);
SETBITMAPS
(
options_text_xpm
);
dimensionsMenu
->
Append
(
item
);
// Pads
item
=
new
wxMenuItem
(
dimensionsMenu
,
ID_PCB_PAD_SETUP
,
_
(
"Pads"
),
_
(
"Adjust default pad characteristics"
)
);
item
->
SetBitmap
(
pad_xpm
);
SETBITMAPS
(
pad_xpm
);
dimensionsMenu
->
Append
(
item
);
// Pads Mask Clearance
item
=
new
wxMenuItem
(
dimensionsMenu
,
ID_PCB_MASK_CLEARANCE
,
_
(
"Pads Mask Clearance"
),
_
(
"Adjust the global clearance between pads and the solder resist mask"
)
);
item
->
SetBitmap
(
pads_mask_layers_xpm
);
SETBITMAPS
(
pads_mask_layers_xpm
);
dimensionsMenu
->
Append
(
item
);
...
...
@@ -533,10 +540,10 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
item
=
new
wxMenuItem
(
dimensionsMenu
,
ID_CONFIG_SAVE
,
_
(
"&Save"
),
_
(
"Save dimension preferences"
)
);
item
->
SetBitmap
(
save_xpm
);
SETBITMAPS
(
save_xpm
);
dimensionsMenu
->
Append
(
item
);
/
* append dimension menu to config menu */
/
/ Append dimension menu to config menu
ADD_MENUITEM_WITH_HELP_AND_SUBMENU
(
configmenu
,
dimensionsMenu
,
-
1
,
_
(
"Di&mensions"
),
_
(
"Global dimensions preferences"
),
...
...
@@ -553,35 +560,34 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
item
=
new
wxMenuItem
(
configmenu
,
ID_CONFIG_SAVE
,
_
(
"&Save Preferences"
),
_
(
"Save application preferences"
)
);
item
->
SetBitmap
(
save_setup_xpm
);
SETBITMAPS
(
save_setup_xpm
);
configmenu
->
Append
(
item
);
// Read Preferences
item
=
new
wxMenuItem
(
configmenu
,
ID_CONFIG_READ
,
_
(
"&Read Preferences"
),
_
(
"Read application preferences"
)
);
item
->
SetBitmap
(
read_setup_xpm
);
SETBITMAPS
(
read_setup_xpm
);
configmenu
->
Append
(
item
);
/**
* Design Rules menu
*/
wxMenu
*
designRulesMenu
=
new
wxMenu
;
/
* Design Rules */
/
/ Design Rules
item
=
new
wxMenuItem
(
designRulesMenu
,
ID_MENU_PCB_SHOW_DESIGN_RULES_DIALOG
,
_
(
"Design Rules"
),
_
(
"Open the design rules editor"
)
);
item
->
SetBitmap
(
hammer_xpm
);
SETBITMAPS
(
hammer_xpm
);
designRulesMenu
->
Append
(
item
);
/
* Layers Setup */
/
/ Layers Setup
item
=
new
wxMenuItem
(
configmenu
,
ID_PCB_LAYERS_SETUP
,
_
(
"&Layers Setup"
),
_
(
"Enable and set layer properties"
)
);
item
->
SetBitmap
(
copper_layers_setup_xpm
);
SETBITMAPS
(
copper_layers_setup_xpm
);
designRulesMenu
->
Append
(
item
);
...
...
@@ -592,25 +598,20 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
AddHelpVersionInfoMenuEntry
(
helpMenu
);
/
* Contents */
/
/ Contents
item
=
new
wxMenuItem
(
helpMenu
,
ID_GENERAL_HELP
,
_
(
"&Contents"
),
_
(
"Open the on line PCBnew documentation"
)
);
item
->
SetBitmap
(
online_help_xpm
);
SETBITMAPS
(
online_help_xpm
);
helpMenu
->
Append
(
item
);
/* About */
#if !defined(__WXMAC__)
item
=
new
wxMenuItem
(
helpMenu
,
ID_KICAD_ABOUT
,
// About
item
=
new
wxMenuItem
(
helpMenu
,
wxID_ABOUT
,
_
(
"&About"
),
_
(
"About PCBnew printed circuit board designer"
)
);
item
->
SetBitmap
(
info_xpm
);
_
(
"About PCBnew printed circuit board designer"
));
SETBITMAPS
(
info_xpm
);
helpMenu
->
Append
(
item
);
#endif
/* !defined(__WXMAC__) */
/**
* Append all menus to the menuBar
...
...
pcbnew/pcbframe.cpp
View file @
fb475361
...
...
@@ -111,7 +111,7 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME )
EVT_MENU_RANGE
(
ID_PREFERENCES_HOTKEY_START
,
ID_PREFERENCES_HOTKEY_END
,
PCB_EDIT_FRAME
::
Process_Config
)
EVT_MENU
(
ID_MENU_PCB_SHOW_HIDE_LAYERS_MANAGER_DIALOG
,
PCB_EDIT_FRAME
::
Process_Config
)
EVT_MENU
(
ID_OPTIONS_SETUP
,
PCB_EDIT_FRAME
::
Process_Config
)
EVT_MENU
(
wxID_PREFERENCES
,
PCB_EDIT_FRAME
::
Process_Config
)
EVT_MENU
(
ID_PCB_LAYERS_SETUP
,
PCB_EDIT_FRAME
::
Process_Config
)
EVT_MENU
(
ID_PCB_MASK_CLEARANCE
,
PCB_EDIT_FRAME
::
Process_Config
)
EVT_MENU
(
ID_PCB_PAD_SETUP
,
PCB_EDIT_FRAME
::
Process_Config
)
...
...
@@ -140,7 +140,7 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME )
// Menu Help
EVT_MENU
(
ID_GENERAL_HELP
,
EDA_DRAW_FRAME
::
GetKicadHelp
)
EVT_MENU
(
ID_KICA
D_ABOUT
,
EDA_BASE_FRAME
::
GetKicadAbout
)
EVT_MENU
(
wxI
D_ABOUT
,
EDA_BASE_FRAME
::
GetKicadAbout
)
// Menu 3D Frame
EVT_MENU
(
ID_MENU_PCB_SHOW_3D_FRAME
,
PCB_EDIT_FRAME
::
Show3D_Frame
)
...
...
pcbnew/pcbnew.cpp
View file @
fb475361
...
...
@@ -92,14 +92,6 @@ void WinEDA_App::MacOpenFile( const wxString& fileName )
bool
WinEDA_App
::
OnInit
()
{
/* WXMAC application specific */
#ifdef __WXMAC__
// wxApp::SetExitOnFrameDelete(false);
wxApp
::
s_macAboutMenuItemId
=
ID_KICAD_ABOUT
;
wxApp
::
s_macPreferencesMenuItemId
=
ID_OPTIONS_SETUP
;
#endif
/* __WXMAC__ */
wxFileName
fn
;
PCB_EDIT_FRAME
*
frame
=
NULL
;
...
...
pcbnew/pcbnew_config.cpp
View file @
fb475361
...
...
@@ -26,7 +26,6 @@
#define HOTKEY_FILENAME wxT( "pcbnew" )
void
PCB_EDIT_FRAME
::
Process_Config
(
wxCommandEvent
&
event
)
{
int
id
=
event
.
GetId
();
...
...
@@ -59,7 +58,7 @@ void PCB_EDIT_FRAME::Process_Config( wxCommandEvent& event )
}
break
;
case
ID_OPTIONS_SETUP
:
case
wxID_PREFERENCES
:
{
Dialog_GeneralOptions
dlg
(
this
);
dlg
.
ShowModal
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment