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
5a0aca0e
Commit
5a0aca0e
authored
Jan 18, 2010
by
jerryjacobs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More Mac OS X work, see CHANGELOG.txt
parent
e3894962
Changes
19
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
406 additions
and
147 deletions
+406
-147
CHANGELOG.txt
CHANGELOG.txt
+11
-0
TODO.txt
TODO.txt
+7
-1
drawpanel.cpp
common/drawpanel.cpp
+1
-1
cvframe.cpp
cvpcb/cvframe.cpp
+1
-1
cvpcb.cpp
cvpcb/cvpcb.cpp
+21
-13
menucfg.cpp
cvpcb/menucfg.cpp
+31
-9
CMakeLists.txt
eeschema/CMakeLists.txt
+4
-13
eeschema.cpp
eeschema/eeschema.cpp
+11
-11
hotkeys.cpp
eeschema/hotkeys.cpp
+33
-5
menubar.cpp
eeschema/menubar.cpp
+175
-60
schframe.cpp
eeschema/schframe.cpp
+1
-1
wxPcbStruct.h
include/wxPcbStruct.h
+2
-0
buildmnu.cpp
kicad/buildmnu.cpp
+15
-5
kicad.cpp
kicad/kicad.cpp
+9
-0
Makefile
packaging/mac-osx/dmg-generator/Makefile
+2
-2
edit.cpp
pcbnew/edit.cpp
+1
-4
menubar_pcbframe.cpp
pcbnew/menubar_pcbframe.cpp
+67
-20
pcbframe.cpp
pcbnew/pcbframe.cpp
+5
-1
pcbnew.cpp
pcbnew/pcbnew.cpp
+9
-0
No files found.
CHANGELOG.txt
View file @
5a0aca0e
...
...
@@ -5,6 +5,17 @@ Please add newer entries at the top, list the date and your name with
email address.
2010-Jan-17 UPDATE Jerry Jacobs <xor.gate.engineering[at]gmail[dot]com>
================================================================================
More work to make kicad more Mac OS X compliant.
* Workaround for wxAboutDialog bug.
* WXMAC needs wxID_EXIT to make closing the application function properly.
* Workaround for hotkeys, on Mac OS X we can't use Fx keys.
This needs to be further implemented and is a work in progress.
We need to modify the hotkey code to display Mac OS X the
special modifier keys in the hotkey list.
2010-Jan-18 UPDATE Dick Hollenbeck <dick@softplc.com>
================================================================================
++any
...
...
TODO.txt
View file @
5a0aca0e
...
...
@@ -3,10 +3,16 @@ KiCad TODO List
CMAKE
-----
* Add install targets for binaries and resources on Mac.
* Add Python.
WXMAC Platform
--------------
* Fix hotkey list to match CMD key
* Fix AddHotkeyName to let wxWidgets handle Ctrl to CMD key
* Fix About dialog crash, or trash wxAboutDialog and create our own
About dialog to match all platforms. (wxAboutDialog different on platforms)
* Fix toolbar button tooltips.
Common
------
...
...
common/drawpanel.cpp
View file @
5a0aca0e
...
...
@@ -799,7 +799,7 @@ void WinEDA_DrawPanel::DrawGrid( wxDC* DC )
// Under linux, to be tested (could be depend on linux versions
// so perhaps could be necessary to set this option at run time.
#if
0
#if
defined( __WXMAC__ )
// Use a pixel based draw to display grid
// There is a lot of calls, so the cost is hight
...
...
cvpcb/cvframe.cpp
View file @
5a0aca0e
...
...
@@ -35,7 +35,7 @@ BEGIN_EVENT_TABLE( WinEDA_CvpcbFrame, WinEDA_BasicFrame )
WinEDA_CvpcbFrame
::
LoadNetList
)
EVT_MENU
(
ID_SAVE_PROJECT
,
WinEDA_CvpcbFrame
::
SaveQuitCvpcb
)
EVT_MENU
(
ID_CVPCB_QU
IT
,
EVT_MENU
(
wxID_EX
IT
,
WinEDA_CvpcbFrame
::
OnQuit
)
EVT_MENU
(
ID_GENERAL_HELP
,
WinEDA_CvpcbFrame
::
GetKicadHelp
)
...
...
cvpcb/cvpcb.cpp
View file @
5a0aca0e
...
...
@@ -36,7 +36,7 @@ const wxString titleLibLoadError( _( "Library Load Error" ) );
* http://wiki.wxwidgets.org/WxMac-specific_topics
*/
void
WinEDA_App
::
MacOpenFile
(
const
wxString
&
fileName
)
{
wxFileName
f
n
=
fileName
;
wxFileName
f
ilename
=
fileName
;
wxString
oldPath
;
WinEDA_CvpcbFrame
*
frame
=
((
WinEDA_CvpcbFrame
*
)
GetTopWindow
());
...
...
@@ -46,16 +46,16 @@ void WinEDA_App::MacOpenFile(const wxString &fileName) {
/* Update the library search path list. */
if
(
wxGetApp
().
GetLibraryPathList
().
Index
(
oldPath
)
!=
wxNOT_FOUND
)
wxGetApp
().
GetLibraryPathList
().
Remove
(
oldPath
);
wxGetApp
().
GetLibraryPathList
().
Insert
(
f
n
.
GetPath
(),
0
);
wxGetApp
().
GetLibraryPathList
().
Insert
(
f
ilename
.
GetPath
(),
0
);
frame
->
m_NetlistFileName
=
f
n
;
frame
->
m_NetlistFileName
=
f
ilename
;
if
(
frame
->
ReadNetList
()
)
{
frame
->
SetLastProject
(
f
n
.
GetFullPath
()
);
frame
->
SetLastProject
(
f
ilename
.
GetFullPath
()
);
frame
->
SetTitle
(
wxGetApp
().
GetTitle
()
+
wxT
(
" "
)
+
GetBuildVersion
()
+
wxT
(
" "
)
+
f
n
.
GetFullPath
()
);
wxT
(
" "
)
+
f
ilename
.
GetFullPath
()
);
}
else
{
...
...
@@ -75,8 +75,16 @@ IMPLEMENT_APP( WinEDA_App )
bool
WinEDA_App
::
OnInit
()
{
wxFileName
fn
;
wxString
msg
;
/* WXMAC application specific */
#ifdef __WXMAC__
// wxApp::SetExitOnFrameDelete(false);
// wxApp::s_macAboutMenuItemId = ID_KICAD_ABOUT;
wxApp
::
s_macPreferencesMenuItemId
=
ID_OPTIONS_SETUP
;
#endif
/* __WXMAC__ */
wxFileName
filename
;
wxString
message
;
WinEDA_CvpcbFrame
*
frame
=
NULL
;
InitEDA_Appl
(
wxT
(
"CvPCB"
),
APP_TYPE_CVPCB
);
...
...
@@ -89,8 +97,8 @@ bool WinEDA_App::OnInit()
if
(
argc
>
1
)
{
f
n
=
argv
[
1
];
wxSetWorkingDirectory
(
f
n
.
GetPath
()
);
f
ilename
=
argv
[
1
];
wxSetWorkingDirectory
(
f
ilename
.
GetPath
()
);
}
// read current setup and reopen last directory if no filename to open in command line
...
...
@@ -105,17 +113,17 @@ bool WinEDA_App::OnInit()
// Show the frame
SetTopWindow
(
frame
);
frame
->
LoadProjectFile
(
f
n
.
GetFullPath
()
);
frame
->
LoadProjectFile
(
f
ilename
.
GetFullPath
()
);
frame
->
Show
(
TRUE
);
frame
->
BuildFOOTPRINTS_LISTBOX
();
if
(
f
n
.
IsOk
()
&&
fn
.
FileExists
()
)
if
(
f
ilename
.
IsOk
()
&&
filename
.
FileExists
()
)
{
frame
->
m_NetlistFileName
=
f
n
;
frame
->
m_NetlistFileName
=
f
ilename
;
if
(
frame
->
ReadNetList
()
)
{
frame
->
m_NetlistFileExtension
=
f
n
.
GetExt
();
frame
->
m_NetlistFileExtension
=
f
ilename
.
GetExt
();
return
true
;
}
}
...
...
cvpcb/menucfg.cpp
View file @
5a0aca0e
/**
*************************************/
/* menucfg : build the cvpcb main menu */
/***************************************/
/**
* @file menubar.cpp
* (Re)Create the CvPCB main MenuBar
*/
#include "fctsys.h"
#include "appl_wxstruct.h"
#include "common.h"
...
...
@@ -28,6 +28,16 @@ void WinEDA_CvpcbFrame::ReCreateMenuBar()
item
->
SetBitmap
(
open_xpm
);
filesMenu
->
Append
(
item
);
/* Open Recent submenu */
wxMenu
*
openRecentMenu
=
new
wxMenu
();
wxGetApp
().
m_fileHistory
.
AddFilesToMenu
(
openRecentMenu
);
ADD_MENUITEM_WITH_HELP_AND_SUBMENU
(
filesMenu
,
openRecentMenu
,
-
1
,
_
(
"Open &Recent"
),
_
(
"Open a recent opened netlist document"
),
open_project_xpm
);
filesMenu
->
AppendSeparator
();
item
=
new
wxMenuItem
(
filesMenu
,
ID_SAVE_PROJECT
,
_
(
"&Save As..."
),
...
...
@@ -35,13 +45,15 @@ void WinEDA_CvpcbFrame::ReCreateMenuBar()
item
->
SetBitmap
(
save_xpm
);
filesMenu
->
Append
(
item
);
/* Quit on all platforms except WXMAC */
#if !defined(__WXMAC__)
filesMenu
->
AppendSeparator
();
item
=
new
wxMenuItem
(
filesMenu
,
ID_CVPCB_QUIT
,
_
(
"E&xit"
),
_
(
"Quit Cvpcb"
)
);
item
->
SetBitmap
(
exit_xpm
);
item
=
new
wxMenuItem
(
filesMenu
,
wxID_EXIT
,
_
(
"&Quit"
),
_
(
"Quit CvPCB"
)
);
filesMenu
->
Append
(
item
);
wxGetApp
().
m_fileHistory
.
AddFilesToMenu
(
filesMenu
);
#endif
/* !defined( __WXMAC__) */
// Menu Configuration:
wxMenu
*
configmenu
=
new
wxMenu
;
...
...
@@ -70,12 +82,21 @@ void WinEDA_CvpcbFrame::ReCreateMenuBar()
_
(
"Open the cvpcb manual"
)
);
item
->
SetBitmap
(
help_xpm
);
helpMenu
->
Append
(
item
);
/* About on all platforms except WXMAC */
#if !defined(__WXMAC__)
item
=
new
wxMenuItem
(
helpMenu
,
ID_KICAD_ABOUT
,
_
(
"&About
cvpcb
"
),
_
(
"&About"
),
_
(
"About cvpcb schematic to pcb converter"
)
);
item
->
SetBitmap
(
info_xpm
);
helpMenu
->
Append
(
item
);
#endif
/* !defined(__WXMAC__) */
/**
* Create the menubar and append all submenus
*/
menuBar
->
Append
(
filesMenu
,
_
(
"&File"
)
);
menuBar
->
Append
(
configmenu
,
_
(
"&Preferences"
)
);
menuBar
->
Append
(
helpMenu
,
_
(
"&Help"
)
);
...
...
@@ -84,3 +105,4 @@ void WinEDA_CvpcbFrame::ReCreateMenuBar()
* rebuilt. This allows language changes of the menu text on the fly. */
SetMenuBar
(
menuBar
);
}
eeschema/CMakeLists.txt
View file @
5a0aca0e
...
...
@@ -4,15 +4,6 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}
${
CMAKE_SOURCE_DIR
}
/common
${
Boost_INCLUDE_DIR
}
)
##
# Name of target on OSX is also the title of the application
# on other targets this should be as normal
##
if
(
APPLE
)
set
(
EESCHEMA_NAME EESchema
)
else
(
APPLE
)
set
(
EESCHEMA_NAME eeschema
)
endif
(
APPLE
)
set
(
EESCHEMA_SRCS
annotate.cpp
...
...
@@ -157,15 +148,15 @@ if(APPLE)
set
(
MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.eeschema
)
endif
(
APPLE
)
add_executable
(
${
EESCHEMA_NAME
}
WIN32 MACOSX_BUNDLE
${
EESCHEMA_SRCS
}
${
EESCHEMA_EXTRA_SRCS
}
${
EESCHEMA_RESOURCES
}
)
add_executable
(
eeschema
WIN32 MACOSX_BUNDLE
${
EESCHEMA_SRCS
}
${
EESCHEMA_EXTRA_SRCS
}
${
EESCHEMA_RESOURCES
}
)
if
(
APPLE
)
set_target_properties
(
${
EESCHEMA_NAME
}
PROPERTIES MACOSX_BUNDLE_INFO_PLIST
${
CMAKE_CURRENT_SOURCE_DIR
}
/Info.plist
)
set_target_properties
(
eeschema
PROPERTIES MACOSX_BUNDLE_INFO_PLIST
${
CMAKE_CURRENT_SOURCE_DIR
}
/Info.plist
)
endif
(
APPLE
)
target_link_libraries
(
${
EESCHEMA_NAME
}
common bitmaps
${
wxWidgets_LIBRARIES
}
)
target_link_libraries
(
eeschema
common bitmaps
${
wxWidgets_LIBRARIES
}
)
install
(
TARGETS
${
EESCHEMA_NAME
}
install
(
TARGETS
eeschema
DESTINATION
${
KICAD_BIN
}
COMPONENT binary
)
...
...
eeschema/eeschema.cpp
View file @
5a0aca0e
...
...
@@ -111,15 +111,15 @@ 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_
CONFIG_REQ
;
//
wxApp::SetExitOnFrameDelete(false);
//
wxApp::s_macAboutMenuItemId = ID_KICAD_ABOUT;
wxApp
::
s_macPreferencesMenuItemId
=
ID_
OPTIONS_SETUP
;
#endif
/* __WXMAC__ */
wxFileName
fn
;
wxFileName
filename
;
WinEDA_SchematicFrame
*
frame
=
NULL
;
g_DebugLevel
=
0
;
// Debug level */
...
...
@@ -133,7 +133,7 @@ bool WinEDA_App::OnInit()
}
if
(
argc
>
1
)
f
n
=
argv
[
1
];
f
ilename
=
argv
[
1
];
/* init EESCHEMA */
SeedLayers
();
...
...
@@ -166,13 +166,13 @@ bool WinEDA_App::OnInit()
frame
->
Zoom_Automatique
(
TRUE
);
/* Load file specified in the command line. */
if
(
f
n
.
IsOk
()
)
if
(
f
ilename
.
IsOk
()
)
{
if
(
f
n
.
GetExt
()
!=
SchematicFileExtension
)
f
n
.
SetExt
(
SchematicFileExtension
);
wxSetWorkingDirectory
(
f
n
.
GetPath
()
);
if
(
f
ilename
.
GetExt
()
!=
SchematicFileExtension
)
f
ilename
.
SetExt
(
SchematicFileExtension
);
wxSetWorkingDirectory
(
f
ilename
.
GetPath
()
);
if
(
frame
->
DrawPanel
&&
frame
->
LoadOneEEProject
(
f
n
.
GetFullPath
(),
false
)
<=
0
)
&&
frame
->
LoadOneEEProject
(
f
ilename
.
GetFullPath
(),
false
)
<=
0
)
frame
->
DrawPanel
->
Refresh
(
true
);
}
else
...
...
eeschema/hotkeys.cpp
View file @
5a0aca0e
...
...
@@ -47,22 +47,50 @@
/* local variables */
/* Hotkey list: */
// Common commands
static
Ki_HotkeyInfo
HkZoomAuto
(
wxT
(
"Zoom Auto"
),
HK_ZOOM_AUTO
,
/**
* Common commands
*/
/* Fit on Screen */
static
Ki_HotkeyInfo
HkZoomAuto
(
wxT
(
"Fit on Screen"
),
HK_ZOOM_AUTO
,
WXK_HOME
);
static
Ki_HotkeyInfo
HkZoomCenter
(
wxT
(
"Zoom Center"
),
HK_ZOOM_CENTER
,
WXK_F4
);
static
Ki_HotkeyInfo
HkZoomRedraw
(
wxT
(
"Zoom Redraw"
),
HK_ZOOM_REDRAW
,
WXK_F3
);
static
Ki_HotkeyInfo
HkZoomOut
(
wxT
(
"Zoom Out"
),
HK_ZOOM_OUT
,
WXK_F2
);
static
Ki_HotkeyInfo
HkZoomIn
(
wxT
(
"Zoom In"
),
HK_ZOOM_IN
,
WXK_F1
);
/* Zoom In */
#if !defined( __WXMAC__ )
static
Ki_HotkeyInfo
HkZoomIn
(
wxT
(
"Zoom In"
),
HK_ZOOM_IN
,
WXK_F1
);
#else
static
Ki_HotkeyInfo
HkZoomIn
(
wxT
(
"Zoom In"
),
HK_ZOOM_IN
,
GR_KB_CTRL
+
'+'
);
#endif
/* Zoom Out */
#if !defined( __WXMAC__ )
static
Ki_HotkeyInfo
HkZoomOut
(
wxT
(
"Zoom Out"
),
HK_ZOOM_OUT
,
WXK_F2
);
#else
static
Ki_HotkeyInfo
HkZoomOut
(
wxT
(
"Zoom Out"
),
HK_ZOOM_OUT
,
GR_KB_CTRL
+
'-'
);
#endif
static
Ki_HotkeyInfo
HkHelp
(
wxT
(
"Help: this message"
),
HK_HELP
,
'?'
);
static
Ki_HotkeyInfo
HkResetLocalCoord
(
wxT
(
"Reset local coord."
),
HK_RESET_LOCAL_COORD
,
' '
);
/* Undo */
static
Ki_HotkeyInfo
HkUndo
(
wxT
(
"Undo"
),
HK_UNDO
,
GR_KB_CTRL
+
'Z'
,
(
int
)
ID_SCHEMATIC_UNDO
);
static
Ki_HotkeyInfo
HkRedo
(
wxT
(
"Redo"
),
HK_REDO
,
GR_KB_CTRL
+
'Y'
,
/* Redo */
#if !defined( __WXMAC__ )
static
Ki_HotkeyInfo
HkRedo
(
wxT
(
"Redo"
),
HK_REDO
,
GR_KB_CTRL
+
'Y'
,
(
int
)
ID_SCHEMATIC_REDO
);
#else
static
Ki_HotkeyInfo
HkRedo
(
wxT
(
"Redo"
),
HK_REDO
,
GR_KB_SHIFT
+
GR_KB_CTRL
+
'Z'
,
(
int
)
ID_SCHEMATIC_REDO
);
#endif
// Schematic editor
static
Ki_HotkeyInfo
HkBeginWire
(
wxT
(
"begin Wire"
),
HK_BEGIN_WIRE
,
'W'
);
...
...
eeschema/menubar.cpp
View file @
5a0aca0e
This diff is collapsed.
Click to expand it.
eeschema/schframe.cpp
View file @
5a0aca0e
...
...
@@ -56,7 +56,7 @@ BEGIN_EVENT_TABLE( WinEDA_SchematicFrame, WinEDA_DrawFrame )
EVT_MENU
(
ID_GEN_PLOT_DXF
,
WinEDA_SchematicFrame
::
ToPlot_DXF
)
EVT_MENU
(
ID_GEN_COPY_SHEET_TO_CLIPBOARD
,
WinEDA_DrawFrame
::
CopyToClipboard
)
EVT_MENU
(
ID_GEN_COPY_BLOCK_TO_CLIPBOARD
,
WinEDA_DrawFrame
::
CopyToClipboard
)
EVT_MENU
(
ID_EXIT
,
WinEDA_SchematicFrame
::
OnExit
)
EVT_MENU
(
wx
ID_EXIT
,
WinEDA_SchematicFrame
::
OnExit
)
EVT_MENU
(
ID_POPUP_SCH_COPY_ITEM
,
WinEDA_SchematicFrame
::
OnCopySchematicItemRequest
)
...
...
include/wxPcbStruct.h
View file @
5a0aca0e
...
...
@@ -87,6 +87,8 @@ public:
~
WinEDA_PcbFrame
();
void
OnQuit
(
wxCommandEvent
&
WXUNUSED
(
event
)
);
/** Function ToPlotter
* Open a dialog frame to create plot and drill files
* relative to the current board
...
...
kicad/buildmnu.cpp
View file @
5a0aca0e
...
...
@@ -29,7 +29,7 @@ BEGIN_EVENT_TABLE( WinEDA_MainFrame, WinEDA_BasicFrame )
/* Menu events */
EVT_MENU
(
ID_SAVE_PROJECT
,
WinEDA_MainFrame
::
OnSaveProject
)
EVT_MENU
(
ID_EXIT
,
WinEDA_MainFrame
::
OnExit
)
EVT_MENU
(
wx
ID_EXIT
,
WinEDA_MainFrame
::
OnExit
)
EVT_MENU
(
ID_TO_EDITOR
,
WinEDA_MainFrame
::
OnOpenTextEditor
)
EVT_MENU
(
ID_BROWSE_AN_SELECT_FILE
,
WinEDA_MainFrame
::
OnOpenFileInTextEditor
)
...
...
@@ -127,12 +127,17 @@ void WinEDA_MainFrame::ReCreateMenuBar()
// Separator
filesMenu
->
AppendSeparator
();
// Exit
item
=
new
wxMenuItem
(
filesMenu
,
ID_EXIT
,
_
(
"E&xit"
),
_
(
"Quit kicad"
)
);
/* Quit on all platforms except WXMAC */
#if !defined( __WXMAC__ )
filesMenu
->
AppendSeparator
();
item
=
new
wxMenuItem
(
filesMenu
,
wxID_EXIT
,
_
(
"&Quit"
),
_
(
"Quit KiCad"
)
);
item
->
SetBitmap
(
exit_xpm
);
filesMenu
->
Append
(
item
);
#endif
/* !defined( __WXMAC__ ) */
/* Add the file history */
wxGetApp
().
m_fileHistory
.
AddFilesToMenu
(
filesMenu
);
...
...
@@ -222,12 +227,17 @@ void WinEDA_MainFrame::ReCreateMenuBar()
item
->
SetBitmap
(
help_xpm
);
helpMenu
->
Append
(
item
);
// About Kicad
// About on all platforms except WXMAC */
#if !defined( __WXMAC__ )
helpMenu
->
AppendSeparator
();
item
=
new
wxMenuItem
(
helpMenu
,
ID_KICAD_ABOUT
,
_
(
"&About"
),
_
(
"About kicad project manager"
)
);
item
->
SetBitmap
(
info_xpm
);
helpMenu
->
Append
(
item
);
#endif
/* !defined( __WXMAC__ ) */
// Append menus to menuBar
menuBar
->
Append
(
filesMenu
,
_
(
"&File"
)
);
menuBar
->
Append
(
browseMenu
,
_
(
"&Browse"
)
);
...
...
kicad/kicad.cpp
View file @
5a0aca0e
...
...
@@ -85,6 +85,15 @@ 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
);
...
...
packaging/mac-osx/dmg-generator/Makefile
View file @
5a0aca0e
...
...
@@ -7,13 +7,13 @@
# Original credits by Adium developers !
# http://www.adium.im
###########
VERSION
=
2010011
6
VERSION
=
2010011
8
###########
# Variables
###########
BUILD_DIR
=
build
APP_DIR
=
bin
APP_DIR
=
release
KICAD_DIR
=
$(BUILD_DIR)
RELEASE_NAME
=
kicad-
$(VERSION)
...
...
pcbnew/edit.cpp
View file @
5a0aca0e
...
...
@@ -27,6 +27,7 @@ static void Process_Move_Item( WinEDA_PcbFrame* frame,
EDA_BaseStruct
*
DrawStruct
,
wxDC
*
DC
);
/* Handles the selection of command events. */
void
WinEDA_PcbFrame
::
Process_Special_Functions
(
wxCommandEvent
&
event
)
{
...
...
@@ -151,10 +152,6 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
case
0
:
break
;
case
ID_EXIT
:
Close
(
true
);
break
;
case
ID_OPEN_MODULE_EDITOR
:
if
(
m_ModuleEditFrame
==
NULL
)
{
...
...
pcbnew/menubar_pcbframe.cpp
View file @
5a0aca0e
...
...
@@ -36,13 +36,13 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
wxMenu
*
filesMenu
=
new
wxMenu
;
/* New Board */
item
=
new
wxMenuItem
(
filesMenu
,
ID_NEW_BOARD
,
_
(
"&New"
),
item
=
new
wxMenuItem
(
filesMenu
,
ID_NEW_BOARD
,
_
(
"&New
\t
Ctrl+N
"
),
_
(
"Clear current board and initialize a new one"
)
);
item
->
SetBitmap
(
new_xpm
);
filesMenu
->
Append
(
item
);
/* Load Board */
item
=
new
wxMenuItem
(
filesMenu
,
ID_LOAD_FILE
,
_
(
"&Open"
),
item
=
new
wxMenuItem
(
filesMenu
,
ID_LOAD_FILE
,
_
(
"&Open
\t
Ctrl+O
"
),
_
(
"Delete current board and load new board"
)
);
item
->
SetBitmap
(
open_xpm
);
filesMenu
->
Append
(
item
);
...
...
@@ -66,14 +66,14 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
/* Save */
item
=
new
wxMenuItem
(
filesMenu
,
ID_SAVE_BOARD
,
_
(
"&Save"
),
_
(
"&Save
\t
Ctrl+S
"
),
_
(
"Save current board"
)
);
item
->
SetBitmap
(
save_xpm
);
filesMenu
->
Append
(
item
);
/* Save As */
item
=
new
wxMenuItem
(
filesMenu
,
ID_SAVE_BOARD_AS
,
_
(
"Save as..."
),
_
(
"Save as...
\t
Shift+Ctrl+S
"
),
_
(
"Save the current board as.."
)
);
item
->
SetBitmap
(
save_as_xpm
);
filesMenu
->
Append
(
item
);
...
...
@@ -185,7 +185,7 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
filesMenu
->
AppendSeparator
();
/* Print */
item
=
new
wxMenuItem
(
filesMenu
,
ID_GEN_PRINT
,
_
(
"
P&rint
"
),
item
=
new
wxMenuItem
(
filesMenu
,
ID_GEN_PRINT
,
_
(
"
&Print
\t
Ctrl+P
"
),
_
(
"Print pcb board"
)
);
item
->
SetBitmap
(
print_button
);
filesMenu
->
Append
(
item
);
...
...
@@ -222,13 +222,17 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
_
(
"Archive or add footprints in a library file"
),
library_xpm
);
/* Exit */
/* Quit on all platforms except WXMAC */
#if !defined( __WXMAC__ )
filesMenu
->
AppendSeparator
();
item
=
new
wxMenuItem
(
filesMenu
,
ID_EXIT
,
_
(
"&Quit"
),
item
=
new
wxMenuItem
(
filesMenu
,
wx
ID_EXIT
,
_
(
"&Quit"
),
_
(
"Quit PCBNew"
)
);
item
->
SetBitmap
(
exit_xpm
);
filesMenu
->
Append
(
item
);
#endif
/* !defined( __WXMAC__ ) */
/**
* Edit menu
...
...
@@ -236,15 +240,25 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
wxMenu
*
editMenu
=
new
wxMenu
;
/* Undo */
/* TODO add Undo hotkey */
item
=
new
wxMenuItem
(
editMenu
,
ID_UNDO_BUTT
,
_
(
"Undo"
),
#if !defined( __WXMAC__)
text
=
AddHotkeyName
(
_
(
"Undo"
),
s_Pcbnew_Editor_Hokeys_Descr
,
HK_UNDO
);
#else
text
=
_
(
"Undo
\t
Ctrl+Z"
);
#endif
item
=
new
wxMenuItem
(
editMenu
,
ID_UNDO_BUTT
,
text
,
_
(
"Undo last edition"
),
wxITEM_NORMAL
);
item
->
SetBitmap
(
undo_xpm
);
editMenu
->
Append
(
item
);
/* Redo */
/* TODO add Redo hotkey */
item
=
new
wxMenuItem
(
editMenu
,
ID_REDO_BUTT
,
_
(
"Redo"
),
#if !defined( __WXMAC__)
text
=
AddHotkeyName
(
_
(
"Redo"
),
s_Pcbnew_Editor_Hokeys_Descr
,
HK_REDO
);
#else
text
=
_
(
"Redo
\t
Shift+Ctrl+Z"
);
#endif
item
=
new
wxMenuItem
(
editMenu
,
ID_REDO_BUTT
,
text
,
_
(
"Redo the last undo command"
),
wxITEM_NORMAL
);
item
->
SetBitmap
(
redo_xpm
);
editMenu
->
Append
(
item
);
...
...
@@ -253,7 +267,12 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
editMenu
->
AppendSeparator
();
/* Find */
#if !defined( __WXMAC__)
text
=
AddHotkeyName
(
_
(
"&Find..."
),
s_Pcbnew_Editor_Hokeys_Descr
,
HK_FIND_ITEM
);
#else
text
=
_
(
"Find
\t
Ctrl+F"
);
#endif
item
=
new
wxMenuItem
(
editMenu
,
ID_FIND_ITEMS
,
text
,
_
(
"Find components and text in current loaded board"
)
);
item
->
SetBitmap
(
find_xpm
);
...
...
@@ -291,24 +310,41 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
wxMenu
*
viewMenu
=
new
wxMenu
;
/* Zoom in */
text
=
AddHotkeyName
(
_
(
"Zoom in"
),
s_Pcbnew_Editor_Hokeys_Descr
,
HK_ZOOM_IN
);
item
=
new
wxMenuItem
(
viewMenu
,
ID_ZOOM_IN
,
text
,
_
(
"Zoom in"
),
#if !defined( __WXMAC__)
text
=
AddHotkeyName
(
_
(
"Zoom In"
),
s_Pcbnew_Editor_Hokeys_Descr
,
HK_ZOOM_IN
);
#else
text
=
_
(
"Zoom In
\t
Ctrl++"
);
#endif
item
=
new
wxMenuItem
(
viewMenu
,
ID_ZOOM_IN
,
text
,
_
(
"Zoom In"
),
wxITEM_NORMAL
);
item
->
SetBitmap
(
zoom_in_xpm
);
viewMenu
->
Append
(
item
);
/* Zoom out */
#if !defined( __WXMAC__)
text
=
AddHotkeyName
(
_
(
"Zoom out"
),
s_Pcbnew_Editor_Hokeys_Descr
,
HK_ZOOM_OUT
);
item
=
new
wxMenuItem
(
viewMenu
,
ID_ZOOM_OUT
,
text
,
_
(
"Zoom out"
),
#else
text
=
_
(
"Zoom Out
\t
Ctrl+-"
);
#endif
item
=
new
wxMenuItem
(
viewMenu
,
ID_ZOOM_OUT
,
text
,
_
(
"Zoom Out"
),
wxITEM_NORMAL
);
item
->
SetBitmap
(
zoom_out_xpm
);
viewMenu
->
Append
(
item
);
/* Zoom auto */
text
=
AddHotkeyName
(
_
(
"Zoom auto"
),
s_Pcbnew_Editor_Hokeys_Descr
,
/* Fit on Screen */
#if !defined( __WXMAC__)
text
=
AddHotkeyName
(
_
(
"Fit on Screen"
),
s_Pcbnew_Editor_Hokeys_Descr
,
HK_ZOOM_AUTO
);
item
=
new
wxMenuItem
(
viewMenu
,
ID_ZOOM_PAGE
,
text
,
_
(
"Zoom auto"
),
#else
text
=
_
(
"Fit on Screen
\t
Ctrl+0"
);
#endif
item
=
new
wxMenuItem
(
viewMenu
,
ID_ZOOM_PAGE
,
text
,
_
(
"Zoom to fit the board on the screen"
),
wxITEM_NORMAL
);
item
->
SetBitmap
(
zoom_auto_xpm
);
viewMenu
->
Append
(
item
);
...
...
@@ -316,9 +352,15 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
viewMenu
->
AppendSeparator
();
/* Redraw view */
text
=
AddHotkeyName
(
_
(
"Redraw view"
),
s_Pcbnew_Editor_Hokeys_Descr
,
#if !defined( __WXMAC__)
text
=
AddHotkeyName
(
_
(
"Redraw"
),
s_Pcbnew_Editor_Hokeys_Descr
,
HK_ZOOM_REDRAW
);
item
=
new
wxMenuItem
(
viewMenu
,
ID_ZOOM_REDRAW
,
text
,
_
(
"Zoom auto"
),
#else
text
=
_
(
"Redraw
\t
Ctrl+R"
);
#endif
item
=
new
wxMenuItem
(
viewMenu
,
ID_ZOOM_REDRAW
,
text
,
_
(
"Redraw the screen of the board"
),
wxITEM_NORMAL
);
item
->
SetBitmap
(
zoom_redraw_xpm
);
viewMenu
->
Append
(
item
);
...
...
@@ -464,11 +506,16 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
item
->
SetBitmap
(
help_xpm
);
helpMenu
->
Append
(
item
);
/* About on all platforms except WXMAC */
#if !defined(__WXMAC__)
item
=
new
wxMenuItem
(
helpMenu
,
ID_KICAD_ABOUT
,
_
(
"&About"
),
_
(
"About PCBnew printed circuit board designer"
)
);
item
->
SetBitmap
(
info_xpm
);
helpMenu
->
Append
(
item
);
#endif
/* !defined(__WXMAC__) */
/**
* Append all menus to the menuBar
...
...
pcbnew/pcbframe.cpp
View file @
5a0aca0e
...
...
@@ -72,7 +72,7 @@ BEGIN_EVENT_TABLE( WinEDA_PcbFrame, WinEDA_BasePcbFrame )
EVT_MENU
(
ID_MENU_ARCHIVE_ALL_MODULES
,
WinEDA_PcbFrame
::
Process_Special_Functions
)
EVT_MENU
(
ID_EXIT
,
WinEDA_PcbFrame
::
Process_Special_Functions
)
EVT_MENU
(
wxID_EXIT
,
WinEDA_PcbFrame
::
OnQuit
)
// menu Config
EVT_MENU_RANGE
(
ID_CONFIG_AND_PREFERENCES_START
,
...
...
@@ -319,6 +319,10 @@ WinEDA_PcbFrame::~WinEDA_PcbFrame()
delete
m_drc
;
}
void
WinEDA_PcbFrame
::
OnQuit
(
wxCommandEvent
&
WXUNUSED
(
event
)
)
{
Close
(
true
);
}
void
WinEDA_PcbFrame
::
OnCloseWindow
(
wxCloseEvent
&
Event
)
{
...
...
pcbnew/pcbnew.cpp
View file @
5a0aca0e
...
...
@@ -21,6 +21,7 @@
#include "zones.h"
#include "drag.h"
#include "eda_dde.h"
#include "id.h"
#include "build_version.h"
...
...
@@ -79,6 +80,14 @@ 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
;
WinEDA_PcbFrame
*
frame
=
NULL
;
...
...
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