diff --git a/CMakeModules/CreateSVNVersionHeader.cmake b/CMakeModules/CreateSVNVersionHeader.cmake index f9ff6e872b..1c6b9d952b 100644 --- a/CMakeModules/CreateSVNVersionHeader.cmake +++ b/CMakeModules/CreateSVNVersionHeader.cmake @@ -37,14 +37,12 @@ macro(create_svn_version_header) endif(Subversion_FOUND) # Check to make sure 'svn info' command did not fail. Otherwise fallback - # to vesion strings defined in "/include/build_version.h". + # to version strings defined in "/include/build_version.h". if(Kicad_WC_LAST_CHANGED_DATE) string(REGEX REPLACE "^([0-9]+)\\-([0-9]+)\\-([0-9]+).*" "\\1\\2\\3" _kicad_svn_date ${Kicad_WC_LAST_CHANGED_DATE}) - set(KICAD_SVN_VERSION + set(KICAD_BUILD_VERSION "(${_kicad_svn_date} SVN-R${Kicad_WC_LAST_CHANGED_REV})") - set(KICAD_ABOUT_VERSION - "SVN-R${Kicad_WC_LAST_CHANGED_REV} (${_kicad_svn_date})") # Definition to conditionally use date and revision returned from the # Subversion info command instead of hand coded date and revision in @@ -58,7 +56,6 @@ macro(create_svn_version_header) configure_file(${CMAKE_SOURCE_DIR}/CMakeModules/version.h.cmake ${CMAKE_BINARY_DIR}/version.h) - message(STATUS "Kicad SVN version: ${KICAD_SVN_VERSION}") - message(STATUS "Kicad about version: ${KICAD_ABOUT_VERSION}") + message(STATUS "Kicad SVN build version: ${KICAD_BUILD_VERSION}") endif(Kicad_WC_LAST_CHANGED_DATE) endmacro(create_svn_version_header) diff --git a/CMakeModules/version.h.cmake b/CMakeModules/version.h.cmake index 555bb5b121..79fcd4b6d5 100644 --- a/CMakeModules/version.h.cmake +++ b/CMakeModules/version.h.cmake @@ -8,7 +8,6 @@ #ifndef __KICAD_SVN_VERSION_H__ #define __KICAD_SVN_VERSION_H__ -#cmakedefine KICAD_SVN_VERSION "@KICAD_SVN_VERSION@" -#cmakedefine KICAD_ABOUT_VERSION "@KICAD_ABOUT_VERSION@" +#cmakedefine KICAD_BUILD_VERSION "@KICAD_BUILD_VERSION@" #endif /* __KICAD_SVN_VERSION_H__ */ diff --git a/common/about_kicad.cpp b/common/about_kicad.cpp index 1fcb0ad8d4..b14bf0f6d2 100644 --- a/common/about_kicad.cpp +++ b/common/about_kicad.cpp @@ -8,29 +8,28 @@ #include "appl_wxstruct.h" -#define BUILD_VERSION "(2009-12-05-unstable)" - -#if defined(HAVE_SVN_VERSION) || defined(HAVE_SVN_REVISION) -# include "version.h" -#ifndef KICAD_ABOUT_VERSION -#define KICAD_ABOUT_VERSION BUILD_VERSION -#endif -wxString g_BuildAboutVersion( wxT( KICAD_ABOUT_VERSION ) ); -#else -wxString g_BuildAboutVersion( wxT( BUILD_VERSION ) ); +#ifdef HAVE_SVN_VERSION +#include "version.h" // define the KICAD_BUILD_VERSION #endif +#ifndef KICAD_BUILD_VERSION +#define KICAD_BUILD_VERSION "(2010-01-04)" +#endif -/** Function GetAboutBuildVersion() - * Return custom build date for about dialog +#define VERSION_STABILITY "unstable" + +/** Function GetBuildVersion() + * Return the build date and version */ -wxString GetAboutBuildVersion() +wxString GetBuildVersion() { - return g_BuildAboutVersion; + wxString msg; + msg.Printf( wxT("%s-%s"), + wxT( KICAD_BUILD_VERSION ), wxT(VERSION_STABILITY)); + return msg; } - /**********************************/ wxString SetMsg( const wxString& msg ) /**********************************/ @@ -62,7 +61,7 @@ void InitKiCadAbout( wxAboutDialogInfo& info ) wxString description; /* KiCad build version */ - description << ( _T( "Build: " ) ) << GetAboutBuildVersion(); + description << ( _T( "Build: " ) ) << GetBuildVersion(); /* Print for wxversion */ description << ( wxT( "\n\nwxWidgets " ) ) diff --git a/common/common.cpp b/common/common.cpp index a6ea78a96d..aec535052d 100644 --- a/common/common.cpp +++ b/common/common.cpp @@ -118,26 +118,6 @@ StructColors ColorRefs[NBCOLOR] = }; -#define BUILD_VERSION "(2009-12-05-unstable)" - - -#ifdef HAVE_SVN_VERSION -#include "version.h" -wxString g_BuildVersion( wxT( KICAD_SVN_VERSION ) ); -#else -wxString g_BuildVersion( wxT( BUILD_VERSION ) ); -#endif - - -/** Function GetBuildVersion() - * Return the build date - */ -wxString GetBuildVersion() -{ - return g_BuildVersion; -} - - /** function SetLocaleTo_C_standard * because kicad is internationalized, switch internalization to "C" standard * i.e. uses the . (dot) as separator in print/read float numbers diff --git a/common/gr_basic.cpp b/common/gr_basic.cpp index 6f7df5f837..62949dd31b 100644 --- a/common/gr_basic.cpp +++ b/common/gr_basic.cpp @@ -285,8 +285,13 @@ void GRResetPenAndBrush( wxDC* DC ) void SetPenMinWidth( int minwidth ) { PenMinWidth = minwidth; - if( PenMinWidth < 1 ) - PenMinWidth = 1; + if( PenMinWidth < 0 ) + PenMinWidth = 0; +} + +int GetPenMinWidth( ) +{ + return PenMinWidth; } @@ -1037,16 +1042,6 @@ static void GRSClosedPoly( EDA_Rect* ClipBox, } -/* not used - * static void GRSClosedPoly( EDA_Rect* ClipBox, wxDC* DC, int n, wxPoint - * Points[], - * bool Fill, int Color, int BgColor ) - * { - * GRSClosedPoly( ClipBox, DC, n, Points, Fill, 0, Color, BgColor ); - * } - */ - - /* * Draw a new polyline and fill it if Fill, in drawing space. */ diff --git a/common/pcbcommon.cpp b/common/pcbcommon.cpp index 3df848990b..f90e69b9e5 100644 --- a/common/pcbcommon.cpp +++ b/common/pcbcommon.cpp @@ -118,28 +118,6 @@ int g_GridRoutingSize = 250; bool g_Zone_45_Only = FALSE; -/* HPGL plot settings. */ -int g_HPGL_Pen_Num = 1; /* pen number */ -int g_HPGL_Pen_Speed = 40; /* speed in cm/s */ -int g_HPGL_Pen_Diam; /* diameter in mils */ -int g_HPGL_Pen_Recouvrement; /* recovery in mils ( for filling ) */ - -float Scale_X; -float Scale_Y; /* scale factor in X and Y axis */ - -int PlotMarge; -int g_PlotLine_Width; -int g_PlotFormat = PLOT_FORMAT_GERBER; -int g_PlotOrient; - -wxPoint g_PlotOffset; - -FILE* dest = NULL; - -/* id for plot format (see enum PlotFormat in plot_common.h) */ -int g_PlotScaleOpt; -int g_DrillShapeOpt; - // Default setting used when creating a new zone ZONE_SETTING g_Zone_Default_Setting; diff --git a/gerbview/dialog_print_using_printer.cpp b/gerbview/dialog_print_using_printer.cpp index b384e25465..ec0ea45376 100644 --- a/gerbview/dialog_print_using_printer.cpp +++ b/gerbview/dialog_print_using_printer.cpp @@ -48,7 +48,6 @@ private: WinEDA_GerberFrame* m_Parent; wxConfig* m_Config; wxCheckBox* m_BoxSelectLayer[32]; - static bool m_ExcludeEdgeLayer; public: DIALOG_PRINT_USING_PRINTER( WinEDA_GerberFrame* parent ); @@ -63,7 +62,6 @@ private: void OnButtonCancelClick( wxCommandEvent& event ) { Close(); } void SetPrintParameters( ); - void SetPenWidth(); void InitValues( ); public: @@ -72,8 +70,6 @@ public: int SetLayerMaskFromListSelection(); }; -bool DIALOG_PRINT_USING_PRINTER::m_ExcludeEdgeLayer; - /*******************************************************/ @@ -128,7 +124,6 @@ void DIALOG_PRINT_USING_PRINTER::InitValues( ) wxString msg; layer_max = 32; - m_ExcludeEdgeLayer = true; // no meaning in gerbview /* Create layer list */ int mask = 1, ii; @@ -154,7 +149,6 @@ void DIALOG_PRINT_USING_PRINTER::InitValues( ) if( m_Config ) { - m_Config->Read( OPTKEY_PLOT_LINEWIDTH_VALUE, &s_Parameters.m_PenMinSize ); m_Config->Read( OPTKEY_PRINT_X_FINESCALE_ADJ, &s_Parameters.m_XScaleAdjust ); m_Config->Read( OPTKEY_PRINT_Y_FINESCALE_ADJ, &s_Parameters.m_YScaleAdjust ); m_Config->Read( OPTKEY_PRINT_SCALE, &scale_idx ); @@ -206,10 +200,7 @@ void DIALOG_PRINT_USING_PRINTER::InitValues( ) else m_ModeColorOption->SetSelection( 0 ); - AddUnitSymbol( *m_TextPenWidth, g_UnitMetric ); - m_DialogPenWidth->SetValue( - ReturnStringFromValue( g_UnitMetric, s_Parameters.m_PenMinSize, m_Parent->m_InternalUnits ) ); - + s_Parameters.m_PenMinSize = 0; // Create scale adjust option msg.Printf( wxT( "%f" ), s_Parameters.m_XScaleAdjust ); @@ -249,7 +240,6 @@ void DIALOG_PRINT_USING_PRINTER::OnCloseWindow( wxCloseEvent& event ) if( m_Config ) { - m_Config->Write( OPTKEY_PLOT_LINEWIDTH_VALUE, s_Parameters.m_PenMinSize ); m_Config->Write( OPTKEY_PRINT_X_FINESCALE_ADJ, s_Parameters.m_XScaleAdjust ); m_Config->Write( OPTKEY_PRINT_Y_FINESCALE_ADJ, s_Parameters.m_YScaleAdjust ); m_Config->Write( OPTKEY_PRINT_SCALE, m_ScaleOption->GetSelection() ); @@ -301,35 +291,8 @@ void DIALOG_PRINT_USING_PRINTER::SetPrintParameters( ) } g_pcb_plot_options.ScaleAdjX = s_Parameters.m_XScaleAdjust; g_pcb_plot_options.ScaleAdjX = s_Parameters.m_YScaleAdjust; - SetPenWidth(); } - -/**********************************************/ -void DIALOG_PRINT_USING_PRINTER::SetPenWidth() -/***********************************************/ - -/* Get the new pen width value, and verify min et max value - * NOTE: s_Parameters.m_PenMinSize is in internal units - */ -{ - s_Parameters.m_PenMinSize = ReturnValueFromTextCtrl( *m_DialogPenWidth, m_Parent->m_InternalUnits ); - - if( s_Parameters.m_PenMinSize > WIDTH_MAX_VALUE ) - { - s_Parameters.m_PenMinSize = WIDTH_MAX_VALUE; - } - - if( s_Parameters.m_PenMinSize < WIDTH_MIN_VALUE ) - { - s_Parameters.m_PenMinSize = WIDTH_MIN_VALUE; - } - - m_DialogPenWidth->SetValue( - ReturnStringFromValue( g_UnitMetric, s_Parameters.m_PenMinSize, m_Parent->m_InternalUnits ) ); -} - - /**********************************************************/ void DIALOG_PRINT_USING_PRINTER::OnPrintSetup( wxCommandEvent& event ) /**********************************************************/ diff --git a/gerbview/dialog_print_using_printer_base.cpp b/gerbview/dialog_print_using_printer_base.cpp index da5b612d1b..aee5ef35bc 100644 --- a/gerbview/dialog_print_using_printer_base.cpp +++ b/gerbview/dialog_print_using_printer_base.cpp @@ -69,15 +69,6 @@ DIALOG_PRINT_USING_PRINTER_base::DIALOG_PRINT_USING_PRINTER_base( wxWindow* pare wxStaticBoxSizer* sbOptionsSizer; sbOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options:") ), wxVERTICAL ); - m_TextPenWidth = new wxStaticText( this, wxID_ANY, _("Pen Width Mini"), wxDefaultPosition, wxDefaultSize, 0 ); - m_TextPenWidth->Wrap( -1 ); - sbOptionsSizer->Add( m_TextPenWidth, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - - m_DialogPenWidth = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_DialogPenWidth->SetToolTip( _("Selection of the minimum pen thickness used to draw items.") ); - - sbOptionsSizer->Add( m_DialogPenWidth, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); - m_Print_Mirror = new wxCheckBox( this, wxID_ANY, _("Mirror"), wxDefaultPosition, wxDefaultSize, 0 ); sbOptionsSizer->Add( m_Print_Mirror, 0, wxALL, 5 ); diff --git a/gerbview/dialog_print_using_printer_base.fbp b/gerbview/dialog_print_using_printer_base.fbp index 210850bd59..c553896088 100644 --- a/gerbview/dialog_print_using_printer_base.fbp +++ b/gerbview/dialog_print_using_printer_base.fbp @@ -426,112 +426,6 @@ wxVERTICAL none - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - - - 1 - - - 0 - wxID_ANY - Pen Width Mini - - - m_TextPenWidth - protected - - - - - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND - 0 - - - - 1 - - - 0 - wxID_ANY - - 0 - -1,-1 - m_DialogPenWidth - protected - - - - - Selection of the minimum pen thickness used to draw items. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 wxALL diff --git a/gerbview/dialog_print_using_printer_base.h b/gerbview/dialog_print_using_printer_base.h index 9487e7db93..4d87fc16d4 100644 --- a/gerbview/dialog_print_using_printer_base.h +++ b/gerbview/dialog_print_using_printer_base.h @@ -49,8 +49,6 @@ class DIALOG_PRINT_USING_PRINTER_base : public wxDialog wxTextCtrl* m_FineAdjustXscaleOpt; wxStaticText* m_FineAdjustYscaleTitle; wxTextCtrl* m_FineAdjustYscaleOpt; - wxStaticText* m_TextPenWidth; - wxTextCtrl* m_DialogPenWidth; wxCheckBox* m_Print_Mirror; wxRadioBox* m_ModeColorOption; wxRadioBox* m_PagesOption; diff --git a/gerbview/pcbplot.h b/gerbview/pcbplot.h index f66930cf8a..8dd7d6e193 100644 --- a/gerbview/pcbplot.h +++ b/gerbview/pcbplot.h @@ -6,7 +6,6 @@ #define PCBPLOT_H /* Shared Config keys for plot and print */ -#define OPTKEY_PLOT_LINEWIDTH_VALUE wxT( "PlotLineWidth" ) #define OPTKEY_LAYERBASE wxT( "PlotLayer_%d" ) #define OPTKEY_PRINT_X_FINESCALE_ADJ wxT( "PrintXFineScaleAdj" ) #define OPTKEY_PRINT_Y_FINESCALE_ADJ wxT( "PrintYFineScaleAdj" ) diff --git a/gerbview/tracepcb.cpp b/gerbview/tracepcb.cpp index 60570aca63..113acb2d01 100644 --- a/gerbview/tracepcb.cpp +++ b/gerbview/tracepcb.cpp @@ -117,6 +117,8 @@ void WinEDA_GerberFrame::Trace_Gerber( wxDC* DC, int draw_mode, int printmasklay // minimize reallocations of the vector's internal array by starting with a good sized one. points.reserve(10000); + int tmp = GetPenMinWidth( ); + SetPenMinWidth(0 ); for( TRACK* track = GetBoard()->m_Zone; track; track = track->Next() ) { if( !(track->ReturnMaskLayer() & printmasklayer) ) @@ -176,6 +178,8 @@ void WinEDA_GerberFrame::Trace_Gerber( wxDC* DC, int draw_mode, int printmasklay // Draw tracks and flashes down here. This will probably not be a final solution to drawing order issues Draw_Track_Buffer( DrawPanel, DC, GetBoard(), draw_mode, printmasklayer ); + + SetPenMinWidth( tmp ); if( DisplayOpt.DisplayPadNum ) Affiche_DCodes_Pistes( DrawPanel, DC, GetBoard(), GR_COPY ); diff --git a/include/build_version.h b/include/build_version.h index a43c4cbb95..56473712de 100644 --- a/include/build_version.h +++ b/include/build_version.h @@ -3,7 +3,9 @@ #ifndef KICAD_BUILD_VERSION #define KICAD_BUILD_VERSION -extern wxString g_BuildVersion; -extern wxString g_BuildAboutVersion; +/** Function GetBuildVersion() + * Return the build date and version + */ +wxString GetBuildVersion(); #endif // KICAD_BUILD_VERSION diff --git a/include/common.h b/include/common.h index 67431fab43..f32bad0782 100644 --- a/include/common.h +++ b/include/common.h @@ -267,8 +267,6 @@ void InitKiCadAbout( wxAboutDialogInfo& info ); /* common.cpp */ /**************/ wxString GetBuildVersion(); /* Return the build date */ -wxString GetAboutBuildVersion(); /* Return custom build date for about - * dialog */ /** * function Affiche_1_Parametre diff --git a/include/gr_basic.h b/include/gr_basic.h index 4a817be294..5c7bf522cf 100644 --- a/include/gr_basic.h +++ b/include/gr_basic.h @@ -57,6 +57,7 @@ void GRForceBlackPen( bool flagforce ); */ bool GetGRForceBlackPenState( void ); void SetPenMinWidth( int minwidth ); +int GetPenMinWidth( ); void GRSPutPixel( EDA_Rect* ClipBox, wxDC* DC, int x, int y, int color ); void GRSFilledRect( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1, diff --git a/pcbnew/dialog_print_using_printer.cpp b/pcbnew/dialog_print_using_printer.cpp index 5d3da85fe2..f830fc0d41 100644 --- a/pcbnew/dialog_print_using_printer.cpp +++ b/pcbnew/dialog_print_using_printer.cpp @@ -54,7 +54,6 @@ public: private: void OnCloseWindow( wxCloseEvent& event ); - void OnInitDialog( wxInitDialogEvent& event ); void OnPrintSetup( wxCommandEvent& event ); void OnPrintPreview( wxCommandEvent& event ); void OnPrintButtonClick( wxCommandEvent& event ); diff --git a/pcbnew/specctra.cpp b/pcbnew/specctra.cpp index abc910fccd..6173a734d0 100644 --- a/pcbnew/specctra.cpp +++ b/pcbnew/specctra.cpp @@ -4170,7 +4170,8 @@ PARSER::PARSER( ELEM* aParent ) : generated_by_freeroute = false; host_cad = "Kicad's PCBNEW"; - host_version = CONV_TO_UTF8(g_BuildVersion); + wxString msg = GetBuildVersion(); + host_version = CONV_TO_UTF8(msg); }