Commit 021a075f authored by jean-pierre charras's avatar jean-pierre charras

Gerbview: minor enhancement.

All: fix some strings very hard to translate in messages.
parent 121b65bf
...@@ -7,9 +7,9 @@ ...@@ -7,9 +7,9 @@
#ifndef KICAD_BUILD_VERSION #ifndef KICAD_BUILD_VERSION
#if defined KICAD_GOST #if defined KICAD_GOST
# define KICAD_BUILD_VERSION "(2011-aug-04 GOST)" # define KICAD_BUILD_VERSION "(2011-oct-15 GOST)"
#else #else
# define KICAD_BUILD_VERSION "(2011-aug-04)" # define KICAD_BUILD_VERSION "(2011-oct-15)"
#endif #endif
#endif #endif
......
...@@ -89,15 +89,10 @@ void CVPCB_MAINFRAME::ReCreateMenuBar() ...@@ -89,15 +89,10 @@ void CVPCB_MAINFRAME::ReCreateMenuBar()
// Menu Preferences: // Menu Preferences:
wxMenu* preferencesMenu = new wxMenu; wxMenu* preferencesMenu = new wxMenu;
// Options (Preferences on WXMAC) // Libraries to load
AddMenuItem( preferencesMenu, AddMenuItem( preferencesMenu, wxID_PREFERENCES,
wxID_PREFERENCES, _( "&Libraries" ),
#ifdef __WXMAC__ _( "Set footprint libraries lo load and library search paths" ),
_( "&Preferences..." ),
#else
_( "&Options" ),
#endif // __WXMAC__
_( "Set libraries and library search paths" ),
KiBitmap( config_xpm ) ); KiBitmap( config_xpm ) );
// Language submenu // Language submenu
......
...@@ -425,7 +425,7 @@ bool CMP_LIBRARY::Load( wxString& aErrorMsg ) ...@@ -425,7 +425,7 @@ bool CMP_LIBRARY::Load( wxString& aErrorMsg )
if( !tkn.HasMoreTokens() if( !tkn.HasMoreTokens()
|| !tkn.GetNextToken().Upper().StartsWith(wxT( "EESCHEMA-LIB" ) ) ) || !tkn.GetNextToken().Upper().StartsWith(wxT( "EESCHEMA-LIB" ) ) )
{ {
aErrorMsg = _( "The file is NOT an EESCHEMA library!" ); aErrorMsg = _( "The file is NOT an Eeschema library!" );
fclose( file ); fclose( file );
return false; return false;
} }
......
...@@ -231,7 +231,7 @@ void DIALOG_PLOT_SCHEMATIC_DXF::PlotOneSheetDXF( const wxString& FileName, ...@@ -231,7 +231,7 @@ void DIALOG_PLOT_SCHEMATIC_DXF::PlotOneSheetDXF( const wxString& FileName,
plotter->set_color_mode( m_plotColorOpt ); plotter->set_color_mode( m_plotColorOpt );
/* Init : */ /* Init : */
plotter->set_creator( wxT( "EESchema-DXF" ) ); plotter->set_creator( wxT( "Eeschema-DXF" ) );
plotter->set_filename( FileName ); plotter->set_filename( FileName );
plotter->start_plot( output_file ); plotter->start_plot( output_file );
......
...@@ -378,7 +378,7 @@ void DIALOG_PLOT_SCHEMATIC_HPGL::Plot_1_Page_HPGL( const wxString& FileName, ...@@ -378,7 +378,7 @@ void DIALOG_PLOT_SCHEMATIC_HPGL::Plot_1_Page_HPGL( const wxString& FileName,
plotter->set_viewport( offset, plot_scale, 0 ); plotter->set_viewport( offset, plot_scale, 0 );
plotter->set_default_line_width( g_DrawDefaultLineThickness ); plotter->set_default_line_width( g_DrawDefaultLineThickness );
/* Init : */ /* Init : */
plotter->set_creator( wxT( "EESchema-HPGL" ) ); plotter->set_creator( wxT( "Eeschema-HPGL" ) );
plotter->set_filename( FileName ); plotter->set_filename( FileName );
plotter->set_pen_speed( g_HPGL_Pen_Descr.m_Pen_Speed ); plotter->set_pen_speed( g_HPGL_Pen_Descr.m_Pen_Speed );
plotter->set_pen_number( g_HPGL_Pen_Descr.m_Pen_Num ); plotter->set_pen_number( g_HPGL_Pen_Descr.m_Pen_Num );
......
...@@ -282,7 +282,7 @@ void DIALOG_PLOT_SCHEMATIC_PS::plotOneSheetPS( const wxString& FileName, ...@@ -282,7 +282,7 @@ void DIALOG_PLOT_SCHEMATIC_PS::plotOneSheetPS( const wxString& FileName,
plotter->set_color_mode( m_plotColorOpt ); plotter->set_color_mode( m_plotColorOpt );
/* Init : */ /* Init : */
plotter->set_creator( wxT( "EESchema-PS" ) ); plotter->set_creator( wxT( "Eeschema-PS" ) );
plotter->set_filename( FileName ); plotter->set_filename( FileName );
plotter->start_plot( output_file ); plotter->start_plot( output_file );
......
...@@ -74,8 +74,9 @@ bool SCH_EDIT_FRAME::SaveEEFile( SCH_SCREEN* aScreen, int aSaveType, bool aCreat ...@@ -74,8 +74,9 @@ bool SCH_EDIT_FRAME::SaveEEFile( SCH_SCREEN* aScreen, int aSaveType, bool aCreat
if( !wxRenameFile( schematicFileName.GetFullPath(), backupFileName.GetFullPath() ) ) if( !wxRenameFile( schematicFileName.GetFullPath(), backupFileName.GetFullPath() ) )
{ {
DisplayError( this, _( "Could not save backup of file <" ) + msg.Printf(_( "Could not save backup of file <%s>" ),
schematicFileName.GetFullPath() + wxT( ">." ) ); GetChars( schematicFileName.GetFullPath() ) );
DisplayError( this, msg );
} }
} }
} }
...@@ -111,7 +112,8 @@ bool SCH_EDIT_FRAME::SaveEEFile( SCH_SCREEN* aScreen, int aSaveType, bool aCreat ...@@ -111,7 +112,8 @@ bool SCH_EDIT_FRAME::SaveEEFile( SCH_SCREEN* aScreen, int aSaveType, bool aCreat
if( ( f = wxFopen( schematicFileName.GetFullPath(), wxT( "wt" ) ) ) == NULL ) if( ( f = wxFopen( schematicFileName.GetFullPath(), wxT( "wt" ) ) ) == NULL )
{ {
msg = _( "Failed to create file " ) + schematicFileName.GetFullPath(); msg.Printf( _( "Failed to create file <%s>" ),
GetChars( schematicFileName.GetFullPath() ) );
DisplayError( this, msg ); DisplayError( this, msg );
return false; return false;
} }
......
...@@ -512,7 +512,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() ...@@ -512,7 +512,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
_( "Open the \"Getting Started in KiCad\" guide for beginners" ), _( "Open the \"Getting Started in KiCad\" guide for beginners" ),
KiBitmap( help_xpm ) ); KiBitmap( help_xpm ) );
// About EESchema // About Eeschema
helpMenu->AppendSeparator(); helpMenu->AppendSeparator();
AddMenuItem( helpMenu, AddMenuItem( helpMenu,
wxID_ABOUT, wxID_ABOUT,
......
...@@ -107,7 +107,7 @@ bool SCH_BUS_ENTRY::Load( LINE_READER& aLine, wxString& aErrorMsg ) ...@@ -107,7 +107,7 @@ bool SCH_BUS_ENTRY::Load( LINE_READER& aLine, wxString& aErrorMsg )
if( !aLine.ReadLine() || sscanf( (char*) aLine, "%d %d %d %d ", &m_Pos.x, &m_Pos.y, if( !aLine.ReadLine() || sscanf( (char*) aLine, "%d %d %d %d ", &m_Pos.x, &m_Pos.y,
&m_Size.x, &m_Size.y ) != 4 ) &m_Size.x, &m_Size.y ) != 4 )
{ {
aErrorMsg.Printf( wxT( "EESchema file bus entry load error at line %d" ), aErrorMsg.Printf( wxT( "Eeschema file bus entry load error at line %d" ),
aLine.LineNumber() ); aLine.LineNumber() );
aErrorMsg << wxT( "\n" ) << FROM_UTF8( (char*) aLine ); aErrorMsg << wxT( "\n" ) << FROM_UTF8( (char*) aLine );
return false; return false;
......
...@@ -5,6 +5,7 @@ add_definitions(-DGERBVIEW -DPCBNEW) ...@@ -5,6 +5,7 @@ add_definitions(-DGERBVIEW -DPCBNEW)
### ###
include_directories(${CMAKE_CURRENT_SOURCE_DIR} include_directories(${CMAKE_CURRENT_SOURCE_DIR}
${Boost_INCLUDE_DIR} ${Boost_INCLUDE_DIR}
./dialogs
../3d-viewer ../3d-viewer
../common ../common
../cvpcb ../cvpcb
...@@ -18,6 +19,8 @@ set(DIALOGS_SRCS ...@@ -18,6 +19,8 @@ set(DIALOGS_SRCS
dialogs/gerbview_dialog_display_options_frame_base.cpp dialogs/gerbview_dialog_display_options_frame_base.cpp
dialogs/gerbview_dialog_display_options_frame.cpp dialogs/gerbview_dialog_display_options_frame.cpp
dialogs/dialog_layers_select_to_pcb_base.cpp dialogs/dialog_layers_select_to_pcb_base.cpp
dialogs/dialog_show_page_borders.cpp
dialogs/dialog_show_page_borders_base.cpp
dialogs/dialog_print_using_printer.cpp dialogs/dialog_print_using_printer.cpp
dialogs/dialog_print_using_printer_base.cpp dialogs/dialog_print_using_printer_base.cpp
) )
......
/**
* @file dialog_show_page_borders.cpp
* Dialog to show/hide frame reference and select paper size for printing
*/
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2011 jean-pierre.charras@gipsa-lab.inpg.fr
* Copyright (C) 2007 KiCad Developers, see change_log.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "fctsys.h"
#include "common.h"
#include "gerbview.h"
#include "dialog_show_page_borders.h"
DIALOG_PAGE_SHOW_PAGE_BORDERS::DIALOG_PAGE_SHOW_PAGE_BORDERS( GERBVIEW_FRAME *parent) :
DIALOG_PAGE_SHOW_PAGE_BORDERS_BASE( parent, wxID_ANY )
{
m_Parent = parent;
SetFocus();
m_ShowPageLimits->SetSelection(0);
if( m_Parent->m_Draw_Sheet_Ref )
{
for( int ii = 1; g_GerberPageSizeList[ii] != NULL; ii++ )
{
if( m_Parent->GetScreen()->m_CurrentSheetDesc == g_GerberPageSizeList[ii] )
{
m_ShowPageLimits->SetSelection(ii);
break;
}
}
}
GetSizer()->Fit( this );
GetSizer()->SetSizeHints( this );
Center();
m_sdbSizer1OK->SetDefault();
}
void DIALOG_PAGE_SHOW_PAGE_BORDERS::OnCancelButtonClick( wxCommandEvent& event )
{
EndModal( wxID_CANCEL );
}
void DIALOG_PAGE_SHOW_PAGE_BORDERS::OnOKBUttonClick( wxCommandEvent& event )
{
m_Parent->m_DisplayPadFill = m_Parent->m_DisplayViaFill =
DisplayOpt.DisplayViaFill;
m_Parent->m_DisplayPcbTrackFill = DisplayOpt.DisplayPcbTrackFill;
int idx = m_ShowPageLimits->GetSelection();
if( idx > 0 )
m_Parent->m_Draw_Sheet_Ref = true;
else
m_Parent->m_Draw_Sheet_Ref = false;
m_Parent->GetScreen()->m_CurrentSheetDesc = g_GerberPageSizeList[idx];
EndModal( wxID_OK );
}
/**
* @file dialog_show_page_borders.h
* Dialog to show/hide frame reference and select paper size for printing
*/
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2011 jean-pierre.charras@gipsa-lab.inpg.fr
* Copyright (C) 2007 KiCad Developers, see change_log.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "dialog_show_page_borders_base.h"
class DIALOG_PAGE_SHOW_PAGE_BORDERS : public DIALOG_PAGE_SHOW_PAGE_BORDERS_BASE
{
private:
GERBVIEW_FRAME* m_Parent;
public:
DIALOG_PAGE_SHOW_PAGE_BORDERS( GERBVIEW_FRAME* parent );
~DIALOG_PAGE_SHOW_PAGE_BORDERS() {};
private:
void OnOKBUttonClick( wxCommandEvent& event );
void OnCancelButtonClick( wxCommandEvent& event );
};
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Jun 30 2011)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#include "dialog_show_page_borders_base.h"
///////////////////////////////////////////////////////////////////////////
DIALOG_PAGE_SHOW_PAGE_BORDERS_BASE::DIALOG_PAGE_SHOW_PAGE_BORDERS_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
wxBoxSizer* bDialogSizer;
bDialogSizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* bUpperSizer;
bUpperSizer = new wxBoxSizer( wxHORIZONTAL );
wxBoxSizer* bRightSizer;
bRightSizer = new wxBoxSizer( wxVERTICAL );
wxString m_ShowPageLimitsChoices[] = { _("Full size. Do not show page limits"), _("Full size"), _("Size A4"), _("Size A3"), _("Size A2"), _("Size A"), _("Size B"), _("Size C") };
int m_ShowPageLimitsNChoices = sizeof( m_ShowPageLimitsChoices ) / sizeof( wxString );
m_ShowPageLimits = new wxRadioBox( this, wxID_ANY, _("Show Page Limits:"), wxDefaultPosition, wxDefaultSize, m_ShowPageLimitsNChoices, m_ShowPageLimitsChoices, 1, wxRA_SPECIFY_COLS );
m_ShowPageLimits->SetSelection( 0 );
bRightSizer->Add( m_ShowPageLimits, 0, wxALL|wxEXPAND, 5 );
bUpperSizer->Add( bRightSizer, 1, wxEXPAND, 5 );
bDialogSizer->Add( bUpperSizer, 1, wxEXPAND, 5 );
m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
bDialogSizer->Add( m_staticline1, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
m_sdbSizer1 = new wxStdDialogButtonSizer();
m_sdbSizer1OK = new wxButton( this, wxID_OK );
m_sdbSizer1->AddButton( m_sdbSizer1OK );
m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
m_sdbSizer1->Realize();
bDialogSizer->Add( m_sdbSizer1, 0, wxEXPAND|wxALL, 5 );
this->SetSizer( bDialogSizer );
this->Layout();
// Connect Events
m_sdbSizer1Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAGE_SHOW_PAGE_BORDERS_BASE::OnCancelButtonClick ), NULL, this );
m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAGE_SHOW_PAGE_BORDERS_BASE::OnOKBUttonClick ), NULL, this );
}
DIALOG_PAGE_SHOW_PAGE_BORDERS_BASE::~DIALOG_PAGE_SHOW_PAGE_BORDERS_BASE()
{
// Disconnect Events
m_sdbSizer1Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAGE_SHOW_PAGE_BORDERS_BASE::OnCancelButtonClick ), NULL, this );
m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAGE_SHOW_PAGE_BORDERS_BASE::OnOKBUttonClick ), NULL, this );
}
This diff is collapsed.
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Jun 30 2011)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#ifndef __DIALOG_SHOW_PAGE_BORDERS_BASE_H__
#define __DIALOG_SHOW_PAGE_BORDERS_BASE_H__
#include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/intl.h>
#include <wx/string.h>
#include <wx/radiobox.h>
#include <wx/gdicmn.h>
#include <wx/font.h>
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/sizer.h>
#include <wx/statline.h>
#include <wx/button.h>
#include <wx/dialog.h>
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_PAGE_SHOW_PAGE_BORDERS_BASE
///////////////////////////////////////////////////////////////////////////////
class DIALOG_PAGE_SHOW_PAGE_BORDERS_BASE : public wxDialog
{
private:
protected:
wxRadioBox* m_ShowPageLimits;
wxStaticLine* m_staticline1;
wxStdDialogButtonSizer* m_sdbSizer1;
wxButton* m_sdbSizer1OK;
wxButton* m_sdbSizer1Cancel;
// Virtual event handlers, overide them in your derived class
virtual void OnCancelButtonClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnOKBUttonClick( wxCommandEvent& event ) { event.Skip(); }
public:
DIALOG_PAGE_SHOW_PAGE_BORDERS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Page Borders"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 263,254 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_PAGE_SHOW_PAGE_BORDERS_BASE();
};
#endif //__DIALOG_SHOW_PAGE_BORDERS_BASE_H__
/* /**
* file gerbview_dialog_display_options_frame.cpp * @file gerbview_dialog_display_options_frame.cpp
* Set the display options for GerbView * Set some display options for GerbView
*/ */
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include "dialog_helpers.h" #include "dialog_helpers.h"
#include "class_DCodeSelectionbox.h" #include "class_DCodeSelectionbox.h"
#include "class_gerbview_layer_widget.h" #include "class_gerbview_layer_widget.h"
#include "dialog_show_page_borders.h"
// Event table: // Event table:
...@@ -30,6 +31,7 @@ BEGIN_EVENT_TABLE( GERBVIEW_FRAME, PCB_BASE_FRAME ) ...@@ -30,6 +31,7 @@ BEGIN_EVENT_TABLE( GERBVIEW_FRAME, PCB_BASE_FRAME )
EVT_TOOL( ID_GERBVIEW_LOAD_DRILL_FILE, GERBVIEW_FRAME::Files_io ) EVT_TOOL( ID_GERBVIEW_LOAD_DRILL_FILE, GERBVIEW_FRAME::Files_io )
EVT_TOOL( ID_GERBVIEW_LOAD_DCODE_FILE, GERBVIEW_FRAME::Files_io ) EVT_TOOL( ID_GERBVIEW_LOAD_DCODE_FILE, GERBVIEW_FRAME::Files_io )
EVT_TOOL( ID_NEW_BOARD, GERBVIEW_FRAME::Files_io ) EVT_TOOL( ID_NEW_BOARD, GERBVIEW_FRAME::Files_io )
EVT_TOOL( ID_GERBVIEW_SET_PAGE_BORDER, GERBVIEW_FRAME::Process_Special_Functions )
// Menu Files: // Menu Files:
EVT_MENU( wxID_FILE, GERBVIEW_FRAME::Files_io ) EVT_MENU( wxID_FILE, GERBVIEW_FRAME::Files_io )
...@@ -150,6 +152,14 @@ void GERBVIEW_FRAME::Process_Special_Functions( wxCommandEvent& event ) ...@@ -150,6 +152,14 @@ void GERBVIEW_FRAME::Process_Special_Functions( wxCommandEvent& event )
switch( id ) switch( id )
{ {
case ID_GERBVIEW_SET_PAGE_BORDER:
{
DIALOG_PAGE_SHOW_PAGE_BORDERS dlg( this );
if (dlg.ShowModal() == wxID_OK )
DrawPanel->Refresh();
}
break;
case ID_GERBVIEW_GLOBAL_DELETE: case ID_GERBVIEW_GLOBAL_DELETE:
Erase_Current_Layer( true ); Erase_Current_Layer( true );
ClearMsgPanel(); ClearMsgPanel();
......
...@@ -41,6 +41,7 @@ enum gerbview_ids ...@@ -41,6 +41,7 @@ enum gerbview_ids
ID_TOOLBARH_GERBVIEW_SELECT_ACTIVE_LAYER, ID_TOOLBARH_GERBVIEW_SELECT_ACTIVE_LAYER,
ID_GERBVIEW_GLOBAL_DELETE, ID_GERBVIEW_GLOBAL_DELETE,
ID_GERBVIEW_OPTIONS_SETUP, ID_GERBVIEW_OPTIONS_SETUP,
ID_GERBVIEW_SET_PAGE_BORDER,
ID_TB_OPTIONS_SHOW_LAYERS_MANAGER_VERTICAL_TOOLBAR, ID_TB_OPTIONS_SHOW_LAYERS_MANAGER_VERTICAL_TOOLBAR,
ID_TB_OPTIONS_SHOW_DCODES, ID_TB_OPTIONS_SHOW_DCODES,
ID_TB_OPTIONS_SHOW_FLASHED_ITEMS_SKETCH, ID_TB_OPTIONS_SHOW_FLASHED_ITEMS_SKETCH,
......
...@@ -120,7 +120,7 @@ void GERBVIEW_FRAME::ReCreateMenuBar( void ) ...@@ -120,7 +120,7 @@ void GERBVIEW_FRAME::ReCreateMenuBar( void )
AddMenuItem( fileMenu, AddMenuItem( fileMenu,
wxID_EXIT, wxID_EXIT,
_( "E&xit" ), _( "E&xit" ),
_( "Quit Gerbview" ), _( "Quit GerbView" ),
KiBitmap( exit_xpm ) ); KiBitmap( exit_xpm ) );
// Menu for configuration and preferences // Menu for configuration and preferences
...@@ -199,7 +199,7 @@ void GERBVIEW_FRAME::ReCreateMenuBar( void ) ...@@ -199,7 +199,7 @@ void GERBVIEW_FRAME::ReCreateMenuBar( void )
AddMenuItem( helpMenu, AddMenuItem( helpMenu,
wxID_HELP, wxID_HELP,
_( "&Contents" ), _( "&Contents" ),
_( "Open the Gerbview handbook" ), _( "Open the GerbView handbook" ),
KiBitmap( help_xpm ) ); KiBitmap( help_xpm ) );
// About GerbView // About GerbView
......
...@@ -37,6 +37,10 @@ void GERBVIEW_FRAME::ReCreateHToolbar( void ) ...@@ -37,6 +37,10 @@ void GERBVIEW_FRAME::ReCreateHToolbar( void )
KiBitmap( gerbview_drill_file_xpm ), KiBitmap( gerbview_drill_file_xpm ),
_( "Load an excellon drill file on the current layer. Previous data will be deleted" ) ); _( "Load an excellon drill file on the current layer. Previous data will be deleted" ) );
m_HToolBar->AddSeparator();
m_HToolBar->AddTool( ID_GERBVIEW_SET_PAGE_BORDER, wxEmptyString, KiBitmap( sheetset_xpm ),
_( "Show/hide frame reference and select paper size for printing" ) );
m_HToolBar->AddSeparator(); m_HToolBar->AddSeparator();
m_HToolBar->AddTool( wxID_PRINT, wxEmptyString, KiBitmap( print_button_xpm ), m_HToolBar->AddTool( wxID_PRINT, wxEmptyString, KiBitmap( print_button_xpm ),
_( "Print layers" ) ); _( "Print layers" ) );
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
; General Product Description Definitions ; General Product Description Definitions
!define PRODUCT_NAME "KiCad" !define PRODUCT_NAME "KiCad"
!define PRODUCT_VERSION "2011.08.04" !define PRODUCT_VERSION "2011.10.15"
!define PRODUCT_WEB_SITE "http://iut-tice.ujf-grenoble.fr/kicad/" !define PRODUCT_WEB_SITE "http://iut-tice.ujf-grenoble.fr/kicad/"
!define SOURCEFORGE_WEB_SITE "http://kicad.sourceforge.net/" !define SOURCEFORGE_WEB_SITE "http://kicad.sourceforge.net/"
!define COMPANY_NAME "" !define COMPANY_NAME ""
......
...@@ -228,8 +228,8 @@ void FOOTPRINT_EDIT_FRAME::Delete_Module_In_Library( const wxString& aLibname ) ...@@ -228,8 +228,8 @@ void FOOTPRINT_EDIT_FRAME::Delete_Module_In_Library( const wxString& aLibname )
if( ( lib_module = wxFopen( oldFileName.GetFullPath(), wxT( "rt" ) ) ) == NULL ) if( ( lib_module = wxFopen( oldFileName.GetFullPath(), wxT( "rt" ) ) ) == NULL )
{ {
wxString msg; wxString msg;
msg.Printf( _( "Library %s not found" ), GetChars(oldFileName.GetFullPath() ) ); msg.Printf( _( "Library <%s> not found" ), GetChars(oldFileName.GetFullPath() ) );
DisplayError( this, msg ); DisplayError( NULL, msg );
return; return;
} }
...@@ -241,9 +241,9 @@ void FOOTPRINT_EDIT_FRAME::Delete_Module_In_Library( const wxString& aLibname ) ...@@ -241,9 +241,9 @@ void FOOTPRINT_EDIT_FRAME::Delete_Module_In_Library( const wxString& aLibname )
{ {
fclose( lib_module ); fclose( lib_module );
wxString msg; wxString msg;
msg.Printf( _( "%s is not a valid footprint library file" ), msg.Printf( _( "<%s> is not a valid footprint library file" ),
GetChars( oldFileName.GetFullPath() ) ); GetChars( oldFileName.GetFullPath() ) );
DisplayError( this, msg ); DisplayError( NULL, msg );
return; return;
} }
...@@ -255,7 +255,7 @@ void FOOTPRINT_EDIT_FRAME::Delete_Module_In_Library( const wxString& aLibname ) ...@@ -255,7 +255,7 @@ void FOOTPRINT_EDIT_FRAME::Delete_Module_In_Library( const wxString& aLibname )
{ {
fclose( lib_module ); fclose( lib_module );
msg.Printf( _( "Module [%s] not found" ), GetChars( CmpName ) ); msg.Printf( _( "Module [%s] not found" ), GetChars( CmpName ) );
DisplayError( this, msg ); DisplayError( NULL, msg );
return; return;
} }
...@@ -266,9 +266,8 @@ void FOOTPRINT_EDIT_FRAME::Delete_Module_In_Library( const wxString& aLibname ) ...@@ -266,9 +266,8 @@ void FOOTPRINT_EDIT_FRAME::Delete_Module_In_Library( const wxString& aLibname )
if( ( out_file = wxFopen( newFileName.GetFullPath(), wxT( "wt" ) ) ) == NULL ) if( ( out_file = wxFopen( newFileName.GetFullPath(), wxT( "wt" ) ) ) == NULL )
{ {
fclose( lib_module ); fclose( lib_module );
wxString msg; msg.Printf( _( "Unable to create %s" ), GetChars( newFileName.GetFullPath() ) );
msg = _( "Unable to create " ) + newFileName.GetFullPath(); DisplayError( NULL, msg );
DisplayError( this, msg );
return; return;
} }
...@@ -328,16 +327,18 @@ void FOOTPRINT_EDIT_FRAME::Delete_Module_In_Library( const wxString& aLibname ) ...@@ -328,16 +327,18 @@ void FOOTPRINT_EDIT_FRAME::Delete_Module_In_Library( const wxString& aLibname )
if( !wxRenameFile( oldFileName.GetFullPath(), backupFileName.GetFullPath() ) ) if( !wxRenameFile( oldFileName.GetFullPath(), backupFileName.GetFullPath() ) )
{ {
DisplayError( this, _( "Could not create library back up file <" ) + msg.Printf( _( "Could not create library back up file <%s>." ),
backupFileName.GetFullName() + wxT( ">." ) ); GetChars( backupFileName.GetFullName() ) );
DisplayError( this, msg );
return; return;
} }
/* The temporary file is renamed as the previous library. */ /* The temporary file is renamed as the previous library. */
if( !wxRenameFile( newFileName.GetFullPath(), oldFileName.GetFullPath() ) ) if( !wxRenameFile( newFileName.GetFullPath(), oldFileName.GetFullPath() ) )
{ {
DisplayError( this, _( "Could not create temporary library file <" ) + msg.Printf( _("Could not create temporary library file <%s>."),
oldFileName.GetFullName() + wxT( ">." ) ); GetChars( oldFileName.GetFullName() ) );
DisplayError( this, msg );
return; return;
} }
...@@ -395,7 +396,8 @@ void PCB_BASE_FRAME::Archive_Modules( const wxString& LibName, bool NewModulesOn ...@@ -395,7 +396,8 @@ void PCB_BASE_FRAME::Archive_Modules( const wxString& LibName, bool NewModulesOn
if( ( lib_module = wxFopen( fileName, wxT( "w+t" ) ) ) == NULL ) if( ( lib_module = wxFopen( fileName, wxT( "w+t" ) ) ) == NULL )
{ {
wxString msg = _( "Unable to create " ) + fileName; wxString msg;
msg.Printf( _( "Unable to create <%s>" ), GetChars(fileName) );
DisplayError( this, msg ); DisplayError( this, msg );
return; return;
} }
...@@ -456,7 +458,7 @@ bool PCB_BASE_FRAME::Save_Module_In_Library( const wxString& aLibName, ...@@ -456,7 +458,7 @@ bool PCB_BASE_FRAME::Save_Module_In_Library( const wxString& aLibName,
if( !newFileName.FileExists( aLibName ) ) if( !newFileName.FileExists( aLibName ) )
{ {
msg.Printf( _( "Library %s not found." ), GetChars( aLibName ) ); msg.Printf( _( "Library <%s> not found." ), GetChars( aLibName ) );
DisplayError( this, msg ); DisplayError( this, msg );
return false; return false;
} }
...@@ -493,7 +495,7 @@ bool PCB_BASE_FRAME::Save_Module_In_Library( const wxString& aLibName, ...@@ -493,7 +495,7 @@ bool PCB_BASE_FRAME::Save_Module_In_Library( const wxString& aLibName,
if( ( lib_module = wxFopen( aLibName, wxT( "rt" ) ) ) == NULL ) if( ( lib_module = wxFopen( aLibName, wxT( "rt" ) ) ) == NULL )
{ {
msg.Printf( _( "Unable to open %s" ), GetChars( aLibName ) ); msg.Printf( _( "Unable to open <%s>" ), GetChars( aLibName ) );
DisplayError( this, msg ); DisplayError( this, msg );
return false; return false;
} }
...@@ -504,7 +506,7 @@ bool PCB_BASE_FRAME::Save_Module_In_Library( const wxString& aLibName, ...@@ -504,7 +506,7 @@ bool PCB_BASE_FRAME::Save_Module_In_Library( const wxString& aLibName,
if( ! input_lib.IsLibrary() ) if( ! input_lib.IsLibrary() )
{ {
fclose( lib_module ); fclose( lib_module );
msg.Printf( _( "File %s is not an Eeschema library" ), GetChars( aLibName ) ); msg.Printf( _( "File <%s> is not an Eeschema library" ), GetChars( aLibName ) );
DisplayError( this, msg ); DisplayError( this, msg );
return false; return false;
} }
...@@ -537,7 +539,7 @@ bool PCB_BASE_FRAME::Save_Module_In_Library( const wxString& aLibName, ...@@ -537,7 +539,7 @@ bool PCB_BASE_FRAME::Save_Module_In_Library( const wxString& aLibName,
if( ( dest = wxFopen( newFileName.GetFullPath(), wxT( "w+t" ) ) ) == NULL ) if( ( dest = wxFopen( newFileName.GetFullPath(), wxT( "w+t" ) ) ) == NULL )
{ {
fclose( lib_module ); fclose( lib_module );
msg = _( "Unable to create " ) + newFileName.GetFullPath(); msg.Printf( _( "Unable to create <%s>" ), GetChars( newFileName.GetFullPath() ) );
DisplayError( this, msg ); DisplayError( this, msg );
return false; return false;
} }
...@@ -622,22 +624,27 @@ bool PCB_BASE_FRAME::Save_Module_In_Library( const wxString& aLibName, ...@@ -622,22 +624,27 @@ bool PCB_BASE_FRAME::Save_Module_In_Library( const wxString& aLibName,
wxRemoveFile( oldFileName.GetFullPath() ); wxRemoveFile( oldFileName.GetFullPath() );
if( !wxRenameFile( aLibName, oldFileName.GetFullPath() ) ) if( !wxRenameFile( aLibName, oldFileName.GetFullPath() ) )
DisplayError( this, _( "Could not create library back up file <" ) + {
oldFileName.GetFullName() + wxT( ">." ) ); msg.Printf( _( "Could not create library back up file <%s>." ),
GetChars( oldFileName.GetFullName() ) );
DisplayError( this, msg );
}
/* The new library file is renamed */ /* The new library file is renamed */
if( !wxRenameFile( newFileName.GetFullPath(), aLibName ) ) if( !wxRenameFile( newFileName.GetFullPath(), aLibName ) )
{ {
DisplayError( this, _( "Could not create temporary library file <" ) + msg.Printf( _( "Could not create temporary library file <%s>." ),
aLibName + wxT( ">." ) ); GetChars( aLibName ) );
DisplayError( this, msg );
return false; return false;
} }
if( aDisplayDialog ) if( aDisplayDialog )
{ {
msg = _( "Component " ); msg += Name_Cmp; wxString fmt = module_exists ?
msg += module_exists ? _( " replaced in " ) : _( " added in " ); _( "Component [%s] replaced in <%s>" ) :
msg += aLibName; _( "Component [%s] added in <%s>" );
msg.Printf( fmt, GetChars( Name_Cmp ), GetChars( aLibName ) );
SetStatusText( msg ); SetStatusText( msg );
} }
...@@ -753,7 +760,7 @@ int FOOTPRINT_EDIT_FRAME::CreateLibrary( const wxString& aLibName ) ...@@ -753,7 +760,7 @@ int FOOTPRINT_EDIT_FRAME::CreateLibrary( const wxString& aLibName )
if( ( lib_module = wxFopen( fileName.GetFullPath(), wxT( "wt" ) ) ) == NULL ) if( ( lib_module = wxFopen( fileName.GetFullPath(), wxT( "wt" ) ) ) == NULL )
{ {
msg = _( "Unable to create " ) + fileName.GetFullPath(); msg.Printf( _( "Unable to create library <%s>" ), GetChars( fileName.GetFullPath() ) );
DisplayError( this, msg ); DisplayError( this, msg );
return -1; return -1;
} }
......
...@@ -657,7 +657,7 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() ...@@ -657,7 +657,7 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
// Contents // Contents
AddMenuItem( helpMenu, wxID_HELP, AddMenuItem( helpMenu, wxID_HELP,
_( "&Contents" ), _( "&Contents" ),
_( "Open the pcbnew handbook" ), _( "Open the Pcbnew handbook" ),
KiBitmap( online_help_xpm ) ); KiBitmap( online_help_xpm ) );
AddMenuItem( helpMenu, wxID_INDEX, AddMenuItem( helpMenu, wxID_INDEX,
_( "&Getting Started in KiCad" ), _( "&Getting Started in KiCad" ),
......
release version: release version:
2011 aug 04 2011 oct 15
files (.zip,.tgz): files (.zip,.tgz):
kicad-2011-08-04 kicad-2011-10-15
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment