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 @@
#ifndef KICAD_BUILD_VERSION
#if defined KICAD_GOST
# define KICAD_BUILD_VERSION "(2011-aug-04 GOST)"
# define KICAD_BUILD_VERSION "(2011-oct-15 GOST)"
#else
# define KICAD_BUILD_VERSION "(2011-aug-04)"
# define KICAD_BUILD_VERSION "(2011-oct-15)"
#endif
#endif
......
......@@ -89,15 +89,10 @@ void CVPCB_MAINFRAME::ReCreateMenuBar()
// Menu Preferences:
wxMenu* preferencesMenu = new wxMenu;
// Options (Preferences on WXMAC)
AddMenuItem( preferencesMenu,
wxID_PREFERENCES,
#ifdef __WXMAC__
_( "&Preferences..." ),
#else
_( "&Options" ),
#endif // __WXMAC__
_( "Set libraries and library search paths" ),
// Libraries to load
AddMenuItem( preferencesMenu, wxID_PREFERENCES,
_( "&Libraries" ),
_( "Set footprint libraries lo load and library search paths" ),
KiBitmap( config_xpm ) );
// Language submenu
......
......@@ -425,7 +425,7 @@ bool CMP_LIBRARY::Load( wxString& aErrorMsg )
if( !tkn.HasMoreTokens()
|| !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 );
return false;
}
......
......@@ -231,7 +231,7 @@ void DIALOG_PLOT_SCHEMATIC_DXF::PlotOneSheetDXF( const wxString& FileName,
plotter->set_color_mode( m_plotColorOpt );
/* Init : */
plotter->set_creator( wxT( "EESchema-DXF" ) );
plotter->set_creator( wxT( "Eeschema-DXF" ) );
plotter->set_filename( FileName );
plotter->start_plot( output_file );
......
......@@ -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_default_line_width( g_DrawDefaultLineThickness );
/* Init : */
plotter->set_creator( wxT( "EESchema-HPGL" ) );
plotter->set_creator( wxT( "Eeschema-HPGL" ) );
plotter->set_filename( FileName );
plotter->set_pen_speed( g_HPGL_Pen_Descr.m_Pen_Speed );
plotter->set_pen_number( g_HPGL_Pen_Descr.m_Pen_Num );
......
......@@ -282,7 +282,7 @@ void DIALOG_PLOT_SCHEMATIC_PS::plotOneSheetPS( const wxString& FileName,
plotter->set_color_mode( m_plotColorOpt );
/* Init : */
plotter->set_creator( wxT( "EESchema-PS" ) );
plotter->set_creator( wxT( "Eeschema-PS" ) );
plotter->set_filename( FileName );
plotter->start_plot( output_file );
......
......@@ -74,8 +74,9 @@ bool SCH_EDIT_FRAME::SaveEEFile( SCH_SCREEN* aScreen, int aSaveType, bool aCreat
if( !wxRenameFile( schematicFileName.GetFullPath(), backupFileName.GetFullPath() ) )
{
DisplayError( this, _( "Could not save backup of file <" ) +
schematicFileName.GetFullPath() + wxT( ">." ) );
msg.Printf(_( "Could not save backup of file <%s>" ),
GetChars( schematicFileName.GetFullPath() ) );
DisplayError( this, msg );
}
}
}
......@@ -111,7 +112,8 @@ bool SCH_EDIT_FRAME::SaveEEFile( SCH_SCREEN* aScreen, int aSaveType, bool aCreat
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 );
return false;
}
......
......@@ -512,7 +512,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
_( "Open the \"Getting Started in KiCad\" guide for beginners" ),
KiBitmap( help_xpm ) );
// About EESchema
// About Eeschema
helpMenu->AppendSeparator();
AddMenuItem( helpMenu,
wxID_ABOUT,
......
......@@ -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,
&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() );
aErrorMsg << wxT( "\n" ) << FROM_UTF8( (char*) aLine );
return false;
......
......@@ -5,6 +5,7 @@ add_definitions(-DGERBVIEW -DPCBNEW)
###
include_directories(${CMAKE_CURRENT_SOURCE_DIR}
${Boost_INCLUDE_DIR}
./dialogs
../3d-viewer
../common
../cvpcb
......@@ -18,6 +19,8 @@ set(DIALOGS_SRCS
dialogs/gerbview_dialog_display_options_frame_base.cpp
dialogs/gerbview_dialog_display_options_frame.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_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 );
}
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<wxFormBuilder_Project>
<FileVersion major="1" minor="10" />
<object class="Project" expanded="1">
<property name="class_decoration"></property>
<property name="code_generation">C++</property>
<property name="disconnect_events">1</property>
<property name="disconnect_mode">source_name</property>
<property name="disconnect_python_events">0</property>
<property name="embedded_files_path">res</property>
<property name="encoding">UTF-8</property>
<property name="event_generation">connect</property>
<property name="file">dialog_show_page_borders_base</property>
<property name="first_id">1000</property>
<property name="help_provider">none</property>
<property name="internationalize">1</property>
<property name="name">dialog_show_page_borders_base</property>
<property name="namespace"></property>
<property name="path">.</property>
<property name="precompiled_header"></property>
<property name="relative_path">1</property>
<property name="skip_python_events">1</property>
<property name="use_enum">0</property>
<property name="use_microsoft_bom">0</property>
<object class="Dialog" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_managed">0</property>
<property name="aui_name"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center"></property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="event_handler">impl_virtual</property>
<property name="extra_style"></property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="layer"></property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">DIALOG_PAGE_SHOW_PAGE_BORDERS_BASE</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="position"></property>
<property name="resize">Resizable</property>
<property name="row"></property>
<property name="show">1</property>
<property name="size">263,254</property>
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
<property name="subclass"></property>
<property name="title">Page Borders</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnActivate"></event>
<event name="OnActivateApp"></event>
<event name="OnAuiFindManager"></event>
<event name="OnAuiPaneButton"></event>
<event name="OnAuiPaneClose"></event>
<event name="OnAuiPaneMaximize"></event>
<event name="OnAuiPaneRestore"></event>
<event name="OnAuiRender"></event>
<event name="OnChar"></event>
<event name="OnClose"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnHibernate"></event>
<event name="OnIconize"></event>
<event name="OnIdle"></event>
<event name="OnInitDialog"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bDialogSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">1</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bUpperSizer</property>
<property name="orient">wxHORIZONTAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">1</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bRightSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxRadioBox" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_name"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="choices">&quot;Full size. Do not show page limits&quot; &quot;Full size&quot; &quot;Size A4&quot; &quot;Size A3&quot; &quot;Size A2&quot; &quot;Size A&quot; &quot;Size B&quot; &quot;Size C&quot;</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Show Page Limits:</property>
<property name="layer"></property>
<property name="majorDimension">1</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_ShowPageLimits</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="position"></property>
<property name="resize">Resizable</property>
<property name="row"></property>
<property name="selection">0</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style">wxRA_SPECIFY_COLS</property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRadioBox"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
</object>
</object>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxStaticLine" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_name"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="layer"></property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_staticline1</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="position"></property>
<property name="resize">Resizable</property>
<property name="row"></property>
<property name="show">1</property>
<property name="size"></property>
<property name="style">wxLI_HORIZONTAL</property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxALL</property>
<property name="proportion">0</property>
<object class="wxStdDialogButtonSizer" expanded="1">
<property name="Apply">0</property>
<property name="Cancel">1</property>
<property name="ContextHelp">0</property>
<property name="Help">0</property>
<property name="No">0</property>
<property name="OK">1</property>
<property name="Save">0</property>
<property name="Yes">0</property>
<property name="minimum_size"></property>
<property name="name">m_sdbSizer1</property>
<property name="permission">protected</property>
<event name="OnApplyButtonClick"></event>
<event name="OnCancelButtonClick">OnCancelButtonClick</event>
<event name="OnContextHelpButtonClick"></event>
<event name="OnHelpButtonClick"></event>
<event name="OnNoButtonClick"></event>
<event name="OnOKButtonClick">OnOKBUttonClick</event>
<event name="OnSaveButtonClick"></event>
<event name="OnYesButtonClick"></event>
</object>
</object>
</object>
</object>
</object>
</wxFormBuilder_Project>
///////////////////////////////////////////////////////////////////////////
// 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
* Set the display options for GerbView
/**
* @file gerbview_dialog_display_options_frame.cpp
* Set some display options for GerbView
*/
......
......@@ -17,6 +17,7 @@
#include "dialog_helpers.h"
#include "class_DCodeSelectionbox.h"
#include "class_gerbview_layer_widget.h"
#include "dialog_show_page_borders.h"
// Event table:
......@@ -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_DCODE_FILE, 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:
EVT_MENU( wxID_FILE, GERBVIEW_FRAME::Files_io )
......@@ -150,6 +152,14 @@ void GERBVIEW_FRAME::Process_Special_Functions( wxCommandEvent& event )
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:
Erase_Current_Layer( true );
ClearMsgPanel();
......
......@@ -41,6 +41,7 @@ enum gerbview_ids
ID_TOOLBARH_GERBVIEW_SELECT_ACTIVE_LAYER,
ID_GERBVIEW_GLOBAL_DELETE,
ID_GERBVIEW_OPTIONS_SETUP,
ID_GERBVIEW_SET_PAGE_BORDER,
ID_TB_OPTIONS_SHOW_LAYERS_MANAGER_VERTICAL_TOOLBAR,
ID_TB_OPTIONS_SHOW_DCODES,
ID_TB_OPTIONS_SHOW_FLASHED_ITEMS_SKETCH,
......
......@@ -120,7 +120,7 @@ void GERBVIEW_FRAME::ReCreateMenuBar( void )
AddMenuItem( fileMenu,
wxID_EXIT,
_( "E&xit" ),
_( "Quit Gerbview" ),
_( "Quit GerbView" ),
KiBitmap( exit_xpm ) );
// Menu for configuration and preferences
......@@ -199,7 +199,7 @@ void GERBVIEW_FRAME::ReCreateMenuBar( void )
AddMenuItem( helpMenu,
wxID_HELP,
_( "&Contents" ),
_( "Open the Gerbview handbook" ),
_( "Open the GerbView handbook" ),
KiBitmap( help_xpm ) );
// About GerbView
......
......@@ -37,6 +37,10 @@ void GERBVIEW_FRAME::ReCreateHToolbar( void )
KiBitmap( gerbview_drill_file_xpm ),
_( "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->AddTool( wxID_PRINT, wxEmptyString, KiBitmap( print_button_xpm ),
_( "Print layers" ) );
......
......@@ -17,7 +17,7 @@
; General Product Description Definitions
!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 SOURCEFORGE_WEB_SITE "http://kicad.sourceforge.net/"
!define COMPANY_NAME ""
......
......@@ -228,8 +228,8 @@ void FOOTPRINT_EDIT_FRAME::Delete_Module_In_Library( const wxString& aLibname )
if( ( lib_module = wxFopen( oldFileName.GetFullPath(), wxT( "rt" ) ) ) == NULL )
{
wxString msg;
msg.Printf( _( "Library %s not found" ), GetChars(oldFileName.GetFullPath() ) );
DisplayError( this, msg );
msg.Printf( _( "Library <%s> not found" ), GetChars(oldFileName.GetFullPath() ) );
DisplayError( NULL, msg );
return;
}
......@@ -241,9 +241,9 @@ void FOOTPRINT_EDIT_FRAME::Delete_Module_In_Library( const wxString& aLibname )
{
fclose( lib_module );
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() ) );
DisplayError( this, msg );
DisplayError( NULL, msg );
return;
}
......@@ -255,7 +255,7 @@ void FOOTPRINT_EDIT_FRAME::Delete_Module_In_Library( const wxString& aLibname )
{
fclose( lib_module );
msg.Printf( _( "Module [%s] not found" ), GetChars( CmpName ) );
DisplayError( this, msg );
DisplayError( NULL, msg );
return;
}
......@@ -266,9 +266,8 @@ void FOOTPRINT_EDIT_FRAME::Delete_Module_In_Library( const wxString& aLibname )
if( ( out_file = wxFopen( newFileName.GetFullPath(), wxT( "wt" ) ) ) == NULL )
{
fclose( lib_module );
wxString msg;
msg = _( "Unable to create " ) + newFileName.GetFullPath();
DisplayError( this, msg );
msg.Printf( _( "Unable to create %s" ), GetChars( newFileName.GetFullPath() ) );
DisplayError( NULL, msg );
return;
}
......@@ -328,16 +327,18 @@ void FOOTPRINT_EDIT_FRAME::Delete_Module_In_Library( const wxString& aLibname )
if( !wxRenameFile( oldFileName.GetFullPath(), backupFileName.GetFullPath() ) )
{
DisplayError( this, _( "Could not create library back up file <" ) +
backupFileName.GetFullName() + wxT( ">." ) );
msg.Printf( _( "Could not create library back up file <%s>." ),
GetChars( backupFileName.GetFullName() ) );
DisplayError( this, msg );
return;
}
/* The temporary file is renamed as the previous library. */
if( !wxRenameFile( newFileName.GetFullPath(), oldFileName.GetFullPath() ) )
{
DisplayError( this, _( "Could not create temporary library file <" ) +
oldFileName.GetFullName() + wxT( ">." ) );
msg.Printf( _("Could not create temporary library file <%s>."),
GetChars( oldFileName.GetFullName() ) );
DisplayError( this, msg );
return;
}
......@@ -395,7 +396,8 @@ void PCB_BASE_FRAME::Archive_Modules( const wxString& LibName, bool NewModulesOn
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 );
return;
}
......@@ -456,7 +458,7 @@ bool PCB_BASE_FRAME::Save_Module_In_Library( const wxString& aLibName,
if( !newFileName.FileExists( aLibName ) )
{
msg.Printf( _( "Library %s not found." ), GetChars( aLibName ) );
msg.Printf( _( "Library <%s> not found." ), GetChars( aLibName ) );
DisplayError( this, msg );
return false;
}
......@@ -493,7 +495,7 @@ bool PCB_BASE_FRAME::Save_Module_In_Library( const wxString& aLibName,
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 );
return false;
}
......@@ -504,7 +506,7 @@ bool PCB_BASE_FRAME::Save_Module_In_Library( const wxString& aLibName,
if( ! input_lib.IsLibrary() )
{
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 );
return false;
}
......@@ -537,7 +539,7 @@ bool PCB_BASE_FRAME::Save_Module_In_Library( const wxString& aLibName,
if( ( dest = wxFopen( newFileName.GetFullPath(), wxT( "w+t" ) ) ) == NULL )
{
fclose( lib_module );
msg = _( "Unable to create " ) + newFileName.GetFullPath();
msg.Printf( _( "Unable to create <%s>" ), GetChars( newFileName.GetFullPath() ) );
DisplayError( this, msg );
return false;
}
......@@ -622,22 +624,27 @@ bool PCB_BASE_FRAME::Save_Module_In_Library( const wxString& aLibName,
wxRemoveFile( 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 */
if( !wxRenameFile( newFileName.GetFullPath(), aLibName ) )
{
DisplayError( this, _( "Could not create temporary library file <" ) +
aLibName + wxT( ">." ) );
msg.Printf( _( "Could not create temporary library file <%s>." ),
GetChars( aLibName ) );
DisplayError( this, msg );
return false;
}
if( aDisplayDialog )
{
msg = _( "Component " ); msg += Name_Cmp;
msg += module_exists ? _( " replaced in " ) : _( " added in " );
msg += aLibName;
wxString fmt = module_exists ?
_( "Component [%s] replaced in <%s>" ) :
_( "Component [%s] added in <%s>" );
msg.Printf( fmt, GetChars( Name_Cmp ), GetChars( aLibName ) );
SetStatusText( msg );
}
......@@ -753,7 +760,7 @@ int FOOTPRINT_EDIT_FRAME::CreateLibrary( const wxString& aLibName )
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 );
return -1;
}
......
......@@ -657,7 +657,7 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
// Contents
AddMenuItem( helpMenu, wxID_HELP,
_( "&Contents" ),
_( "Open the pcbnew handbook" ),
_( "Open the Pcbnew handbook" ),
KiBitmap( online_help_xpm ) );
AddMenuItem( helpMenu, wxID_INDEX,
_( "&Getting Started in KiCad" ),
......
release version:
2011 aug 04
2011 oct 15
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