Commit 2a1b776b authored by CHARRAS's avatar CHARRAS

see changelog

parent df7e6f37
...@@ -5,6 +5,23 @@ Started 2007-June-11 ...@@ -5,6 +5,23 @@ Started 2007-June-11
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.
2008-Feb-26 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
+eeschema
changed in class DrawSheetStruct m_s member name to m_AssociatedScreen
some others minor problems solved.
some files "uncrustified"
Major problem in undo/redo when a sheet is deleted not yet solved
Only for a complex hierarchy, could lost data.
When a sheet is deleted by block delete. it is put in undo list.
It is really deleted after 10 changes (when the undo list is full).
At this time, the associated data is also deleted.
If an other (not deleted) sheet shares the same data, this data is lost.
Need work to solve this problem and keep the undo/redo feature.
2008-Feb-25 UPDATE Wayne Stambaugh <stambaughw{at}verizon{dot}net> 2008-Feb-25 UPDATE Wayne Stambaugh <stambaughw{at}verizon{dot}net>
================================================================================ ================================================================================
+eeschema +eeschema
......
...@@ -34,9 +34,6 @@ void ReAnnotatePowerSymbolsOnly( void ) ...@@ -34,9 +34,6 @@ void ReAnnotatePowerSymbolsOnly( void )
/* Build the screen list (screen, not sheet) */ /* Build the screen list (screen, not sheet) */
EDA_SheetList SheetList( NULL ); EDA_SheetList SheetList( NULL );
/* Update the screen number, sheet count and date */
//ScreenList.UpdateScreenNumberAndDate();
DrawSheetList* sheet; DrawSheetList* sheet;
int CmpNumber = 1; int CmpNumber = 1;
...@@ -161,7 +158,7 @@ void DeleteAnnotation( WinEDA_SchematicFrame* parent, bool annotateSchematic ) ...@@ -161,7 +158,7 @@ void DeleteAnnotation( WinEDA_SchematicFrame* parent, bool annotateSchematic )
sheet->DeleteAnnotation( annotateSchematic ); sheet->DeleteAnnotation( annotateSchematic );
g_RootSheet->m_s->SetModify(); g_RootSheet->m_AssociatedScreen->SetModify();
parent->DrawPanel->Refresh( true ); parent->DrawPanel->Refresh( true );
} }
...@@ -192,10 +189,11 @@ void AnnotateComponents( WinEDA_SchematicFrame* parent, ...@@ -192,10 +189,11 @@ void AnnotateComponents( WinEDA_SchematicFrame* parent,
/* Build the sheet list */ /* Build the sheet list */
EDA_SheetList SheetList( g_RootSheet ); EDA_SheetList SheetList( g_RootSheet );
/* Update the sheet number */ /* Update the screen number, sheet count and date */
ii = 0; SheetList.UpdateSheetNumberAndDate();
/* First pass: Component counting */ /* First pass: Component counting */
ii = 0;
sheet = parent->GetSheet(); sheet = parent->GetSheet();
if( annotateSchematic ) if( annotateSchematic )
{ {
...@@ -595,7 +593,7 @@ int CheckAnnotate( WinEDA_SchematicFrame* frame, bool oneSheetOnly ) ...@@ -595,7 +593,7 @@ int CheckAnnotate( WinEDA_SchematicFrame* frame, bool oneSheetOnly )
/* build the screen list */ /* build the screen list */
EDA_SheetList SheetList( NULL ); EDA_SheetList SheetList( NULL );
g_RootSheet->m_s->SetModify(); g_RootSheet->m_AssociatedScreen->SetModify();
ii = 0; ii = 0;
/* first pass : count composents */ /* first pass : count composents */
......
...@@ -258,7 +258,7 @@ void WinEDA_AnnotateFrame::OnClear( wxCommandEvent& event ) ...@@ -258,7 +258,7 @@ void WinEDA_AnnotateFrame::OnClear( wxCommandEvent& event )
message += _( "\n\nThis operation will clear the existing annotation " \ message += _( "\n\nThis operation will clear the existing annotation " \
"and cannot be undone." ); "and cannot be undone." );
response = wxMessageBox( message, _( "" ), response = wxMessageBox( message, wxT( "" ),
wxICON_EXCLAMATION | wxOK | wxCANCEL ); wxICON_EXCLAMATION | wxOK | wxCANCEL );
if (response == wxCANCEL) if (response == wxCANCEL)
return; return;
...@@ -283,7 +283,7 @@ void WinEDA_AnnotateFrame::OnApply( wxCommandEvent& event ) ...@@ -283,7 +283,7 @@ void WinEDA_AnnotateFrame::OnApply( wxCommandEvent& event )
message += _( "\n\nThis operation will change the current annotation and " \ message += _( "\n\nThis operation will change the current annotation and " \
"cannot be undone." ); "cannot be undone." );
response = wxMessageBox( message, _( "" ), response = wxMessageBox( message, wxT( "" ),
wxICON_EXCLAMATION | wxOK | wxCANCEL ); wxICON_EXCLAMATION | wxOK | wxCANCEL );
if (response == wxCANCEL) if (response == wxCANCEL)
return; return;
......
...@@ -832,12 +832,12 @@ static EDA_BaseStruct* CopyStruct( WinEDA_DrawPanel* panel, wxDC* DC, BASE_SCREE ...@@ -832,12 +832,12 @@ static EDA_BaseStruct* CopyStruct( WinEDA_DrawPanel* panel, wxDC* DC, BASE_SCREE
case DRAW_SHEET_STRUCT_TYPE: case DRAW_SHEET_STRUCT_TYPE:
{ {
//DuplicateStruct calls GenCopy, which should handle //DuplicateStruct calls GenCopy, which should handle
//m_s and m_sRefCount properly. //m_AssociatedScreen and m_sRefCount properly.
DrawSheetStruct* sheet = (DrawSheetStruct*) Struct; DrawSheetStruct* sheet = (DrawSheetStruct*) Struct;
sheet->m_TimeStamp = GetTimeStamp(); sheet->m_TimeStamp = GetTimeStamp();
//sheet->m_s->m_UndoList = NULL; //sheet->m_AssociatedScreen->m_UndoList = NULL;
//sheet->m_s->m_RedoList = NULL; //sheet->m_AssociatedScreen->m_RedoList = NULL;
//keep m_s pointer & associated. //keep m_AssociatedScreen pointer & associated.
//sheet->m_Son = NULL; m_son is involved in undo and redo. //sheet->m_Son = NULL; m_son is involved in undo and redo.
break; break;
} }
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
/***********************************************************/ /***********************************************************/
DrawSheetStruct::DrawSheetStruct( const wxPoint& pos ) : DrawSheetStruct::DrawSheetStruct( const wxPoint& pos ) :
EDA_BaseStruct( DRAW_SHEET_STRUCT_TYPE ) EDA_BaseStruct( DRAW_SHEET_STRUCT_TYPE )
/***********************************************************/ /***********************************************************/
{ {
m_Label = NULL; m_Label = NULL;
...@@ -43,9 +43,12 @@ DrawSheetStruct::DrawSheetStruct( const wxPoint& pos ) : ...@@ -43,9 +43,12 @@ DrawSheetStruct::DrawSheetStruct( const wxPoint& pos ) :
m_Layer = LAYER_SHEET; m_Layer = LAYER_SHEET;
m_Pos = pos; m_Pos = pos;
m_SheetNameSize = m_FileNameSize = 60; m_SheetNameSize = m_FileNameSize = 60;
m_s = NULL; m_AssociatedScreen = NULL;
m_SheetName = wxT("Root"); m_SheetName = wxT( "Root" );
m_FileName = wxT(" "); m_FileName = wxT( " " );
m_SheetNumber = 1;
m_NumberOfSheets = 1;
} }
...@@ -54,21 +57,25 @@ DrawSheetStruct::~DrawSheetStruct() ...@@ -54,21 +57,25 @@ DrawSheetStruct::~DrawSheetStruct()
/**************************************/ /**************************************/
{ {
DrawSheetLabelStruct* label = m_Label, * next_label; DrawSheetLabelStruct* label = m_Label, * next_label;
while( label ){
while( label )
{
next_label = (DrawSheetLabelStruct*) label->Pnext; next_label = (DrawSheetLabelStruct*) label->Pnext;
delete label; delete label;
label = next_label; label = next_label;
} }
//also, look at the associated sheet & its reference count //also, look at the associated sheet & its reference count
//perhaps it should be deleted also. //perhaps it should be deleted also.
if(m_s){ if( m_AssociatedScreen )
m_s->m_RefCount--; {
if(m_s->m_RefCount == 0) m_AssociatedScreen->m_RefCount--;
delete m_s; if( m_AssociatedScreen->m_RefCount == 0 )
} delete m_AssociatedScreen;
}
} }
/***********************************************/ /***********************************************/
DrawSheetStruct* DrawSheetStruct::GenCopy() DrawSheetStruct* DrawSheetStruct::GenCopy()
/***********************************************/ /***********************************************/
...@@ -88,11 +95,11 @@ DrawSheetStruct* DrawSheetStruct::GenCopy() ...@@ -88,11 +95,11 @@ DrawSheetStruct* DrawSheetStruct::GenCopy()
newitem->m_FileNameSize = m_FileNameSize; newitem->m_FileNameSize = m_FileNameSize;
newitem->m_SheetName = m_SheetName; newitem->m_SheetName = m_SheetName;
newitem->m_SheetNameSize = m_SheetNameSize; newitem->m_SheetNameSize = m_SheetNameSize;
newitem->m_Label = NULL; newitem->m_Label = NULL;
DrawSheetLabelStruct* Slabel = NULL, *label = m_Label; DrawSheetLabelStruct* Slabel = NULL, * label = m_Label;
if( label ) if( label )
{ {
Slabel = newitem->m_Label = label->GenCopy(); Slabel = newitem->m_Label = label->GenCopy();
...@@ -108,11 +115,11 @@ DrawSheetStruct* DrawSheetStruct::GenCopy() ...@@ -108,11 +115,11 @@ DrawSheetStruct* DrawSheetStruct::GenCopy()
label = (DrawSheetLabelStruct*) label->Pnext; label = (DrawSheetLabelStruct*) label->Pnext;
} }
/* don't copy screen data - just reference it. */ /* don't copy screen data - just reference it. */
newitem->m_s = m_s; newitem->m_AssociatedScreen = m_AssociatedScreen;
if(m_s) if( m_AssociatedScreen )
m_s->m_RefCount++; m_AssociatedScreen->m_RefCount++;
return newitem; return newitem;
} }
...@@ -120,6 +127,7 @@ DrawSheetStruct* DrawSheetStruct::GenCopy() ...@@ -120,6 +127,7 @@ DrawSheetStruct* DrawSheetStruct::GenCopy()
/**********************************************************/ /**********************************************************/
void DrawSheetStruct::SwapData( DrawSheetStruct* copyitem ) void DrawSheetStruct::SwapData( DrawSheetStruct* copyitem )
/**********************************************************/ /**********************************************************/
/* Used if undo / redo command: /* Used if undo / redo command:
* swap data between this and copyitem * swap data between this and copyitem
*/ */
...@@ -132,65 +140,71 @@ void DrawSheetStruct::SwapData( DrawSheetStruct* copyitem ) ...@@ -132,65 +140,71 @@ void DrawSheetStruct::SwapData( DrawSheetStruct* copyitem )
EXCHG( m_Label, copyitem->m_Label ); EXCHG( m_Label, copyitem->m_Label );
EXCHG( m_NbLabel, copyitem->m_NbLabel ); EXCHG( m_NbLabel, copyitem->m_NbLabel );
} }
/****************************************************************/ /****************************************************************/
void DrawSheetStruct::Place( WinEDA_DrawFrame* frame, wxDC* DC ) void DrawSheetStruct::Place( WinEDA_DrawFrame* frame, wxDC* DC )
/****************************************************************/ /****************************************************************/
{ {
/* Placement en liste des structures si nouveau composant:*/ /* Placement en liste des structures si nouveau composant:*/
if( m_Flags & IS_NEW ) if( m_Flags & IS_NEW )
{ {
if( !( (WinEDA_SchematicFrame*) frame )->EditSheet( this, DC ) ) if( !( (WinEDA_SchematicFrame*) frame )->EditSheet( this, DC ) )
{ {
frame->GetScreen()->SetCurItem( NULL ); frame->GetScreen()->SetCurItem( NULL );
frame->DrawPanel->ManageCurseur = NULL; frame->DrawPanel->ManageCurseur = NULL;
frame->DrawPanel->ForceCloseManageCurseur = NULL; frame->DrawPanel->ForceCloseManageCurseur = NULL;
RedrawOneStruct( frame->DrawPanel, DC, this, g_XorMode ); RedrawOneStruct( frame->DrawPanel, DC, this, g_XorMode );
delete this; delete this;
return; return;
} }
} }
EDA_BaseStruct::Place( frame, DC ); //puts it on the EEDrawList. EDA_BaseStruct::Place( frame, DC ); //puts it on the EEDrawList.
} }
/********************************************************************/ /********************************************************************/
void DrawSheetStruct::CleanupSheet( WinEDA_SchematicFrame* frame, wxDC* DC ) void DrawSheetStruct::CleanupSheet( WinEDA_SchematicFrame* frame, wxDC* DC )
/********************************************************************/ /********************************************************************/
/* Delete pinsheets which are not corresponding to a hierarchal label /* Delete pinsheets which are not corresponding to a hierarchal label
* if DC != NULL, redraw Sheet * if DC != NULL, redraw Sheet
*/ */
{ {
DrawSheetLabelStruct* Pinsheet, * NextPinsheet; DrawSheetLabelStruct* Pinsheet, * NextPinsheet;
if( !IsOK( frame, _( "Ok to cleanup this sheet" ) ) ) if( !IsOK( frame, _( "Ok to cleanup this sheet" ) ) )
return; return;
Pinsheet = m_Label; Pinsheet = m_Label;
while( Pinsheet ) while( Pinsheet )
{ {
/* Search Hlabel corresponding to this Pinsheet */ /* Search Hlabel corresponding to this Pinsheet */
EDA_BaseStruct* DrawStruct = m_s->EEDrawList; EDA_BaseStruct* DrawStruct = m_AssociatedScreen->EEDrawList;
DrawHierLabelStruct* HLabel = NULL; DrawHierLabelStruct* HLabel = NULL;
for( ; DrawStruct != NULL; DrawStruct = DrawStruct->Pnext ) for( ; DrawStruct != NULL; DrawStruct = DrawStruct->Pnext )
{ {
if( DrawStruct->Type() != DRAW_HIER_LABEL_STRUCT_TYPE ) if( DrawStruct->Type() != DRAW_HIER_LABEL_STRUCT_TYPE )
continue; continue;
HLabel = (DrawHierLabelStruct*) DrawStruct; HLabel = (DrawHierLabelStruct*) DrawStruct;
if( Pinsheet->m_Text.CmpNoCase( HLabel->m_Text ) == 0 ) if( Pinsheet->m_Text.CmpNoCase( HLabel->m_Text ) == 0 )
break; // Found! break; // Found!
HLabel = NULL; HLabel = NULL;
} }
NextPinsheet = (DrawSheetLabelStruct*) Pinsheet->Pnext; NextPinsheet = (DrawSheetLabelStruct*) Pinsheet->Pnext;
if( HLabel == NULL ) // Hlabel not found: delete pinsheet if( HLabel == NULL ) // Hlabel not found: delete pinsheet
{ {
frame->GetScreen()->SetModify(); frame->GetScreen()->SetModify();
frame->DeleteSheetLabel( DC, Pinsheet ); frame->DeleteSheetLabel( DC, Pinsheet );
} }
Pinsheet = NextPinsheet; Pinsheet = NextPinsheet;
} }
} }
/**************************************************************************************/ /**************************************************************************************/
void DrawSheetStruct::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, void DrawSheetStruct::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset,
int DrawMode, int Color ) int DrawMode, int Color )
...@@ -247,143 +261,183 @@ void DrawSheetStruct::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& of ...@@ -247,143 +261,183 @@ void DrawSheetStruct::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& of
} }
} }
/**************************************************************************************/ /**************************************************************************************/
void DrawSheetStruct::DeleteAnnotation( bool recurse ) void DrawSheetStruct::DeleteAnnotation( bool recurse )
/**************************************************************************************/ /**************************************************************************************/
{ {
if(recurse && m_s){ if( recurse && m_AssociatedScreen )
EDA_BaseStruct* strct = m_s->EEDrawList; {
for(; strct; strct = strct->Pnext){ EDA_BaseStruct* strct = m_AssociatedScreen->EEDrawList;
if(strct->Type() == DRAW_SHEET_STRUCT_TYPE){ for( ; strct; strct = strct->Pnext )
DrawSheetStruct* sheet = (DrawSheetStruct*)strct; {
sheet->DeleteAnnotation(recurse); if( strct->Type() == DRAW_SHEET_STRUCT_TYPE )
} {
} DrawSheetStruct* sheet = (DrawSheetStruct*) strct;
} sheet->DeleteAnnotation( recurse );
EDA_BaseStruct* comp = m_s->EEDrawList; }
for( ; comp ; comp = comp->Pnext ){ }
if(comp->Type() == DRAW_LIB_ITEM_STRUCT_TYPE ){ }
((EDA_SchComponentStruct*)comp)->ClearAnnotation(); EDA_BaseStruct* comp = m_AssociatedScreen->EEDrawList;
} for( ; comp; comp = comp->Pnext )
} {
if( comp->Type() == DRAW_LIB_ITEM_STRUCT_TYPE )
{
( (EDA_SchComponentStruct*) comp )->ClearAnnotation();
}
}
} }
/*******************************************************************/ /*******************************************************************/
int DrawSheetStruct::ComponentCount( ) int DrawSheetStruct::ComponentCount()
/*******************************************************************/ /*******************************************************************/
{ {
//count our own components, without the power components. //count our own components, without the power components.
/* Routine retournant le nombre de composants dans le schema,
* powers non comprises */ /* Routine retournant le nombre de composants dans le schema,
int n = 0; * powers non comprises */
if(m_s){ int n = 0;
EDA_BaseStruct* bs;
for( bs = m_s->EEDrawList; bs != NULL; bs = bs->Pnext ){ if( m_AssociatedScreen )
if( bs->Type() == DRAW_LIB_ITEM_STRUCT_TYPE ){ {
DrawPartStruct* Cmp = (DrawPartStruct*) bs; EDA_BaseStruct* bs;
if( Cmp->m_Field[VALUE].m_Text.GetChar( 0 ) != '#' ) for( bs = m_AssociatedScreen->EEDrawList; bs != NULL; bs = bs->Pnext )
n++; {
} if( bs->Type() == DRAW_LIB_ITEM_STRUCT_TYPE )
if(bs->Type() == DRAW_SHEET_STRUCT_TYPE){ {
DrawSheetStruct* sheet = (DrawSheetStruct*)bs; DrawPartStruct* Cmp = (DrawPartStruct*) bs;
n += sheet->ComponentCount(); if( Cmp->m_Field[VALUE].m_Text.GetChar( 0 ) != '#' )
} n++;
} }
} if( bs->Type() == DRAW_SHEET_STRUCT_TYPE )
return n; {
DrawSheetStruct* sheet = (DrawSheetStruct*) bs;
n += sheet->ComponentCount();
}
}
}
return n;
} }
/*******************************************************************************/ /*******************************************************************************/
bool DrawSheetStruct::SearchHierarchy(wxString filename, SCH_SCREEN **screen) bool DrawSheetStruct::SearchHierarchy( wxString filename, SCH_SCREEN** screen )
/*******************************************************************************/ /*******************************************************************************/
{ {
//search the existing hierarchy for an instance of screen "FileName". //search the existing hierarchy for an instance of screen "FileName".
if(m_s){ if( m_AssociatedScreen )
EDA_BaseStruct* strct = m_s->EEDrawList; {
while(strct){ EDA_BaseStruct* strct = m_AssociatedScreen->EEDrawList;
if(strct->Type() == DRAW_SHEET_STRUCT_TYPE){ while( strct )
DrawSheetStruct* ss = (DrawSheetStruct*)strct; {
if(ss->m_s && ss->m_s->m_FileName.CmpNoCase(filename) == 0){ if( strct->Type() == DRAW_SHEET_STRUCT_TYPE )
*screen = ss->m_s; {
return true; DrawSheetStruct* ss = (DrawSheetStruct*) strct;
} if( ss->m_AssociatedScreen && ss->m_AssociatedScreen->m_FileName.CmpNoCase( filename ) == 0 )
if(ss->SearchHierarchy(filename, screen)) {
return true; *screen = ss->m_AssociatedScreen;
} return true;
strct = strct->Pnext; }
} if( ss->SearchHierarchy( filename, screen ) )
} return true;
return false; }
strct = strct->Pnext;
}
}
return false;
} }
/*******************************************************************************/ /*******************************************************************************/
bool DrawSheetStruct::LocatePathOfScreen(SCH_SCREEN *screen, DrawSheetList* list) bool DrawSheetStruct::LocatePathOfScreen( SCH_SCREEN* screen, DrawSheetList* list )
/*******************************************************************************/ /*******************************************************************************/
{ {
//search the existing hierarchy for an instance of screen "FileName". //search the existing hierarchy for an instance of screen "FileName".
//don't bother looking at the root sheet - it must be unique, //don't bother looking at the root sheet - it must be unique,
//no other references to its m_s otherwise there would be loops //no other references to its m_s otherwise there would be loops
//in the heirarchy. //in the heirarchy.
//search the existing hierarchy for an instance of screen "FileName". //search the existing hierarchy for an instance of screen "FileName".
if(m_s){ if( m_AssociatedScreen )
list->Push(this); {
if(m_s == screen) list->Push( this );
return true; if( m_AssociatedScreen == screen )
EDA_BaseStruct* strct = m_s->EEDrawList; return true;
while(strct){ EDA_BaseStruct* strct = m_AssociatedScreen->EEDrawList;
if(strct->Type() == DRAW_SHEET_STRUCT_TYPE){ while( strct )
DrawSheetStruct* ss = (DrawSheetStruct*)strct; {
if(ss->LocatePathOfScreen(screen, list)) if( strct->Type() == DRAW_SHEET_STRUCT_TYPE )
return true; {
} DrawSheetStruct* ss = (DrawSheetStruct*) strct;
strct = strct->Pnext; if( ss->LocatePathOfScreen( screen, list ) )
} return true;
list->Pop(); }
} strct = strct->Pnext;
return false; }
list->Pop();
}
return false;
} }
/*******************************************************************************/ /*******************************************************************************/
bool DrawSheetStruct::Load(WinEDA_SchematicFrame* frame) bool DrawSheetStruct::Load( WinEDA_SchematicFrame* frame )
/*******************************************************************************/ /*******************************************************************************/
{ {
if(!m_s){ if( !m_AssociatedScreen )
SCH_SCREEN* screen = NULL; {
g_RootSheet->SearchHierarchy(m_FileName, &screen); SCH_SCREEN* screen = NULL;
if(screen){ g_RootSheet->SearchHierarchy( m_FileName, &screen );
m_s = screen; if( screen )
m_s->m_RefCount++; {
//do not need to load the sub-sheets - this has already been done. m_AssociatedScreen = screen;
}else{ m_AssociatedScreen->m_RefCount++;
m_s = new SCH_SCREEN(SCHEMATIC_FRAME);
m_s->m_RefCount++; //do not need to load the sub-sheets - this has already been done.
if(!frame->LoadOneEEFile(m_s, m_FileName)) }
return false; else
EDA_BaseStruct* bs = m_s->EEDrawList; {
while(bs){ m_AssociatedScreen = new SCH_SCREEN( SCHEMATIC_FRAME );
if(bs->Type() == DRAW_SHEET_STRUCT_TYPE){ m_AssociatedScreen->m_RefCount++;
DrawSheetStruct* ss = (DrawSheetStruct*)bs; if( !frame->LoadOneEEFile( m_AssociatedScreen, m_FileName ) )
if(!ss->Load(frame)) return false;
return false; EDA_BaseStruct* bs = m_AssociatedScreen->EEDrawList;
} while( bs )
bs = bs->Pnext; {
} if( bs->Type() == DRAW_SHEET_STRUCT_TYPE )
} {
} DrawSheetStruct* ss = (DrawSheetStruct*) bs;
return true; if( !ss->Load( frame ) )
return false;
}
bs = bs->Pnext;
}
}
}
return true;
} }
/*******************************************************************************/ /*******************************************************************************/
int DrawSheetStruct::CountSheets() int DrawSheetStruct::CountSheets()
/*******************************************************************************/ /*******************************************************************************/
{ {
int count = 1; //1 = this!! int count = 1; //1 = this!!
if(m_s){
EDA_BaseStruct* strct = m_s->EEDrawList; if( m_AssociatedScreen )
for(; strct; strct = strct->Pnext){ {
if(strct->Type() == DRAW_SHEET_STRUCT_TYPE){ EDA_BaseStruct* strct = m_AssociatedScreen->EEDrawList;
DrawSheetStruct* ss = (DrawSheetStruct*)strct; for( ; strct; strct = strct->Pnext )
count += ss->CountSheets(); {
} if( strct->Type() == DRAW_SHEET_STRUCT_TYPE )
} {
} DrawSheetStruct* ss = (DrawSheetStruct*) strct;
return count; count += ss->CountSheets();
}
}
}
return count;
} }
...@@ -394,8 +448,8 @@ int DrawSheetStruct::CountSheets() ...@@ -394,8 +448,8 @@ int DrawSheetStruct::CountSheets()
/*******************************************************************/ /*******************************************************************/
DrawSheetLabelStruct::DrawSheetLabelStruct( DrawSheetStruct* parent, DrawSheetLabelStruct::DrawSheetLabelStruct( DrawSheetStruct* parent,
const wxPoint& pos, const wxString& text ) : const wxPoint& pos, const wxString& text ) :
EDA_BaseStruct( DRAW_SHEETLABEL_STRUCT_TYPE ), EDA_BaseStruct( DRAW_SHEETLABEL_STRUCT_TYPE )
EDA_TextStruct( text ) , EDA_TextStruct( text )
/*******************************************************************/ /*******************************************************************/
{ {
m_Layer = LAYER_SHEETLABEL; m_Layer = LAYER_SHEETLABEL;
...@@ -511,115 +565,179 @@ void DrawSheetLabelStruct::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoin ...@@ -511,115 +565,179 @@ void DrawSheetLabelStruct::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoin
GRPoly( &panel->m_ClipBox, DC, NbSegm, coord, FillShape, LineWidth, txtcolor, txtcolor ); /* Poly Non rempli */ GRPoly( &panel->m_ClipBox, DC, NbSegm, coord, FillShape, LineWidth, txtcolor, txtcolor ); /* Poly Non rempli */
} }
/**********************************************/ /**********************************************/
/* class to handle a series of sheets *********/ /* class to handle a series of sheets *********/
/* a 'path' so to speak.. *********************/ /* a 'path' so to speak.. *********************/
/**********************************************/ /**********************************************/
DrawSheetList::DrawSheetList(){ DrawSheetList::DrawSheetList()
for(int i=0; i<DSLSZ ; i++) {
m_sheets[i] = NULL; for( int i = 0; i<DSLSZ; i++ )
m_numSheets = 0; m_sheets[i] = NULL;
m_numSheets = 0;
} }
int DrawSheetList::Cmp(DrawSheetList& d){
if(m_numSheets > d.m_numSheets)
return 1; int DrawSheetList::Cmp( DrawSheetList& d )
if(m_numSheets < d.m_numSheets) {
return -1; if( m_numSheets > d.m_numSheets )
//otherwise, same number of sheets. return 1;
for(int i=0; i<m_numSheets; i++){ if( m_numSheets < d.m_numSheets )
if(m_sheets[i]->m_TimeStamp > d.m_sheets[i]->m_TimeStamp) return -1;
return 1;
if(m_sheets[i]->m_TimeStamp < d.m_sheets[i]->m_TimeStamp) //otherwise, same number of sheets.
return -1; for( int i = 0; i<m_numSheets; i++ )
} {
return 0; if( m_sheets[i]->m_TimeStamp > d.m_sheets[i]->m_TimeStamp )
return 1;
if( m_sheets[i]->m_TimeStamp < d.m_sheets[i]->m_TimeStamp )
return -1;
}
return 0;
} }
DrawSheetStruct* DrawSheetList::Last(){
if(m_numSheets)
return m_sheets[m_numSheets-1]; DrawSheetStruct* DrawSheetList::Last()
return NULL; {
if( m_numSheets )
return m_sheets[m_numSheets - 1];
return NULL;
} }
SCH_SCREEN* DrawSheetList::LastScreen(){
if(m_numSheets)
return m_sheets[m_numSheets-1]->m_s; SCH_SCREEN* DrawSheetList::LastScreen()
return NULL; {
if( m_numSheets )
return m_sheets[m_numSheets - 1]->m_AssociatedScreen;
return NULL;
} }
EDA_BaseStruct* DrawSheetList::LastDrawList(){
if(m_numSheets && m_sheets[m_numSheets-1]->m_s)
return m_sheets[m_numSheets-1]->m_s->EEDrawList; EDA_BaseStruct* DrawSheetList::LastDrawList()
return NULL; {
if( m_numSheets && m_sheets[m_numSheets - 1]->m_AssociatedScreen )
return m_sheets[m_numSheets - 1]->m_AssociatedScreen->EEDrawList;
return NULL;
} }
void DrawSheetList::Push(DrawSheetStruct* sheet){
if(m_numSheets < DSLSZ){
m_sheets[m_numSheets] = sheet; void DrawSheetList::Push( DrawSheetStruct* sheet )
m_numSheets++; {
} if( m_numSheets < DSLSZ )
{
m_sheets[m_numSheets] = sheet;
m_numSheets++;
}
} }
DrawSheetStruct* DrawSheetList::Pop(){
if(m_numSheets > 0){
m_numSheets --; DrawSheetStruct* DrawSheetList::Pop()
return m_sheets[m_numSheets]; {
} if( m_numSheets > 0 )
return NULL; {
m_numSheets--;
return m_sheets[m_numSheets];
}
return NULL;
} }
wxString DrawSheetList::Path(){
wxString s, t;
s = wxT("/"); wxString DrawSheetList::Path()
//start at 1 to avoid the root sheet, {
//which does not need to be added to the path wxString s, t;
//it's timestamp changes anyway.
for(int i=1; i< m_numSheets; i++){ s = wxT( "/" );
t.Printf(_("%8.8lX/"), m_sheets[i]->m_TimeStamp);
s = s + t; //start at 1 to avoid the root sheet,
} //which does not need to be added to the path
return s; //it's timestamp changes anyway.
for( int i = 1; i< m_numSheets; i++ )
{
t.Printf( _( "%8.8lX/" ), m_sheets[i]->m_TimeStamp );
s = s + t;
}
return s;
} }
wxString DrawSheetList::PathHumanReadable(){
wxString s, t;
s = wxT("/"); wxString DrawSheetList::PathHumanReadable()
//start at 1 to avoid the root sheet, as above. {
for(int i=1; i< m_numSheets; i++){ wxString s, t;
s = s + m_sheets[i]->m_SheetName + wxT("/");
} s = wxT( "/" );
return s;
//start at 1 to avoid the root sheet, as above.
for( int i = 1; i< m_numSheets; i++ )
{
s = s + m_sheets[i]->m_SheetName + wxT( "/" );
}
return s;
} }
void DrawSheetList::UpdateAllScreenReferences(){
EDA_BaseStruct* t = LastDrawList();
while(t){ void DrawSheetList::UpdateAllScreenReferences()
if(t->Type() == DRAW_LIB_ITEM_STRUCT_TYPE){ {
EDA_SchComponentStruct* d = (EDA_SchComponentStruct*)t; EDA_BaseStruct* t = LastDrawList();
d->m_Field[REFERENCE].m_Text = d->GetRef(this);
} while( t )
t = t->Pnext; {
} if( t->Type() == DRAW_LIB_ITEM_STRUCT_TYPE )
printf( "on sheet: %s \n", CONV_TO_UTF8(PathHumanReadable()) ); {
EDA_SchComponentStruct* d = (EDA_SchComponentStruct*) t;
d->m_Field[REFERENCE].m_Text = d->GetRef( this );
}
t = t->Pnext;
}
printf( "on sheet: %s \n", CONV_TO_UTF8( PathHumanReadable() ) );
} }
bool DrawSheetList::operator= (const DrawSheetList& d1){
m_numSheets = d1.m_numSheets;
int i; bool DrawSheetList::operator=( const DrawSheetList& d1 )
for(i=0; i<m_numSheets; i++){ {
m_sheets[i] = d1.m_sheets[i]; m_numSheets = d1.m_numSheets;
} int i;
for(; i<DSLSZ; i++){ for( i = 0; i<m_numSheets; i++ )
m_sheets[i] = 0; {
} m_sheets[i] = d1.m_sheets[i];
return true; }
for( ; i<DSLSZ; i++ )
{
m_sheets[i] = 0;
}
return true;
} }
bool DrawSheetList::operator==(const DrawSheetList &d1){
if(m_numSheets != d1.m_numSheets)
return false; bool DrawSheetList::operator==( const DrawSheetList& d1 )
for(int i=0; i<m_numSheets; i++){ {
if(m_sheets[i] != d1.m_sheets[i]) if( m_numSheets != d1.m_numSheets )
return false; return false;
} for( int i = 0; i<m_numSheets; i++ )
return true; {
if( m_sheets[i] != d1.m_sheets[i] )
return false;
}
return true;
} }
bool DrawSheetList::operator!=(const DrawSheetList &d1){
if(m_numSheets != d1.m_numSheets)
return true; bool DrawSheetList::operator!=( const DrawSheetList& d1 )
for(int i=0; i<m_numSheets; i++){ {
if(m_sheets[i] != d1.m_sheets[i]) if( m_numSheets != d1.m_numSheets )
return true; return true;
} for( int i = 0; i<m_numSheets; i++ )
return false; {
if( m_sheets[i] != d1.m_sheets[i] )
return true;
}
return false;
} }
...@@ -20,7 +20,7 @@ void SetStructFather( EDA_BaseStruct* Struct, BASE_SCREEN* Screen ) ...@@ -20,7 +20,7 @@ void SetStructFather( EDA_BaseStruct* Struct, BASE_SCREEN* Screen )
case DRAW_TEXT_STRUCT_TYPE: case DRAW_TEXT_STRUCT_TYPE:
case DRAW_LABEL_STRUCT_TYPE: case DRAW_LABEL_STRUCT_TYPE:
case DRAW_GLOBAL_LABEL_STRUCT_TYPE: case DRAW_GLOBAL_LABEL_STRUCT_TYPE:
case DRAW_HIER_LABEL_STRUCT_TYPE: case DRAW_HIER_LABEL_STRUCT_TYPE:
case DRAW_LIB_ITEM_STRUCT_TYPE: case DRAW_LIB_ITEM_STRUCT_TYPE:
case DRAW_SEGMENT_STRUCT_TYPE: case DRAW_SEGMENT_STRUCT_TYPE:
case DRAW_BUSENTRY_STRUCT_TYPE: case DRAW_BUSENTRY_STRUCT_TYPE:
...@@ -51,9 +51,9 @@ void EDA_BaseStruct::Place( WinEDA_DrawFrame* frame, wxDC* DC ) ...@@ -51,9 +51,9 @@ void EDA_BaseStruct::Place( WinEDA_DrawFrame* frame, wxDC* DC )
{ {
if( m_Flags & IS_NEW ) if( m_Flags & IS_NEW )
{ {
SCH_SCREEN* screen = (SCH_SCREEN*)frame->GetScreen(); SCH_SCREEN* screen = (SCH_SCREEN*) frame->GetScreen();
if(!screen->CheckIfOnDrawList(this)) //don't want a loop! if( !screen->CheckIfOnDrawList( this ) ) //don't want a loop!
screen->AddToDrawList(this); screen->AddToDrawList( this );
g_ItemToRepeat = this; g_ItemToRepeat = this;
if( frame->m_Ident == SCHEMATIC_FRAME ) if( frame->m_Ident == SCHEMATIC_FRAME )
( (WinEDA_SchematicFrame*) frame )->SaveCopyInUndoList( this, IS_NEW ); ( (WinEDA_SchematicFrame*) frame )->SaveCopyInUndoList( this, IS_NEW );
...@@ -80,7 +80,7 @@ void EDA_BaseStruct::Place( WinEDA_DrawFrame* frame, wxDC* DC ) ...@@ -80,7 +80,7 @@ void EDA_BaseStruct::Place( WinEDA_DrawFrame* frame, wxDC* DC )
static int table_zoom[] = { 1, 2, 4, 8, 16, 32, 64, 128, 0 }; /* Valeurs standards du zoom */ static int table_zoom[] = { 1, 2, 4, 8, 16, 32, 64, 128, 0 }; /* Valeurs standards du zoom */
/* Constructeur de SCREEN */ /* Constructeur de SCREEN */
SCH_SCREEN::SCH_SCREEN( int screentype, KICAD_T aType ) : SCH_SCREEN::SCH_SCREEN( int screentype, KICAD_T aType ) :
BASE_SCREEN( screentype, aType ) BASE_SCREEN( screentype, aType )
{ {
EEDrawList = NULL; /* Schematic items list */ EEDrawList = NULL; /* Schematic items list */
...@@ -89,9 +89,9 @@ SCH_SCREEN::SCH_SCREEN( int screentype, KICAD_T aType ) : ...@@ -89,9 +89,9 @@ SCH_SCREEN::SCH_SCREEN( int screentype, KICAD_T aType ) :
SetZoomList( table_zoom ); SetZoomList( table_zoom );
SetGridList( g_GridList ); SetGridList( g_GridList );
m_UndoRedoCountMax = 10; m_UndoRedoCountMax = 10;
m_RefCount = 0; m_RefCount = 0;
m_ScreenNumber = 1; m_ScreenNumber = 1;
m_NumberOfScreen = 1; m_NumberOfScreen = 1;
} }
...@@ -117,9 +117,10 @@ void SCH_SCREEN::FreeDrawList() ...@@ -117,9 +117,10 @@ void SCH_SCREEN::FreeDrawList()
{ {
DrawStruct = EEDrawList; DrawStruct = EEDrawList;
EEDrawList = EEDrawList->Pnext; EEDrawList = EEDrawList->Pnext;
SAFE_DELETE(DrawStruct); SAFE_DELETE( DrawStruct );
} }
EEDrawList = NULL;
EEDrawList = NULL;
} }
...@@ -147,26 +148,34 @@ void SCH_SCREEN::RemoveFromDrawList( EDA_BaseStruct* DrawStruct ) ...@@ -147,26 +148,34 @@ void SCH_SCREEN::RemoveFromDrawList( EDA_BaseStruct* DrawStruct )
} }
} }
} }
/**************************************************************/ /**************************************************************/
bool SCH_SCREEN::CheckIfOnDrawList( EDA_BaseStruct* st ) bool SCH_SCREEN::CheckIfOnDrawList( EDA_BaseStruct* st )
/**************************************************************/ /**************************************************************/
{ {
EDA_BaseStruct* DrawList = EEDrawList; EDA_BaseStruct* DrawList = EEDrawList;
while( DrawList ){
if( DrawList == st) while( DrawList )
return true; {
DrawList = DrawList->Pnext; if( DrawList == st )
} return true;
return false; DrawList = DrawList->Pnext;
}
return false;
} }
/**************************************************************/ /**************************************************************/
void SCH_SCREEN::AddToDrawList( EDA_BaseStruct* st ) void SCH_SCREEN::AddToDrawList( EDA_BaseStruct* st )
/**************************************************************/ /**************************************************************/
{ //simple function to add to the head of the drawlist. { //simple function to add to the head of the drawlist.
st->Pnext = EEDrawList; st->Pnext = EEDrawList;
EEDrawList = st; EEDrawList = st;
} }
/*********************************************************************/ /*********************************************************************/
/* Class EDA_ScreenList to handle the list of screens in a hierarchy */ /* Class EDA_ScreenList to handle the list of screens in a hierarchy */
/*********************************************************************/ /*********************************************************************/
...@@ -176,18 +185,19 @@ SCH_SCREEN* EDA_ScreenList::GetFirst() ...@@ -176,18 +185,19 @@ SCH_SCREEN* EDA_ScreenList::GetFirst()
/*****************************************/ /*****************************************/
{ {
m_Index = 0; m_Index = 0;
if(m_List.GetCount() > 0) if( m_List.GetCount() > 0 )
return m_List[0]; return m_List[0];
return NULL; return NULL;
} }
/*****************************************/ /*****************************************/
SCH_SCREEN* EDA_ScreenList::GetNext() SCH_SCREEN* EDA_ScreenList::GetNext()
/*****************************************/ /*****************************************/
{ {
if( m_Index < m_List.GetCount() ) if( m_Index < m_List.GetCount() )
m_Index++; m_Index++;
return GetScreen(m_Index); return GetScreen( m_Index );
} }
...@@ -198,58 +208,59 @@ SCH_SCREEN* EDA_ScreenList::GetScreen( unsigned int index ) ...@@ -198,58 +208,59 @@ SCH_SCREEN* EDA_ScreenList::GetScreen( unsigned int index )
/* return the m_List[index] item /* return the m_List[index] item
*/ */
{ {
if( index < m_List.GetCount() ) if( index < m_List.GetCount() )
return m_List[index]; return m_List[index];
return NULL; return NULL;
} }
/************************************************/ /************************************************/
void EDA_ScreenList::AddScreenToList( SCH_SCREEN* testscreen ) void EDA_ScreenList::AddScreenToList( SCH_SCREEN* testscreen )
/************************************************/ /************************************************/
{ {
if(testscreen == NULL) return; if( testscreen == NULL )
for(unsigned int i=0; i< m_List.GetCount(); i++){ return;
if(m_List[i] == testscreen) for( unsigned int i = 0; i< m_List.GetCount(); i++ )
return; {
} if( m_List[i] == testscreen )
m_List.Add(testscreen); return;
}
m_List.Add( testscreen );
#ifdef DEBUG #ifdef DEBUG
printf("EDA_ScreenList::AddScreenToList adding %s\n", (const char*)testscreen->m_FileName.mb_str()); printf( "EDA_ScreenList::AddScreenToList adding %s\n",
(const char*) testscreen->m_FileName.mb_str(
) );
#endif #endif
} }
/************************************************/
void EDA_ScreenList::UpdateScreenNumberAndDate( )
/************************************************/
{
SCH_SCREEN* screen;
wxString date = GenDate();
for(int i=0; i<(int)m_List.GetCount(); i++){
screen = m_List[i];
screen->m_ScreenNumber = i;
screen->m_NumberOfScreen = m_List.GetCount();
screen->m_Date = date;
}
}
/************************************************************************/ /************************************************************************/
void EDA_ScreenList::BuildScreenList(EDA_BaseStruct* s) void EDA_ScreenList::BuildScreenList( EDA_BaseStruct* s )
/************************************************************************/ /************************************************************************/
{ {
if(s && s->Type() == DRAW_SHEET_STRUCT_TYPE){ if( s && s->Type() == DRAW_SHEET_STRUCT_TYPE )
DrawSheetStruct* ds = (DrawSheetStruct*)s; {
s = ds->m_s; DrawSheetStruct* ds = (DrawSheetStruct*) s;
} s = ds->m_AssociatedScreen;
if(s && s->Type() == SCREEN_STRUCT_TYPE){ }
SCH_SCREEN* screen = (SCH_SCREEN*)s; if( s && s->Type() == SCREEN_STRUCT_TYPE )
AddScreenToList(screen); {
EDA_BaseStruct* strct = screen->EEDrawList; SCH_SCREEN* screen = (SCH_SCREEN*) s;
while(strct){ AddScreenToList( screen );
if(strct->Type() == DRAW_SHEET_STRUCT_TYPE){ EDA_BaseStruct* strct = screen->EEDrawList;
BuildScreenList(strct); while( strct )
} {
strct = strct->Pnext; if( strct->Type() == DRAW_SHEET_STRUCT_TYPE )
} {
} BuildScreenList( strct );
}
strct = strct->Pnext;
}
}
} }
/*********************************************************************/ /*********************************************************************/
/* Class EDA_SheetList to handle the list of Sheets in a hierarchy */ /* Class EDA_SheetList to handle the list of Sheets in a hierarchy */
/*********************************************************************/ /*********************************************************************/
...@@ -258,58 +269,109 @@ void EDA_ScreenList::BuildScreenList(EDA_BaseStruct* s) ...@@ -258,58 +269,109 @@ void EDA_ScreenList::BuildScreenList(EDA_BaseStruct* s)
DrawSheetList* EDA_SheetList::GetFirst() DrawSheetList* EDA_SheetList::GetFirst()
/*****************************************/ /*****************************************/
{ {
m_index = 0; m_index = 0;
if(m_count > 0) if( m_count > 0 )
return &( m_List[0] ); return &( m_List[0] );
return NULL; return NULL;
} }
/*****************************************/ /*****************************************/
DrawSheetList* EDA_SheetList::GetNext() DrawSheetList* EDA_SheetList::GetNext()
/*****************************************/ /*****************************************/
{ {
if( m_index < m_count ) if( m_index < m_count )
m_index++; m_index++;
return GetSheet(m_index); return GetSheet( m_index );
} }
/************************************************/ /************************************************/
DrawSheetList* EDA_SheetList::GetSheet(int index ) DrawSheetList* EDA_SheetList::GetSheet( int index )
/************************************************/ /************************************************/
/* return the m_List[index] item /* return the m_List[index] item
*/ */
{ {
if( index < m_count ) if( index < m_count )
return &(m_List[index]); return &(m_List[index]);
return NULL; return NULL;
} }
/************************************************************************/ /************************************************************************/
void EDA_SheetList::BuildSheetList(DrawSheetStruct* sheet) void EDA_SheetList::BuildSheetList( DrawSheetStruct* sheet )
/************************************************************************/ /************************************************************************/
{ {
if(m_List == NULL){ if( m_List == NULL )
int count = sheet->CountSheets(); {
m_count = count; int count = sheet->CountSheets();
m_index = 0; m_count = count;
if(m_List) free(m_List); m_List = NULL; m_index = 0;
count *= sizeof(DrawSheetList); if( m_List )
m_List = (DrawSheetList*)MyZMalloc(count); free( m_List );m_List = NULL;
memset((void*)m_List, 0, count); count *= sizeof(DrawSheetList);
m_currList.Clear(); m_List = (DrawSheetList*) MyZMalloc( count );
} memset( (void*) m_List, 0, count );
m_currList.Push(sheet); m_currList.Clear();
m_List[m_index] = m_currList; }
m_index++; m_currList.Push( sheet );
if(sheet->m_s != NULL){ m_List[m_index] = m_currList;
EDA_BaseStruct* strct = m_currList.LastDrawList(); m_index++;
while(strct){ if( sheet->m_AssociatedScreen != NULL )
if(strct->Type() == DRAW_SHEET_STRUCT_TYPE){ {
DrawSheetStruct* sht = (DrawSheetStruct*)strct; EDA_BaseStruct* strct = m_currList.LastDrawList();
BuildSheetList(sht); while( strct )
{
if( strct->Type() == DRAW_SHEET_STRUCT_TYPE )
{
DrawSheetStruct* sht = (DrawSheetStruct*) strct;
BuildSheetList( sht );
}
strct = strct->Pnext;
}
}
m_currList.Pop();
}
/************************************************/
void EDA_SheetList::UpdateSheetNumberAndDate()
/************************************************/
/* Set a sheet number, the sheet count for sheets in the whole schematic
* and update the date in all srceens
*/
{
wxString date = GenDate();
int sheet_count = 1, sheet_number = 2; // sheet 1 is the root sheet
for( int ii = 0; ii<(int) m_count; ii++ )
{
DrawSheetList* sheetlist = GetSheet( ii );
sheet_count += sheetlist->m_numSheets;
}
for( int ii = 0; ii<(int) m_count; ii++ )
{
DrawSheetList* sheetlist = GetSheet( ii );
// Read all sheets in path, but not the root sheet (jj = 1)
for( int jj = 1; jj < sheetlist->m_numSheets; jj++ )
{
DrawSheetStruct* sheet = sheetlist->m_sheets[jj];
sheet->m_SheetNumber = sheet_number++;
sheet->m_NumberOfSheets = m_count;
SCH_SCREEN* screen = sheet->m_AssociatedScreen;
if( screen != NULL )
{
screen->m_NumberOfScreen = sheet_count;
screen->m_Date = date;
} }
strct = strct->Pnext; }
} }
}
m_currList.Pop(); g_RootSheet->m_AssociatedScreen->m_Date = date;
g_RootSheet->m_AssociatedScreen->m_NumberOfScreen = sheet_count;
g_RootSheet->m_SheetNumber = 1;
g_RootSheet->m_NumberOfSheets = m_count;
} }
...@@ -18,30 +18,31 @@ ...@@ -18,30 +18,31 @@
/* Forward declarations */ /* Forward declarations */
class DrawSheetStruct; class DrawSheetStruct;
extern DrawSheetStruct* g_RootSheet; extern DrawSheetStruct* g_RootSheet;
class SCH_SCREEN : public BASE_SCREEN class SCH_SCREEN : public BASE_SCREEN
{ {
public: public:
int m_RefCount; //how many sheets reference this screen? int m_RefCount; //how many sheets reference this screen?
//delete when it goes to zero. //delete when it goes to zero.
int m_ScreenNumber; int m_ScreenNumber;
int m_NumberOfScreen; int m_NumberOfScreen;
SCH_SCREEN( int idtype, KICAD_T aType = SCREEN_STRUCT_TYPE ); SCH_SCREEN( int idtype, KICAD_T aType = SCREEN_STRUCT_TYPE );
~SCH_SCREEN(); ~SCH_SCREEN();
virtual wxString GetClass() const virtual wxString GetClass() const
{ {
return wxT("SCH_SCREEN"); return wxT( "SCH_SCREEN" );
} }
void FreeDrawList(); // Free EESchema drawing list (does not delete the sub hierarchies) void FreeDrawList(); // Free EESchema drawing list (does not delete the sub hierarchies)
void Place( WinEDA_DrawFrame* frame, wxDC* DC ) { }; void Place( WinEDA_DrawFrame* frame, wxDC* DC ) { };
void RemoveFromDrawList( EDA_BaseStruct* DrawStruct );/* remove DrawStruct from EEDrawList. */ void RemoveFromDrawList( EDA_BaseStruct* DrawStruct ); /* remove DrawStruct from EEDrawList. */
bool CheckIfOnDrawList( EDA_BaseStruct* st ); bool CheckIfOnDrawList( EDA_BaseStruct* st );
void AddToDrawList( EDA_BaseStruct* DrawStruct ); void AddToDrawList( EDA_BaseStruct* DrawStruct );
void ClearUndoORRedoList( EDA_BaseStruct* List ); void ClearUndoORRedoList( EDA_BaseStruct* List );
bool SchematicCleanUp( wxDC* DC = NULL ); bool SchematicCleanUp( wxDC* DC = NULL );
...@@ -54,157 +55,200 @@ public: ...@@ -54,157 +55,200 @@ public:
}; };
class DrawSheetLabelStruct : public EDA_BaseStruct, public EDA_TextStruct class DrawSheetLabelStruct : public EDA_BaseStruct
, public EDA_TextStruct
{ {
public: public:
int m_Layer; int m_Layer;
int m_Edge, m_Shape; int m_Edge, m_Shape;
bool m_IsDangling; // TRUE si non connect� bool m_IsDangling; // TRUE non connected
public: public:
DrawSheetLabelStruct( DrawSheetStruct* parent, DrawSheetLabelStruct( DrawSheetStruct* parent,
const wxPoint& pos = wxPoint( 0, 0 ), const wxPoint& pos = wxPoint( 0, 0 ),
const wxString& text = wxEmptyString ); const wxString& text = wxEmptyString );
~DrawSheetLabelStruct() { } ~DrawSheetLabelStruct() { }
virtual wxString GetClass() const virtual wxString GetClass() const
{ {
return wxT("DrawSheetLabelStruct"); return wxT( "DrawSheetLabelStruct" );
} }
DrawSheetLabelStruct* GenCopy(); DrawSheetLabelStruct* GenCopy();
DrawSheetLabelStruct* Next() DrawSheetLabelStruct* Next()
{ return (DrawSheetLabelStruct*) Pnext; } { return (DrawSheetLabelStruct*) Pnext; }
void Place( WinEDA_DrawFrame* frame, wxDC* DC ); void Place( WinEDA_DrawFrame* frame, wxDC* DC );
virtual void Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, virtual void Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset,
int draw_mode, int Color = -1 ); int draw_mode, int Color = -1 );
}; };
WX_DEFINE_ARRAY( DrawSheetStruct*, SheetGrowArray );
/* class DrawSheetStruct
This class is the sheet symbol placed in a schematic, and is the entry point for a sub schematic
*/
WX_DEFINE_ARRAY( DrawSheetStruct *, SheetGrowArray );
class DrawSheetStruct : public EDA_BaseStruct /*public SCH_SCREEN*/ /* Gestion de la hierarchie */ class DrawSheetStruct : public EDA_BaseStruct /*public SCH_SCREEN*/ /* Gestion de la hierarchie */
{ {
public: public:
wxString m_SheetName; //this is equivalent to C101 for components: wxString m_SheetName; //this is equivalent to C101 for components:
// it is stored in F0 ... of the file. // it is stored in F0 ... of the file.
wxString m_FileName; //also in SCH_SCREEN (redundant), wxString m_FileName; //also in SCH_SCREEN (redundant),
//but need it here for loading after //but need it here for loading after
//reading the sheet description from file. //reading the sheet description from file.
int m_SheetNameSize; int m_SheetNameSize;
int m_FileNameSize; int m_FileNameSize;
wxPoint m_Pos; wxPoint m_Pos;
wxSize m_Size; /* Position and Size of sheet symbol */ wxSize m_Size; /* Position and Size of sheet symbol */
int m_Layer; int m_Layer;
DrawSheetLabelStruct* m_Label; /* Points de connection, linked list.*/ DrawSheetLabelStruct* m_Label; /* Points de connection, linked list.*/
int m_NbLabel; /* Nombre de points de connexion */ int m_NbLabel; /* Nombre de points de connexion */
SCH_SCREEN* m_s; SCH_SCREEN* m_AssociatedScreen; /* Associated Screen which handle the physical data
In complex hierarchies we can have many DrawSheetStruct using the same data
*/
int m_SheetNumber; // sheet number (used for info)
int m_NumberOfSheets; // Sheets count in the whole schematic (used for info)
public: public:
DrawSheetStruct( const wxPoint& pos = wxPoint( 0, 0 ) ); DrawSheetStruct( const wxPoint& pos = wxPoint( 0, 0 ) );
~DrawSheetStruct(); ~DrawSheetStruct();
virtual wxString GetClass() const virtual wxString GetClass() const
{ {
return wxT("DrawSheetStruct"); return wxT( "DrawSheetStruct" );
} }
void Place( WinEDA_DrawFrame* frame, wxDC* DC ); void Place( WinEDA_DrawFrame* frame, wxDC* DC );
DrawSheetStruct* GenCopy(); DrawSheetStruct* GenCopy();
void Display_Infos( WinEDA_DrawFrame* frame ); void Display_Infos( WinEDA_DrawFrame* frame );
void CleanupSheet( WinEDA_SchematicFrame* frame, wxDC* DC ); void CleanupSheet( WinEDA_SchematicFrame* frame, wxDC* DC );
virtual void Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, virtual void Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset,
int draw_mode, int Color = -1 ); int draw_mode, int Color = -1 );
void SwapData( DrawSheetStruct* copyitem ); void SwapData( DrawSheetStruct* copyitem );
void DeleteAnnotation( bool recurse ); void DeleteAnnotation( bool recurse );
int ComponentCount(); int ComponentCount();
bool Load(WinEDA_SchematicFrame* frame); bool Load( WinEDA_SchematicFrame* frame );
bool SearchHierarchy(wxString filename, SCH_SCREEN **screen); bool SearchHierarchy( wxString filename, SCH_SCREEN** screen );
bool LocatePathOfScreen(SCH_SCREEN *screen, DrawSheetList* list); bool LocatePathOfScreen( SCH_SCREEN* screen, DrawSheetList* list );
int CountSheets(); int CountSheets();
//void RemoveSheet(DrawSheetStruct* sheet);
//to remove a sheet, just delete it //void RemoveSheet(DrawSheetStruct* sheet);
//-- the destructor should take care of everything else. //to remove a sheet, just delete it
//-- the destructor should take care of everything else.
}; };
/**********************************************/
/* class to handle a series of sheets *********/
/* a 'path' so to speak.. *********************/
/**********************************************/
#define DSLSZ 32 #define DSLSZ 32
class DrawSheetList class DrawSheetList
{ {
public: public:
int m_numSheets; int m_numSheets;
DrawSheetStruct* m_sheets[DSLSZ]; DrawSheetStruct* m_sheets[DSLSZ];
DrawSheetList(); DrawSheetList();
~DrawSheetList(){}; ~DrawSheetList() { };
void Clear(){m_numSheets = 0; } void Clear() { m_numSheets = 0; }
int Cmp(DrawSheetList& d); int Cmp( DrawSheetList& d );
DrawSheetStruct* Last(); DrawSheetStruct* Last();
SCH_SCREEN* LastScreen(); SCH_SCREEN* LastScreen();
EDA_BaseStruct* LastDrawList(); EDA_BaseStruct* LastDrawList();
void Push(DrawSheetStruct* sheet); void Push( DrawSheetStruct* sheet );
DrawSheetStruct* Pop(); DrawSheetStruct* Pop();
wxString Path(); wxString Path();
wxString PathHumanReadable(); wxString PathHumanReadable();
void UpdateAllScreenReferences(); void UpdateAllScreenReferences();
bool operator= (const DrawSheetList& d1);
bool operator==(const DrawSheetList &d1); bool operator =( const DrawSheetList& d1 );
bool operator!=(const DrawSheetList &d1);
}; bool operator ==( const DrawSheetList& d1 );
bool operator !=( const DrawSheetList& d1 );
};
/*******************************************************/
/* Class to handle the list of *Sheets* in a hierarchy */ /* Class to handle the list of *Sheets* in a hierarchy */
// sheets are not unique - can have many sheets with the same /*******************************************************/
// filename and the same SCH_SHEET reference.
// sheets are not unique - can have many sheets with the same
// filename and the same SCH_SHEET reference.
class EDA_SheetList class EDA_SheetList
{ {
private: private:
DrawSheetList* m_List; DrawSheetList* m_List;
int m_count; int m_count;
int m_index; int m_index;
DrawSheetList m_currList; DrawSheetList m_currList;
public: public:
EDA_SheetList( DrawSheetStruct* sheet ){ EDA_SheetList( DrawSheetStruct* sheet )
m_index = 0; {
m_count = 0; m_index = 0;
m_List = NULL; m_count = 0;
if(sheet == NULL) m_List = NULL;
sheet = g_RootSheet; if( sheet == NULL )
BuildSheetList( sheet ); sheet = g_RootSheet;
} BuildSheetList( sheet );
~EDA_SheetList() {if(m_List){free(m_List);} m_List = NULL;} }
int GetCount() { return m_count; }
DrawSheetList* GetFirst();
DrawSheetList* GetNext(); ~EDA_SheetList()
DrawSheetList* GetSheet(int index ); {
if( m_List )
private: {
void BuildSheetList( DrawSheetStruct* sheet ); free( m_List );
}
m_List = NULL;
}
int GetCount() { return m_count; }
DrawSheetList* GetFirst();
DrawSheetList* GetNext();
DrawSheetList* GetSheet( int index );
void UpdateSheetNumberAndDate(); // Update the date displayed in the sheet count
private:
void BuildSheetList( DrawSheetStruct* sheet );
}; };
/********************************************************/
/* Class to handle the list of *screens* in a hierarchy */ /* Class to handle the list of *screens* in a hierarchy */
// screens are unique, and correspond to .sch files. /********************************************************/
WX_DEFINE_ARRAY( SCH_SCREEN*, ScreenGrowArray );
// screens are unique, and correspond to .sch files.
WX_DEFINE_ARRAY( SCH_SCREEN *, ScreenGrowArray );
class EDA_ScreenList class EDA_ScreenList
{ {
private: private:
ScreenGrowArray m_List; ScreenGrowArray m_List;
unsigned int m_Index; unsigned int m_Index;
public: public:
EDA_ScreenList(){ EDA_ScreenList()
m_Index = 0; {
BuildScreenList(g_RootSheet); m_Index = 0;
} BuildScreenList( g_RootSheet );
~EDA_ScreenList() {} }
int GetCount() { return m_List.GetCount(); }
~EDA_ScreenList() { }
int GetCount() { return m_List.GetCount(); }
SCH_SCREEN* GetFirst(); SCH_SCREEN* GetFirst();
SCH_SCREEN* GetNext(); SCH_SCREEN* GetNext();
SCH_SCREEN* GetScreen( unsigned int index ); SCH_SCREEN* GetScreen( unsigned int index );
void UpdateScreenNumberAndDate();
private: private:
void AddScreenToList( SCH_SCREEN* testscreen ); void AddScreenToList( SCH_SCREEN* testscreen );
void BuildScreenList( EDA_BaseStruct* sheet ); void BuildScreenList( EDA_BaseStruct* sheet );
}; };
#endif /* CLASS_SCREEN_H */ #endif /* CLASS_SCREEN_H */
...@@ -140,9 +140,7 @@ void EDA_SchComponentStruct::SetRef( DrawSheetList* sheet, wxString ref ) ...@@ -140,9 +140,7 @@ void EDA_SchComponentStruct::SetRef( DrawSheetList* sheet, wxString ref )
//check to see if it is already there before inserting it //check to see if it is already there before inserting it
wxString path = GetPath( sheet ); wxString path = GetPath( sheet );
printf( "SetRef path: %s ref: %s\n", // printf( "SetRef path: %s ref: %s\n", CONV_TO_UTF8( path ), CONV_TO_UTF8( ref ) ); // Debug
CONV_TO_UTF8( path ),
CONV_TO_UTF8( ref ) );
unsigned int i; unsigned int i;
bool notInArray = true; bool notInArray = true;
for( i = 0; i<m_Paths.GetCount(); i++ ) for( i = 0; i<m_Paths.GetCount(); i++ )
......
...@@ -28,8 +28,8 @@ enum NumFieldType { ...@@ -28,8 +28,8 @@ enum NumFieldType {
FIELD5, FIELD5,
FIELD6, FIELD6,
FIELD7, FIELD7,
FIELD8, FIELD8,
NUMBER_OF_FIELDS /* Nombre de champs de texte affectes au composant */ NUMBER_OF_FIELDS /* Nombre de champs de texte affectes au composant */
}; };
...@@ -37,7 +37,8 @@ enum NumFieldType { ...@@ -37,7 +37,8 @@ enum NumFieldType {
* component fields are texts attached to the component (not the graphic texts) * component fields are texts attached to the component (not the graphic texts)
* There are 2 major fields : Reference and Value * There are 2 major fields : Reference and Value
*/ */
class PartTextStruct : public EDA_BaseStruct, public EDA_TextStruct class PartTextStruct : public EDA_BaseStruct
, public EDA_TextStruct
{ {
public: public:
int m_Layer; int m_Layer;
...@@ -48,7 +49,7 @@ public: ...@@ -48,7 +49,7 @@ public:
public: public:
PartTextStruct( const wxPoint& pos = wxPoint( 0, 0 ), const wxString& text = wxEmptyString ); PartTextStruct( const wxPoint& pos = wxPoint( 0, 0 ), const wxString& text = wxEmptyString );
~PartTextStruct(); ~PartTextStruct();
virtual wxString GetClass() const virtual wxString GetClass() const
{ {
return wxT( "PartText" ); return wxT( "PartText" );
...@@ -78,37 +79,38 @@ public: ...@@ -78,37 +79,38 @@ public:
wxPoint m_Pos; /* Exact position of part. */ wxPoint m_Pos; /* Exact position of part. */
public: public:
DrawPartStruct( KICAD_T struct_type, const wxPoint &pos ); DrawPartStruct( KICAD_T struct_type, const wxPoint& pos );
~DrawPartStruct(); ~DrawPartStruct();
virtual wxString GetClass() const virtual wxString GetClass() const
{ {
return wxT( "DrawPart" ); return wxT( "DrawPart" );
} }
}; };
WX_DECLARE_OBJARRAY(DrawSheetList, ArrayOfSheetLists); WX_DECLARE_OBJARRAY( DrawSheetList, ArrayOfSheetLists );
/* the class EDA_SchComponentStruct describes a real component */ /* the class EDA_SchComponentStruct describes a real component */
class EDA_SchComponentStruct : public DrawPartStruct class EDA_SchComponentStruct : public DrawPartStruct
{ {
public: public:
int m_Multi; /* In multi unit chip - which unit to draw. */ int m_Multi; /* In multi unit chip - which unit to draw. */
//int m_FlagControlMulti; //int m_FlagControlMulti;
ArrayOfSheetLists m_UsedOnSheets; ArrayOfSheetLists m_UsedOnSheets;
int m_Convert; /* Gestion (management) des mutiples representations (ex: conversion De Morgan) */ int m_Convert; /* Gestion (management) des mutiples representations (ex: conversion De Morgan) */
int m_Transform[2][2]; /* The rotation/mirror transformation matrix. */ int m_Transform[2][2]; /* The rotation/mirror transformation matrix. */
bool* m_PinIsDangling; // liste des indicateurs de pin non connectee bool* m_PinIsDangling; // liste des indicateurs de pin non connectee
wxArrayString m_Paths; // /sheet1/C102, /sh2/sh1/U32 etc. wxArrayString m_Paths; // /sheet1/C102, /sh2/sh1/U32 etc.
wxArrayString m_References; // C102, U32 etc. wxArrayString m_References; // C102, U32 etc.
wxString m_PrefixString; //C, R, U, Q etc - the first character which typically indicates what the component is. wxString m_PrefixString; /*C, R, U, Q etc - the first character which typically indicates what the component is.
//determined, upon placement, from the library component. * determined, upon placement, from the library component.
//determined, upon file load, by the first non-digits in the reference fields. * determined, upon file load, by the first non-digits in the reference fields. */
public: public:
EDA_SchComponentStruct( const wxPoint& pos = wxPoint( 0, 0 ) ); EDA_SchComponentStruct( const wxPoint& pos = wxPoint( 0, 0 ) );
~EDA_SchComponentStruct( void ) { } ~EDA_SchComponentStruct( void ) { }
virtual wxString GetClass() const virtual wxString GetClass() const
{ {
return wxT( "EDA_SchComponent" ); return wxT( "EDA_SchComponent" );
...@@ -124,7 +126,7 @@ public: ...@@ -124,7 +126,7 @@ public:
EDA_Rect GetBoundaryBox(); EDA_Rect GetBoundaryBox();
const wxString& ReturnFieldName( int aFieldNdx ) const; const wxString& ReturnFieldName( int aFieldNdx ) const;
/** /**
* Function GetFieldValue * Function GetFieldValue
...@@ -134,32 +136,35 @@ public: ...@@ -134,32 +136,35 @@ public:
*/ */
const wxString& GetFieldValue( int aFieldNdx ) const; const wxString& GetFieldValue( int aFieldNdx ) const;
virtual void Draw( WinEDA_DrawPanel* panel, virtual void Draw( WinEDA_DrawPanel* panel,
wxDC* DC, wxDC* DC,
const wxPoint& offset, const wxPoint& offset,
int draw_mode, int draw_mode,
int Color = -1 ); int Color = -1 );
void SwapData( EDA_SchComponentStruct* copyitem ); void SwapData( EDA_SchComponentStruct* copyitem );
virtual void Place( WinEDA_DrawFrame* frame, wxDC* DC ); virtual void Place( WinEDA_DrawFrame* frame, wxDC* DC );
//returns a unique ID, in the form of a path. //returns a unique ID, in the form of a path.
wxString GetPath( DrawSheetList* sheet); wxString GetPath( DrawSheetList* sheet );
const wxString GetRef( DrawSheetList* sheet ); const wxString GetRef( DrawSheetList* sheet );
void SetRef( DrawSheetList* sheet, wxString ref ); void SetRef( DrawSheetList* sheet, wxString ref );
void ClearRefs(); void ClearRefs();
#if defined(DEBUG)
#if defined (DEBUG)
/** /**
* Function Show * Function Show
* is used to output the object tree, currently for debugging only. * is used to output the object tree, currently for debugging only.
* @param nestLevel An aid to prettier tree indenting, and is the level * @param nestLevel An aid to prettier tree indenting, and is the level
* of nesting of this object within the overall tree. * of nesting of this object within the overall tree.
* @param os The ostream& to output to. * @param os The ostream& to output to.
*/ */
void Show( int nestLevel, std::ostream& os ); void Show( int nestLevel, std::ostream& os );
#endif
#endif
}; };
......
...@@ -37,20 +37,20 @@ wxString msg; ...@@ -37,20 +37,20 @@ wxString msg;
} }
/* effacement du sous schema correspondant */ /* effacement du sous schema correspondant */
if( FirstSheet->m_s->IsModify() && confirm_deletion ) if( FirstSheet->m_AssociatedScreen->IsModify() && confirm_deletion )
{ {
msg.Printf( _("Sheet %s (file %s) modified. Save it?"), msg.Printf( _("Sheet %s (file %s) modified. Save it?"),
FirstSheet->m_SheetName.GetData(), FirstSheet->m_SheetName.GetData(),
FirstSheet->m_FileName.GetData()); FirstSheet->m_FileName.GetData());
if( IsOK(NULL, msg) ) if( IsOK(NULL, msg) )
{ {
frame->SaveEEFile(FirstSheet->m_s, FILE_SAVE_AS); frame->SaveEEFile(FirstSheet->m_AssociatedScreen, FILE_SAVE_AS);
} }
} }
/* free the sub hierarchy */ /* free the sub hierarchy */
if(FirstSheet->m_s){ if(FirstSheet->m_AssociatedScreen){
EEDrawList = FirstSheet->m_s->EEDrawList; EEDrawList = FirstSheet->m_AssociatedScreen->EEDrawList;
while (EEDrawList != NULL) while (EEDrawList != NULL)
{ {
DrawStruct = EEDrawList; DrawStruct = EEDrawList;
...@@ -61,7 +61,7 @@ wxString msg; ...@@ -61,7 +61,7 @@ wxString msg;
} }
} }
/* Effacement des elements de la feuille courante */ /* Effacement des elements de la feuille courante */
FirstSheet->m_s->FreeDrawList(); FirstSheet->m_AssociatedScreen->FreeDrawList();
} }
} }
......
...@@ -544,7 +544,7 @@ wxString mask, filename; ...@@ -544,7 +544,7 @@ wxString mask, filename;
else else
s_ExportSeparatorSymbol = s_ExportSeparator[0]; s_ExportSeparatorSymbol = s_ExportSeparator[0];
m_ListFileName = g_RootSheet->m_s->m_FileName; m_ListFileName = g_RootSheet->m_AssociatedScreen->m_FileName;
ChangeFileNameExt(m_ListFileName, EXT_LIST); ChangeFileNameExt(m_ListFileName, EXT_LIST);
//need to get rid of the path. //need to get rid of the path.
m_ListFileName = m_ListFileName.AfterLast('/'); m_ListFileName = m_ListFileName.AfterLast('/');
......
/******************************************************/ /******************************************************/
/** eeconfig.cpp : routines et menus de configuration */ /** eeconfig.cpp : routines et menus de configuration */
/*******************************************************/ /*******************************************************/
#include "fctsys.h" #include "fctsys.h"
#include "common.h" #include "common.h"
#include "program.h" #include "program.h"
...@@ -18,189 +18,195 @@ ...@@ -18,189 +18,195 @@
/* Variables locales */ /* Variables locales */
#define HOTKEY_FILENAME wxT("eeschema") #define HOTKEY_FILENAME wxT( "eeschema" )
/*********************************************************************/ /*********************************************************************/
void WinEDA_SchematicFrame::Process_Config(wxCommandEvent& event) void WinEDA_SchematicFrame::Process_Config( wxCommandEvent& event )
/*********************************************************************/ /*********************************************************************/
{ {
int id = event.GetId(); int id = event.GetId();
wxPoint pos; wxPoint pos;
wxString FullFileName; wxString FullFileName;
wxGetMousePosition(&pos.x, &pos.y); wxGetMousePosition( &pos.x, &pos.y );
pos.y += 5; pos.y += 5;
switch ( id )
{ switch( id )
case ID_COLORS_SETUP : {
DisplayColorSetupFrame(this, pos); case ID_COLORS_SETUP:
break; DisplayColorSetupFrame( this, pos );
break;
case ID_CONFIG_REQ : // Creation de la fenetre de configuration
InstallConfigFrame(pos); case ID_CONFIG_REQ: // Creation de la fenetre de configuration
break; InstallConfigFrame( pos );
break;
case ID_OPTIONS_SETUP:
DisplayOptionFrame(this, pos); case ID_OPTIONS_SETUP:
break; DisplayOptionFrame( this, pos );
break;
case ID_CONFIG_SAVE:
Save_Config(this); case ID_CONFIG_SAVE:
break; Save_Config( this );
break;
case ID_CONFIG_READ:
{ case ID_CONFIG_READ:
wxString mask( wxT("*") ); mask += g_Prj_Config_Filename_ext; {
FullFileName = g_RootSheet->m_s->m_FileName; wxString mask( wxT( "*" ) ); mask += g_Prj_Config_Filename_ext;
ChangeFileNameExt( FullFileName, g_Prj_Config_Filename_ext ); FullFileName = g_RootSheet->m_AssociatedScreen->m_FileName;
ChangeFileNameExt( FullFileName, g_Prj_Config_Filename_ext );
FullFileName = EDA_FileSelector(_("Read config file"),
wxGetCwd(), /* Chemin par defaut */ FullFileName = EDA_FileSelector( _( "Read config file" ),
FullFileName, /* nom fichier par defaut */ wxGetCwd(), /* Chemin par defaut */
g_Prj_Config_Filename_ext, /* extension par defaut */ FullFileName, /* nom fichier par defaut */
mask, /* Masque d'affichage */ g_Prj_Config_Filename_ext, /* extension par defaut */
this, mask, /* Masque d'affichage */
wxFD_OPEN, this,
TRUE /* ne change pas de repertoire courant */ wxFD_OPEN,
); TRUE /* ne change pas de repertoire courant */
if ( FullFileName.IsEmpty() ) break; );
if ( ! wxFileExists(FullFileName) ) if( FullFileName.IsEmpty() )
{ break;
wxString msg = _("File ") + FullFileName +_("not found");; if( !wxFileExists( FullFileName ) )
DisplayError(this, msg); break; {
} wxString msg = _( "File " ) + FullFileName + _( "not found" );;
Read_Config(FullFileName, TRUE ); DisplayError( this, msg ); break;
} }
break; Read_Config( FullFileName, TRUE );
}
case ID_PREFERENCES_CREATE_CONFIG_HOTKEYS: break;
FullFileName = ReturnHotkeyConfigFilePath( g_ConfigFileLocationChoice );
FullFileName += HOTKEY_FILENAME; case ID_PREFERENCES_CREATE_CONFIG_HOTKEYS:
FullFileName += DEFAULT_HOTKEY_FILENAME_EXT; FullFileName = ReturnHotkeyConfigFilePath( g_ConfigFileLocationChoice );
WriteHotkeyConfigFile(FullFileName, s_Eeschema_Hokeys_Descr, true); FullFileName += HOTKEY_FILENAME;
break; FullFileName += DEFAULT_HOTKEY_FILENAME_EXT;
WriteHotkeyConfigFile( FullFileName, s_Eeschema_Hokeys_Descr, true );
case ID_PREFERENCES_READ_CONFIG_HOTKEYS: break;
Read_Hotkey_Config( this, true);
break; case ID_PREFERENCES_READ_CONFIG_HOTKEYS:
Read_Hotkey_Config( this, true );
case ID_PREFERENCES_EDIT_CONFIG_HOTKEYS: break;
{
FullFileName = ReturnHotkeyConfigFilePath( g_ConfigFileLocationChoice ); case ID_PREFERENCES_EDIT_CONFIG_HOTKEYS:
FullFileName += HOTKEY_FILENAME; {
FullFileName += DEFAULT_HOTKEY_FILENAME_EXT; FullFileName = ReturnHotkeyConfigFilePath( g_ConfigFileLocationChoice );
wxString editorname = GetEditorName(); FullFileName += HOTKEY_FILENAME;
if ( !editorname.IsEmpty() ) FullFileName += DEFAULT_HOTKEY_FILENAME_EXT;
ExecuteFile(this, editorname, FullFileName); wxString editorname = GetEditorName();
} if( !editorname.IsEmpty() )
break; ExecuteFile( this, editorname, FullFileName );
}
case ID_PREFERENCES_HOTKEY_PATH_IS_HOME: break;
case ID_PREFERENCES_HOTKEY_PATH_IS_KICAD:
HandleHotkeyConfigMenuSelection( this, id ); case ID_PREFERENCES_HOTKEY_PATH_IS_HOME:
break; case ID_PREFERENCES_HOTKEY_PATH_IS_KICAD:
HandleHotkeyConfigMenuSelection( this, id );
case ID_PREFERENCES_HOTKEY_SHOW_CURRENT_LIST: // Display Current hotkey list for eeschema break;
DisplayHotkeyList( this, s_Schematic_Hokeys_Descr );
break; case ID_PREFERENCES_HOTKEY_SHOW_CURRENT_LIST: // Display Current hotkey list for eeschema
DisplayHotkeyList( this, s_Schematic_Hokeys_Descr );
default: break;
DisplayError(this, wxT("WinEDA_SchematicFrame::Process_Config internal error") );
} default:
DisplayError( this, wxT( "WinEDA_SchematicFrame::Process_Config internal error" ) );
}
} }
/***************************************************************/ /***************************************************************/
bool Read_Hotkey_Config( WinEDA_DrawFrame * frame, bool verbose ) bool Read_Hotkey_Config( WinEDA_DrawFrame* frame, bool verbose )
/***************************************************************/ /***************************************************************/
/* /*
* Read the hotkey files config for eeschema and libedit * Read the hotkey files config for eeschema and libedit
*/ */
{ {
wxString FullFileName = ReturnHotkeyConfigFilePath( g_ConfigFileLocationChoice ); wxString FullFileName = ReturnHotkeyConfigFilePath( g_ConfigFileLocationChoice );
FullFileName += HOTKEY_FILENAME;
FullFileName += DEFAULT_HOTKEY_FILENAME_EXT;
frame->ReadHotkeyConfigFile(FullFileName, s_Eeschema_Hokeys_Descr, verbose);
return TRUE; FullFileName += HOTKEY_FILENAME;
FullFileName += DEFAULT_HOTKEY_FILENAME_EXT;
frame->ReadHotkeyConfigFile( FullFileName, s_Eeschema_Hokeys_Descr, verbose );
return TRUE;
} }
/***********************************************************************/ /***********************************************************************/
bool Read_Config( const wxString & CfgFileName, bool ForceRereadConfig ) bool Read_Config( const wxString& CfgFileName, bool ForceRereadConfig )
/***********************************************************************/ /***********************************************************************/
/* lit la configuration, si elle n'a pas deja ete lue
1 - lit <nom fichier root>.pro
2 - si non trouve lit <chemin des binaires>../template/kicad.pro
3 - si non trouve: init des variables aux valeurs par defaut
Retourne TRUE si lu, FALSE si config non lue /* lit la configuration, si elle n'a pas deja ete lue
*/ * 1 - lit <nom fichier root>.pro
* 2 - si non trouve lit <chemin des binaires>../template/kicad.pro
* 3 - si non trouve: init des variables aux valeurs par defaut
*
* Retourne TRUE si lu, FALSE si config non lue
*/
{ {
wxString FullFileName; wxString FullFileName;
bool IsRead = TRUE; bool IsRead = TRUE;
wxArrayString liblist_tmp = g_LibName_List; wxArrayString liblist_tmp = g_LibName_List;
if ( CfgFileName.IsEmpty() ) FullFileName = g_RootSheet->m_s->m_FileName; if( CfgFileName.IsEmpty() )
else FullFileName = CfgFileName; FullFileName = g_RootSheet->m_AssociatedScreen->m_FileName;
g_LibName_List.Clear(); else
FullFileName = CfgFileName;
if ( ! g_EDA_Appl->ReadProjectConfig(FullFileName, g_LibName_List.Clear();
GROUP, ParamCfgList, ForceRereadConfig ? FALSE : TRUE) ) // Config non lue
{ if( !g_EDA_Appl->ReadProjectConfig( FullFileName,
g_LibName_List = liblist_tmp; GROUP, ParamCfgList, ForceRereadConfig ? FALSE : TRUE ) ) // Config non lue
IsRead = FALSE; {
} g_LibName_List = liblist_tmp;
IsRead = FALSE;
/* Traitement des variables particulieres: */ }
SetRealLibraryPath( wxT("library") );
/* Traitement des variables particulieres: */
// If the list is void, load the libraries "power.lib" and "device.lib" SetRealLibraryPath( wxT( "library" ) );
if ( g_LibName_List.GetCount() == 0 )
{ // If the list is void, load the libraries "power.lib" and "device.lib"
g_LibName_List.Add( wxT("power") ); if( g_LibName_List.GetCount() == 0 )
g_LibName_List.Add( wxT("device") ); {
} g_LibName_List.Add( wxT( "power" ) );
g_LibName_List.Add( wxT( "device" ) );
if ( g_EDA_Appl->m_SchematicFrame ) }
{
g_EDA_Appl->m_SchematicFrame->SetDrawBgColor(g_DrawBgColor); if( g_EDA_Appl->m_SchematicFrame )
g_EDA_Appl->m_SchematicFrame->m_Draw_Grid = g_ShowGrid; {
} g_EDA_Appl->m_SchematicFrame->SetDrawBgColor( g_DrawBgColor );
g_EDA_Appl->m_SchematicFrame->m_Draw_Grid = g_ShowGrid;
LoadLibraries(g_EDA_Appl->m_SchematicFrame); }
return IsRead; LoadLibraries( g_EDA_Appl->m_SchematicFrame );
return IsRead;
} }
/****************************************************************/ /****************************************************************/
void WinEDA_SchematicFrame::Save_Config(wxWindow * displayframe) void WinEDA_SchematicFrame::Save_Config( wxWindow* displayframe )
/***************************************************************/ /***************************************************************/
{ {
wxString path; wxString path;
wxString FullFileName; wxString FullFileName;
wxString mask( wxT("*") ); wxString mask( wxT( "*" ) );
mask += g_Prj_Config_Filename_ext; mask += g_Prj_Config_Filename_ext;
FullFileName = g_RootSheet->m_s->m_FileName.AfterLast('/') /*ConfigFileName*/; FullFileName = g_RootSheet->m_AssociatedScreen->m_FileName.AfterLast( '/' ) /*ConfigFileName*/;
ChangeFileNameExt( FullFileName, g_Prj_Config_Filename_ext ); ChangeFileNameExt( FullFileName, g_Prj_Config_Filename_ext );
path = wxGetCwd(); path = wxGetCwd();
FullFileName = EDA_FileSelector(_("Save preferences"), FullFileName = EDA_FileSelector( _( "Save preferences" ),
path, /* Chemin par defaut */ path, /* Chemin par defaut */
FullFileName, /* nom fichier par defaut */ FullFileName, /* nom fichier par defaut */
g_Prj_Config_Filename_ext, /* extension par defaut */ g_Prj_Config_Filename_ext, /* extension par defaut */
mask, /* Masque d'affichage */ mask, /* Masque d'affichage */
displayframe, displayframe,
wxFD_SAVE, wxFD_SAVE,
TRUE TRUE
); );
if ( FullFileName.IsEmpty() ) return; if( FullFileName.IsEmpty() )
return;
/* ecriture de la configuration */
g_EDA_Appl->WriteProjectConfig(FullFileName, GROUP, ParamCfgList); /* ecriture de la configuration */
g_EDA_Appl->WriteProjectConfig( FullFileName, GROUP, ParamCfgList );
} }
...@@ -129,7 +129,7 @@ wxString title; ...@@ -129,7 +129,7 @@ wxString title;
void WinEDA_DrawPanel::PrintPage(wxDC * DC, bool Print_Sheet_Ref, int PrintMask) void WinEDA_DrawPanel::PrintPage(wxDC * DC, bool Print_Sheet_Ref, int PrintMask)
/*******************************************************************************/ /*******************************************************************************/
{ {
BASE_SCREEN * screen; // * oldscreen = m_Parent->GetScreen(); BASE_SCREEN * screen;
wxBeginBusyCursor(); wxBeginBusyCursor();
...@@ -140,7 +140,6 @@ BASE_SCREEN * screen; // * oldscreen = m_Parent->GetScreen(); ...@@ -140,7 +140,6 @@ BASE_SCREEN * screen; // * oldscreen = m_Parent->GetScreen();
if ( Print_Sheet_Ref ) if ( Print_Sheet_Ref )
m_Parent->TraceWorkSheet(DC, screen, g_DrawMinimunLineWidth ); m_Parent->TraceWorkSheet(DC, screen, g_DrawMinimunLineWidth );
//m_Parent->m_CurrentSheet->m_s = oldscreen;
wxEndBusyCursor(); wxEndBusyCursor();
} }
......
...@@ -400,7 +400,7 @@ void WinEDA_ErcFrame::TestErc( wxCommandEvent& event ) ...@@ -400,7 +400,7 @@ void WinEDA_ErcFrame::TestErc( wxCommandEvent& event )
if( WriteFichierERC == TRUE ) if( WriteFichierERC == TRUE )
{ {
wxString ErcFullFileName; wxString ErcFullFileName;
ErcFullFileName = g_RootSheet->m_s->m_FileName; ErcFullFileName = g_RootSheet->m_AssociatedScreen->m_FileName;
ChangeFileNameExt( ErcFullFileName, wxT( ".erc" ) ); ChangeFileNameExt( ErcFullFileName, wxT( ".erc" ) );
ErcFullFileName = EDA_FileSelector( _( "ERC file:" ), ErcFullFileName = EDA_FileSelector( _( "ERC file:" ),
wxEmptyString, /* Chemin par defaut */ wxEmptyString, /* Chemin par defaut */
......
...@@ -63,7 +63,7 @@ void WinEDA_SchematicFrame::Save_File( wxCommandEvent& event ) ...@@ -63,7 +63,7 @@ void WinEDA_SchematicFrame::Save_File( wxCommandEvent& event )
mask = wxT( "*" ) + g_SchExtBuffer; mask = wxT( "*" ) + g_SchExtBuffer;
FullFileName = EDA_FileSelector( _( "Schematic files:" ), FullFileName = EDA_FileSelector( _( "Schematic files:" ),
wxEmptyString, //default path wxEmptyString, //default path
sheet->m_s->m_FileName,// default filename sheet->m_AssociatedScreen->m_FileName,// default filename
g_SchExtBuffer, // extension par defaut g_SchExtBuffer, // extension par defaut
mask, // Masque d'affichage mask, // Masque d'affichage
this, this,
...@@ -111,8 +111,8 @@ int WinEDA_SchematicFrame::LoadOneEEProject( const wxString& FileName, bool IsNe ...@@ -111,8 +111,8 @@ int WinEDA_SchematicFrame::LoadOneEEProject( const wxString& FileName, bool IsNe
{ {
if( !IsOK( this, _( "Clear Schematic Hierarchy (modified!)?" ) ) ) if( !IsOK( this, _( "Clear Schematic Hierarchy (modified!)?" ) ) )
return FALSE; return FALSE;
if( g_RootSheet->m_s->m_FileName != g_DefaultSchematicFileName ) if( g_RootSheet->m_AssociatedScreen->m_FileName != g_DefaultSchematicFileName )
SetLastProject( g_RootSheet->m_s->m_FileName ); SetLastProject( g_RootSheet->m_AssociatedScreen->m_FileName );
} }
FullFileName = FileName; FullFileName = FileName;
...@@ -146,7 +146,7 @@ int WinEDA_SchematicFrame::LoadOneEEProject( const wxString& FileName, bool IsNe ...@@ -146,7 +146,7 @@ int WinEDA_SchematicFrame::LoadOneEEProject( const wxString& FileName, bool IsNe
memset( &g_EESchemaVar, 0, sizeof(g_EESchemaVar) ); memset( &g_EESchemaVar, 0, sizeof(g_EESchemaVar) );
GetScreen()->ClrModify(); GetScreen()->ClrModify();
//m_CurrentSheet->m_s->Pnext = NULL; should be by default //m_CurrentSheet->m_AssociatedScreen->Pnext = NULL; should be by default
if( IsNew ) if( IsNew )
{ {
...@@ -190,7 +190,7 @@ int WinEDA_SchematicFrame::LoadOneEEProject( const wxString& FileName, bool IsNe ...@@ -190,7 +190,7 @@ int WinEDA_SchematicFrame::LoadOneEEProject( const wxString& FileName, bool IsNe
// Loading the project library cache // Loading the project library cache
wxString FullLibName; wxString FullLibName;
wxString shortfilename; wxString shortfilename;
wxSplitPath( g_RootSheet->m_s->m_FileName, NULL, &shortfilename, NULL ); wxSplitPath( g_RootSheet->m_AssociatedScreen->m_FileName, NULL, &shortfilename, NULL );
FullLibName << wxT( "." ) << STRING_DIR_SEP << shortfilename << wxT( ".cache" ) << FullLibName << wxT( "." ) << STRING_DIR_SEP << shortfilename << wxT( ".cache" ) <<
g_LibExtBuffer; g_LibExtBuffer;
if( wxFileExists( FullLibName ) ) if( wxFileExists( FullLibName ) )
...@@ -211,16 +211,16 @@ int WinEDA_SchematicFrame::LoadOneEEProject( const wxString& FileName, bool IsNe ...@@ -211,16 +211,16 @@ int WinEDA_SchematicFrame::LoadOneEEProject( const wxString& FileName, bool IsNe
LibCacheExist = TRUE; LibCacheExist = TRUE;
} }
if( !wxFileExists( g_RootSheet->m_s->m_FileName ) && !LibCacheExist ) // Nouveau projet prpbablement if( !wxFileExists( g_RootSheet->m_AssociatedScreen->m_FileName ) && !LibCacheExist ) // Nouveau projet prpbablement
{ {
msg.Printf( _( "File %s not found (new project ?)" ), msg.Printf( _( "File %s not found (new project ?)" ),
g_RootSheet->m_s->m_FileName.GetData() ); g_RootSheet->m_AssociatedScreen->m_FileName.GetData() );
DisplayInfo( this, msg, 20 ); DisplayInfo( this, msg, 20 );
return -1; return -1;
} }
//load the project. //load the project.
SAFE_DELETE(g_RootSheet->m_s); SAFE_DELETE(g_RootSheet->m_AssociatedScreen);
if(!g_RootSheet->Load(this)) if(!g_RootSheet->Load(this))
return 0; return 0;
......
...@@ -273,7 +273,7 @@ void WinEDA_SchematicFrame::InstallNextScreen(DrawSheetStruct * Sheet) ...@@ -273,7 +273,7 @@ void WinEDA_SchematicFrame::InstallNextScreen(DrawSheetStruct * Sheet)
/* Routine d'installation de l'ecran correspondant au symbole Sheet pointe /* Routine d'installation de l'ecran correspondant au symbole Sheet pointe
par la souris par la souris
have to be careful here because the DrawSheetStructs within the EEDrawList have to be careful here because the DrawSheetStructs within the EEDrawList
don't actually have a valid m_s (on purpose -- you need the m_SubSheet hierarchy don't actually have a valid m_AssociatedScreen (on purpose -- you need the m_SubSheet hierarchy
to maintain path info (well, this is but one way to maintain path info..) to maintain path info (well, this is but one way to maintain path info..)
*/ */
{ {
...@@ -297,11 +297,10 @@ static void UpdateScreenFromSheet(WinEDA_SchematicFrame * frame) ...@@ -297,11 +297,10 @@ static void UpdateScreenFromSheet(WinEDA_SchematicFrame * frame)
{ {
SCH_SCREEN * NewScreen; SCH_SCREEN * NewScreen;
//SCH_SCREEN * oldscreen = frame->GetScreen(); what is oldscreen used for?
NewScreen = frame->m_CurrentSheet->LastScreen(); NewScreen = frame->m_CurrentSheet->LastScreen();
if(!NewScreen) if(!NewScreen)
NewScreen = g_RootSheet->m_s; NewScreen = g_RootSheet->m_AssociatedScreen;
// Reinit des parametres d'affichage du nouvel ecran // Reinit des parametres d'affichage du nouvel ecran
// assumes m_CurrentSheet has already been updated. // assumes m_CurrentSheet has already been updated.
......
...@@ -656,6 +656,7 @@ void WinEDA_LibeditFrame::Process_Special_Functions( wxCommandEvent& event ) ...@@ -656,6 +656,7 @@ void WinEDA_LibeditFrame::Process_Special_Functions( wxCommandEvent& event )
{ {
EditField( &dc, (LibDrawField*) CurrentDrawItem ); EditField( &dc, (LibDrawField*) CurrentDrawItem );
} }
DrawPanel->MouseToCursorSchema();
DrawPanel->CursorOn( &dc ); DrawPanel->CursorOn( &dc );
break; break;
...@@ -725,7 +726,6 @@ void WinEDA_LibeditFrame::Process_Special_Functions( wxCommandEvent& event ) ...@@ -725,7 +726,6 @@ void WinEDA_LibeditFrame::Process_Special_Functions( wxCommandEvent& event )
break; break;
} }
DrawPanel->MouseToCursorSchema();
DrawPanel->m_IgnoreMouseEvents = FALSE; DrawPanel->m_IgnoreMouseEvents = FALSE;
if( m_ID_current_state == 0 ) if( m_ID_current_state == 0 )
......
...@@ -65,7 +65,9 @@ OBJECTS = eeschema.o\ ...@@ -65,7 +65,9 @@ OBJECTS = eeschema.o\
savelib.o symbtext.o \ savelib.o symbtext.o \
symbdraw.o \ symbdraw.o \
hierarch.o files-io.o \ hierarch.o files-io.o \
annotate.o plothpgl.o \ annotate.o\
annotate_dialog.o\
plothpgl.o \
plot.o libalias.o \ plot.o libalias.o \
plotps.o netform.o \ plotps.o netform.o \
delsheet.o \ delsheet.o \
...@@ -110,7 +112,9 @@ find.o:find.cpp dialog_find.cpp dialog_find.h $(DEPEND) ...@@ -110,7 +112,9 @@ find.o:find.cpp dialog_find.cpp dialog_find.h $(DEPEND)
eeconfig.o: eeconfig.cpp eeconfig.h $(DEPEND) eeconfig.o: eeconfig.cpp eeconfig.h $(DEPEND)
annotate.o: annotate.cpp annotate_dialog.cpp annotate_dialog.h $(DEPEND) netlist.h annotate.o: annotate.cpp annotate_dialog.h $(DEPEND) netlist.h
annotate_dialog.o: annotate_dialog.cpp annotate_dialog.h $(DEPEND) netlist.h
netlist.o: netlist.cpp $(DEPEND) netlist.h netlist.o: netlist.cpp $(DEPEND) netlist.h
......
...@@ -170,7 +170,7 @@ void* WinEDA_SchematicFrame::BuildNetListBase() ...@@ -170,7 +170,7 @@ void* WinEDA_SchematicFrame::BuildNetListBase()
g_TabObjNet = NULL; /* Init pour le 1er passage dans ListeObjetConnection */ g_TabObjNet = NULL; /* Init pour le 1er passage dans ListeObjetConnection */
/* count nelist items */ /* count nelist items */
g_RootSheet->m_s->SetModify(); g_RootSheet->m_AssociatedScreen->SetModify();
for( sheet = SheetListList.GetFirst(); sheet != NULL; sheet = SheetListList.GetNext() ) for( sheet = SheetListList.GetFirst(); sheet != NULL; sheet = SheetListList.GetNext() )
{ {
......
...@@ -539,7 +539,7 @@ void WinEDA_NetlistFrame::GenNetlist( wxCommandEvent& event ) ...@@ -539,7 +539,7 @@ void WinEDA_NetlistFrame::GenNetlist( wxCommandEvent& event )
g_NetFormat = CurrPage->m_IdNetType; g_NetFormat = CurrPage->m_IdNetType;
/* Calculate the netlist filename */ /* Calculate the netlist filename */
FullFileName = g_RootSheet->m_s->m_FileName; FullFileName = g_RootSheet->m_AssociatedScreen->m_FileName;
switch( g_NetFormat ) switch( g_NetFormat )
{ {
...@@ -649,7 +649,7 @@ void WinEDA_NetlistFrame::RunSimulator( wxCommandEvent& event ) ...@@ -649,7 +649,7 @@ void WinEDA_NetlistFrame::RunSimulator( wxCommandEvent& event )
CommandLine = g_SimulatorCommandLine.AfterFirst( ' ' ); CommandLine = g_SimulatorCommandLine.AfterFirst( ' ' );
/* Calculate the netlist filename */ /* Calculate the netlist filename */
NetlistFullFileName = g_RootSheet->m_s->m_FileName; NetlistFullFileName = g_RootSheet->m_AssociatedScreen->m_FileName;
ChangeFileNameExt( NetlistFullFileName, wxT( ".cir" ) ); ChangeFileNameExt( NetlistFullFileName, wxT( ".cir" ) );
AddDelimiterString( NetlistFullFileName ); AddDelimiterString( NetlistFullFileName );
CommandLine += wxT( " " ) + NetlistFullFileName; CommandLine += wxT( " " ) + NetlistFullFileName;
......
...@@ -209,7 +209,7 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event ) ...@@ -209,7 +209,7 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event )
case ID_TO_PCB: case ID_TO_PCB:
{ {
wxString Line; wxString Line;
if( g_RootSheet->m_s->m_FileName != wxEmptyString ) if( g_RootSheet->m_AssociatedScreen->m_FileName != wxEmptyString )
{ {
Line = GetScreen()->m_FileName; Line = GetScreen()->m_FileName;
AddDelimiterString( Line ); AddDelimiterString( Line );
...@@ -224,9 +224,9 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event ) ...@@ -224,9 +224,9 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event )
case ID_TO_CVPCB: case ID_TO_CVPCB:
{ {
wxString Line; wxString Line;
if( g_RootSheet->m_s->m_FileName != wxEmptyString ) if( g_RootSheet->m_AssociatedScreen->m_FileName != wxEmptyString )
{ {
Line = g_RootSheet->m_s->m_FileName; Line = g_RootSheet->m_AssociatedScreen->m_FileName;
AddDelimiterString( Line ); AddDelimiterString( Line );
ChangeFileNameExt( Line, wxEmptyString ); ChangeFileNameExt( Line, wxEmptyString );
ExecuteFile( this, CVPCB_EXE, Line ); ExecuteFile( this, CVPCB_EXE, Line );
......
...@@ -16,40 +16,40 @@ ...@@ -16,40 +16,40 @@
/* Functions to undo and redo edit commands. /* Functions to undo and redo edit commands.
* commmands to undo are in CurrentScreen->m_UndoList * commmands to undo are in CurrentScreen->m_UndoList
* commmands to redo are in CurrentScreen->m_RedoList * commmands to redo are in CurrentScreen->m_RedoList
* *
* m_UndoList and m_RedoList are a linked list of DrawPickedStruct. * m_UndoList and m_RedoList are a linked list of DrawPickedStruct.
* each DrawPickedStruct has its .m_Son member pointing to an item to undo or redo, * each DrawPickedStruct has its .m_Son member pointing to an item to undo or redo,
* or to a list of DrawPickedStruct which points (.m_PickedStruct membre) * or to a list of DrawPickedStruct which points (.m_PickedStruct membre)
* the items to undo or redo * the items to undo or redo
* *
* there are 3 cases: * there are 3 cases:
* - delete item(s) command * - delete item(s) command
* - change item(s) command * - change item(s) command
* - add item(s) command * - add item(s) command
* *
* Undo command * Undo command
* - delete item(s) command: * - delete item(s) command:
* deleted items are moved in undo list * deleted items are moved in undo list
* *
* - change item(s) command * - change item(s) command
* A copy of item(s) is made (a DrawPickedStruct list of wrappers) * A copy of item(s) is made (a DrawPickedStruct list of wrappers)
* the .m_Image member of each wrapper points the modified item. * the .m_Image member of each wrapper points the modified item.
* *
* - add item(s) command * - add item(s) command
* A list of item(s) is made * A list of item(s) is made
* the .m_Image member of each wrapper points the new item. * the .m_Image member of each wrapper points the new item.
* *
* Redo command * Redo command
* - delete item(s) old command: * - delete item(s) old command:
* deleted items are moved in EEDrawList list * deleted items are moved in EEDrawList list
* *
* - change item(s) command * - change item(s) command
* the copy of item(s) is moved in Undo list * the copy of item(s) is moved in Undo list
* *
* - add item(s) command * - add item(s) command
* The list of item(s) is used to create a deleted list in undo list * The list of item(s) is used to create a deleted list in undo list
* (same as a delete command) * (same as a delete command)
* *
* A problem is the hierarchical sheet handling. * A problem is the hierarchical sheet handling.
* the data associated (subhierarchy, uno/redo list) is deleted only * the data associated (subhierarchy, uno/redo list) is deleted only
* when the sheet is really deleted (i.e. when deleted from undo or redo list) * when the sheet is really deleted (i.e. when deleted from undo or redo list)
...@@ -90,7 +90,7 @@ void SwapData( EDA_BaseStruct* Item ) ...@@ -90,7 +90,7 @@ void SwapData( EDA_BaseStruct* Item )
case DRAW_LABEL_STRUCT_TYPE: case DRAW_LABEL_STRUCT_TYPE:
case DRAW_GLOBAL_LABEL_STRUCT_TYPE: case DRAW_GLOBAL_LABEL_STRUCT_TYPE:
case DRAW_HIER_LABEL_STRUCT_TYPE: case DRAW_HIER_LABEL_STRUCT_TYPE:
case DRAW_TEXT_STRUCT_TYPE: case DRAW_TEXT_STRUCT_TYPE:
#undef SOURCE #undef SOURCE
#undef DEST #undef DEST
...@@ -181,20 +181,20 @@ void WinEDA_SchematicFrame::SaveCopyInUndoList( EDA_BaseStruct* ItemToCopy, ...@@ -181,20 +181,20 @@ void WinEDA_SchematicFrame::SaveCopyInUndoList( EDA_BaseStruct* ItemToCopy,
/* Create a copy of the current schematic draw list, and put it in the undo list. /* Create a copy of the current schematic draw list, and put it in the undo list.
* A DrawPickedStruct wrapper is created to handle the draw list. * A DrawPickedStruct wrapper is created to handle the draw list.
* the .m_Son of this wrapper points the list of items * the .m_Son of this wrapper points the list of items
* *
* flag_type_command = * flag_type_command =
* 0 (unspecified) * 0 (unspecified)
* IS_CHANGED * IS_CHANGED
* IS_NEW * IS_NEW
* IS_DELETED * IS_DELETED
* IS_WIRE_IMAGE * IS_WIRE_IMAGE
* *
* for 0: only a wrapper is created. The used must init the .Flags member of the * for 0: only a wrapper is created. The used must init the .Flags member of the
* wrapper, and add the item list to the wrapper * wrapper, and add the item list to the wrapper
* If it is a delete command, items are put on list with the .Flags member set to IS_DELETED. * If it is a delete command, items are put on list with the .Flags member set to IS_DELETED.
* When it will be really deleted, the EEDrawList and the subhierarchy will be deleted. * When it will be really deleted, the EEDrawList and the subhierarchy will be deleted.
* If it is only a copy, the EEDrawList and the subhierarchy must NOT be deleted. * If it is only a copy, the EEDrawList and the subhierarchy must NOT be deleted.
* *
* Note: * Note:
* Edit wires and busses is a bit complex. * Edit wires and busses is a bit complex.
* because when a new wire is added, modifications in wire list * because when a new wire is added, modifications in wire list
...@@ -286,13 +286,13 @@ void WinEDA_SchematicFrame::SaveCopyInUndoList( EDA_BaseStruct* ItemToCopy, ...@@ -286,13 +286,13 @@ void WinEDA_SchematicFrame::SaveCopyInUndoList( EDA_BaseStruct* ItemToCopy,
GetScreen()->AddItemToUndoList( NewList ); GetScreen()->AddItemToUndoList( NewList );
/* Clear redo list, because after new save there is no redo to do */ /* Clear redo list, because after new save there is no redo to do */
((SCH_SCREEN*)GetScreen())->ClearUndoORRedoList( GetScreen()->m_RedoList ); ( (SCH_SCREEN*) GetScreen() )->ClearUndoORRedoList( GetScreen()->m_RedoList );
GetScreen()->m_RedoList = NULL; GetScreen()->m_RedoList = NULL;
} }
/**********************************************************/ /**********************************************************/
bool WinEDA_SchematicFrame::GetSchematicFromRedoList() bool WinEDA_SchematicFrame::GetSchematicFromRedoList()
/**********************************************************/ /**********************************************************/
/* Redo the last edition: /* Redo the last edition:
...@@ -314,8 +314,8 @@ bool WinEDA_SchematicFrame::GetSchematicFromRedoList() ...@@ -314,8 +314,8 @@ bool WinEDA_SchematicFrame::GetSchematicFromRedoList()
GetScreen()->SetModify(); GetScreen()->SetModify();
ReCreateHToolbar(); ReCreateHToolbar();
SetToolbars(); SetToolbars();
return TRUE; return TRUE;
} }
...@@ -362,7 +362,7 @@ void WinEDA_SchematicFrame::PutDataInPreviousState( DrawPickedStruct* List ) ...@@ -362,7 +362,7 @@ void WinEDA_SchematicFrame::PutDataInPreviousState( DrawPickedStruct* List )
while( PickedList ) while( PickedList )
{ {
item = PickedList->m_Image; item = PickedList->m_Image;
((SCH_SCREEN*)GetScreen())->RemoveFromDrawList( item ); ( (SCH_SCREEN*) GetScreen() )->RemoveFromDrawList( item );
item->m_Flags = IS_DELETED; item->m_Flags = IS_DELETED;
PickedList->m_PickedStruct = item; PickedList->m_PickedStruct = item;
PickedList->m_Flags = IS_DELETED; PickedList->m_Flags = IS_DELETED;
...@@ -372,7 +372,7 @@ void WinEDA_SchematicFrame::PutDataInPreviousState( DrawPickedStruct* List ) ...@@ -372,7 +372,7 @@ void WinEDA_SchematicFrame::PutDataInPreviousState( DrawPickedStruct* List )
else else
{ {
FirstItem = List->m_Image; FirstItem = List->m_Image;
((SCH_SCREEN*)GetScreen())->RemoveFromDrawList( FirstItem ); ( (SCH_SCREEN*) GetScreen() )->RemoveFromDrawList( FirstItem );
FirstItem->m_Flags = IS_DELETED; FirstItem->m_Flags = IS_DELETED;
List->m_Son = FirstItem; List->m_Son = FirstItem;
} }
...@@ -407,7 +407,7 @@ void WinEDA_SchematicFrame::PutDataInPreviousState( DrawPickedStruct* List ) ...@@ -407,7 +407,7 @@ void WinEDA_SchematicFrame::PutDataInPreviousState( DrawPickedStruct* List )
case IS_WIRE_IMAGE: case IS_WIRE_IMAGE:
/* Exchange the current wires and the oild wires */ /* Exchange the current wires and the oild wires */
List->m_Son = ((SCH_SCREEN*)GetScreen())->ExtractWires( FALSE ); List->m_Son = ( (SCH_SCREEN*) GetScreen() )->ExtractWires( FALSE );
while( FirstItem ) while( FirstItem )
{ {
EDA_BaseStruct* nextitem = FirstItem->Pnext; EDA_BaseStruct* nextitem = FirstItem->Pnext;
...@@ -437,7 +437,7 @@ void WinEDA_SchematicFrame::PutDataInPreviousState( DrawPickedStruct* List ) ...@@ -437,7 +437,7 @@ void WinEDA_SchematicFrame::PutDataInPreviousState( DrawPickedStruct* List )
case IS_NEW: case IS_NEW:
item = PickedList->m_Image; item = PickedList->m_Image;
((SCH_SCREEN*)GetScreen())->RemoveFromDrawList( item ); ( (SCH_SCREEN*) GetScreen() )->RemoveFromDrawList( item );
item->m_Flags = IS_DELETED; item->m_Flags = IS_DELETED;
PickedList->m_PickedStruct = item; PickedList->m_PickedStruct = item;
PickedList->m_Flags = IS_DELETED; PickedList->m_Flags = IS_DELETED;
...@@ -489,8 +489,8 @@ bool WinEDA_SchematicFrame::GetSchematicFromUndoList() ...@@ -489,8 +489,8 @@ bool WinEDA_SchematicFrame::GetSchematicFromUndoList()
GetScreen()->SetModify(); GetScreen()->SetModify();
ReCreateHToolbar(); ReCreateHToolbar();
SetToolbars(); SetToolbars();
return TRUE; return TRUE;
} }
...@@ -517,7 +517,7 @@ void SCH_SCREEN::ClearUndoORRedoList( EDA_BaseStruct* List ) ...@@ -517,7 +517,7 @@ void SCH_SCREEN::ClearUndoORRedoList( EDA_BaseStruct* List )
FirstItem = List->m_Son; FirstItem = List->m_Son;
CmdType = List->m_Flags; CmdType = List->m_Flags;
SAFE_DELETE( List ); SAFE_DELETE( List );
if( FirstItem == NULL ) if( FirstItem == NULL )
continue; continue;
...@@ -542,22 +542,25 @@ void SCH_SCREEN::ClearUndoORRedoList( EDA_BaseStruct* List ) ...@@ -542,22 +542,25 @@ void SCH_SCREEN::ClearUndoORRedoList( EDA_BaseStruct* List )
{ {
if( (item->m_Flags & IS_NEW) == 0 ) if( (item->m_Flags & IS_NEW) == 0 )
{ {
printf("schematic undo_redo.cpp: undo_redo with a DRAW_SHEET_STRUCT_TYPE, checkme!!\n"); printf(
/* "schematic undo_redo.cpp: undo_redo with a DRAW_SHEET_STRUCT_TYPE, checkme!!\n" );
sheet->EEDrawList = NULL;
sheet->m_UndoList = NULL; /*
sheet->m_RedoList = NULL; * sheet->EEDrawList = NULL;
*/ * sheet->m_UndoList = NULL;
* sheet->m_RedoList = NULL;
*/
} }
} }
} }
if( (item->m_Flags & IS_NEW) == 0 ){ if( (item->m_Flags & IS_NEW) == 0 )
SAFE_DELETE( item ); {
} SAFE_DELETE( item );
}
} }
DrawPickedStruct* wrapper = PickedList; DrawPickedStruct* wrapper = PickedList;
PickedList = PickedList->Next(); PickedList = PickedList->Next();
SAFE_DELETE( wrapper ); SAFE_DELETE( wrapper );
} }
} }
else // This is a single item: deleted copy else // This is a single item: deleted copy
...@@ -583,18 +586,21 @@ void SCH_SCREEN::ClearUndoORRedoList( EDA_BaseStruct* List ) ...@@ -583,18 +586,21 @@ void SCH_SCREEN::ClearUndoORRedoList( EDA_BaseStruct* List )
{ {
if( (FirstItem->m_Flags & IS_NEW) == 0 ) if( (FirstItem->m_Flags & IS_NEW) == 0 )
{ {
printf("schematic undo_redo.cpp undo_redo with a DRAW_SHEET_STRUCT_TYPE, checkme!!\n"); printf(
/* "schematic undo_redo.cpp undo_redo with a DRAW_SHEET_STRUCT_TYPE, checkme!!\n" );
sheet->EEDrawList = NULL;
sheet->m_UndoList = NULL; /*
sheet->m_RedoList = NULL; * sheet->EEDrawList = NULL;
*/ * sheet->m_UndoList = NULL;
* sheet->m_RedoList = NULL;
*/
} }
} }
} }
if( (FirstItem->m_Flags & IS_NEW) == 0 ){ if( (FirstItem->m_Flags & IS_NEW) == 0 )
SAFE_DELETE( FirstItem ); {
} SAFE_DELETE( FirstItem );
}
} }
} }
} }
......
...@@ -215,22 +215,22 @@ wxString WinEDA_SchematicFrame::GetScreenDesc() ...@@ -215,22 +215,22 @@ wxString WinEDA_SchematicFrame::GetScreenDesc()
} }
/******************************/ /*******************************************/
void WinEDA_SchematicFrame::CreateScreens() void WinEDA_SchematicFrame::CreateScreens()
/******************************/ /*******************************************/
{ {
/* creation des ecrans Sch , Lib */ /* creation des ecrans Sch , Lib */
if( g_RootSheet == NULL ) if( g_RootSheet == NULL )
{ {
g_RootSheet = new DrawSheetStruct(); g_RootSheet = new DrawSheetStruct();
} }
if( g_RootSheet->m_s == NULL ) if( g_RootSheet->m_AssociatedScreen == NULL )
{ {
g_RootSheet->m_s = new SCH_SCREEN( SCHEMATIC_FRAME ); g_RootSheet->m_AssociatedScreen = new SCH_SCREEN( SCHEMATIC_FRAME );
g_RootSheet->m_s->m_RefCount++; g_RootSheet->m_AssociatedScreen->m_RefCount++;
} }
g_RootSheet->m_s->m_FileName = g_DefaultSchematicFileName; g_RootSheet->m_AssociatedScreen->m_FileName = g_DefaultSchematicFileName;
g_RootSheet->m_s->m_Date = GenDate(); g_RootSheet->m_AssociatedScreen->m_Date = GenDate();
m_CurrentSheet->Clear(); m_CurrentSheet->Clear();
m_CurrentSheet->Push( g_RootSheet ); m_CurrentSheet->Push( g_RootSheet );
...@@ -294,10 +294,11 @@ void WinEDA_SchematicFrame::OnCloseWindow( wxCloseEvent& Event ) ...@@ -294,10 +294,11 @@ void WinEDA_SchematicFrame::OnCloseWindow( wxCloseEvent& Event )
} }
} }
if( !GetScreen()->m_FileName.IsEmpty() && (GetScreen()->EEDrawList != NULL) ) if( !g_RootSheet->m_AssociatedScreen->m_FileName.IsEmpty() &&
SetLastProject( GetScreen()->m_FileName ); (g_RootSheet->m_AssociatedScreen->EEDrawList != NULL) )
SetLastProject( g_RootSheet->m_AssociatedScreen->m_FileName );
ClearProjectDrawList( g_RootSheet->m_s, TRUE ); ClearProjectDrawList( g_RootSheet->m_AssociatedScreen, TRUE );
/* allof sub sheets are deleted, only the main sheet is useable */ /* allof sub sheets are deleted, only the main sheet is useable */
m_CurrentSheet->Clear(); m_CurrentSheet->Clear();
......
...@@ -84,12 +84,12 @@ WinEDA_SheetPropertiesFrame::WinEDA_SheetPropertiesFrame() ...@@ -84,12 +84,12 @@ WinEDA_SheetPropertiesFrame::WinEDA_SheetPropertiesFrame()
WinEDA_SheetPropertiesFrame::WinEDA_SheetPropertiesFrame( WinEDA_SchematicFrame* parent, WinEDA_SheetPropertiesFrame::WinEDA_SheetPropertiesFrame( WinEDA_SchematicFrame* parent,
DrawSheetStruct* currentsheet, DrawSheetStruct* currentsheet,
wxWindowID id, wxWindowID id,
const wxString& caption, const wxString& caption,
const wxPoint& pos, const wxPoint& pos,
const wxSize& size, const wxSize& size,
long style ) long style )
{ {
m_Parent = parent; m_Parent = parent;
m_CurrentSheet = currentsheet; m_CurrentSheet = currentsheet;
...@@ -97,11 +97,11 @@ WinEDA_SheetPropertiesFrame::WinEDA_SheetPropertiesFrame( WinEDA_SchematicFrame* ...@@ -97,11 +97,11 @@ WinEDA_SheetPropertiesFrame::WinEDA_SheetPropertiesFrame( WinEDA_SchematicFrame*
AddUnitSymbol( *m_SheetNameTextSize ); AddUnitSymbol( *m_SheetNameTextSize );
PutValueInLocalUnits( *m_SheetNameSize, m_CurrentSheet->m_SheetNameSize, PutValueInLocalUnits( *m_SheetNameSize, m_CurrentSheet->m_SheetNameSize,
m_Parent->m_InternalUnits ); m_Parent->m_InternalUnits );
AddUnitSymbol( *m_FileNameTextSize ); AddUnitSymbol( *m_FileNameTextSize );
PutValueInLocalUnits( *m_FileNameSize, m_CurrentSheet->m_FileNameSize, PutValueInLocalUnits( *m_FileNameSize, m_CurrentSheet->m_FileNameSize,
m_Parent->m_InternalUnits ); m_Parent->m_InternalUnits );
} }
...@@ -159,52 +159,53 @@ void WinEDA_SheetPropertiesFrame::CreateControls() ...@@ -159,52 +159,53 @@ void WinEDA_SheetPropertiesFrame::CreateControls()
itemBoxSizer3->Add( itemBoxSizer4, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5 ); itemBoxSizer3->Add( itemBoxSizer4, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5 );
wxStaticText* itemStaticText5 = new wxStaticText( itemDialog1, wxID_STATIC, _( wxStaticText* itemStaticText5 = new wxStaticText( itemDialog1, wxID_STATIC, _(
"Filename (will be created upon save if it does not already exist):" ), wxDefaultPosition, "Filename (will be created upon save if it does not already exist):" ),
wxDefaultSize, 0 ); wxDefaultPosition,
wxDefaultSize, 0 );
itemBoxSizer4->Add( itemStaticText5, itemBoxSizer4->Add( itemStaticText5,
0, 0,
wxALIGN_LEFT | wxLEFT | wxRIGHT | wxTOP | wxADJUST_MINSIZE, wxALIGN_LEFT | wxLEFT | wxRIGHT | wxTOP | wxADJUST_MINSIZE,
5 ); 5 );
m_FileNameWin = new wxTextCtrl( itemDialog1, ID_TEXTCTRL1, _T( "" ), wxDefaultPosition, m_FileNameWin = new wxTextCtrl( itemDialog1, ID_TEXTCTRL1, _T( "" ), wxDefaultPosition,
wxSize( 300, -1 ), wxTE_PROCESS_ENTER ); wxSize( 300, -1 ), wxTE_PROCESS_ENTER );
itemBoxSizer4->Add( m_FileNameWin, 0, wxALIGN_LEFT | wxLEFT | wxRIGHT | wxBOTTOM, 5 ); itemBoxSizer4->Add( m_FileNameWin, 0, wxALIGN_LEFT | wxLEFT | wxRIGHT | wxBOTTOM, 5 );
wxStaticText* itemStaticText7 = new wxStaticText( itemDialog1, wxID_STATIC, _( wxStaticText* itemStaticText7 = new wxStaticText( itemDialog1, wxID_STATIC, _(
"Sheetname:" ), wxDefaultPosition, "Sheetname:" ), wxDefaultPosition,
wxDefaultSize, 0 ); wxDefaultSize, 0 );
itemBoxSizer4->Add( itemStaticText7, itemBoxSizer4->Add( itemStaticText7,
0, 0,
wxALIGN_LEFT | wxLEFT | wxRIGHT | wxTOP | wxADJUST_MINSIZE, wxALIGN_LEFT | wxLEFT | wxRIGHT | wxTOP | wxADJUST_MINSIZE,
5 ); 5 );
m_SheetNameWin = new wxTextCtrl( itemDialog1, ID_TEXTCTRL, _T( "" ), wxDefaultPosition, m_SheetNameWin = new wxTextCtrl( itemDialog1, ID_TEXTCTRL, _T( "" ), wxDefaultPosition,
wxSize( 300, -1 ), 0 ); wxSize( 300, -1 ), 0 );
itemBoxSizer4->Add( m_SheetNameWin, 0, wxALIGN_LEFT | wxLEFT | wxRIGHT | wxBOTTOM, 5 ); itemBoxSizer4->Add( m_SheetNameWin, 0, wxALIGN_LEFT | wxLEFT | wxRIGHT | wxBOTTOM, 5 );
wxBoxSizer* itemBoxSizer9 = new wxBoxSizer( wxVERTICAL ); wxBoxSizer* itemBoxSizer9 = new wxBoxSizer( wxVERTICAL );
itemBoxSizer3->Add( itemBoxSizer9, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5 ); itemBoxSizer3->Add( itemBoxSizer9, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5 );
m_FileNameTextSize = new wxStaticText( itemDialog1, wxID_STATIC, _( m_FileNameTextSize = new wxStaticText( itemDialog1, wxID_STATIC, _(
"Size" ), wxDefaultPosition, wxDefaultSize, 0 ); "Size" ), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer9->Add( m_FileNameTextSize, itemBoxSizer9->Add( m_FileNameTextSize,
0, 0,
wxALIGN_LEFT | wxLEFT | wxRIGHT | wxTOP | wxADJUST_MINSIZE, wxALIGN_LEFT | wxLEFT | wxRIGHT | wxTOP | wxADJUST_MINSIZE,
5 ); 5 );
m_FileNameSize = new wxTextCtrl( itemDialog1, ID_TEXTCTRL2, _T( m_FileNameSize = new wxTextCtrl( itemDialog1, ID_TEXTCTRL2, _T(
"" ), wxDefaultPosition, wxDefaultSize, 0 ); "" ), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer9->Add( m_FileNameSize, 0, wxALIGN_LEFT | wxLEFT | wxRIGHT | wxBOTTOM, 5 ); itemBoxSizer9->Add( m_FileNameSize, 0, wxALIGN_LEFT | wxLEFT | wxRIGHT | wxBOTTOM, 5 );
m_SheetNameTextSize = new wxStaticText( itemDialog1, wxID_STATIC, _( m_SheetNameTextSize = new wxStaticText( itemDialog1, wxID_STATIC, _(
"Size" ), wxDefaultPosition, wxDefaultSize, 0 ); "Size" ), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer9->Add( m_SheetNameTextSize, itemBoxSizer9->Add( m_SheetNameTextSize,
0, 0,
wxALIGN_LEFT | wxLEFT | wxRIGHT | wxTOP | wxADJUST_MINSIZE, wxALIGN_LEFT | wxLEFT | wxRIGHT | wxTOP | wxADJUST_MINSIZE,
5 ); 5 );
m_SheetNameSize = new wxTextCtrl( itemDialog1, ID_TEXTCTRL3, _T( m_SheetNameSize = new wxTextCtrl( itemDialog1, ID_TEXTCTRL3, _T(
"" ), wxDefaultPosition, wxDefaultSize, 0 ); "" ), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer9->Add( m_SheetNameSize, 0, wxALIGN_LEFT | wxLEFT | wxRIGHT | wxBOTTOM, 5 ); itemBoxSizer9->Add( m_SheetNameSize, 0, wxALIGN_LEFT | wxLEFT | wxRIGHT | wxBOTTOM, 5 );
itemBoxSizer2->Add( 5, 5, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5 ); itemBoxSizer2->Add( 5, 5, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5 );
...@@ -213,12 +214,12 @@ void WinEDA_SheetPropertiesFrame::CreateControls() ...@@ -213,12 +214,12 @@ void WinEDA_SheetPropertiesFrame::CreateControls()
itemBoxSizer2->Add( itemBoxSizer15, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5 ); itemBoxSizer2->Add( itemBoxSizer15, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5 );
wxButton* itemButton16 = new wxButton( itemDialog1, wxID_CANCEL, _( wxButton* itemButton16 = new wxButton( itemDialog1, wxID_CANCEL, _(
"&Cancel" ), wxDefaultPosition, wxDefaultSize, 0 ); "&Cancel" ), wxDefaultPosition, wxDefaultSize, 0 );
itemButton16->SetForegroundColour( wxColour( 0, 0, 255 ) ); itemButton16->SetForegroundColour( wxColour( 0, 0, 255 ) );
itemBoxSizer15->Add( itemButton16, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5 ); itemBoxSizer15->Add( itemButton16, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5 );
wxButton* itemButton17 = new wxButton( itemDialog1, wxID_OK, _( wxButton* itemButton17 = new wxButton( itemDialog1, wxID_OK, _(
"&OK" ), wxDefaultPosition, wxDefaultSize, 0 ); "&OK" ), wxDefaultPosition, wxDefaultSize, 0 );
itemButton17->SetForegroundColour( wxColour( 196, 0, 0 ) ); itemButton17->SetForegroundColour( wxColour( 196, 0, 0 ) );
itemBoxSizer15->Add( itemButton17, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5 ); itemBoxSizer15->Add( itemButton17, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5 );
...@@ -292,39 +293,45 @@ void WinEDA_SheetPropertiesFrame::SheetPropertiesAccept( wxCommandEvent& event ) ...@@ -292,39 +293,45 @@ void WinEDA_SheetPropertiesFrame::SheetPropertiesAccept( wxCommandEvent& event )
{ {
m_CurrentSheet->m_FileName = FileName; m_CurrentSheet->m_FileName = FileName;
if( wxFileExists( FileName ) )//do we reload the data from the existing file if( wxFileExists( FileName ) ) //do we reload the data from the existing file
{ {
msg.Printf( _( "A file named %s exists, load it (otherwise overwrite it)?" ), FileName.GetData() ); msg.Printf( _(
"A file named %s exists, load it (otherwise overwrite it)?" ),
FileName.GetData() );
if( IsOK( this, msg ) ) if( IsOK( this, msg ) )
{ {
if( m_CurrentSheet->m_s ){ if( m_CurrentSheet->m_AssociatedScreen )
m_CurrentSheet->m_s->m_RefCount--; {
if( m_CurrentSheet->m_s->m_RefCount == 0) m_CurrentSheet->m_AssociatedScreen->m_RefCount--;
SAFE_DELETE(m_CurrentSheet->m_s); if( m_CurrentSheet->m_AssociatedScreen->m_RefCount == 0 )
} SAFE_DELETE( m_CurrentSheet->m_AssociatedScreen );
m_CurrentSheet->m_s = NULL; //so that we reload.. }
m_CurrentSheet->Load(m_Parent); m_CurrentSheet->m_AssociatedScreen = NULL; //so that we reload..
m_CurrentSheet->Load( m_Parent );
} }
}else{ }
//just make a new screen if needed. else
if( !m_CurrentSheet->m_s ){ {
m_CurrentSheet->m_s = new SCH_SCREEN(SCHEMATIC_FRAME); //just make a new screen if needed.
m_CurrentSheet->m_s->m_RefCount++; //be careful with these if( !m_CurrentSheet->m_AssociatedScreen )
m_CurrentSheet->m_s->m_FileName = FileName; {
} m_CurrentSheet->m_AssociatedScreen = new SCH_SCREEN( SCHEMATIC_FRAME );
} m_CurrentSheet->m_AssociatedScreen->m_RefCount++; //be careful with these
m_CurrentSheet->m_AssociatedScreen->m_FileName = FileName;
}
}
} }
msg = m_FileNameSize->GetValue(); msg = m_FileNameSize->GetValue();
m_CurrentSheet->m_FileNameSize = m_CurrentSheet->m_FileNameSize =
ReturnValueFromString( g_UnitMetric, ReturnValueFromString( g_UnitMetric,
msg, m_Parent->m_InternalUnits ); msg, m_Parent->m_InternalUnits );
m_CurrentSheet->m_SheetName = m_SheetNameWin->GetValue(); m_CurrentSheet->m_SheetName = m_SheetNameWin->GetValue();
msg = m_SheetNameSize->GetValue(); msg = m_SheetNameSize->GetValue();
m_CurrentSheet->m_SheetNameSize = m_CurrentSheet->m_SheetNameSize =
ReturnValueFromString( g_UnitMetric, ReturnValueFromString( g_UnitMetric,
msg, m_Parent->m_InternalUnits ); msg, m_Parent->m_InternalUnits );
if( ( m_CurrentSheet->m_SheetName.IsEmpty() ) ) if( ( m_CurrentSheet->m_SheetName.IsEmpty() ) )
m_CurrentSheet->m_SheetName = m_CurrentSheet->m_FileName; m_CurrentSheet->m_SheetName = m_CurrentSheet->m_FileName;
...@@ -368,19 +375,19 @@ DrawSheetStruct* WinEDA_SchematicFrame::CreateSheet( wxDC* DC ) ...@@ -368,19 +375,19 @@ DrawSheetStruct* WinEDA_SchematicFrame::CreateSheet( wxDC* DC )
{ {
g_ItemToRepeat = NULL; g_ItemToRepeat = NULL;
DrawSheetStruct* Sheet = new DrawSheetStruct( GetScreen()->m_Curseur ); DrawSheetStruct* Sheet = new DrawSheetStruct( GetScreen()->m_Curseur );
Sheet->m_Flags = IS_NEW | IS_RESIZED; Sheet->m_Flags = IS_NEW | IS_RESIZED;
Sheet->m_TimeStamp = GetTimeStamp(); Sheet->m_TimeStamp = GetTimeStamp();
Sheet->m_Parent = GetScreen(); Sheet->m_Parent = GetScreen();
Sheet->m_s = NULL; Sheet->m_AssociatedScreen = NULL;
s_SheetMindx = SHEET_MIN_WIDTH; s_SheetMindx = SHEET_MIN_WIDTH;
s_SheetMindy = SHEET_MIN_HEIGHT; s_SheetMindy = SHEET_MIN_HEIGHT;
//need to check if this is being added to the EEDrawList. //need to check if this is being added to the EEDrawList.
//also need to update the heirarchy, if we are adding //also need to update the heirarchy, if we are adding
// a sheet to a screen that already has multiple instances (!) // a sheet to a screen that already has multiple instances (!)
GetScreen()->SetCurItem( Sheet ); GetScreen()->SetCurItem( Sheet );
DrawPanel->ManageCurseur = DeplaceSheet; DrawPanel->ManageCurseur = DeplaceSheet;
DrawPanel->ForceCloseManageCurseur = ExitSheet; DrawPanel->ForceCloseManageCurseur = ExitSheet;
...@@ -422,7 +429,7 @@ void WinEDA_SchematicFrame::ReSizeSheet( DrawSheetStruct* Sheet, wxDC* DC ) ...@@ -422,7 +429,7 @@ void WinEDA_SchematicFrame::ReSizeSheet( DrawSheetStruct* Sheet, wxDC* DC )
while( sheetlabel ) while( sheetlabel )
{ {
s_SheetMindx = MAX( s_SheetMindx, s_SheetMindx = MAX( s_SheetMindx,
(int) ( (sheetlabel->GetLength() + 1) * sheetlabel->m_Size.x ) ); (int) ( (sheetlabel->GetLength() + 1) * sheetlabel->m_Size.x ) );
s_SheetMindy = MAX( s_SheetMindy, sheetlabel->m_Pos.y - Sheet->m_Pos.y ); s_SheetMindy = MAX( s_SheetMindy, sheetlabel->m_Pos.y - Sheet->m_Pos.y );
sheetlabel = (DrawSheetLabelStruct*) sheetlabel->Pnext; sheetlabel = (DrawSheetLabelStruct*) sheetlabel->Pnext;
} }
...@@ -462,7 +469,7 @@ static void DeplaceSheet( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ) ...@@ -462,7 +469,7 @@ static void DeplaceSheet( WinEDA_DrawPanel* panel, wxDC* DC, bool erase )
{ {
wxPoint move_vector; wxPoint move_vector;
DrawSheetLabelStruct* SheetLabel; DrawSheetLabelStruct* SheetLabel;
BASE_SCREEN* screen = panel->m_Parent->GetScreen(); BASE_SCREEN* screen = panel->m_Parent->GetScreen();
DrawSheetStruct* Sheet = (DrawSheetStruct*) DrawSheetStruct* Sheet = (DrawSheetStruct*)
screen->GetCurItem(); screen->GetCurItem();
...@@ -474,9 +481,9 @@ static void DeplaceSheet( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ) ...@@ -474,9 +481,9 @@ static void DeplaceSheet( WinEDA_DrawPanel* panel, wxDC* DC, bool erase )
if( Sheet->m_Flags & IS_RESIZED ) if( Sheet->m_Flags & IS_RESIZED )
{ {
Sheet->m_Size.x = MAX( s_SheetMindx, Sheet->m_Size.x = MAX( s_SheetMindx,
screen->m_Curseur.x - Sheet->m_Pos.x ); screen->m_Curseur.x - Sheet->m_Pos.x );
Sheet->m_Size.y = MAX( s_SheetMindy, Sheet->m_Size.y = MAX( s_SheetMindy,
screen->m_Curseur.y - Sheet->m_Pos.y ); screen->m_Curseur.y - Sheet->m_Pos.y );
SheetLabel = Sheet->m_Label; SheetLabel = Sheet->m_Label;
while( SheetLabel ) while( SheetLabel )
{ {
...@@ -496,7 +503,6 @@ static void DeplaceSheet( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ) ...@@ -496,7 +503,6 @@ static void DeplaceSheet( WinEDA_DrawPanel* panel, wxDC* DC, bool erase )
} }
/****************************************/ /****************************************/
/* Routine de sortie du Menu de Sheet */ /* Routine de sortie du Menu de Sheet */
/****************************************/ /****************************************/
...@@ -512,9 +518,9 @@ static void ExitSheet( WinEDA_DrawPanel* Panel, wxDC* DC ) ...@@ -512,9 +518,9 @@ static void ExitSheet( WinEDA_DrawPanel* Panel, wxDC* DC )
if( Sheet->m_Flags & IS_NEW ) /* Nouveau Placement en cours, on l'efface */ if( Sheet->m_Flags & IS_NEW ) /* Nouveau Placement en cours, on l'efface */
{ {
RedrawOneStruct( Panel, DC, Sheet, g_XorMode ); RedrawOneStruct( Panel, DC, Sheet, g_XorMode );
SAFE_DELETE( Sheet ); SAFE_DELETE( Sheet );
} }
else if( Sheet->m_Flags & IS_RESIZED )/* resize en cours: on l'annule */ else if( Sheet->m_Flags & IS_RESIZED ) /* resize en cours: on l'annule */
{ {
RedrawOneStruct( Panel, DC, Sheet, g_XorMode ); RedrawOneStruct( Panel, DC, Sheet, g_XorMode );
Sheet->m_Size.x = s_OldPos.x; Sheet->m_Size.x = s_OldPos.x;
...@@ -522,10 +528,10 @@ static void ExitSheet( WinEDA_DrawPanel* Panel, wxDC* DC ) ...@@ -522,10 +528,10 @@ static void ExitSheet( WinEDA_DrawPanel* Panel, wxDC* DC )
RedrawOneStruct( Panel, DC, Sheet, GR_DEFAULT_DRAWMODE ); RedrawOneStruct( Panel, DC, Sheet, GR_DEFAULT_DRAWMODE );
Sheet->m_Flags = 0; Sheet->m_Flags = 0;
} }
else if( Sheet->m_Flags & IS_MOVED )/* move en cours: on l'annule */ else if( Sheet->m_Flags & IS_MOVED ) /* move en cours: on l'annule */
{ {
wxPoint curspos = Screen->m_Curseur; wxPoint curspos = Screen->m_Curseur;
Panel->m_Parent->GetScreen()->m_Curseur = s_OldPos; Panel->m_Parent->GetScreen()->m_Curseur = s_OldPos;
DeplaceSheet( Panel, DC, TRUE ); DeplaceSheet( Panel, DC, TRUE );
RedrawOneStruct( Panel, DC, Sheet, GR_DEFAULT_DRAWMODE ); RedrawOneStruct( Panel, DC, Sheet, GR_DEFAULT_DRAWMODE );
Sheet->m_Flags = 0; Sheet->m_Flags = 0;
...@@ -540,7 +546,6 @@ static void ExitSheet( WinEDA_DrawPanel* Panel, wxDC* DC ) ...@@ -540,7 +546,6 @@ static void ExitSheet( WinEDA_DrawPanel* Panel, wxDC* DC )
} }
/*! /*!
* wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL * wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL
*/ */
......
...@@ -358,8 +358,8 @@ DrawSheetLabelStruct* WinEDA_SchematicFrame::Import_PinSheet( DrawSheetStruct* S ...@@ -358,8 +358,8 @@ DrawSheetLabelStruct* WinEDA_SchematicFrame::Import_PinSheet( DrawSheetStruct* S
DrawSheetLabelStruct* NewSheetLabel, * SheetLabel = NULL; DrawSheetLabelStruct* NewSheetLabel, * SheetLabel = NULL;
DrawHierLabelStruct* HLabel = NULL; DrawHierLabelStruct* HLabel = NULL;
if(!Sheet->m_s) return NULL; if(!Sheet->m_AssociatedScreen) return NULL;
DrawStruct = Sheet->m_s->EEDrawList; DrawStruct = Sheet->m_AssociatedScreen->EEDrawList;
HLabel = NULL; HLabel = NULL;
for( ; DrawStruct != NULL; DrawStruct = DrawStruct->Pnext ) for( ; DrawStruct != NULL; DrawStruct = DrawStruct->Pnext )
{ {
......
No preview for this file type
...@@ -2,8 +2,8 @@ msgid "" ...@@ -2,8 +2,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: kicad\n" "Project-Id-Version: kicad\n"
"POT-Creation-Date: \n" "POT-Creation-Date: \n"
"PO-Revision-Date: 2008-02-21 07:51+0100\n" "PO-Revision-Date: 2008-02-26 12:12+0100\n"
"Last-Translator: \n" "Last-Translator: jp charras <jean-pierre.charras@inpg.fr>\n"
"Language-Team: kicad team <jean-pierre.charras@ujf-grenoble.fr>\n" "Language-Team: kicad team <jean-pierre.charras@ujf-grenoble.fr>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-1\n" "Content-Type: text/plain; charset=iso-8859-1\n"
...@@ -267,7 +267,6 @@ msgstr "&OK" ...@@ -267,7 +267,6 @@ msgstr "&OK"
#: pcbnew/dialog_zones_by_polygon.cpp:205 #: pcbnew/dialog_zones_by_polygon.cpp:205
#: eeschema/plothpgl.cpp:274 #: eeschema/plothpgl.cpp:274
#: eeschema/symbtext.cpp:178 #: eeschema/symbtext.cpp:178
#: eeschema/annotate_dialog.cpp:154
#: eeschema/dialog_options.cpp:278 #: eeschema/dialog_options.cpp:278
#: eeschema/dialog_build_BOM.cpp:342 #: eeschema/dialog_build_BOM.cpp:342
#: eeschema/dialog_erc.cpp:218 #: eeschema/dialog_erc.cpp:218
...@@ -1033,6 +1032,7 @@ msgstr "Origine des coord de trac ...@@ -1033,6 +1032,7 @@ msgstr "Origine des coord de trac
#: pcbnew/pcbplot.cpp:214 #: pcbnew/pcbplot.cpp:214
#: pcbnew/xchgmod.cpp:137 #: pcbnew/xchgmod.cpp:137
#: eeschema/annotate_dialog.cpp:197
#: share/zoom.cpp:448 #: share/zoom.cpp:448
msgid "Close" msgid "Close"
msgstr "Fermer" msgstr "Fermer"
...@@ -1252,8 +1252,8 @@ msgid "Ref." ...@@ -1252,8 +1252,8 @@ msgid "Ref."
msgstr "Ref." msgstr "Ref."
#: pcbnew/class_text_mod.cpp:345 #: pcbnew/class_text_mod.cpp:345
#: pcbnew/class_board_item.cpp:79
#: pcbnew/class_edge_mod.cpp:290 #: pcbnew/class_edge_mod.cpp:290
#: pcbnew/class_board_item.cpp:79
#: eeschema/edit_component_in_schematic.cpp:789 #: eeschema/edit_component_in_schematic.cpp:789
#: eeschema/component_class.cpp:56 #: eeschema/component_class.cpp:56
#: eeschema/eelayer.h:158 #: eeschema/eelayer.h:158
...@@ -1267,17 +1267,17 @@ msgid "Text" ...@@ -1267,17 +1267,17 @@ msgid "Text"
msgstr "Texte" msgstr "Texte"
#: pcbnew/class_text_mod.cpp:350 #: pcbnew/class_text_mod.cpp:350
#: pcbnew/class_edge_mod.cpp:289
#: pcbnew/class_pad.cpp:881 #: pcbnew/class_pad.cpp:881
#: pcbnew/class_module.cpp:1107 #: pcbnew/class_module.cpp:1107
#: pcbnew/class_edge_mod.cpp:289
#: cvpcb/setvisu.cpp:31 #: cvpcb/setvisu.cpp:31
msgid "Module" msgid "Module"
msgstr "Module" msgstr "Module"
#: pcbnew/class_text_mod.cpp:359 #: pcbnew/class_text_mod.cpp:359
#: pcbnew/class_marker.cpp:133
#: pcbnew/class_track.cpp:779 #: pcbnew/class_track.cpp:779
#: pcbnew/class_drawsegment.cpp:159 #: pcbnew/class_drawsegment.cpp:159
#: pcbnew/class_marker.cpp:133
#: pcbnew/class_zone.cpp:526 #: pcbnew/class_zone.cpp:526
#: gerbview/affiche.cpp:94 #: gerbview/affiche.cpp:94
msgid "Type" msgid "Type"
...@@ -1312,11 +1312,11 @@ msgstr "Miroir" ...@@ -1312,11 +1312,11 @@ msgstr "Miroir"
#: pcbnew/class_text_mod.cpp:386 #: pcbnew/class_text_mod.cpp:386
#: pcbnew/class_pcb_text.cpp:191 #: pcbnew/class_pcb_text.cpp:191
#: pcbnew/dialog_edit_mod_text.cpp:204 #: pcbnew/dialog_edit_mod_text.cpp:204
#: pcbnew/class_edge_mod.cpp:300
#: pcbnew/cotation.cpp:129 #: pcbnew/cotation.cpp:129
#: pcbnew/mirepcb.cpp:113 #: pcbnew/mirepcb.cpp:113
#: pcbnew/pcbtexte.cpp:130 #: pcbnew/pcbtexte.cpp:130
#: pcbnew/class_track.cpp:859 #: pcbnew/class_track.cpp:859
#: pcbnew/class_edge_mod.cpp:300
#: pcbnew/class_drawsegment.cpp:179 #: pcbnew/class_drawsegment.cpp:179
#: eeschema/affiche.cpp:188 #: eeschema/affiche.cpp:188
#: eeschema/dialog_cmp_graphic_properties.cpp:188 #: eeschema/dialog_cmp_graphic_properties.cpp:188
...@@ -1419,52 +1419,19 @@ msgstr "Max" ...@@ -1419,52 +1419,19 @@ msgstr "Max"
msgid "Segm" msgid "Segm"
msgstr "Segm" msgstr "Segm"
#: pcbnew/gendrill.cpp:308
msgid "Drill file"
msgstr "Fichier de percage"
#: pcbnew/gendrill.cpp:323
#: pcbnew/gendrill.cpp:789
#: pcbnew/plotps.cpp:51
#: pcbnew/xchgmod.cpp:643
msgid "Unable to create file "
msgstr "Impossible de crer le fichier "
#: pcbnew/gendrill.cpp:378
#: pcbnew/dialog_gendrill.cpp:180
msgid "2:3"
msgstr "2:3"
#: pcbnew/gendrill.cpp:379
#: pcbnew/dialog_gendrill.cpp:181
msgid "2:4"
msgstr "2:4"
#: pcbnew/gendrill.cpp:384
msgid "3:2"
msgstr "3:2"
#: pcbnew/gendrill.cpp:385
msgid "3:3"
msgstr "3:3"
#: pcbnew/gendrill.cpp:728
msgid "Drill Map file"
msgstr "Fichier Plan de perage"
#: pcbnew/gendrill.cpp:743
msgid "Unable to create file"
msgstr "Impossible de crer le fichier "
#: pcbnew/gendrill.cpp:774
msgid "Drill Report file"
msgstr "Fichier rapport de perage:"
#: pcbnew/controle.cpp:172 #: pcbnew/controle.cpp:172
#: pcbnew/modedit.cpp:77 #: pcbnew/modedit.cpp:77
msgid "Selection Clarification" msgid "Selection Clarification"
msgstr "Clarification de la Slection" msgstr "Clarification de la Slection"
#: pcbnew/surbrill.cpp:37
msgid "Filter for net names:"
msgstr "Filtre pour nets:"
#: pcbnew/surbrill.cpp:41
msgid "List Nets"
msgstr "Liste quipots"
#: pcbnew/dialog_graphic_items_options.cpp:194 #: pcbnew/dialog_graphic_items_options.cpp:194
msgid "Graphics:" msgid "Graphics:"
msgstr "Elments graphiques;" msgstr "Elments graphiques;"
...@@ -1955,7 +1922,7 @@ msgid "Pad Settings" ...@@ -1955,7 +1922,7 @@ msgid "Pad Settings"
msgstr "Caract pads" msgstr "Caract pads"
#: pcbnew/modedit.cpp:406 #: pcbnew/modedit.cpp:406
#: eeschema/schedit.cpp:300 #: eeschema/schedit.cpp:303
msgid "Add Drawing" msgid "Add Drawing"
msgstr "Ajout d'lments graphiques" msgstr "Ajout d'lments graphiques"
...@@ -1966,8 +1933,8 @@ msgstr "Place Ancre" ...@@ -1966,8 +1933,8 @@ msgstr "Place Ancre"
#: pcbnew/modedit.cpp:424 #: pcbnew/modedit.cpp:424
#: pcbnew/edit.cpp:552 #: pcbnew/edit.cpp:552
#: eeschema/schedit.cpp:458
#: eeschema/libframe.cpp:579 #: eeschema/libframe.cpp:579
#: eeschema/schedit.cpp:470
msgid "Delete item" msgid "Delete item"
msgstr "Suppression d'lments" msgstr "Suppression d'lments"
...@@ -1982,7 +1949,7 @@ msgstr "Fin Outil" ...@@ -1982,7 +1949,7 @@ msgstr "Fin Outil"
#: pcbnew/modedit_onclick.cpp:216 #: pcbnew/modedit_onclick.cpp:216
#: pcbnew/onrightclick.cpp:484 #: pcbnew/onrightclick.cpp:484
#: eeschema/libedit_onrightclick.cpp:237 #: eeschema/libedit_onrightclick.cpp:237
#: eeschema/onrightclick.cpp:614 #: eeschema/onrightclick.cpp:622
#: gerbview/onrightclick.cpp:51 #: gerbview/onrightclick.cpp:51
msgid "Cancel Block" msgid "Cancel Block"
msgstr "Annuler Bloc" msgstr "Annuler Bloc"
...@@ -1996,7 +1963,7 @@ msgstr "Zoom Bloc (drag+bouton milieu)" ...@@ -1996,7 +1963,7 @@ msgstr "Zoom Bloc (drag+bouton milieu)"
#: pcbnew/modedit_onclick.cpp:221 #: pcbnew/modedit_onclick.cpp:221
#: pcbnew/onrightclick.cpp:489 #: pcbnew/onrightclick.cpp:489
#: eeschema/libedit_onrightclick.cpp:245 #: eeschema/libedit_onrightclick.cpp:245
#: eeschema/onrightclick.cpp:622 #: eeschema/onrightclick.cpp:630
#: gerbview/onrightclick.cpp:54 #: gerbview/onrightclick.cpp:54
msgid "Place Block" msgid "Place Block"
msgstr "Place Bloc" msgstr "Place Bloc"
...@@ -2004,7 +1971,7 @@ msgstr "Place Bloc" ...@@ -2004,7 +1971,7 @@ msgstr "Place Bloc"
#: pcbnew/modedit_onclick.cpp:223 #: pcbnew/modedit_onclick.cpp:223
#: pcbnew/onrightclick.cpp:491 #: pcbnew/onrightclick.cpp:491
#: eeschema/libedit_onrightclick.cpp:251 #: eeschema/libedit_onrightclick.cpp:251
#: eeschema/onrightclick.cpp:631 #: eeschema/onrightclick.cpp:639
msgid "Copy Block (shift + drag mouse)" msgid "Copy Block (shift + drag mouse)"
msgstr "Copie Bloc (shift + drag mouse)" msgstr "Copie Bloc (shift + drag mouse)"
...@@ -2132,14 +2099,6 @@ msgstr "Effacement contour" ...@@ -2132,14 +2099,6 @@ msgstr "Effacement contour"
msgid "Set Width" msgid "Set Width"
msgstr "Ajuste Epaiss" msgstr "Ajuste Epaiss"
#: pcbnew/surbrill.cpp:37
msgid "Filter for net names:"
msgstr "Filtre pour nets:"
#: pcbnew/surbrill.cpp:41
msgid "List Nets"
msgstr "Liste quipots"
#: pcbnew/plotgerb.cpp:72 #: pcbnew/plotgerb.cpp:72
msgid "unable to create file " msgid "unable to create file "
msgstr "Impossible de crer fichier " msgstr "Impossible de crer fichier "
...@@ -2589,6 +2548,13 @@ msgstr "Autoroute Pad" ...@@ -2589,6 +2548,13 @@ msgstr "Autoroute Pad"
msgid "Autoroute Net" msgid "Autoroute Net"
msgstr "Autoroute Net" msgstr "Autoroute Net"
#: pcbnew/plotps.cpp:51
#: pcbnew/gendrill.cpp:323
#: pcbnew/gendrill.cpp:789
#: pcbnew/xchgmod.cpp:643
msgid "Unable to create file "
msgstr "Impossible de crer le fichier "
#: pcbnew/plotps.cpp:361 #: pcbnew/plotps.cpp:361
#: pcbnew/affiche.cpp:63 #: pcbnew/affiche.cpp:63
#: pcbnew/class_board.cpp:444 #: pcbnew/class_board.cpp:444
...@@ -2913,8 +2879,8 @@ msgstr "Addition ...@@ -2913,8 +2879,8 @@ msgstr "Addition
#: pcbnew/edit.cpp:290 #: pcbnew/edit.cpp:290
#: pcbnew/tool_modedit.cpp:180 #: pcbnew/tool_modedit.cpp:180
#: eeschema/schedit.cpp:320
#: eeschema/libframe.cpp:503 #: eeschema/libframe.cpp:503
#: eeschema/schedit.cpp:323
#: gerbview/tool_gerber.cpp:385 #: gerbview/tool_gerber.cpp:385
msgid "Add Text" msgid "Add Text"
msgstr "Ajout de Texte" msgstr "Ajout de Texte"
...@@ -2935,12 +2901,28 @@ msgstr "Surbrillance des ...@@ -2935,12 +2901,28 @@ msgstr "Surbrillance des
msgid "Local Ratsnest" msgid "Local Ratsnest"
msgstr "Monter le chevelu gnral" msgstr "Monter le chevelu gnral"
#: pcbnew/class_edge_mod.cpp:287
msgid "Seg"
msgstr "Seg"
#: pcbnew/class_edge_mod.cpp:293
msgid "TimeStamp"
msgstr "TimeStamp"
#: pcbnew/class_edge_mod.cpp:295
msgid "Mod Layer"
msgstr "Couche Mod."
#: pcbnew/class_edge_mod.cpp:297
msgid "Seg Layer"
msgstr "Couche Seg."
#: pcbnew/pcbframe.cpp:272 #: pcbnew/pcbframe.cpp:272
msgid "Board modified, Save before exit ?" msgid "Board modified, Save before exit ?"
msgstr "Circuit Imprim modifie, Sauver avant de quitter ?" msgstr "Circuit Imprim modifie, Sauver avant de quitter ?"
#: pcbnew/pcbframe.cpp:273 #: pcbnew/pcbframe.cpp:273
#: eeschema/schframe.cpp:238 #: eeschema/schframe.cpp:269
#: cvpcb/cvframe.cpp:178 #: cvpcb/cvframe.cpp:178
#: common/confirm.cpp:119 #: common/confirm.cpp:119
msgid "Confirmation" msgid "Confirmation"
...@@ -2963,12 +2945,12 @@ msgid "Display Polar Coords" ...@@ -2963,12 +2945,12 @@ msgid "Display Polar Coords"
msgstr "Affichage coord Polaires" msgstr "Affichage coord Polaires"
#: pcbnew/pcbframe.cpp:391 #: pcbnew/pcbframe.cpp:391
#: eeschema/schframe.cpp:328 #: eeschema/schframe.cpp:368
msgid "Grid not show" msgid "Grid not show"
msgstr "Grille non montre" msgstr "Grille non montre"
#: pcbnew/pcbframe.cpp:391 #: pcbnew/pcbframe.cpp:391
#: eeschema/schframe.cpp:328 #: eeschema/schframe.cpp:368
msgid "Show Grid" msgid "Show Grid"
msgstr "Afficher grille" msgstr "Afficher grille"
...@@ -3406,14 +3388,26 @@ msgstr "Grille perso" ...@@ -3406,14 +3388,26 @@ msgstr "Grille perso"
msgid "+/- to switch" msgid "+/- to switch"
msgstr "+/- pour commuter" msgstr "+/- pour commuter"
#: pcbnew/class_marker.cpp:133 #: pcbnew/cross-probing.cpp:54
#: pcbnew/class_board_item.cpp:232 #, c-format
msgid "Marker" msgid "%s found"
msgstr "Marqueur" msgstr "%s trouv"
#: pcbnew/class_marker.cpp:137 #: pcbnew/cross-probing.cpp:56
msgid "ErrType" #: pcbnew/cross-probing.cpp:110
msgstr "Type Err" #, c-format
msgid "%s not found"
msgstr "%s non trouv"
#: pcbnew/cross-probing.cpp:113
#, c-format
msgid "%s pin %s not found"
msgstr "%s pin %s non trouve"
#: pcbnew/cross-probing.cpp:118
#, c-format
msgid "%s pin %s found"
msgstr "%s pin %s trouve"
#: pcbnew/cotation.cpp:85 #: pcbnew/cotation.cpp:85
msgid "Dimension properties" msgid "Dimension properties"
...@@ -3462,6 +3456,40 @@ msgstr "Segment en cours d' ...@@ -3462,6 +3456,40 @@ msgstr "Segment en cours d'
msgid "Delete Layer " msgid "Delete Layer "
msgstr "Effacer Couche" msgstr "Effacer Couche"
#: pcbnew/gendrill.cpp:308
msgid "Drill file"
msgstr "Fichier de percage"
#: pcbnew/gendrill.cpp:378
#: pcbnew/dialog_gendrill.cpp:180
msgid "2:3"
msgstr "2:3"
#: pcbnew/gendrill.cpp:379
#: pcbnew/dialog_gendrill.cpp:181
msgid "2:4"
msgstr "2:4"
#: pcbnew/gendrill.cpp:384
msgid "3:2"
msgstr "3:2"
#: pcbnew/gendrill.cpp:385
msgid "3:3"
msgstr "3:3"
#: pcbnew/gendrill.cpp:728
msgid "Drill Map file"
msgstr "Fichier Plan de perage"
#: pcbnew/gendrill.cpp:743
msgid "Unable to create file"
msgstr "Impossible de crer le fichier "
#: pcbnew/gendrill.cpp:774
msgid "Drill Report file"
msgstr "Fichier rapport de perage:"
#: pcbnew/export_gencad.cpp:69 #: pcbnew/export_gencad.cpp:69
msgid "GenCAD file:" msgid "GenCAD file:"
msgstr "Fichier GenCAD:" msgstr "Fichier GenCAD:"
...@@ -3632,70 +3660,6 @@ msgstr "N'affiche pas les couches cuivre" ...@@ -3632,70 +3660,6 @@ msgstr "N'affiche pas les couches cuivre"
msgid "Apply" msgid "Apply"
msgstr "Appliquer" msgstr "Appliquer"
#: pcbnew/specctra_import.cpp:74
msgid "Merge Specctra Session file:"
msgstr "Fichier Specctra Session Fusionner:"
#: pcbnew/specctra_import.cpp:100
msgid "BOARD may be corrupted, do not save it."
msgstr "Le PCB peut tre corrompu. Ne pas le sauver"
#: pcbnew/specctra_import.cpp:102
msgid "Fix problem and try again."
msgstr "Fixer le problme et recommencer."
#: pcbnew/specctra_import.cpp:116
msgid "Session file imported and merged OK."
msgstr "Fichier Session import et fusionn correctement."
#: pcbnew/specctra_import.cpp:182
#: pcbnew/specctra_import.cpp:290
#, c-format
msgid "Session file uses invalid layer id \"%s\""
msgstr "Le Fichier Session utilise une couche invalide n \"%s\""
#: pcbnew/specctra_import.cpp:232
msgid "Session via padstack has no shapes"
msgstr ""
#: pcbnew/specctra_import.cpp:239
#: pcbnew/specctra_import.cpp:257
#: pcbnew/specctra_import.cpp:281
#, c-format
msgid "Unsupported via shape: \"%s\""
msgstr "Forme via inconnue: \"%s\""
#: pcbnew/specctra_import.cpp:338
msgid "Session file is missing the \"session\" section"
msgstr ""
#: pcbnew/specctra_import.cpp:341
msgid "Session file is missing the \"placement\" section"
msgstr ""
#: pcbnew/specctra_import.cpp:344
msgid "Session file is missing the \"routes\" section"
msgstr ""
#: pcbnew/specctra_import.cpp:347
msgid "Session file is missing the \"library_out\" section"
msgstr ""
#: pcbnew/specctra_import.cpp:374
#, c-format
msgid "Session file has 'reference' to non-existent component \"%s\""
msgstr ""
#: pcbnew/specctra_import.cpp:446
#, c-format
msgid "Unsupported wire shape: \"%s\" for net: \"%s\""
msgstr "Forme de connexion inconnue: \"%s\" pour net: \"%s\""
#: pcbnew/specctra_import.cpp:489
#, c-format
msgid "A wire_via references a missing padstack \"%s\""
msgstr ""
#: pcbnew/pcbtexte.cpp:88 #: pcbnew/pcbtexte.cpp:88
msgid "TextPCB properties" msgid "TextPCB properties"
msgstr "Proprits des textes PCB" msgstr "Proprits des textes PCB"
...@@ -4360,6 +4324,11 @@ msgstr "Borgne/Aveugle" ...@@ -4360,6 +4324,11 @@ msgstr "Borgne/Aveugle"
msgid "Micro Via" msgid "Micro Via"
msgstr "Micro Via" msgstr "Micro Via"
#: pcbnew/class_board_item.cpp:232
#: pcbnew/class_marker.cpp:133
msgid "Marker"
msgstr "Marqueur"
#: pcbnew/class_board_item.cpp:237 #: pcbnew/class_board_item.cpp:237
msgid "Dimension" msgid "Dimension"
msgstr "Dimension" msgstr "Dimension"
...@@ -4407,6 +4376,28 @@ msgstr "Erreur DRC: la fermeture de cette zone cr ...@@ -4407,6 +4376,28 @@ msgstr "Erreur DRC: la fermeture de cette zone cr
msgid "No Net" msgid "No Net"
msgstr "No Net" msgstr "No Net"
#: pcbnew/specctra_export.cpp:64
msgid "Specctra DSN file:"
msgstr "Fichier Specctra DSN"
#: pcbnew/specctra_export.cpp:118
msgid "BOARD exported OK."
msgstr "PCB export Ok."
#: pcbnew/specctra_export.cpp:123
msgid "Unable to export, please fix and try again."
msgstr "Impossible d'exporter, fixer le problme et recommencer"
#: pcbnew/specctra_export.cpp:783
#, c-format
msgid "Component with value of \"%s\" has empty reference id."
msgstr "Le composant avec valeur \"%s\" a une rfrence vide."
#: pcbnew/specctra_export.cpp:791
#, c-format
msgid "Multiple components have identical reference IDs of \"%s\"."
msgstr "Multiple composants ont une reference identique \"%s\"."
#: pcbnew/class_board.cpp:447 #: pcbnew/class_board.cpp:447
msgid "Nodes" msgid "Nodes"
msgstr "Nodes" msgstr "Nodes"
...@@ -4480,10 +4471,17 @@ msgstr "Couche Inf." ...@@ -4480,10 +4471,17 @@ msgstr "Couche Inf."
msgid "The Top Layer and Bottom Layer must differ" msgid "The Top Layer and Bottom Layer must differ"
msgstr "Les couches dessus et dessous doivent diffrer" msgstr "Les couches dessus et dessous doivent diffrer"
#: pcbnew/move-drag_pads.cpp:251 #: pcbnew/onleftclick.cpp:176
#, c-format msgid "Graphic not authorized on Copper layers"
msgid "Delete Pad (module %s %s) " msgstr "Graphique non autoris sur Couches Cuivre"
msgstr "Effacer Pad (module %s %s) "
#: pcbnew/onleftclick.cpp:199
msgid "Tracks on Copper layers only "
msgstr "Pistes sur couches cuivre seulement"
#: pcbnew/onleftclick.cpp:281
msgid "Cotation not authorized on Copper layers"
msgstr "Cotation non autorise sur Couches Cuivre"
#: pcbnew/globaleditpad.cpp:76 #: pcbnew/globaleditpad.cpp:76
msgid "Pads Global Edit" msgid "Pads Global Edit"
...@@ -4545,64 +4543,74 @@ msgstr "Pas de pads ou de points de d ...@@ -4545,64 +4543,74 @@ msgstr "Pas de pads ou de points de d
msgid "Ok" msgid "Ok"
msgstr "Ok" msgstr "Ok"
#: pcbnew/class_edge_mod.cpp:287 #: pcbnew/move-drag_pads.cpp:268
msgid "Seg" #, c-format
msgstr "Seg" msgid "Delete Pad (module %s %s) "
msgstr "Effacer Pad (module %s %s) "
#: pcbnew/class_edge_mod.cpp:293 #: pcbnew/specctra_import.cpp:74
msgid "TimeStamp" msgid "Merge Specctra Session file:"
msgstr "TimeStamp" msgstr "Fichier Specctra Session Fusionner:"
#: pcbnew/class_edge_mod.cpp:295 #: pcbnew/specctra_import.cpp:101
msgid "Mod Layer" msgid "BOARD may be corrupted, do not save it."
msgstr "Couche Mod." msgstr "Le PCB peut tre corrompu. Ne pas le sauver"
#: pcbnew/class_edge_mod.cpp:297 #: pcbnew/specctra_import.cpp:103
msgid "Seg Layer" msgid "Fix problem and try again."
msgstr "Couche Seg." msgstr "Fixer le problme et recommencer."
#: pcbnew/cross-probing.cpp:54 #: pcbnew/specctra_import.cpp:117
#, c-format msgid "Session file imported and merged OK."
msgid "%s found" msgstr "Fichier Session import et fusionn correctement."
msgstr "%s trouv"
#: pcbnew/cross-probing.cpp:56 #: pcbnew/specctra_import.cpp:183
#: pcbnew/cross-probing.cpp:109 #: pcbnew/specctra_import.cpp:291
#, c-format #, c-format
msgid "%s not found" msgid "Session file uses invalid layer id \"%s\""
msgstr "%s non trouv" msgstr "Le Fichier Session utilise une couche invalide n \"%s\""
#: pcbnew/cross-probing.cpp:111 #: pcbnew/specctra_import.cpp:233
#, c-format msgid "Session via padstack has no shapes"
msgid "%s pin %s not found" msgstr ""
msgstr "%s pin %s non trouve"
#: pcbnew/cross-probing.cpp:113 #: pcbnew/specctra_import.cpp:240
#: pcbnew/specctra_import.cpp:258
#: pcbnew/specctra_import.cpp:282
#, c-format #, c-format
msgid "%s pin %s found" msgid "Unsupported via shape: \"%s\""
msgstr "%s pin %s trouve" msgstr "Forme via inconnue: \"%s\""
#: pcbnew/specctra_export.cpp:64 #: pcbnew/specctra_import.cpp:339
msgid "Specctra DSN file:" msgid "Session file is missing the \"session\" section"
msgstr "Fichier Specctra DSN" msgstr ""
#: pcbnew/specctra_export.cpp:118 #: pcbnew/specctra_import.cpp:342
msgid "BOARD exported OK." msgid "Session file is missing the \"placement\" section"
msgstr "PCB export Ok." msgstr ""
#: pcbnew/specctra_export.cpp:123 #: pcbnew/specctra_import.cpp:345
msgid "Unable to export, please fix and try again." msgid "Session file is missing the \"routes\" section"
msgstr ""
#: pcbnew/specctra_import.cpp:348
msgid "Session file is missing the \"library_out\" section"
msgstr "" msgstr ""
#: pcbnew/specctra_export.cpp:720 #: pcbnew/specctra_import.cpp:375
#, c-format #, c-format
msgid "Component with value of \"%s\" has empty reference id." msgid "Session file has 'reference' to non-existent component \"%s\""
msgstr "Le composant avec valeur \"%s\" a une rfrence vide." msgstr ""
#: pcbnew/specctra_export.cpp:728 #: pcbnew/specctra_import.cpp:447
#, c-format #, c-format
msgid "Multiple components have identical reference IDs of \"%s\"." msgid "Unsupported wire shape: \"%s\" for net: \"%s\""
msgstr "Multiple composants ont une reference identique \"%s\"." msgstr "Forme de connexion inconnue: \"%s\" pour net: \"%s\""
#: pcbnew/specctra_import.cpp:490
#, c-format
msgid "A wire_via references a missing padstack \"%s\""
msgstr ""
#: pcbnew/class_drawsegment.cpp:161 #: pcbnew/class_drawsegment.cpp:161
msgid "Shape" msgid "Shape"
...@@ -4680,18 +4688,6 @@ msgstr "Isolation" ...@@ -4680,18 +4688,6 @@ msgstr "Isolation"
msgid "Mask clearance" msgid "Mask clearance"
msgstr "Retrait Masque" msgstr "Retrait Masque"
#: pcbnew/onleftclick.cpp:176
msgid "Graphic not authorized on Copper layers"
msgstr "Graphique non autoris sur Couches Cuivre"
#: pcbnew/onleftclick.cpp:199
msgid "Tracks on Copper layers only "
msgstr "Pistes sur couches cuivre seulement"
#: pcbnew/onleftclick.cpp:281
msgid "Cotation not authorized on Copper layers"
msgstr "Cotation non autorise sur Couches Cuivre"
#: pcbnew/dialog_drc.cpp:430 #: pcbnew/dialog_drc.cpp:430
#: eeschema/dialog_erc.cpp:237 #: eeschema/dialog_erc.cpp:237
#: eeschema/dialog_edit_component_in_lib.cpp:166 #: eeschema/dialog_edit_component_in_lib.cpp:166
...@@ -4816,6 +4812,10 @@ msgstr "Fichier rapport termin ...@@ -4816,6 +4812,10 @@ msgstr "Fichier rapport termin
msgid "DRC Report file" msgid "DRC Report file"
msgstr "Fichier rapport de contrle DRC:" msgstr "Fichier rapport de contrle DRC:"
#: pcbnew/class_marker.cpp:137
msgid "ErrType"
msgstr "Type Err"
#: pcbnew/cleaningoptions_dialog.cpp:146 #: pcbnew/cleaningoptions_dialog.cpp:146
msgid "Static" msgid "Static"
msgstr "Static" msgstr "Static"
...@@ -5302,7 +5302,7 @@ msgid "Pin Num Size to others" ...@@ -5302,7 +5302,7 @@ msgid "Pin Num Size to others"
msgstr "Change taille Num pin autres pins" msgstr "Change taille Num pin autres pins"
#: eeschema/libedit_onrightclick.cpp:241 #: eeschema/libedit_onrightclick.cpp:241
#: eeschema/onrightclick.cpp:620 #: eeschema/onrightclick.cpp:628
msgid "Win. Zoom (Midd butt drag mouse)" msgid "Win. Zoom (Midd butt drag mouse)"
msgstr "Win. Zoom (Midd butt drag mouse)" msgstr "Win. Zoom (Midd butt drag mouse)"
...@@ -5315,72 +5315,10 @@ msgid "Mirror Block (ctrl + drag mouse)" ...@@ -5315,72 +5315,10 @@ msgid "Mirror Block (ctrl + drag mouse)"
msgstr "Bloc Miroir (ctrl + drag mouse)" msgstr "Bloc Miroir (ctrl + drag mouse)"
#: eeschema/libedit_onrightclick.cpp:254 #: eeschema/libedit_onrightclick.cpp:254
#: eeschema/onrightclick.cpp:635 #: eeschema/onrightclick.cpp:643
msgid "Del. Block (shift+ctrl + drag mouse)" msgid "Del. Block (shift+ctrl + drag mouse)"
msgstr "Effacement Bloc (shift+ctrl + drag mouse)" msgstr "Effacement Bloc (shift+ctrl + drag mouse)"
#: eeschema/schedit.cpp:284
msgid "Push/Pop Hierarchy"
msgstr "Naviger dans Hirarchie"
#: eeschema/schedit.cpp:288
msgid "Add NoConnect Flag"
msgstr "Ajoutde symboles de non connexion"
#: eeschema/schedit.cpp:292
#: eeschema/hotkeys.cpp:271
msgid "Add Wire"
msgstr "Ajouter Fils"
#: eeschema/schedit.cpp:296
msgid "Add Bus"
msgstr "Addition de Bus"
#: eeschema/schedit.cpp:304
msgid "Add Junction"
msgstr "Ajout jonctions"
#: eeschema/schedit.cpp:308
msgid "Add Label"
msgstr "Ajout Label"
#: eeschema/schedit.cpp:312
msgid "Add Global label"
msgstr "Ajout de labels globaux"
#: eeschema/schedit.cpp:316
msgid "Add Hierarchal label"
msgstr "Ajouter Label Hirarchique"
#: eeschema/schedit.cpp:324
msgid "Add Wire to Bus Entry"
msgstr "Addition d'entres de bus (type fil vers bus)"
#: eeschema/schedit.cpp:328
msgid "Add Bus to Bus entry"
msgstr "Addition d'entres de bus (type bus vers bus)"
#: eeschema/schedit.cpp:332
msgid "Add Sheet"
msgstr "Ajout de Feuille"
#: eeschema/schedit.cpp:336
msgid "Add PinSheet"
msgstr "Ajout Conn. hirar."
#: eeschema/schedit.cpp:340
msgid "Import PinSheet"
msgstr "Importer Connecteur de hirarchie"
#: eeschema/schedit.cpp:344
#: eeschema/hotkeys.cpp:249
msgid "Add Component"
msgstr "Ajout Composant"
#: eeschema/schedit.cpp:348
msgid "Add Power"
msgstr "Add Alims"
#: eeschema/tool_lib.cpp:48 #: eeschema/tool_lib.cpp:48
msgid "deselect current tool" msgid "deselect current tool"
msgstr "Dslection outil courant" msgstr "Dslection outil courant"
...@@ -5741,50 +5679,6 @@ msgstr "Commun a converti" ...@@ -5741,50 +5679,6 @@ msgstr "Commun a converti"
msgid "Vertical" msgid "Vertical"
msgstr "Vertical" msgstr "Vertical"
#: eeschema/annotate_dialog.cpp:122
msgid "Hierarchy"
msgstr "Hirarchie"
#: eeschema/annotate_dialog.cpp:123
msgid "Current sheet"
msgstr "Feuille active"
#: eeschema/annotate_dialog.cpp:124
msgid "annotate:"
msgstr "Numrotation:"
#: eeschema/annotate_dialog.cpp:129
msgid "all components"
msgstr "Tous les composants"
#: eeschema/annotate_dialog.cpp:130
msgid "new components only"
msgstr "Nouveaux composants seulement"
#: eeschema/annotate_dialog.cpp:131
msgid "select items:"
msgstr "Slection:"
#: eeschema/annotate_dialog.cpp:136
msgid "by position"
msgstr "par position"
#: eeschema/annotate_dialog.cpp:137
msgid "by value"
msgstr "par valeur"
#: eeschema/annotate_dialog.cpp:138
msgid "sorting:"
msgstr "Tri:"
#: eeschema/annotate_dialog.cpp:145
msgid "&Annotate"
msgstr "Numrot&ation"
#: eeschema/annotate_dialog.cpp:150
msgid "&Del Annotate"
msgstr "&Dnumrotation"
#: eeschema/load_one_schematic_file.cpp:103 #: eeschema/load_one_schematic_file.cpp:103
msgid "Failed to open " msgid "Failed to open "
msgstr "Erreur ouverture " msgstr "Erreur ouverture "
...@@ -5799,9 +5693,8 @@ msgid " is NOT EESchema file" ...@@ -5799,9 +5693,8 @@ msgid " is NOT EESchema file"
msgstr " n'est PAS un fichier EESchema" msgstr " n'est PAS un fichier EESchema"
#: eeschema/load_one_schematic_file.cpp:471 #: eeschema/load_one_schematic_file.cpp:471
#, fuzzy
msgid "Done Loading " msgid "Done Loading "
msgstr "Chargement " msgstr "Chargement termin"
#: eeschema/getpart.cpp:106 #: eeschema/getpart.cpp:106
#, c-format #, c-format
...@@ -6098,7 +5991,6 @@ msgid " (with SubCmp)" ...@@ -6098,7 +5991,6 @@ msgid " (with SubCmp)"
msgstr "avec sub-composants" msgstr "avec sub-composants"
#: eeschema/dialog_build_BOM.cpp:1207 #: eeschema/dialog_build_BOM.cpp:1207
#: eeschema/component_class.cpp:345
msgid "?" msgid "?"
msgstr "?" msgstr "?"
...@@ -6470,196 +6362,206 @@ msgid "Delete Glabel" ...@@ -6470,196 +6362,206 @@ msgid "Delete Glabel"
msgstr "Supprimer Label Global" msgstr "Supprimer Label Global"
#: eeschema/onrightclick.cpp:380 #: eeschema/onrightclick.cpp:380
#: eeschema/onrightclick.cpp:402 #: eeschema/onrightclick.cpp:431
#: eeschema/onrightclick.cpp:452 #: eeschema/onrightclick.cpp:460
msgid "Change to Label" msgid "Change to Hierarchical Label"
msgstr "Change en Label" msgstr "Chnager en Label Hirarchique"
#: eeschema/onrightclick.cpp:382 #: eeschema/onrightclick.cpp:382
#: eeschema/onrightclick.cpp:404 #: eeschema/onrightclick.cpp:404
#: eeschema/onrightclick.cpp:429 #: eeschema/onrightclick.cpp:458
msgid "Change to Text" msgid "Change to Label"
msgstr "Change en Texte" msgstr "Change en Label"
#: eeschema/onrightclick.cpp:384 #: eeschema/onrightclick.cpp:384
#: eeschema/onrightclick.cpp:406 #: eeschema/onrightclick.cpp:406
#: eeschema/onrightclick.cpp:431 #: eeschema/onrightclick.cpp:433
#: eeschema/onrightclick.cpp:456 msgid "Change to Text"
msgstr "Change en Texte"
#: eeschema/onrightclick.cpp:386
#: eeschema/onrightclick.cpp:410
#: eeschema/onrightclick.cpp:437
#: eeschema/onrightclick.cpp:464
msgid "Change Type" msgid "Change Type"
msgstr "Change Type" msgstr "Change Type"
#: eeschema/onrightclick.cpp:395 #: eeschema/onrightclick.cpp:397
msgid "Move Hlabel" msgid "Move Hlabel"
msgstr "Dplacer Label Hirarchique" msgstr "Dplacer Label Hirarchique"
#: eeschema/onrightclick.cpp:396 #: eeschema/onrightclick.cpp:398
msgid "Rotate HLabel (R)" msgid "Rotate HLabel (R)"
msgstr "Rot. Label Hirarchique (R)" msgstr "Rot. Label Hirarchique (R)"
#: eeschema/onrightclick.cpp:397 #: eeschema/onrightclick.cpp:399
msgid "Edit HLabel" msgid "Edit HLabel"
msgstr "Editer Label Hirarchique" msgstr "Editer Label Hirarchique"
#: eeschema/onrightclick.cpp:398 #: eeschema/onrightclick.cpp:400
msgid "Delete Hlabel" msgid "Delete Hlabel"
msgstr "Supprimer Label Hirarchique" msgstr "Supprimer Label Hirarchique"
#: eeschema/onrightclick.cpp:420 #: eeschema/onrightclick.cpp:408
#: eeschema/onrightclick.cpp:435
msgid "Change to Global label"
msgstr "Change en Label Global"
#: eeschema/onrightclick.cpp:424
msgid "Move Label" msgid "Move Label"
msgstr "Dplace Label" msgstr "Dplace Label"
#: eeschema/onrightclick.cpp:421 #: eeschema/onrightclick.cpp:425
msgid "Rotate Label (R)" msgid "Rotate Label (R)"
msgstr "Rot. Label (R)" msgstr "Rot. Label (R)"
#: eeschema/onrightclick.cpp:422 #: eeschema/onrightclick.cpp:426
msgid "Edit Label" msgid "Edit Label"
msgstr "Editer Label" msgstr "Editer Label"
#: eeschema/onrightclick.cpp:423 #: eeschema/onrightclick.cpp:427
msgid "Delete Label" msgid "Delete Label"
msgstr "Supprimer Label:" msgstr "Supprimer Label:"
#: eeschema/onrightclick.cpp:427 #: eeschema/onrightclick.cpp:451
#: eeschema/onrightclick.cpp:454
msgid "Change to Glabel"
msgstr "Change en Label Global"
#: eeschema/onrightclick.cpp:445
msgid "Move Text" msgid "Move Text"
msgstr "Dplacer Texte" msgstr "Dplacer Texte"
#: eeschema/onrightclick.cpp:446 #: eeschema/onrightclick.cpp:452
msgid "Rotate Text (R)" msgid "Rotate Text (R)"
msgstr "Rot. Texte (R)" msgstr "Rot. Texte (R)"
#: eeschema/onrightclick.cpp:447 #: eeschema/onrightclick.cpp:453
msgid "Edit Text" msgid "Edit Text"
msgstr "Editer Texte" msgstr "Editer Texte"
#: eeschema/onrightclick.cpp:448 #: eeschema/onrightclick.cpp:454
msgid "Delete Text" msgid "Delete Text"
msgstr "Supprimer Texte" msgstr "Supprimer Texte"
#: eeschema/onrightclick.cpp:474 #: eeschema/onrightclick.cpp:462
#: eeschema/onrightclick.cpp:514 msgid "Change to Glabel"
msgstr "Change en Label Global"
#: eeschema/onrightclick.cpp:482
#: eeschema/onrightclick.cpp:522
msgid "Break Wire" msgid "Break Wire"
msgstr "Briser fil" msgstr "Briser fil"
#: eeschema/onrightclick.cpp:477 #: eeschema/onrightclick.cpp:485
msgid "delete junction" msgid "delete junction"
msgstr "Supprimer jonction" msgstr "Supprimer jonction"
#: eeschema/onrightclick.cpp:482 #: eeschema/onrightclick.cpp:490
#: eeschema/onrightclick.cpp:508 #: eeschema/onrightclick.cpp:516
msgid "Delete node" msgid "Delete node"
msgstr "Supprimer Noeud" msgstr "Supprimer Noeud"
#: eeschema/onrightclick.cpp:484 #: eeschema/onrightclick.cpp:492
#: eeschema/onrightclick.cpp:510 #: eeschema/onrightclick.cpp:518
msgid "Delete connection" msgid "Delete connection"
msgstr "Supprimer connexion" msgstr "Supprimer connexion"
#: eeschema/onrightclick.cpp:501 #: eeschema/onrightclick.cpp:509
msgid "End Wire" msgid "End Wire"
msgstr "Fin Fil" msgstr "Fin Fil"
#: eeschema/onrightclick.cpp:503 #: eeschema/onrightclick.cpp:511
msgid "Delete Wire" msgid "Delete Wire"
msgstr "Supprimer Fil" msgstr "Supprimer Fil"
#: eeschema/onrightclick.cpp:518 #: eeschema/onrightclick.cpp:526
#: eeschema/onrightclick.cpp:550 #: eeschema/onrightclick.cpp:558
msgid "Add junction" msgid "Add junction"
msgstr "Addition de jonctions" msgstr "Addition de jonctions"
#: eeschema/onrightclick.cpp:519 #: eeschema/onrightclick.cpp:527
#: eeschema/onrightclick.cpp:551 #: eeschema/onrightclick.cpp:559
msgid "Add label" msgid "Add label"
msgstr "Ajout Label" msgstr "Ajout Label"
#: eeschema/onrightclick.cpp:524 #: eeschema/onrightclick.cpp:532
#: eeschema/onrightclick.cpp:556 #: eeschema/onrightclick.cpp:564
msgid "Add global label" msgid "Add global label"
msgstr "Addition de labels globaux" msgstr "Addition de labels globaux"
#: eeschema/onrightclick.cpp:540 #: eeschema/onrightclick.cpp:548
msgid "End Bus" msgid "End Bus"
msgstr "Fin Bus" msgstr "Fin Bus"
#: eeschema/onrightclick.cpp:543 #: eeschema/onrightclick.cpp:551
msgid "Delete Bus" msgid "Delete Bus"
msgstr "Supprimer Bus" msgstr "Supprimer Bus"
#: eeschema/onrightclick.cpp:547 #: eeschema/onrightclick.cpp:555
msgid "Break Bus" msgid "Break Bus"
msgstr "Briser Bus" msgstr "Briser Bus"
#: eeschema/onrightclick.cpp:569 #: eeschema/onrightclick.cpp:577
msgid "Enter Sheet" msgid "Enter Sheet"
msgstr "Enter dans Feuille" msgstr "Enter dans Feuille"
#: eeschema/onrightclick.cpp:571 #: eeschema/onrightclick.cpp:579
msgid "Move Sheet" msgid "Move Sheet"
msgstr "Dplace Feuille" msgstr "Dplace Feuille"
#: eeschema/onrightclick.cpp:576 #: eeschema/onrightclick.cpp:584
msgid "Place Sheet" msgid "Place Sheet"
msgstr "Place Feuille" msgstr "Place Feuille"
#: eeschema/onrightclick.cpp:580 #: eeschema/onrightclick.cpp:588
msgid "Edit Sheet" msgid "Edit Sheet"
msgstr "Edite Feuille" msgstr "Edite Feuille"
#: eeschema/onrightclick.cpp:581 #: eeschema/onrightclick.cpp:589
msgid "Resize Sheet" msgid "Resize Sheet"
msgstr "Redimensionne feuille" msgstr "Redimensionne feuille"
#: eeschema/onrightclick.cpp:584 #: eeschema/onrightclick.cpp:592
msgid "Cleanup PinSheets" msgid "Cleanup PinSheets"
msgstr "Nettoyage de la feuille" msgstr "Nettoyage de la feuille"
#: eeschema/onrightclick.cpp:585 #: eeschema/onrightclick.cpp:593
msgid "Delete Sheet" msgid "Delete Sheet"
msgstr "Supprimer Feuille" msgstr "Supprimer Feuille"
#: eeschema/onrightclick.cpp:598 #: eeschema/onrightclick.cpp:606
msgid "Move PinSheet" msgid "Move PinSheet"
msgstr "Dplace Connecteur de hirarchie" msgstr "Dplace Connecteur de hirarchie"
#: eeschema/onrightclick.cpp:600 #: eeschema/onrightclick.cpp:608
msgid "Edit PinSheet" msgid "Edit PinSheet"
msgstr "Edit Connecteur de hirarchie" msgstr "Edit Connecteur de hirarchie"
#: eeschema/onrightclick.cpp:603 #: eeschema/onrightclick.cpp:611
msgid "Delete PinSheet" msgid "Delete PinSheet"
msgstr "Supprimer Connecteur de hirarchie" msgstr "Supprimer Connecteur de hirarchie"
#: eeschema/onrightclick.cpp:628 #: eeschema/onrightclick.cpp:636
msgid "Other block commands" msgid "Other block commands"
msgstr "Autres commandes de bloc" msgstr "Autres commandes de bloc"
#: eeschema/onrightclick.cpp:629 #: eeschema/onrightclick.cpp:637
msgid "Save Block" msgid "Save Block"
msgstr "Sauver Bloc" msgstr "Sauver Bloc"
#: eeschema/onrightclick.cpp:633 #: eeschema/onrightclick.cpp:641
msgid "Drag Block (ctrl + drag mouse)" msgid "Drag Block (ctrl + drag mouse)"
msgstr "Drag Bloc (ctrl + drag mouse)" msgstr "Drag Bloc (ctrl + drag mouse)"
#: eeschema/onrightclick.cpp:637 #: eeschema/onrightclick.cpp:645
msgid "Mirror Block ||" msgid "Mirror Block ||"
msgstr "Miroir Bloc ||" msgstr "Miroir Bloc ||"
#: eeschema/onrightclick.cpp:641 #: eeschema/onrightclick.cpp:649
msgid "Copy to Clipboard" msgid "Copy to Clipboard"
msgstr "Copie dans Presse papier" msgstr "Copie dans Presse papier"
#: eeschema/class_drawsheet.cpp:164 #: eeschema/class_drawsheet.cpp:174
msgid "Ok to cleanup this sheet" msgid "Ok to cleanup this sheet"
msgstr "Ok pour nettoyer cette feuille" msgstr "Ok pour nettoyer cette feuille"
#: eeschema/class_drawsheet.cpp:572 #: eeschema/class_drawsheet.cpp:655
#, c-format #, c-format
msgid "%8.8lX/" msgid "%8.8lX/"
msgstr "%8.8lX/" msgstr "%8.8lX/"
...@@ -6757,47 +6659,6 @@ msgstr "Forme Label:" ...@@ -6757,47 +6659,6 @@ msgstr "Forme Label:"
msgid "Size " msgid "Size "
msgstr "Taille " msgstr "Taille "
#: eeschema/annotate.cpp:188
msgid "Previous Annotation will be deleted. Continue ?"
msgstr "La numrotation existante va tre dtruite, continuer?"
#: eeschema/annotate.cpp:679
#, c-format
msgid "item not annotated: %s%s"
msgstr "item non numrot: %s%s"
#: eeschema/annotate.cpp:683
#, c-format
msgid "( unit %d)"
msgstr "( Unit %d)"
#: eeschema/annotate.cpp:699
#, c-format
msgid "Error item %s%s"
msgstr "Erreur item %s%s"
#: eeschema/annotate.cpp:701
#, c-format
msgid " unit %d and no more than %d parts"
msgstr " unit %d et plus que %d parts"
#: eeschema/annotate.cpp:734
#: eeschema/annotate.cpp:757
#, c-format
msgid "Multiple item %s%s"
msgstr "Multiplelment %s%s"
#: eeschema/annotate.cpp:739
#: eeschema/annotate.cpp:761
#, c-format
msgid " (unit %d)"
msgstr " ( Unit %d)"
#: eeschema/annotate.cpp:777
#, c-format
msgid "Diff values for %s%d%c (%s) and %s%d%c (%s)"
msgstr "Valeurs diffrentes pour %s%d%c (%s) et %s%d%c (%s)"
#: eeschema/plotps.cpp:179 #: eeschema/plotps.cpp:179
msgid "Plot Options:" msgid "Plot Options:"
msgstr "Options de trac:" msgstr "Options de trac:"
...@@ -6895,27 +6756,6 @@ msgstr "Examen Fichiers de Doc" ...@@ -6895,27 +6756,6 @@ msgstr "Examen Fichiers de Doc"
msgid "Alias" msgid "Alias"
msgstr "Alias" msgstr "Alias"
#: eeschema/schframe.cpp:237
msgid "Schematic modified, Save before exit ?"
msgstr "Schematique modifie, Sauver avant de quitter ?"
#: eeschema/schframe.cpp:338
msgid "No show Hidden Pins"
msgstr "N'affichage pas les pins invisibles"
#: eeschema/schframe.cpp:338
#: eeschema/tool_sch.cpp:274
msgid "Show Hidden Pins"
msgstr "Force affichage des pins invisibles"
#: eeschema/schframe.cpp:341
msgid "Draw lines at any direction"
msgstr "Tracer traits de direction quelconque"
#: eeschema/schframe.cpp:342
msgid "Draw lines H, V or 45 deg only"
msgstr "Tracer traits H, V ou 45 deg seulement"
#: eeschema/menubar.cpp:41 #: eeschema/menubar.cpp:41
#: gerbview/tool_gerber.cpp:63 #: gerbview/tool_gerber.cpp:63
msgid "&New" msgid "&New"
...@@ -7074,26 +6914,22 @@ msgid "Place the bus" ...@@ -7074,26 +6914,22 @@ msgid "Place the bus"
msgstr "Placer le Bus" msgstr "Placer le Bus"
#: eeschema/menubar.cpp:234 #: eeschema/menubar.cpp:234
#, fuzzy
msgid "W&ire to bus entry" msgid "W&ire to bus entry"
msgstr "Addition d'entres de bus (type fil vers bus)" msgstr "Entres de bus (type fil vers bus)"
#: eeschema/menubar.cpp:235 #: eeschema/menubar.cpp:235
#: eeschema/tool_sch.cpp:180 #: eeschema/tool_sch.cpp:180
#, fuzzy
msgid "Place the wire to bus entry" msgid "Place the wire to bus entry"
msgstr "Addition d'entres de bus (type fil vers bus)" msgstr "Placer des entres de bus (type fil vers bus)"
#: eeschema/menubar.cpp:244 #: eeschema/menubar.cpp:244
#, fuzzy
msgid "B&us to bus entry" msgid "B&us to bus entry"
msgstr "Addition d'entres de bus (type bus vers bus)" msgstr "Entres de bus (type bus vers bus)"
#: eeschema/menubar.cpp:245 #: eeschema/menubar.cpp:245
#: eeschema/tool_sch.cpp:184 #: eeschema/tool_sch.cpp:184
#, fuzzy
msgid "Place the bus to bus entry" msgid "Place the bus to bus entry"
msgstr "Addition d'entres de bus (type bus vers bus)" msgstr "Placer des entres de bus (type bus vers bus)"
#: eeschema/menubar.cpp:254 #: eeschema/menubar.cpp:254
msgid "No connect flag" msgid "No connect flag"
...@@ -7151,12 +6987,12 @@ msgstr "Placer la Feuille Hi ...@@ -7151,12 +6987,12 @@ msgstr "Placer la Feuille Hi
#: eeschema/menubar.cpp:314 #: eeschema/menubar.cpp:314
msgid "Imported hierarchical label" msgid "Imported hierarchical label"
msgstr "" msgstr "Importer label hirarchique"
#: eeschema/menubar.cpp:315 #: eeschema/menubar.cpp:315
#: eeschema/tool_sch.cpp:216 #: eeschema/tool_sch.cpp:216
msgid "Place the pin sheet (imported hierarchical label from sheet)" msgid "Place the pin sheet (imported hierarchical label from sheet)"
msgstr "" msgstr "Placer la pin hirarchique ( Importer un label hirarchique vers la feuille)"
#: eeschema/menubar.cpp:324 #: eeschema/menubar.cpp:324
#, fuzzy #, fuzzy
...@@ -7164,18 +7000,16 @@ msgid "Hierarchical pin to sheet" ...@@ -7164,18 +7000,16 @@ msgid "Hierarchical pin to sheet"
msgstr "Addition de pins de hierarchie dans les symboles de hierarchie" msgstr "Addition de pins de hierarchie dans les symboles de hierarchie"
#: eeschema/menubar.cpp:325 #: eeschema/menubar.cpp:325
#, fuzzy
msgid "Place the hierarchical pin to sheet" msgid "Place the hierarchical pin to sheet"
msgstr "Addition de pins de hierarchie dans les symboles de hierarchie" msgstr "Addition de pins de hierarchie dans les feuilles symboles de hierarchie"
#: eeschema/menubar.cpp:336 #: eeschema/menubar.cpp:336
msgid "Graphic line or poligon" msgid "Graphic line or poligon"
msgstr "Ligne ou polygone graphique" msgstr "Ligne ou polygone graphique"
#: eeschema/menubar.cpp:337 #: eeschema/menubar.cpp:337
#, fuzzy
msgid "Place the graphic line or poligon" msgid "Place the graphic line or poligon"
msgstr "Addition de lignes ou polygones graphiques" msgstr "Placer des lignes ou polygones graphiques"
#: eeschema/menubar.cpp:346 #: eeschema/menubar.cpp:346
msgid "Graphic text (comment)" msgid "Graphic text (comment)"
...@@ -7221,7 +7055,7 @@ msgid "Name" ...@@ -7221,7 +7055,7 @@ msgid "Name"
msgstr "Nom" msgstr "Nom"
#: eeschema/dialog_create_component.cpp:168 #: eeschema/dialog_create_component.cpp:168
#: eeschema/component_class.cpp:213 #: eeschema/component_class.cpp:229
msgid "U" msgid "U"
msgstr "U" msgstr "U"
...@@ -7413,6 +7247,16 @@ msgstr "Ancre" ...@@ -7413,6 +7247,16 @@ msgstr "Ancre"
msgid "Export" msgid "Export"
msgstr "Exporter" msgstr "Exporter"
#: eeschema/hotkeys.cpp:249
#: eeschema/schedit.cpp:347
msgid "Add Component"
msgstr "Ajout Composant"
#: eeschema/hotkeys.cpp:271
#: eeschema/schedit.cpp:295
msgid "Add Wire"
msgstr "Ajouter Fils"
#: eeschema/netlist_control.cpp:231 #: eeschema/netlist_control.cpp:231
#: eeschema/netlist_control.cpp:348 #: eeschema/netlist_control.cpp:348
#: gerbview/options.cpp:201 #: gerbview/options.cpp:201
...@@ -8233,6 +8077,8 @@ msgid "" ...@@ -8233,6 +8077,8 @@ msgid ""
"Place the global label.\n" "Place the global label.\n"
"Warning: all global labels with the same name are connected in whole hierarchy" "Warning: all global labels with the same name are connected in whole hierarchy"
msgstr "" msgstr ""
"Placer le label global.\n"
"Attention: tous les labels globaux de mme nom sont connect dans toute la hirarchie"
#: eeschema/tool_sch.cpp:221 #: eeschema/tool_sch.cpp:221
#, fuzzy #, fuzzy
...@@ -8243,6 +8089,11 @@ msgstr "Addition de pins de hierarchie dans les symboles de hierarchie" ...@@ -8243,6 +8089,11 @@ msgstr "Addition de pins de hierarchie dans les symboles de hierarchie"
msgid "Place the graphic line or polygon" msgid "Place the graphic line or polygon"
msgstr "Placer la ligne ou le polygones graphique" msgstr "Placer la ligne ou le polygones graphique"
#: eeschema/tool_sch.cpp:274
#: eeschema/schframe.cpp:379
msgid "Show Hidden Pins"
msgstr "Force affichage des pins invisibles"
#: eeschema/tool_sch.cpp:279 #: eeschema/tool_sch.cpp:279
msgid "HV orientation for Wires and Bus" msgid "HV orientation for Wires and Bus"
msgstr "Force direction H, V et X pour les fils et bus" msgstr "Force direction H, V et X pour les fils et bus"
...@@ -8366,10 +8217,186 @@ msgstr "Valeur NECESSAIRE: changement refus ...@@ -8366,10 +8217,186 @@ msgstr "Valeur NECESSAIRE: changement refus
msgid "Sheet" msgid "Sheet"
msgstr "Feuille" msgstr "Feuille"
#: eeschema/component_class.cpp:97 #: eeschema/annotate_dialog.cpp:153
msgid "Scope"
msgstr "Slection"
#: eeschema/annotate_dialog.cpp:159
msgid "Annotate the entire schematic"
msgstr "Annoter la schmatique complte"
#: eeschema/annotate_dialog.cpp:163
msgid "Annotate the current page only"
msgstr "Annoter la feuille active uniquement"
#: eeschema/annotate_dialog.cpp:166
msgid "Reset existing annotation"
msgstr "Supprimer l'annotation existante"
#: eeschema/annotate_dialog.cpp:177
msgid "Order"
msgstr "Ordre"
#: eeschema/annotate_dialog.cpp:183
msgid "Sort components by position"
msgstr "Trier les composants par position"
#: eeschema/annotate_dialog.cpp:189
msgid "Sort components by value"
msgstr "Trier ls Composants par valeur"
#: eeschema/annotate_dialog.cpp:253
msgid "Clear the existing annotation for "
msgstr "Supprimer l'annotation existante pour "
#: eeschema/annotate_dialog.cpp:255
msgid "the entire schematic?"
msgstr "la schmatique entire?"
#: eeschema/annotate_dialog.cpp:257
msgid "the current sheet?"
msgstr "La feuille courante?"
#: eeschema/annotate_dialog.cpp:259
msgid ""
"\n"
"\n"
"This operation will clear the existing annotation and cannot be undone."
msgstr ""
"\n"
"\n"
"Cette opration supprimera l'annotation existante et ne peut tre annule."
#: eeschema/annotate_dialog.cpp:276
msgid "Clear and annotate all of the components "
msgstr "Reinitialisation et rannotation de tous les composants "
#: eeschema/annotate_dialog.cpp:278
msgid "Annotate only the unannotated components "
msgstr "Annoter seulement les composants non dj annots "
#: eeschema/annotate_dialog.cpp:280
msgid "on the entire schematic?"
msgstr "pour la schematique complte?"
#: eeschema/annotate_dialog.cpp:282
msgid "on the current sheet?"
msgstr "pourr la feuille courante?"
#: eeschema/annotate_dialog.cpp:284
msgid ""
"\n"
"\n"
"This operation will change the current annotation and cannot be undone."
msgstr ""
"\n"
"\n"
"Cette opration changera l'annotation actuelle et ne pourra tre annule."
#: eeschema/schedit.cpp:287
msgid "Push/Pop Hierarchy"
msgstr "Naviger dans Hirarchie"
#: eeschema/schedit.cpp:291
msgid "Add NoConnect Flag"
msgstr "Ajoutde symboles de non connexion"
#: eeschema/schedit.cpp:299
msgid "Add Bus"
msgstr "Addition de Bus"
#: eeschema/schedit.cpp:307
msgid "Add Junction"
msgstr "Ajout jonctions"
#: eeschema/schedit.cpp:311
msgid "Add Label"
msgstr "Ajout Label"
#: eeschema/schedit.cpp:315
msgid "Add Global label"
msgstr "Ajout de labels globaux"
#: eeschema/schedit.cpp:319
msgid "Add Hierarchal label"
msgstr "Ajouter Label Hirarchique"
#: eeschema/schedit.cpp:327
msgid "Add Wire to Bus Entry"
msgstr "Addition d'entres de bus (type fil vers bus)"
#: eeschema/schedit.cpp:331
msgid "Add Bus to Bus entry"
msgstr "Addition d'entres de bus (type bus vers bus)"
#: eeschema/schedit.cpp:335
msgid "Add Sheet"
msgstr "Ajout de Feuille"
#: eeschema/schedit.cpp:339
msgid "Add PinSheet"
msgstr "Ajout Conn. hirar."
#: eeschema/schedit.cpp:343
msgid "Import PinSheet"
msgstr "Importer Connecteur de hirarchie"
#: eeschema/schedit.cpp:351
msgid "Add Power"
msgstr "Add Alims"
#: eeschema/annotate.cpp:658
#, c-format
msgid "item not annotated: %s%s"
msgstr "item non numrot: %s%s"
#: eeschema/annotate.cpp:663
#, c-format
msgid "( unit %d)"
msgstr "( Unit %d)"
#: eeschema/annotate.cpp:680
#, c-format
msgid "Error item %s%s"
msgstr "Erreur item %s%s"
#: eeschema/annotate.cpp:683
#, c-format
msgid " unit %d and no more than %d parts"
msgstr " unit %d et plus que %d parts"
#: eeschema/annotate.cpp:717
#: eeschema/annotate.cpp:740
#, c-format #, c-format
msgid "%8.8lX" msgid "Multiple item %s%s"
msgstr "%8.8lX" msgstr "Multiplelment %s%s"
#: eeschema/annotate.cpp:722
#: eeschema/annotate.cpp:745
#, c-format
msgid " (unit %d)"
msgstr " ( Unit %d)"
#: eeschema/annotate.cpp:762
#, c-format
msgid "Diff values for %s%d%c (%s) and %s%d%c (%s)"
msgstr "Valeurs diffrentes pour %s%d%c (%s) et %s%d%c (%s)"
#: eeschema/schframe.cpp:268
msgid "Schematic modified, Save before exit ?"
msgstr "Schematique modifie, Sauver avant de quitter ?"
#: eeschema/schframe.cpp:379
msgid "No show Hidden Pins"
msgstr "N'affichage pas les pins invisibles"
#: eeschema/schframe.cpp:383
msgid "Draw lines at any direction"
msgstr "Tracer traits de direction quelconque"
#: eeschema/schframe.cpp:384
msgid "Draw lines H, V or 45 deg only"
msgstr "Tracer traits H, V ou 45 deg seulement"
#: cvpcb/dialog_display_options.cpp:147 #: cvpcb/dialog_display_options.cpp:147
#: cvpcb/dialog_display_options.cpp:155 #: cvpcb/dialog_display_options.cpp:155
...@@ -8725,7 +8752,7 @@ msgid "You must choose a PDF viewer before use this option" ...@@ -8725,7 +8752,7 @@ msgid "You must choose a PDF viewer before use this option"
msgstr "Vous devez choisir un Visualisateur PDF avant d'utiliser cette option" msgstr "Vous devez choisir un Visualisateur PDF avant d'utiliser cette option"
#: kicad/preferences.cpp:97 #: kicad/preferences.cpp:97
#: common/gestfich.cpp:627 #: common/gestfich.cpp:639
msgid "Prefered Editor:" msgid "Prefered Editor:"
msgstr "Editeur prfr:" msgstr "Editeur prfr:"
...@@ -9185,16 +9212,6 @@ msgstr "????" ...@@ -9185,16 +9212,6 @@ msgstr "????"
msgid "No layer selected" msgid "No layer selected"
msgstr "Pas de couche slectionne" msgstr "Pas de couche slectionne"
#: gerbview/readgerb.cpp:251
#, c-format
msgid "%d errors while reading Gerber file [%s]"
msgstr "%d erreurs pendant lecture fichier gerber [%s]"
#: gerbview/readgerb.cpp:271
#: gerbview/files.cpp:183
msgid "D codes files:"
msgstr "Fichiers D-Codes:"
#: gerbview/block.cpp:267 #: gerbview/block.cpp:267
msgid "Ok to delete block ?" msgid "Ok to delete block ?"
msgstr "Ok pour effacer le bloc" msgstr "Ok pour effacer le bloc"
...@@ -9286,19 +9303,29 @@ msgstr "Affiche toutes les couches Gerber" ...@@ -9286,19 +9303,29 @@ msgstr "Affiche toutes les couches Gerber"
msgid "Switch off all of the Gerber layers" msgid "Switch off all of the Gerber layers"
msgstr "N'affiche pas les couches Gerber" msgstr "N'affiche pas les couches Gerber"
#: gerbview/gerbview.cpp:37
msgid "GerbView is already running. Continue?"
msgstr "Gerbview est est cours d'excution. Continuer ?"
#: gerbview/files.cpp:83 #: gerbview/files.cpp:83
msgid "Not yet available..." msgid "Not yet available..."
msgstr "non encore disponible" msgstr "non encore disponible"
#: gerbview/files.cpp:131 #: gerbview/files.cpp:131
#: gerbview/files.cpp:216 #: gerbview/files.cpp:217
msgid "Gerber files:" msgid "Gerber files:"
msgstr "Fichiers Gerber:" msgstr "Fichiers Gerber:"
#: gerbview/files.cpp:184
#: gerbview/readgerb.cpp:273
msgid "D codes files:"
msgstr "Fichiers D-Codes:"
#: gerbview/gerbview.cpp:37
msgid "GerbView is already running. Continue?"
msgstr "Gerbview est est cours d'excution. Continuer ?"
#: gerbview/readgerb.cpp:253
#, c-format
msgid "%d errors while reading Gerber file [%s]"
msgstr "%d erreurs pendant lecture fichier gerber [%s]"
#: gerbview/tool_gerber.cpp:37 #: gerbview/tool_gerber.cpp:37
msgid "Clear and Load Gerber file" msgid "Clear and Load Gerber file"
msgstr "Effacer et charger fichier Gerber" msgstr "Effacer et charger fichier Gerber"
...@@ -9852,6 +9879,10 @@ msgstr "Inversion Bloc" ...@@ -9852,6 +9879,10 @@ msgstr "Inversion Bloc"
msgid "Block Mirror" msgid "Block Mirror"
msgstr "Bloc Miroir" msgstr "Bloc Miroir"
#: common/gestfich.cpp:633
msgid "No default editor found, you must choose it"
msgstr "Pas d'diteur par dfaut trouv, vous devez en choisir un"
#: common/infospgm.cpp:34 #: common/infospgm.cpp:34
msgid "Build Version:" msgid "Build Version:"
msgstr "Build Version:" msgstr "Build Version:"
...@@ -9894,10 +9925,6 @@ msgstr "" ...@@ -9894,10 +9925,6 @@ msgstr ""
"\n" "\n"
"International wiki:\n" "International wiki:\n"
#: common/gestfich.cpp:621
msgid "No default editor found, you must choose it"
msgstr "Pas d'diteur par dfaut trouv, vous devez en choisir un"
#: common/basicframe.cpp:219 #: common/basicframe.cpp:219
#, c-format #, c-format
msgid "Help file %s not found" msgid "Help file %s not found"
...@@ -10415,6 +10442,16 @@ msgstr "Via Aveugle/Enterr ...@@ -10415,6 +10442,16 @@ msgstr "Via Aveugle/Enterr
msgid "General Options" msgid "General Options"
msgstr "Options gnrales" msgstr "Options gnrales"
#: pcbnew/drc_stuff.h:147
#, c-format
msgid "ErrType(%d): <b>%s</b><ul><li> %s: %s </li><li> %s: %s </li></ul>"
msgstr "Type Err(%d): <b>%s</b><ul><li> %s: %s </li><li> %s: %s </li></ul>"
#: pcbnew/drc_stuff.h:155
#, c-format
msgid "ErrType(%d): <b>%s</b><ul><li> %s: %s </li></ul>"
msgstr "ErrType(%d): <b>%s</b><ul><li> %s: %s </li></ul>"
#: pcbnew/set_color.h:38 #: pcbnew/set_color.h:38
msgid "Pcbnew Layer Colors:" msgid "Pcbnew Layer Colors:"
msgstr "Pcbnew: Couleur desCouches" msgstr "Pcbnew: Couleur desCouches"
...@@ -10483,11 +10520,6 @@ msgstr "Options de remplissage de Zone" ...@@ -10483,11 +10520,6 @@ msgstr "Options de remplissage de Zone"
msgid "WinEDA_DrillFrame" msgid "WinEDA_DrillFrame"
msgstr "WinEDA_DrillFrame" msgstr "WinEDA_DrillFrame"
#: pcbnew/drc_stuff.h:142
#, c-format
msgid "ErrType(%d): <b>%s</b><ul><li> %s: %s </li><li> %s: %s </li></ul>"
msgstr "Type Err(%d): <b>%s</b><ul><li> %s: %s </li><li> %s: %s </li></ul>"
#: eeschema/symbtext.h:42 #: eeschema/symbtext.h:42
msgid "Graphic text properties" msgid "Graphic text properties"
msgstr "Proprits du texte" msgstr "Proprits du texte"
...@@ -10549,9 +10581,8 @@ msgid "SheetName" ...@@ -10549,9 +10581,8 @@ msgid "SheetName"
msgstr "Nom feuille" msgstr "Nom feuille"
#: eeschema/eelayer.h:189 #: eeschema/eelayer.h:189
#, fuzzy
msgid "SheetLabel (Pin Sheet)" msgid "SheetLabel (Pin Sheet)"
msgstr "Supprimer Connecteur de hirarchie" msgstr "Label de feuille ( Pin de Feuille)"
#: eeschema/eelayer.h:195 #: eeschema/eelayer.h:195
msgid "Hierarchical Label" msgid "Hierarchical Label"
...@@ -10613,10 +10644,6 @@ msgstr "Propri ...@@ -10613,10 +10644,6 @@ msgstr "Propri
msgid "EESchema Locate" msgid "EESchema Locate"
msgstr "Recherche" msgstr "Recherche"
#: eeschema/annotate_dialog.h:53
msgid "EESchema Annotation"
msgstr "Numrotation des composants"
#: eeschema/dialog_erc.h:57 #: eeschema/dialog_erc.h:57
msgid "EESchema Erc" msgid "EESchema Erc"
msgstr "EESchema Erc" msgstr "EESchema Erc"
...@@ -10625,6 +10652,10 @@ msgstr "EESchema Erc" ...@@ -10625,6 +10652,10 @@ msgstr "EESchema Erc"
msgid "Sheet properties" msgid "Sheet properties"
msgstr "Proprits de la feuille" msgstr "Proprits de la feuille"
#: eeschema/annotate_dialog.h:45
msgid "Annotate"
msgstr "Annotation"
#: cvpcb/dialog_cvpcb_config.h:50 #: cvpcb/dialog_cvpcb_config.h:50
msgid "Cvpcb Configuration" msgid "Cvpcb Configuration"
msgstr "Configuration de Cvpcb" msgstr "Configuration de Cvpcb"
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -63,9 +63,9 @@ static std::vector<HOLE_INFO> s_HoleListBuffer; ...@@ -63,9 +63,9 @@ static std::vector<HOLE_INFO> s_HoleListBuffer;
#include "dialog_gendrill.cpp" // Dialog box for drill file generation #include "dialog_gendrill.cpp" // Dialog box for drill file generation
/**********************************************/ /************************************************/
void WinEDA_DrillFrame::InitDisplayParams( void ) void WinEDA_DrillFrame::InitDisplayParams( void )
/**********************************************/ /************************************************/
/* some param values initialisation before display dialog window /* some param values initialisation before display dialog window
*/ */
...@@ -121,8 +121,6 @@ void WinEDA_DrillFrame::InitDisplayParams( void ) ...@@ -121,8 +121,6 @@ void WinEDA_DrillFrame::InitDisplayParams( void )
m_MicroViasDrillSizer->Enable( m_MicroViasCount ); m_MicroViasDrillSizer->Enable( m_MicroViasCount );
m_MicroViaDrillValue->Enable( m_MicroViasCount ); m_MicroViaDrillValue->Enable( m_MicroViasCount );
/* Display statistics */
// Pads holes cound: // Pads holes cound:
m_PadsHoleCount = 0; m_PadsHoleCount = 0;
for( MODULE* module = m_Parent->m_Pcb->m_Modules; module != NULL; module = module->Next() ) for( MODULE* module = m_Parent->m_Pcb->m_Modules; module != NULL; module = module->Next() )
...@@ -133,10 +131,10 @@ void WinEDA_DrillFrame::InitDisplayParams( void ) ...@@ -133,10 +131,10 @@ void WinEDA_DrillFrame::InitDisplayParams( void )
{ {
if( pad->m_Drill.x != 0 ) if( pad->m_Drill.x != 0 )
m_PadsHoleCount++; m_PadsHoleCount++;
else }
else
if( MIN( pad->m_Drill.x, pad->m_Drill.y ) != 0 ) if( MIN( pad->m_Drill.x, pad->m_Drill.y ) != 0 )
m_PadsHoleCount++; m_PadsHoleCount++;
}
} }
} }
......
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