See CHANGELOG.txt
This commit is contained in:
parent
efa9c926e3
commit
535a28fa91
|
@ -4,6 +4,21 @@ KiCad ChangeLog 2010
|
||||||
Please add newer entries at the top, list the date and your name with
|
Please add newer entries at the top, list the date and your name with
|
||||||
email address.
|
email address.
|
||||||
|
|
||||||
|
|
||||||
|
2010-Feb-14 UPDATE Jerry Jacobs <xor.gate.engineering[at]gmail[dot]com>
|
||||||
|
================================================================================
|
||||||
|
++ KiCad
|
||||||
|
Check if project is noname.pro so we don't get a error if kicad is first run.
|
||||||
|
Removed double separator in file menu.
|
||||||
|
Moved recent project to submenu in Open recent.
|
||||||
|
|
||||||
|
++ Common
|
||||||
|
Added CTest/CDash support file
|
||||||
|
Moved helper tool to helper subdirectory
|
||||||
|
|
||||||
|
++ OSX
|
||||||
|
Update compiling doc
|
||||||
|
|
||||||
2010-Feb-07 UPDATE Vesa Solonen <vesa.solonen@hut.fi>
|
2010-Feb-07 UPDATE Vesa Solonen <vesa.solonen@hut.fi>
|
||||||
================================================================================
|
================================================================================
|
||||||
++ all:
|
++ all:
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
##
|
||||||
|
# KiCad CDash/CTest Support
|
||||||
|
# Run cmake, then ctest -D Experimental to push to cdash.
|
||||||
|
##
|
||||||
|
set(CTEST_PROJECT_NAME "KiCad")
|
||||||
|
set(CTEST_NIGHTLY_START_TIME "00:00:00 EST")
|
||||||
|
|
||||||
|
set(CTEST_DROP_METHOD "http")
|
||||||
|
set(CTEST_DROP_SITE "my.cdash.org")
|
||||||
|
set(CTEST_DROP_LOCATION "/submit.php?project=KiCad")
|
||||||
|
set(CTEST_DROP_SITE_CDASH TRUE)
|
||||||
|
|
|
@ -107,4 +107,9 @@ CMAKE_CXX_FLAGS = -D__ASSERTMACROS__ fixes this :-)
|
||||||
configure:18585: gcc -isysroot /Developer/SDKs/MacOSX10.5.sdk/ -mmacosx-version-min=10.5 -o conftest -arch i386 -arch x86_64 -arch ppc -arch i386 -arch x86_64 -arch ppc conftest.c >&5
|
configure:18585: gcc -isysroot /Developer/SDKs/MacOSX10.5.sdk/ -mmacosx-version-min=10.5 -o conftest -arch i386 -arch x86_64 -arch ppc -arch i386 -arch x86_64 -arch ppc conftest.c >&5
|
||||||
ld: warning: in /Developer/SDKs/MacOSX10.5.sdk//usr/lib/libSystem.dylib, missing required architecture ppc in file
|
ld: warning: in /Developer/SDKs/MacOSX10.5.sdk//usr/lib/libSystem.dylib, missing required architecture ppc in file
|
||||||
|
|
||||||
Installing rosetta and xcode with all architectures fixes this "problem"
|
Installing rosetta and xcode with all architectures fixes this "problem"
|
||||||
|
|
||||||
|
|
||||||
|
ld: warning: in /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks//QuickTime.framework/QuickTime, missing required architecture x86_64 in file
|
||||||
|
|
||||||
|
You get this error because the QuickTime 10.6 framework is not build with 64bit support. This not a real issue for KiCad because we don't use it anyway.
|
||||||
|
|
30
README.txt
30
README.txt
|
@ -1,20 +1,20 @@
|
||||||
KiCad README
|
KiCad README
|
||||||
============
|
============
|
||||||
|
For specific documentation like Compiling, GUI translation, Old changelogs see the
|
||||||
Please have a look at the other files,
|
Documentation subfolder.
|
||||||
for specific documentation like Compiling, GUI translation see the Documentation folder.
|
|
||||||
|
|
||||||
Files
|
Files
|
||||||
-----
|
-----
|
||||||
AUTHORS.txt - The authors, contributors, document writers and translators list
|
AUTHORS.txt - The authors, contributors, document writers and translators list
|
||||||
CHANGELOG.txt - This years changelog (see for previous years Documentation/changelogs)
|
CHANGELOG.txt - This years changelog (see for previous years Documentation/changelogs)
|
||||||
CMakeList.txt - CMAKE build tool script
|
CMakeList.txt - CMAKE build tool script
|
||||||
COPYRIGHT.txt - A copy of the GNU General Public License Version 2
|
COPYRIGHT.txt - A copy of the GNU General Public License Version 2
|
||||||
Doxyfile - Doxygen preferences
|
CTestConfig.txt - Support for CTest and CDash testing tools
|
||||||
INSTALL.txt - The release (binairy) installation instructions
|
Doxyfile - Doxygen preferences
|
||||||
TODO.txt - Todo list
|
INSTALL.txt - The release (binairy) installation instructions
|
||||||
uncrustify.cfg - Uncrustify code formatting tool preferences
|
TODO.txt - Todo list
|
||||||
version.txt - The current stable released version
|
uncrustify.cfg - Uncrustify code formatting tool preferences
|
||||||
|
version.txt - The current stable released version
|
||||||
|
|
||||||
Subdirectories
|
Subdirectories
|
||||||
--------------
|
--------------
|
||||||
|
@ -27,6 +27,7 @@ demos - Some demo examples
|
||||||
Documentation - Misc documentation. Translating the GUI, old changelogs etcetera.
|
Documentation - Misc documentation. Translating the GUI, old changelogs etcetera.
|
||||||
eeschema - Sourcecode of the schematic editor
|
eeschema - Sourcecode of the schematic editor
|
||||||
gerbview - Sourcecode of the gerber viewer
|
gerbview - Sourcecode of the gerber viewer
|
||||||
|
helpers - Helper tools and utilities for development
|
||||||
include - Interfaces to the common library
|
include - Interfaces to the common library
|
||||||
internat - Internationalisation files
|
internat - Internationalisation files
|
||||||
kicad - Sourcecode of the project manager
|
kicad - Sourcecode of the project manager
|
||||||
|
@ -38,8 +39,3 @@ scripts - Helper scripts. For building, sourcecode packaging, font settin
|
||||||
share - ?
|
share - ?
|
||||||
template - Project template(s)
|
template - Project template(s)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -5,12 +5,12 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
set(KICAD_SRCS
|
set(KICAD_SRCS
|
||||||
buildmnu.cpp
|
|
||||||
commandframe.cpp
|
commandframe.cpp
|
||||||
files-io.cpp
|
files-io.cpp
|
||||||
kicad.cpp
|
kicad.cpp
|
||||||
kicad-python.cpp
|
kicad-python.cpp
|
||||||
mainframe.cpp
|
mainframe.cpp
|
||||||
|
menubar.cpp
|
||||||
preferences.cpp
|
preferences.cpp
|
||||||
prjconfig.cpp
|
prjconfig.cpp
|
||||||
treeprj_datas.cpp
|
treeprj_datas.cpp
|
||||||
|
|
|
@ -1,33 +1,30 @@
|
||||||
/*****************************************************************************/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file buildmnu.cpp
|
* @file menubar.cpp
|
||||||
* @brief TODO
|
* @brief Project manager menubars and toolbars
|
||||||
*/
|
*/
|
||||||
/*****************************************************************************/
|
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
#include "appl_wxstruct.h"
|
#include "appl_wxstruct.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "kicad.h"
|
#include "kicad.h"
|
||||||
#include "macros.h"
|
#include "macros.h"
|
||||||
#include "bitmaps.h" // Common bitmaps
|
#include "bitmaps.h"
|
||||||
|
|
||||||
|
/* Menubar and toolbar event table */
|
||||||
/*****************************************************************************/
|
|
||||||
BEGIN_EVENT_TABLE( WinEDA_MainFrame, WinEDA_BasicFrame )
|
BEGIN_EVENT_TABLE( WinEDA_MainFrame, WinEDA_BasicFrame )
|
||||||
/* Window events */
|
/* Window events */
|
||||||
EVT_SIZE( WinEDA_MainFrame::OnSize )
|
EVT_SIZE( WinEDA_MainFrame::OnSize )
|
||||||
EVT_CLOSE( WinEDA_MainFrame::OnCloseWindow )
|
EVT_CLOSE( WinEDA_MainFrame::OnCloseWindow )
|
||||||
/* Sash drag events */
|
|
||||||
|
/* Sash drag events */
|
||||||
EVT_SASH_DRAGGED( ID_LEFT_FRAME, WinEDA_MainFrame::OnSashDrag )
|
EVT_SASH_DRAGGED( ID_LEFT_FRAME, WinEDA_MainFrame::OnSashDrag )
|
||||||
/* Toolbar events */
|
|
||||||
|
/* Toolbar events */
|
||||||
EVT_TOOL( ID_NEW_PROJECT, WinEDA_MainFrame::OnLoadProject )
|
EVT_TOOL( ID_NEW_PROJECT, WinEDA_MainFrame::OnLoadProject )
|
||||||
EVT_TOOL( ID_LOAD_PROJECT, WinEDA_MainFrame::OnLoadProject )
|
EVT_TOOL( ID_LOAD_PROJECT, WinEDA_MainFrame::OnLoadProject )
|
||||||
EVT_TOOL( ID_SAVE_PROJECT, WinEDA_MainFrame::OnSaveProject )
|
EVT_TOOL( ID_SAVE_PROJECT, WinEDA_MainFrame::OnSaveProject )
|
||||||
EVT_TOOL( ID_SAVE_AND_ZIP_FILES, WinEDA_MainFrame::OnArchiveFiles )
|
EVT_TOOL( ID_SAVE_AND_ZIP_FILES, WinEDA_MainFrame::OnArchiveFiles )
|
||||||
|
|
||||||
/* Menu events */
|
/* Menu events */
|
||||||
EVT_MENU( ID_SAVE_PROJECT, WinEDA_MainFrame::OnSaveProject )
|
EVT_MENU( ID_SAVE_PROJECT, WinEDA_MainFrame::OnSaveProject )
|
||||||
EVT_MENU( wxID_EXIT, WinEDA_MainFrame::OnExit )
|
EVT_MENU( wxID_EXIT, WinEDA_MainFrame::OnExit )
|
||||||
EVT_MENU( ID_TO_EDITOR, WinEDA_MainFrame::OnOpenTextEditor )
|
EVT_MENU( ID_TO_EDITOR, WinEDA_MainFrame::OnOpenTextEditor )
|
||||||
|
@ -47,13 +44,13 @@ BEGIN_EVENT_TABLE( WinEDA_MainFrame, WinEDA_BasicFrame )
|
||||||
EVT_MENU( ID_GENERAL_HELP, WinEDA_MainFrame::GetKicadHelp )
|
EVT_MENU( ID_GENERAL_HELP, WinEDA_MainFrame::GetKicadHelp )
|
||||||
EVT_MENU( ID_KICAD_ABOUT, WinEDA_MainFrame::GetKicadAbout )
|
EVT_MENU( ID_KICAD_ABOUT, WinEDA_MainFrame::GetKicadAbout )
|
||||||
|
|
||||||
/* Range menu events */
|
/* Range menu events */
|
||||||
EVT_MENU_RANGE( ID_LANGUAGE_CHOICE, ID_LANGUAGE_CHOICE_END,
|
EVT_MENU_RANGE( ID_LANGUAGE_CHOICE, ID_LANGUAGE_CHOICE_END,
|
||||||
WinEDA_MainFrame::SetLanguage )
|
WinEDA_MainFrame::SetLanguage )
|
||||||
|
|
||||||
EVT_MENU_RANGE( wxID_FILE1, wxID_FILE9, WinEDA_MainFrame::OnFileHistory )
|
EVT_MENU_RANGE( wxID_FILE1, wxID_FILE9, WinEDA_MainFrame::OnFileHistory )
|
||||||
|
|
||||||
/* Button events */
|
/* Button events */
|
||||||
EVT_BUTTON( ID_TO_PCB, WinEDA_MainFrame::OnRunPcbNew )
|
EVT_BUTTON( ID_TO_PCB, WinEDA_MainFrame::OnRunPcbNew )
|
||||||
EVT_BUTTON( ID_TO_CVPCB, WinEDA_MainFrame::OnRunCvpcb )
|
EVT_BUTTON( ID_TO_CVPCB, WinEDA_MainFrame::OnRunCvpcb )
|
||||||
EVT_BUTTON( ID_TO_EESCHEMA, WinEDA_MainFrame::OnRunEeschema )
|
EVT_BUTTON( ID_TO_EESCHEMA, WinEDA_MainFrame::OnRunEeschema )
|
||||||
|
@ -72,61 +69,67 @@ END_EVENT_TABLE()
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief TODO
|
* @brief (Re)Create the menubar
|
||||||
*/
|
*/
|
||||||
void WinEDA_MainFrame::ReCreateMenuBar()
|
void WinEDA_MainFrame::ReCreateMenuBar()
|
||||||
{
|
{
|
||||||
wxMenuItem *item;
|
wxMenuItem *item;
|
||||||
wxMenuBar *menuBar = GetMenuBar();
|
wxMenuBar *menuBar = GetMenuBar();
|
||||||
|
|
||||||
/* Destroy the existing menu bar so it can be rebuilt. This allows
|
/**
|
||||||
* language changes of the menu text on the fly. */
|
* Destroy the existing menu bar so it can be rebuilt. This allows
|
||||||
|
* language changes of the menu text on the fly.
|
||||||
|
*/
|
||||||
if( menuBar )
|
if( menuBar )
|
||||||
SetMenuBar( NULL );
|
SetMenuBar( NULL );
|
||||||
|
|
||||||
menuBar = new wxMenuBar();
|
menuBar = new wxMenuBar();
|
||||||
|
|
||||||
// Check if menubar is empty
|
/**
|
||||||
|
* Files menu
|
||||||
|
*/
|
||||||
wxMenu* filesMenu = new wxMenu;
|
wxMenu* filesMenu = new wxMenu;
|
||||||
|
|
||||||
// Open project
|
/* Open */
|
||||||
item = new wxMenuItem( filesMenu, ID_LOAD_PROJECT, _( "&Open\tCtrl+O" ),
|
item = new wxMenuItem( filesMenu, ID_LOAD_PROJECT, _( "&Open\tCtrl+O" ),
|
||||||
_( "Open an existing project" ) );
|
_( "Open an existing project" ) );
|
||||||
item->SetBitmap( open_project_xpm );
|
item->SetBitmap( open_project_xpm );
|
||||||
filesMenu->Append( item );
|
filesMenu->Append( item );
|
||||||
|
|
||||||
// New project
|
/* 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 schematic project" ),
|
||||||
|
open_project_xpm );
|
||||||
|
|
||||||
|
/* New */
|
||||||
item = new wxMenuItem( filesMenu, ID_NEW_PROJECT, _( "&New\tCtrl+N" ),
|
item = new wxMenuItem( filesMenu, ID_NEW_PROJECT, _( "&New\tCtrl+N" ),
|
||||||
_( "Start a new project" ) );
|
_( "Start a new project" ) );
|
||||||
item->SetBitmap( new_project_xpm );
|
item->SetBitmap( new_project_xpm );
|
||||||
filesMenu->Append( item );
|
filesMenu->Append( item );
|
||||||
|
|
||||||
|
/* Save */
|
||||||
// Save project
|
|
||||||
item = new wxMenuItem( filesMenu, ID_SAVE_PROJECT, _( "&Save\tCtrl+S" ),
|
item = new wxMenuItem( filesMenu, ID_SAVE_PROJECT, _( "&Save\tCtrl+S" ),
|
||||||
_( "Save current project" ) );
|
_( "Save current project" ) );
|
||||||
item->SetBitmap( save_project_xpm );
|
item->SetBitmap( save_project_xpm );
|
||||||
filesMenu->Append( item );
|
filesMenu->Append( item );
|
||||||
|
|
||||||
// Separator
|
/* Separator */
|
||||||
filesMenu->AppendSeparator();
|
filesMenu->AppendSeparator();
|
||||||
|
|
||||||
|
/* Archive */
|
||||||
// Archive project
|
|
||||||
item = new wxMenuItem( filesMenu, ID_SAVE_AND_ZIP_FILES, _( "&Archive" ),
|
item = new wxMenuItem( filesMenu, ID_SAVE_AND_ZIP_FILES, _( "&Archive" ),
|
||||||
_( "Archive project files in zip archive" ) );
|
_( "Archive project files in zip archive" ) );
|
||||||
item->SetBitmap( zip_xpm );
|
item->SetBitmap( zip_xpm );
|
||||||
filesMenu->Append( item );
|
filesMenu->Append( item );
|
||||||
|
|
||||||
// Unarchive project
|
/* Unarchive */
|
||||||
item = new wxMenuItem( filesMenu, ID_READ_ZIP_ARCHIVE, _( "&Unarchive" ),
|
item = new wxMenuItem( filesMenu, ID_READ_ZIP_ARCHIVE, _( "&Unarchive" ),
|
||||||
_( "Unarchive project files from zip file" ) );
|
_( "Unarchive project files from zip file" ) );
|
||||||
item->SetBitmap( unzip_xpm );
|
item->SetBitmap( unzip_xpm );
|
||||||
filesMenu->Append( item );
|
filesMenu->Append( item );
|
||||||
|
|
||||||
// Separator
|
|
||||||
filesMenu->AppendSeparator();
|
|
||||||
|
|
||||||
/* Quit on all platforms except WXMAC */
|
/* Quit on all platforms except WXMAC */
|
||||||
#if !defined( __WXMAC__ )
|
#if !defined( __WXMAC__ )
|
||||||
|
|
||||||
|
@ -138,59 +141,61 @@ void WinEDA_MainFrame::ReCreateMenuBar()
|
||||||
|
|
||||||
#endif /* !defined( __WXMAC__ ) */
|
#endif /* !defined( __WXMAC__ ) */
|
||||||
|
|
||||||
/* Add the file history */
|
|
||||||
wxGetApp().m_fileHistory.AddFilesToMenu( filesMenu );
|
|
||||||
|
|
||||||
/**********************************************************************/
|
|
||||||
|
/**
|
||||||
|
* Browse menu
|
||||||
|
*/
|
||||||
wxMenu* browseMenu = new wxMenu();
|
wxMenu* browseMenu = new wxMenu();
|
||||||
/**********************************************************************/
|
|
||||||
|
|
||||||
// Editor
|
/* Text editor */
|
||||||
item = new wxMenuItem( browseMenu, ID_TO_EDITOR, _( "Text E&ditor" ),
|
item = new wxMenuItem( browseMenu, ID_TO_EDITOR, _( "Text E&ditor" ),
|
||||||
_( "Open prefered text editor" ) );
|
_( "Open prefered text editor" ) );
|
||||||
item->SetBitmap( editor_xpm );
|
item->SetBitmap( editor_xpm );
|
||||||
browseMenu->Append( item );
|
browseMenu->Append( item );
|
||||||
|
|
||||||
// Browse files
|
/* Browse files */
|
||||||
item = new wxMenuItem( browseMenu, ID_BROWSE_AN_SELECT_FILE,
|
item = new wxMenuItem( browseMenu, ID_BROWSE_AN_SELECT_FILE,
|
||||||
_( "&Browse Files" ),
|
_( "&View File" ),
|
||||||
_( "Read or edit files with text editor" ) );
|
_( "View, read or edit file with a text editor" ) );
|
||||||
item->SetBitmap( browse_files_xpm );
|
item->SetBitmap( browse_files_xpm );
|
||||||
browseMenu->Append( item );
|
browseMenu->Append( item );
|
||||||
|
|
||||||
/**********************************************************************/
|
|
||||||
wxMenu* PreferencesMenu = new wxMenu;
|
|
||||||
/**********************************************************************/
|
|
||||||
|
|
||||||
// Prefered text editor
|
|
||||||
|
/**
|
||||||
|
* Preferences menu
|
||||||
|
*/
|
||||||
|
wxMenu* PreferencesMenu = new wxMenu;
|
||||||
|
|
||||||
|
/* Text editor */
|
||||||
item = new wxMenuItem( PreferencesMenu, ID_SELECT_PREFERED_EDITOR,
|
item = new wxMenuItem( PreferencesMenu, ID_SELECT_PREFERED_EDITOR,
|
||||||
_( "&Text Editor" ),
|
_( "&Text Editor" ),
|
||||||
_( "Select your prefered text editor" ) );
|
_( "Select your prefered text editor" ) );
|
||||||
item->SetBitmap( editor_xpm );
|
item->SetBitmap( editor_xpm );
|
||||||
PreferencesMenu->Append( item );
|
PreferencesMenu->Append( item );
|
||||||
|
|
||||||
// Submenu Pdf Browser selection: system browser or user
|
/**
|
||||||
// selected browser (and its name)
|
* PDF Viewer submenu
|
||||||
/**********************************************************************/
|
* System browser or user defined checkbox
|
||||||
|
*/
|
||||||
wxMenu* SubMenuPdfBrowserChoice = new wxMenu;
|
wxMenu* SubMenuPdfBrowserChoice = new wxMenu;
|
||||||
/**********************************************************************/
|
|
||||||
|
|
||||||
// Default PDF viewer
|
/* Default */
|
||||||
item = new wxMenuItem( SubMenuPdfBrowserChoice,
|
item = new wxMenuItem( SubMenuPdfBrowserChoice,
|
||||||
ID_SELECT_DEFAULT_PDF_BROWSER,
|
ID_SELECT_DEFAULT_PDF_BROWSER,
|
||||||
_( "Default PDF Viewer" ),
|
_( "Default" ),
|
||||||
_( "Use the default (system) PDF viewer used to browse datasheets" ),
|
_( "Use system default PDF viewer used to browse datasheets" ),
|
||||||
wxITEM_CHECK );
|
wxITEM_CHECK );
|
||||||
SETBITMAPS( datasheet_xpm );
|
SETBITMAPS( datasheet_xpm );
|
||||||
SubMenuPdfBrowserChoice->Append( item );
|
SubMenuPdfBrowserChoice->Append( item );
|
||||||
SubMenuPdfBrowserChoice->Check( ID_SELECT_DEFAULT_PDF_BROWSER,
|
SubMenuPdfBrowserChoice->Check( ID_SELECT_DEFAULT_PDF_BROWSER,
|
||||||
wxGetApp().m_PdfBrowserIsDefault );
|
wxGetApp().m_PdfBrowserIsDefault );
|
||||||
|
|
||||||
|
/* Favourite */
|
||||||
// Favourite PDF viewer
|
|
||||||
item = new wxMenuItem( SubMenuPdfBrowserChoice,
|
item = new wxMenuItem( SubMenuPdfBrowserChoice,
|
||||||
ID_SELECT_PREFERED_PDF_BROWSER,
|
ID_SELECT_PREFERED_PDF_BROWSER,
|
||||||
_( "Favourite PDF Viewer" ),
|
_( "Favourite" ),
|
||||||
_( "Use your favourite PDF viewer used to browse datasheets" ),
|
_( "Use your favourite PDF viewer used to browse datasheets" ),
|
||||||
wxITEM_CHECK );
|
wxITEM_CHECK );
|
||||||
SETBITMAPS( preference_xpm );
|
SETBITMAPS( preference_xpm );
|
||||||
|
@ -199,35 +204,37 @@ void WinEDA_MainFrame::ReCreateMenuBar()
|
||||||
SubMenuPdfBrowserChoice->Check( ID_SELECT_PREFERED_PDF_BROWSER,
|
SubMenuPdfBrowserChoice->Check( ID_SELECT_PREFERED_PDF_BROWSER,
|
||||||
!wxGetApp().m_PdfBrowserIsDefault );
|
!wxGetApp().m_PdfBrowserIsDefault );
|
||||||
|
|
||||||
|
/* Append PDF Viewer submenu to preferences */
|
||||||
item = new wxMenuItem( SubMenuPdfBrowserChoice,
|
item = new wxMenuItem( SubMenuPdfBrowserChoice,
|
||||||
ID_SELECT_PREFERED_PDF_BROWSER_NAME,
|
ID_SELECT_PREFERED_PDF_BROWSER_NAME,
|
||||||
_( "Select Pdf Viewer" ),
|
_( "PDF Viewer" ),
|
||||||
_( "Select your favourite PDF viewer used to browse datasheets" ) );
|
_( "Select your favourite PDF viewer used to browse datasheets" ) );
|
||||||
item->SetBitmap( datasheet_xpm );
|
item->SetBitmap( datasheet_xpm );
|
||||||
SubMenuPdfBrowserChoice->Append( item );
|
SubMenuPdfBrowserChoice->Append( item );
|
||||||
|
|
||||||
ADD_MENUITEM_WITH_HELP_AND_SUBMENU( PreferencesMenu,
|
ADD_MENUITEM_WITH_HELP_AND_SUBMENU( PreferencesMenu,
|
||||||
SubMenuPdfBrowserChoice,
|
SubMenuPdfBrowserChoice,
|
||||||
-1, _( "Pdf Viewer" ),
|
-1, _( "PDF Viewer" ),
|
||||||
_( "Pdf viewer preferences" ),
|
_( "PDF viewer preferences" ),
|
||||||
datasheet_xpm );
|
datasheet_xpm );
|
||||||
|
|
||||||
PreferencesMenu->AppendSeparator();
|
PreferencesMenu->AppendSeparator();
|
||||||
wxGetApp().AddMenuLanguageList( PreferencesMenu );
|
wxGetApp().AddMenuLanguageList( PreferencesMenu );
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************************/
|
|
||||||
wxMenu* helpMenu = new wxMenu;
|
|
||||||
/**********************************************************************/
|
|
||||||
|
|
||||||
// Contents
|
/**
|
||||||
|
* Help menu
|
||||||
|
*/
|
||||||
|
wxMenu* helpMenu = new wxMenu;
|
||||||
|
|
||||||
|
/* Contents */
|
||||||
item = new wxMenuItem( helpMenu, ID_GENERAL_HELP, _( "&Contents" ),
|
item = new wxMenuItem( helpMenu, ID_GENERAL_HELP, _( "&Contents" ),
|
||||||
_( "Open the kicad manual" ) );
|
_( "Open the kicad manual" ) );
|
||||||
item->SetBitmap( help_xpm );
|
item->SetBitmap( help_xpm );
|
||||||
helpMenu->Append( item );
|
helpMenu->Append( item );
|
||||||
|
|
||||||
// About on all platforms except WXMAC */
|
/* About on all platforms except WXMAC */
|
||||||
#if !defined( __WXMAC__ )
|
#if !defined( __WXMAC__ )
|
||||||
|
|
||||||
helpMenu->AppendSeparator();
|
helpMenu->AppendSeparator();
|
||||||
|
@ -238,58 +245,63 @@ void WinEDA_MainFrame::ReCreateMenuBar()
|
||||||
|
|
||||||
#endif /* !defined( __WXMAC__ ) */
|
#endif /* !defined( __WXMAC__ ) */
|
||||||
|
|
||||||
// Append menus to menuBar
|
/**
|
||||||
|
* Create the menubar and append all submenus
|
||||||
|
*/
|
||||||
menuBar->Append( filesMenu, _( "&File" ) );
|
menuBar->Append( filesMenu, _( "&File" ) );
|
||||||
menuBar->Append( browseMenu, _( "&Browse" ) );
|
menuBar->Append( browseMenu, _( "&Browse" ) );
|
||||||
menuBar->Append( PreferencesMenu, _( "&Preferences" ) );
|
menuBar->Append( PreferencesMenu, _( "&Preferences" ) );
|
||||||
menuBar->Append( helpMenu, _( "&Help" ) );
|
menuBar->Append( helpMenu, _( "&Help" ) );
|
||||||
|
|
||||||
|
/* Associate the menu bar with the frame */
|
||||||
SetMenuBar( menuBar );
|
SetMenuBar( menuBar );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief TODO
|
* @brief (Re)Create the horizontal toolbar
|
||||||
*/
|
*/
|
||||||
void WinEDA_MainFrame::RecreateBaseHToolbar()
|
void WinEDA_MainFrame::RecreateBaseHToolbar()
|
||||||
{
|
{
|
||||||
// Check if toolbar is not already set
|
/* Check if toolbar is not already created */
|
||||||
if( m_HToolBar != NULL )
|
if( m_HToolBar != NULL )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Allocate memory for m_HToolBar
|
/* Allocate memory for m_HToolBar */
|
||||||
m_HToolBar = new WinEDA_Toolbar( TOOLBAR_MAIN, this, ID_H_TOOLBAR, TRUE );
|
m_HToolBar = new WinEDA_Toolbar( TOOLBAR_MAIN, this, ID_H_TOOLBAR, TRUE );
|
||||||
|
|
||||||
// Set up toolbar
|
/* New */
|
||||||
m_HToolBar->AddTool( ID_NEW_PROJECT, wxEmptyString,
|
m_HToolBar->AddTool( ID_NEW_PROJECT, wxEmptyString,
|
||||||
wxBitmap( new_project_xpm ),
|
wxBitmap( new_project_xpm ),
|
||||||
_( "Start a new project" ) );
|
_( "Start a new project" ) );
|
||||||
|
|
||||||
// Load project
|
/* Load */
|
||||||
m_HToolBar->AddTool( ID_LOAD_PROJECT, wxEmptyString,
|
m_HToolBar->AddTool( ID_LOAD_PROJECT, wxEmptyString,
|
||||||
wxBitmap( open_project_xpm ),
|
wxBitmap( open_project_xpm ),
|
||||||
_( "Load existing project" ) );
|
_( "Load existing project" ) );
|
||||||
|
|
||||||
// Save project
|
/* Save */
|
||||||
m_HToolBar->AddTool( ID_SAVE_PROJECT, wxEmptyString,
|
m_HToolBar->AddTool( ID_SAVE_PROJECT, wxEmptyString,
|
||||||
wxBitmap( save_project_xpm ),
|
wxBitmap( save_project_xpm ),
|
||||||
_( "Save current project" ) );
|
_( "Save current project" ) );
|
||||||
|
|
||||||
// Separator
|
/* Separator */
|
||||||
m_HToolBar->AddSeparator();
|
m_HToolBar->AddSeparator();
|
||||||
|
|
||||||
// Save and archive files
|
/* Archive */
|
||||||
m_HToolBar->AddTool( ID_SAVE_AND_ZIP_FILES, wxEmptyString,
|
m_HToolBar->AddTool( ID_SAVE_AND_ZIP_FILES, wxEmptyString,
|
||||||
wxBitmap( zip_xpm ),
|
wxBitmap( zip_xpm ),
|
||||||
_( "Archive all project files" ) ); // Tooltip
|
_( "Archive all project files" ) );
|
||||||
|
|
||||||
// Separator
|
/* Separator */
|
||||||
m_HToolBar->AddSeparator();
|
m_HToolBar->AddSeparator();
|
||||||
|
|
||||||
// Refresh project tree
|
/* Refresh project tree */
|
||||||
m_HToolBar->AddTool( ID_PROJECT_TREE_REFRESH, wxEmptyString,
|
m_HToolBar->AddTool( ID_PROJECT_TREE_REFRESH, wxEmptyString,
|
||||||
wxBitmap( reload_xpm ),
|
wxBitmap( reload_xpm ),
|
||||||
_( "Refresh project tree" ) );
|
_( "Refresh project tree" ) );
|
||||||
|
|
||||||
m_HToolBar->Realize(); // Create m_HToolBar
|
/* Create m_HToolBar */
|
||||||
|
m_HToolBar->Realize();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
/*************************************************************/
|
/**
|
||||||
/** prjconfig.cpp : load and save configuration (file *.pro) */
|
* @file prjconfig.cpp
|
||||||
/*************************************************************/
|
* Load and save project configuration files (*.pro)
|
||||||
|
*/
|
||||||
|
|
||||||
#ifdef KICAD_PYTHON
|
#ifdef KICAD_PYTHON
|
||||||
#include <pyhandler.h>
|
#include <pyhandler.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -26,33 +25,41 @@ static const wxString BoardFileNameEntry( wxT( "BoardNm" ) );
|
||||||
|
|
||||||
void WinEDA_MainFrame::CreateNewProject( const wxString PrjFullFileName )
|
void WinEDA_MainFrame::CreateNewProject( const wxString PrjFullFileName )
|
||||||
{
|
{
|
||||||
wxString tmp;
|
wxString filename;
|
||||||
wxFileName newProjectName = PrjFullFileName;
|
wxFileName newProjectName = PrjFullFileName;
|
||||||
|
|
||||||
// Init default config filename
|
/* Init default config filename */
|
||||||
tmp = wxGetApp().FindLibraryPath( wxT( "kicad.pro" ) );
|
filename = wxGetApp().FindLibraryPath( wxT( "kicad.pro" ) );
|
||||||
|
|
||||||
if( !wxFileName::FileExists( tmp ) )
|
/* Check if file kicad.pro exist in template directory */
|
||||||
|
if( wxFileName::FileExists( filename ) )
|
||||||
{
|
{
|
||||||
DisplayInfoMessage( NULL, _( "Project template file <kicad.pro> not found " ) );
|
wxCopyFile( filename, PrjFullFileName );
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wxCopyFile( tmp, PrjFullFileName );
|
DisplayInfoMessage( NULL, _( "Project template file <kicad.pro> not found " ) );
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Init schematic filename */
|
||||||
m_SchematicRootFileName = wxFileName( newProjectName.GetName(),
|
m_SchematicRootFileName = wxFileName( newProjectName.GetName(),
|
||||||
SchematicFileExtension ).GetFullName();
|
SchematicFileExtension ).GetFullName();
|
||||||
|
|
||||||
|
/* Init pcb board filename */
|
||||||
m_BoardFileName = wxFileName( newProjectName.GetName(),
|
m_BoardFileName = wxFileName( newProjectName.GetName(),
|
||||||
BoardFileExtension ).GetFullName();
|
BoardFileExtension ).GetFullName();
|
||||||
|
|
||||||
|
/* Init project filename */
|
||||||
m_ProjectFileName = newProjectName;
|
m_ProjectFileName = newProjectName;
|
||||||
|
|
||||||
|
/* Write settings to project file */
|
||||||
wxGetApp().WriteProjectConfig( PrjFullFileName, GeneralGroupName, NULL );
|
wxGetApp().WriteProjectConfig( PrjFullFileName, GeneralGroupName, NULL );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Loading a new project
|
||||||
|
*/
|
||||||
void WinEDA_MainFrame::OnLoadProject( wxCommandEvent& event )
|
void WinEDA_MainFrame::OnLoadProject( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
int style;
|
int style;
|
||||||
|
@ -89,7 +96,10 @@ void WinEDA_MainFrame::OnLoadProject( wxCommandEvent& event )
|
||||||
wxLogDebug( wxT( "Loading Kicad project file: " ) +
|
wxLogDebug( wxT( "Loading Kicad project file: " ) +
|
||||||
m_ProjectFileName.GetFullPath() );
|
m_ProjectFileName.GetFullPath() );
|
||||||
|
|
||||||
if( !m_ProjectFileName.FileExists() )
|
/* Check if project file exists and if it is not noname.pro */
|
||||||
|
wxString filename = m_ProjectFileName.GetFullName();
|
||||||
|
|
||||||
|
if( !m_ProjectFileName.FileExists() && !filename.IsSameAs(wxT("noname.pro")))
|
||||||
{
|
{
|
||||||
DisplayError( this, _( "Kicad project file <" ) +
|
DisplayError( this, _( "Kicad project file <" ) +
|
||||||
m_ProjectFileName.GetFullPath() + _( "> not found" ) );
|
m_ProjectFileName.GetFullPath() + _( "> not found" ) );
|
||||||
|
@ -135,3 +145,4 @@ void WinEDA_MainFrame::OnSaveProject( wxCommandEvent& event )
|
||||||
wxGetApp().WriteProjectConfig( m_ProjectFileName.GetFullPath(),
|
wxGetApp().WriteProjectConfig( m_ProjectFileName.GetFullPath(),
|
||||||
GeneralGroupName, NULL );
|
GeneralGroupName, NULL );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue