Commit b9b341dc authored by Wayne Stambaugh's avatar Wayne Stambaugh
Browse files

PCB common library global variable removal and other minor fixes.

* Move auto save time global variables into PCB_EDIT_FRAME object.
* Move footprint library name list global variable int PCB_EDIT_FRAME
  object.
* Improve library back up and temporary file error message strings and make
  them translatable.
* PCBNew string unification.
* Translate French code names and comments.
* Coding style policy and Doxygen comment fixes.
parent de96452c
Loading
Loading
Loading
Loading
+0 −4
Original line number Original line Diff line number Diff line
@@ -73,8 +73,6 @@ wxString g_ViaType_Name[4] = {
};
};




wxArrayString g_LibName_List;    // library list to load

DISPLAY_OPTIONS DisplayOpt;      /* Display options for board items */
DISPLAY_OPTIONS DisplayOpt;      /* Display options for board items */


/* PCB file name extension definitions. */
/* PCB file name extension definitions. */
@@ -90,8 +88,6 @@ const wxString ModuleFileWildcard( _( "Kicad footprint library files (*.mod)|*.m
int g_CurrentVersionPCB = 1;
int g_CurrentVersionPCB = 1;


int    g_RotationAngle;
int    g_RotationAngle;
int    g_TimeOut;            // Timer for automatic saving
int    g_SaveTime;           // Time for next saving


int    g_AnchorColor        = BLUE;
int    g_AnchorColor        = BLUE;
int    g_ModuleTextCMPColor = LIGHTGRAY;
int    g_ModuleTextCMPColor = LIGHTGRAY;
+4 −19
Original line number Original line Diff line number Diff line
/*************/
/**
/* files.cpp */
 * @file gerbview/files.cpp
/*************/
 */


#include "fctsys.h"
#include "fctsys.h"
#include "common.h"
#include "common.h"
@@ -13,9 +13,6 @@
#include "class_gerbview_layer_widget.h"
#include "class_gerbview_layer_widget.h"




/* Load a Gerber file selected from history list on current layer
 * Previous data is deleted
 */
void GERBVIEW_FRAME::OnGbrFileHistory( wxCommandEvent& event )
void GERBVIEW_FRAME::OnGbrFileHistory( wxCommandEvent& event )
{
{
    wxString fn;
    wxString fn;
@@ -29,9 +26,7 @@ void GERBVIEW_FRAME::OnGbrFileHistory( wxCommandEvent& event )
    }
    }
}
}


/* Load a Drll (Excellon) file selected from history list on current layer

 * Previous data is deleted
 */
void GERBVIEW_FRAME::OnDrlFileHistory( wxCommandEvent& event )
void GERBVIEW_FRAME::OnDrlFileHistory( wxCommandEvent& event )
{
{
    wxString fn;
    wxString fn;
@@ -180,7 +175,6 @@ bool GERBVIEW_FRAME::LoadGerberFiles( const wxString& aFullFileName )
    }
    }


    Zoom_Automatique( false );
    Zoom_Automatique( false );
    g_SaveTime = time( NULL );


    // Synchronize layers tools with actual active layer:
    // Synchronize layers tools with actual active layer:
    setActiveLayer( getActiveLayer() );
    setActiveLayer( getActiveLayer() );
@@ -265,7 +259,6 @@ bool GERBVIEW_FRAME::LoadExcellonFiles( const wxString& aFullFileName )
    }
    }


    Zoom_Automatique( false );
    Zoom_Automatique( false );
    g_SaveTime = time( NULL );


    // Synchronize layers tools with actual active layer:
    // Synchronize layers tools with actual active layer:
    setActiveLayer( getActiveLayer() );
    setActiveLayer( getActiveLayer() );
@@ -276,14 +269,6 @@ bool GERBVIEW_FRAME::LoadExcellonFiles( const wxString& aFullFileName )
}
}




