Commit d6af27a3 authored by charras's avatar charras

eeschema: enforce time stamp control and repairs bad time stamps in annotation.

parent b9ba67c8
......@@ -4,6 +4,12 @@ KiCad ChangeLog 2009
Please add newer entries at the top, list the date and your name with
email address.
2009-apr-25 UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
================================================================================
++ Eeschema:
When annotating: tests and repairs bad (duplicated) time stamps.
Can be found in old schematics or converted from others tools ...
2009-apr-24 UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
================================================================================
++Pcbnew:
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDisplayName</key>
<string>cvpcb</string>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeIconFile</key>
<string>cvpcb_doc.icns</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>net</string>
</array>
<key>CFBundleTypeName</key>
<string>cvpcb document</string>
<key>LSHandlerRank</key>
<string>Owner</string>
</dict>
</array>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>cvpcb</string>
<key>CFBundleGetInfoString</key>
<string></string>
<key>CFBundleIconFile</key>
<string>cvpcb.icns</string>
<key>CFBundleIdentifier</key>
<string>org.kicad-eda.cvpcb</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleLongVersionString</key>
<string></string>
<key>CFBundleName</key>
<string>Cvpcb</string>
<string></string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string></string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string></string>
<key>CSResourcesFileMapped</key>
<true/>
<key>LSRequiresCarbon</key>
<true/>
<key>NSHumanReadableCopyright</key>
<string></string>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDisplayName</key>
<array/>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
......@@ -12,18 +10,42 @@
<string>sch</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>file_sch.icns</string>
<string>eeschema_doc.icns</string>
<key>CFBundleTypeName</key>
<string>eeschema document</string>
<key>LSHandlerRank</key>
<string>Owner</string>
</dict>
</array>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>eeschema</string>
<key>CFBundleGetInfoString</key>
<string></string>
<key>CFBundleIconFile</key>
<string>eeschema.icns</string>
<key>CFBundleIdentifier</key>
<string>org.kicad-eda.eeschema</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleLongVersionString</key>
<string></string>
<key>CFBundleName</key>
<string>Schematics</string>
<string></string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string></string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string></string>
<key>CSResourcesFileMapped</key>
<true/>
<key>LSRequiresCarbon</key>
<true/>
<key>NSHumanReadableCopyright</key>
<string></string>
</dict>
</plist>
This diff is collapsed.
......@@ -28,7 +28,8 @@
extern void AnnotateComponents( WinEDA_SchematicFrame* parent,
bool annotateSchematic,
int sortOption,
bool resetAnnotation );
bool resetAnnotation,
bool repairsTimestamps );
////@begin XPM images
////@end XPM images
......@@ -261,7 +262,7 @@ void WinEDA_AnnotateFrame::OnApplyClick( wxCommandEvent& event )
if (response == wxCANCEL)
return;
AnnotateComponents( m_Parent, GetLevel(), GetSortOrder(),
GetResetItems() );
GetResetItems() , true );
m_btnClear->Enable();
}
......
......@@ -77,13 +77,12 @@ static char s_ExportSeparatorSymbol;
/**************************************************************************/
void DIALOG_BUILD_BOM::Create_BOM_Lists( bool aTypeFileIsExport,
bool aIncludeSubComponents,
char aExportSeparatorSymbol,
bool aRunBrowser )
bool aIncludeSubComponents,
char aExportSeparatorSymbol,
bool aRunBrowser )
/**************************************************************************/
{
wxFileName fn;
wxString mask, filename;
s_ExportSeparatorSymbol = aExportSeparatorSymbol;
......@@ -112,6 +111,7 @@ void DIALOG_BUILD_BOM::Create_BOM_Lists( bool aTypeFileIsExport,
if( aRunBrowser )
{
wxString editorname = wxGetApp().GetEditorName();
wxString filename = m_ListFileName;
AddDelimiterString( filename );
ExecuteFile( this, editorname, filename );
}
......@@ -120,7 +120,7 @@ void DIALOG_BUILD_BOM::Create_BOM_Lists( bool aTypeFileIsExport,
/****************************************************************************/
void DIALOG_BUILD_BOM::CreateExportList( const wxString& aFullFileName,
bool aIncludeSubComponents )
bool aIncludeSubComponents )
/****************************************************************************/
/*
......@@ -159,7 +159,7 @@ void DIALOG_BUILD_BOM::CreateExportList( const wxString& aFullFileName,
/****************************************************************************/
void DIALOG_BUILD_BOM::GenereListeOfItems( const wxString& aFullFileName,
bool aIncludeSubComponents )
bool aIncludeSubComponents )
/****************************************************************************/
/** GenereListeOfItems()
......@@ -189,7 +189,7 @@ void DIALOG_BUILD_BOM::GenereListeOfItems( const wxString& aFullFileName,
/* creates the list file */
DateAndTime( Line );
wxString Title = wxGetApp().GetAppName() + wxT( " " ) +
GetBuildVersion();
GetBuildVersion();
fprintf( f, "%s >> Creation date: %s\n", CONV_TO_UTF8( Title ), Line );
/* sort component list */
......@@ -219,8 +219,8 @@ void DIALOG_BUILD_BOM::GenereListeOfItems( const wxString& aFullFileName,
{
sort( listOfLabels.begin(), listOfLabels.end(), SortLabelsBySheet );
msg.Printf( _(
"\n#Global, Hierarchical Labels and PinSheets ( order = Sheet Number ) count = %d\n" ),
itemCount );
"\n#Global, Hierarchical Labels and PinSheets ( order = Sheet Number ) count = %d\n" ),
itemCount );
fprintf( f, "%s", CONV_TO_UTF8( msg ) );
PrintListeGLabel( f, listOfLabels );
}
......@@ -230,8 +230,8 @@ void DIALOG_BUILD_BOM::GenereListeOfItems( const wxString& aFullFileName,
sort( listOfLabels.begin(), listOfLabels.end(), SortLabelsByValue );
msg.Printf( _(
"\n#Global, Hierarchical Labels and PinSheets ( order = Alphab. ) count = %d\n\n" ),
itemCount );
"\n#Global, Hierarchical Labels and PinSheets ( order = Alphab. ) count = %d\n\n" ),
itemCount );
fprintf( f, "%s", CONV_TO_UTF8( msg ) );
PrintListeGLabel( f, listOfLabels );
}
......@@ -277,8 +277,8 @@ void BuildComponentsListFromSchematic( std::vector <OBJ_CMP_TO_LIST>& aList )
item.m_Unit = DrawLibItem->GetUnitSelection( sheet );
strncpy( item.m_Reference,
CONV_TO_UTF8( DrawLibItem->GetRef( sheet ) ),
sizeof( item.m_Reference ) );
CONV_TO_UTF8( DrawLibItem->GetRef( sheet ) ),
sizeof( item.m_Reference ) );
// Ensure always nul terminate m_Ref.
item.m_Reference[sizeof( item.m_Reference ) - 1 ] = 0;
......@@ -511,7 +511,7 @@ static void DeleteSubCmp( std::vector <OBJ_CMP_TO_LIST>& aList )
/*******************************************************************************************/
void DIALOG_BUILD_BOM::PrintFieldData( FILE* f, SCH_COMPONENT* DrawLibItem,
bool CompactForm )
bool CompactForm )
/*******************************************************************************************/
{
// @todo make this variable length
......@@ -534,7 +534,7 @@ void DIALOG_BUILD_BOM::PrintFieldData( FILE* f, SCH_COMPONENT* DrawLibItem,
if( CompactForm )
{
fprintf( f, "%c%s", s_ExportSeparatorSymbol,
CONV_TO_UTF8( DrawLibItem->GetField( FOOTPRINT )->m_Text ) );
CONV_TO_UTF8( DrawLibItem->GetField( FOOTPRINT )->m_Text ) );
}
else
fprintf( f, "; %-12s", CONV_TO_UTF8( DrawLibItem->GetField( FOOTPRINT )->m_Text ) );
......@@ -542,7 +542,7 @@ void DIALOG_BUILD_BOM::PrintFieldData( FILE* f, SCH_COMPONENT* DrawLibItem,
for( ii = FIELD1; ii < DrawLibItem->GetFieldCount(); ii++ )
{
if ( ii <= FIELD8 ) // see users fields 1 to 8
if( ii <= FIELD8 ) // see users fields 1 to 8
{
FieldCtrl = FieldListCtrl[ii - FIELD1];
if( FieldCtrl == NULL )
......@@ -551,14 +551,14 @@ void DIALOG_BUILD_BOM::PrintFieldData( FILE* f, SCH_COMPONENT* DrawLibItem,
if( !FieldCtrl->IsChecked() && !m_AddAllFields->IsChecked() )
continue;
}
if( ! m_AddAllFields->IsChecked() )
if( !m_AddAllFields->IsChecked() )
break;
if( CompactForm )
fprintf( f, "%c%s", s_ExportSeparatorSymbol,
CONV_TO_UTF8( DrawLibItem->GetField( ii )->m_Text ) );
CONV_TO_UTF8( DrawLibItem->GetField( ii )->m_Text ) );
else
fprintf( f, "; %-12s", CONV_TO_UTF8( DrawLibItem->GetField( ii )->m_Text ) );
}
......@@ -570,8 +570,7 @@ int DIALOG_BUILD_BOM::PrintComponentsListByRef(
FILE* f,
std::vector <OBJ_CMP_TO_LIST>& aList,
bool CompactForm,
bool
aIncludeSubComponents )
bool aIncludeSubComponents )
/*********************************************************************************************/
/* Print the B.O.M sorted by reference
......@@ -657,9 +656,13 @@ int DIALOG_BUILD_BOM::PrintComponentsListByRef(
if( ( Multi > 1 ) && aIncludeSubComponents )
#if defined (KICAD_GOST)
Unit = aList[ii].m_Unit + '1' - 1;
#else
Unit = aList[ii].m_Unit + 'A' - 1;
#endif
......@@ -669,10 +672,10 @@ int DIALOG_BUILD_BOM::PrintComponentsListByRef(
if( CompactForm )
fprintf( f, "%s%c%s", CmpName, s_ExportSeparatorSymbol,
CONV_TO_UTF8( DrawLibItem->GetField( VALUE )->m_Text ) );
CONV_TO_UTF8( DrawLibItem->GetField( VALUE )->m_Text ) );
else
fprintf( f, "| %-10s %-12s", CmpName,
CONV_TO_UTF8( DrawLibItem->GetField( VALUE )->m_Text ) );
CONV_TO_UTF8( DrawLibItem->GetField( VALUE )->m_Text ) );
if( aIncludeSubComponents )
{
......@@ -764,7 +767,7 @@ int DIALOG_BUILD_BOM::PrintComponentsListByVal(
sprintf( CmpName, "%s%c", aList[ii].m_Reference, Unit );
#endif
fprintf( f, "| %-12s %-10s", CONV_TO_UTF8( DrawLibItem->GetField(
VALUE )->m_Text ), CmpName );
VALUE )->m_Text ), CmpName );
// print the sheet path
if( aIncludeSubComponents )
......
......@@ -415,6 +415,23 @@ void SCH_COMPONENT::SetRef( DrawSheetPath* sheet, const wxString& ref )
rf->m_Text = ref; // for drawing.
}
/** function SetTimeStamp
* Change the old time stamp to the new time stamp.
* the time stamp is also modified in paths
* @param aNewTimeStamp = new time stamp
*/
void SCH_COMPONENT::SetTimeStamp( long aNewTimeStamp)
{
wxString string_timestamp, string_oldtimestamp;
string_timestamp.Printf(wxT("%8.8X"), aNewTimeStamp);
string_oldtimestamp.Printf(wxT("%8.8X"), m_TimeStamp);
m_TimeStamp = aNewTimeStamp;
for( unsigned ii = 0; ii < m_PathsAndReferences.GetCount(); ii++ )
{
m_PathsAndReferences[ii].Replace(string_oldtimestamp.GetData(), string_timestamp.GetData());
}
}
/***********************************************************/
//returns the unit selection, for the given sheet path.
......
......@@ -112,8 +112,7 @@ private:
* with:
* path = /<timestamp1>/<timestamp2> (subsheet path, = / for the root scheet)
* reference = reference for this path (C23, R5, U78 ... )
* multi = part selection in multi parts per package (0 or 1 for àne part
* per package)
* multi = part selection in multi parts per package (0 or 1 for one part per package)
*/
wxArrayString m_PathsAndReferences;
......@@ -193,6 +192,13 @@ public:
*/
void ClearAnnotation( DrawSheetPath* aSheet );
/** function SetTimeStamp
* Change the old time stamp to the new time stamp.
* the time stamp is also modified in paths
* @param aNewTimeStamp = new time stamp
*/
void SetTimeStamp( long aNewTimeStamp);
EDA_Rect GetBoundaryBox() const;
EDA_Rect GetBoundingBox();
......
......@@ -474,7 +474,7 @@ void WinEDA_NetlistFrame::GenNetlist( wxCommandEvent& event )
wxFileDialog dlg( this, _( "Save Netlist Files" ), fn.GetPath(),
fn.GetFullName(), FileWildcard,
wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
wxFD_SAVE /*| wxFD_OVERWRITE_PROMPT*/ );
if( dlg.ShowModal() == wxID_CANCEL )
return;
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDisplayName</key>
<string>gerbview</string>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>pen</string>
<string>gbr</string>
<string>gbx</string>
<string>lgr</string>
<string>ger</string>
<string>pho</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>gerbview_doc.icns</string>
<key>CFBundleTypeName</key>
<string>gerbview document</string>
<key>LSHandlerRank</key>
<string>Default</string>
</dict>
</array>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>gerbview</string>
<key>CFBundleGetInfoString</key>
<string></string>
<key>CFBundleIconFile</key>
<string>gerbview.icns</string>
<key>CFBundleIdentifier</key>
<string>org.kicad-eda.gerbview</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleLongVersionString</key>
<string></string>
<key>CFBundleName</key>
<string>Gerbview</string>
<string></string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string></string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string></string>
<key>CSResourcesFileMapped</key>
<true/>
<key>LSRequiresCarbon</key>
<true/>
<key>NSHumanReadableCopyright</key>
<string></string>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDisplayName</key>
<string>Kicad Project Manager</string>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>pro</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>file_pro.icns</string>
<string>kicad_doc.icns</string>
<key>CFBundleTypeName</key>
<string>kicad project files</string>
<key>LSHandlerRank</key>
<string>Owner</string>
</dict>
</array>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>kicad</string>
<key>CFBundleGetInfoString</key>
<string></string>
<key>CFBundleIconFile</key>
<string>kicad.icns</string>
<key>CFBundleIdentifier</key>
<string>org.kicad-eda.kicad</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleLongVersionString</key>
<string></string>
<key>CFBundleName</key>
<string>Kicad</string>
<string></string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string></string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string></string>
<key>CSResourcesFileMapped</key>
<true/>
<key>LSRequiresCarbon</key>
<true/>
<key>NSHumanReadableCopyright</key>
<string></string>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDisplayName</key>
<string>Pcb Router</string>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeIconFile</key>
<string>pcbnew_doc.icns</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>brd</string>
</array>
<key>CFBundleTypeName</key>
<string>pcbnew board</string>
<key>LSHandlerRank</key>
<string>Owner</string>
</dict>
</array>
<key>CFBundleExecutable</key>
<string>pcbnew</string>
<key>CFBundleGetInfoString</key>
<string></string>
<key>CFBundleIconFile</key>
<string>pcbnew.icns</string>
<key>CFBundleIdentifier</key>
<string>org.kicad-eda.pcbnew</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleLongVersionString</key>
<string></string>
<key>CFBundleName</key>
<string>pcbnew</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string></string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string></string>
<key>CSResourcesFileMapped</key>
<true/>
<key>LSRequiresCarbon</key>
<true/>
<key>NSHumanReadableCopyright</key>
<string></string>
</dict>
</plist>
......@@ -63,7 +63,7 @@ void WinEDA_PcbFrame::RecreateBOMFileFromBoard( wxCommandEvent& aEvent )
fn = GetScreen()->m_FileName;
fn.SetExt( CsvFileExtension );
wxFileDialog dlg( this, _( "Save Bill of Materials" ), wxEmptyString,
wxFileDialog dlg( this, _( "Save Bill of Materials" ), wxGetCwd(),
fn.GetFullName(), CsvFileWildcard,
wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
......
......@@ -82,7 +82,7 @@ DIALOG_NETLIST_FBP::DIALOG_NETLIST_FBP( wxWindow* parent, wxWindowID id, const w
bRightSizerButtons->Add( m_button4, 0, wxALL|wxEXPAND, 5 );
m_button5 = new wxButton( this, wxID_ANY, _("Close"), wxDefaultPosition, wxDefaultSize, 0 );
m_button5 = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 );
bRightSizerButtons->Add( m_button5, 0, wxALL|wxEXPAND, 5 );
bUpperSizer->Add( bRightSizerButtons, 0, wxALIGN_CENTER_VERTICAL, 5 );
......
......@@ -551,7 +551,7 @@
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="id">wxID_CANCEL</property>
<property name="label">Close</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
......
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