/*
 * Read a DCode file (not used with RX274X files , just with RS274D old files).
 * Note: there is no standard for DCode files.
 * Just read a file format created by early versions of Pcbnew.
 * Returns:
 *   false if file not read (cancellation of order ...)
 *   true if OK
 */
bool GERBVIEW_FRAME::LoadDCodeFile( const wxString& aFullFileName )
bool GERBVIEW_FRAME::LoadDCodeFile( const wxString& aFullFileName )
{
{
    wxString   wildcard;
    wxString   wildcard;
+12 −0
Original line number Original line Diff line number Diff line
@@ -412,7 +412,19 @@ public: GERBVIEW_FRAME( wxWindow* father, const wxString& title,
                        GRTraceMode trace_mode );
                        GRTraceMode trace_mode );


    void Files_io( wxCommandEvent& event );
    void Files_io( wxCommandEvent& event );

    /**
     * Function OnGbrFileHistory
     * deletes the current data and loads a Gerber file selected from history list on
     * current layer.
     */
    void OnGbrFileHistory( wxCommandEvent& event );
    void OnGbrFileHistory( wxCommandEvent& event );

    /**
     * Function OnDrlFileHistory
     * deletes the current data and load a drill file in Excellon format selected from
     * history list on current layer.
     */
    void OnDrlFileHistory( wxCommandEvent& event );
    void OnDrlFileHistory( wxCommandEvent& event );


    /**
    /**
+3 −8
Original line number Original line Diff line number Diff line
@@ -29,8 +29,6 @@ extern int g_TabOneLayerMask[LAYER_COUNT];
/* Look up Table for conversion copper layer count -> general copper layer mask: */
/* Look up Table for conversion copper layer count -> general copper layer mask: */
extern int g_TabAllCopperLayerMask[NB_COPPER_LAYERS];
extern int g_TabAllCopperLayerMask[NB_COPPER_LAYERS];



extern wxArrayString   g_LibName_List;    // library list to load
extern DISPLAY_OPTIONS DisplayOpt;
extern DISPLAY_OPTIONS DisplayOpt;


extern wxString g_SaveFileName;
extern wxString g_SaveFileName;
@@ -44,10 +42,7 @@ extern wxString g_ViaType_Name[4];


extern int g_CurrentVersionPCB;
extern int g_CurrentVersionPCB;



extern int g_RotationAngle;
extern int g_RotationAngle;
extern int    g_TimeOut;            // Timer for automatic saving
extern int    g_SaveTime;           // Time for next saving


/// List of segments of the trace currently being drawn.
/// List of segments of the trace currently being drawn.
extern DLIST<TRACK> g_CurrentTrackList;
extern DLIST<TRACK> g_CurrentTrackList;
+5 −6
Original line number Original line Diff line number Diff line
@@ -31,10 +31,10 @@ class GENERAL_COLLECTOR;
class GENERAL_COLLECTORS_GUIDE;
class GENERAL_COLLECTORS_GUIDE;




/******************************************************************/
/**
/* class PCB_BASE_FRAME: Basic class for pcbnew and gerbview */
 * class PCB_BASE_FRAME
/******************************************************************/
 * basic PCB main window class for PCBNew, Gerbview, and CvPcb footprint viewer.

 */
class PCB_BASE_FRAME : public EDA_DRAW_FRAME
class PCB_BASE_FRAME : public EDA_DRAW_FRAME
{
{
public:
public:
@@ -84,7 +84,6 @@ public:
        return m_Pcb;
        return m_Pcb;
    }
    }



    // General
    // General
    virtual void OnCloseWindow( wxCloseEvent& Event ) = 0;
    virtual void OnCloseWindow( wxCloseEvent& Event ) = 0;
    virtual void RedrawActiveWindow( wxDC* DC, bool EraseBg ) { }
    virtual void RedrawActiveWindow( wxDC* DC, bool EraseBg ) { }
Loading