diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 918daa88f9..0ad869fe89 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -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 +================================================================================ +++ 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 ================================================================================ ++Pcbnew: diff --git a/cvpcb/Info.plist b/cvpcb/Info.plist index 264f87762a..fcb8220794 100644 --- a/cvpcb/Info.plist +++ b/cvpcb/Info.plist @@ -1,18 +1,51 @@ - + - CFBundleDisplayName - cvpcb + CFBundleDocumentTypes + + + CFBundleTypeIconFile + cvpcb_doc.icns + CFBundleTypeExtensions + + net + + CFBundleTypeName + cvpcb document + LSHandlerRank + Owner + + + CFBundleDevelopmentRegion + English CFBundleExecutable cvpcb + CFBundleGetInfoString + CFBundleIconFile cvpcb.icns CFBundleIdentifier org.kicad-eda.cvpcb + CFBundleInfoDictionaryVersion + 6.0 + CFBundleLongVersionString + CFBundleName - Cvpcb + + CFBundlePackageType + APPL + CFBundleShortVersionString + + CFBundleSignature + ???? + CFBundleVersion + + CSResourcesFileMapped + LSRequiresCarbon + NSHumanReadableCopyright + diff --git a/cvpcb/cvpcb_doc.icns b/cvpcb/cvpcb_doc.icns new file mode 100644 index 0000000000..f1c122851b Binary files /dev/null and b/cvpcb/cvpcb_doc.icns differ diff --git a/eeschema/Info.plist b/eeschema/Info.plist index eb6ec7e9ef..bf628aa1cd 100644 --- a/eeschema/Info.plist +++ b/eeschema/Info.plist @@ -1,9 +1,7 @@ - + - CFBundleDisplayName - CFBundleDocumentTypes @@ -12,18 +10,42 @@ sch CFBundleTypeIconFile - file_sch.icns + eeschema_doc.icns + CFBundleTypeName + eeschema document + LSHandlerRank + Owner + CFBundleDevelopmentRegion + English CFBundleExecutable eeschema + CFBundleGetInfoString + CFBundleIconFile eeschema.icns CFBundleIdentifier org.kicad-eda.eeschema + CFBundleInfoDictionaryVersion + 6.0 + CFBundleLongVersionString + CFBundleName - Schematics + + CFBundlePackageType + APPL + CFBundleShortVersionString + + CFBundleSignature + ???? + CFBundleVersion + + CSResourcesFileMapped + LSRequiresCarbon + NSHumanReadableCopyright + diff --git a/eeschema/annotate.cpp b/eeschema/annotate.cpp index d10126e689..12548bd511 100644 --- a/eeschema/annotate.cpp +++ b/eeschema/annotate.cpp @@ -18,7 +18,7 @@ /* Local Functions*/ static int AddComponentsInSheetToList( std::vector & aComponentsList, - DrawSheetPath* sheet ); + DrawSheetPath* sheet ); static void BreakReference( std::vector & aComponentsList ); static void ReAnnotateComponents( std::vector & aComponentsList ); static void ComputeReferenceNumber( std::vector & aComponentsList ); @@ -26,6 +26,7 @@ int GetLastReferenceNumber( int aObjet, std::vector & aComponentsList ); static int ExistUnit( int aObjet, int aUnit, std::vector & aComponentsList ); +static int ReplaceDuplicatedTimeStamps(); /******************************************************/ @@ -175,6 +176,21 @@ static bool AnnotateByValue( const OBJ_CMP_TO_LIST& item1, const OBJ_CMP_TO_LIST } +/***************************************************************************** +* qsort function to annotate items by value +* Components are sorted by time stamp +*****************************************************************************/ +static bool SortByTimeStamp( const OBJ_CMP_TO_LIST& item1, const OBJ_CMP_TO_LIST& item2 ) +{ + int ii = item1.m_SheetPath.Cmp( item2.m_SheetPath ); + + if( ii == 0 ) + ii = item1.m_TimeStamp - item2.m_TimeStamp; + + return ii < 0; +} + + /**************************************************************************************/ void WinEDA_SchematicFrame::DeleteAnnotation( bool aCurrentSheetOnly, bool aRedraw ) /**************************************************************************************/ @@ -237,16 +253,33 @@ void WinEDA_SchematicFrame::DeleteAnnotation( bool aCurrentSheetOnly, bool aRedr * 1 = annotate by sorting Y position, * 2 = annotate by sorting value * @param resetAnnotation : true = remove previous annotation false = anotate new components only +* @param repairsTimestamps : true = test for duplicate times stamps and replace duplicated +* Note: this option could change previous annotation, because time stamps are used to handle annotation +* mainly in complex hierarchies. *****************************************************************************/ void AnnotateComponents( WinEDA_SchematicFrame* parent, bool annotateSchematic, int sortOption, - bool resetAnnotation ) + bool resetAnnotation, + bool repairsTimestamps ) { std::vector ComponentsList; wxBusyCursor dummy; + // Test and replace duplicte time stamps + // duplicate can happen with old schematics, or schematic conversions or manual editions of files ... + if( repairsTimestamps ) + { + int ireplacecount = ReplaceDuplicatedTimeStamps(); + if ( ireplacecount ) + { + wxString msg; + msg.Printf(_("%d Duplicate Time stamps replaced"), ireplacecount); + DisplayInfoMessage( NULL, msg, 2); + } + } + /* If it is an annotation for all the components, reset previous * annotation: */ if( resetAnnotation ) @@ -301,13 +334,15 @@ void AnnotateComponents( WinEDA_SchematicFrame* parent, /*******************************************************************************************************/ -int AddComponentsInSheetToList( std::vector & aComponentsList, DrawSheetPath* aSheet ) +int AddComponentsInSheetToList( std::vector & aComponentsList, + DrawSheetPath* aSheet ) /********************************************************************************************************/ + /** function AddComponentsInSheetToList() * Add a OBJ_CMP_TO_LIST object in aComponentsList for each component found in sheet * @param aComponentsList = a std::vector list to fill * @param the DrawSheetPath sheet to analyse -*/ + */ { int NbrCmp = 0; EDA_BaseStruct* DrawList = aSheet->LastDrawList(); @@ -320,18 +355,18 @@ int AddComponentsInSheetToList( std::vector & aComponentsList, { DrawLibItem = (SCH_COMPONENT*) DrawList; Entry = FindLibPart( DrawLibItem->m_ChipName.GetData(), - wxEmptyString, - FIND_ROOT ); + wxEmptyString, + FIND_ROOT ); if( Entry == NULL ) continue; OBJ_CMP_TO_LIST new_object; - new_object.m_RootCmp = DrawLibItem; - new_object.m_Entry = Entry; - new_object.m_Unit = DrawLibItem->GetUnitSelection( aSheet ); - new_object.m_SheetPath = *aSheet; - new_object.m_IsNew = false; - new_object.m_Flag = 0; + new_object.m_RootCmp = DrawLibItem; + new_object.m_Entry = Entry; + new_object.m_Unit = DrawLibItem->GetUnitSelection( aSheet ); + new_object.m_SheetPath = *aSheet; + new_object.m_IsNew = false; + new_object.m_Flag = 0; new_object.m_TimeStamp = DrawLibItem->m_TimeStamp; if( DrawLibItem->GetRef( aSheet ).IsEmpty() ) @@ -375,7 +410,7 @@ static void ReAnnotateComponents( std::vector & aComponentsList component->SetRef( &(aComponentsList[ii].m_SheetPath), CONV_FROM_UTF8( Text ) ); component->m_Multi = aComponentsList[ii].m_Unit; component->SetUnitSelection( &(aComponentsList[ii].m_SheetPath), - aComponentsList[ii].m_Unit ); + aComponentsList[ii].m_Unit ); } } @@ -657,7 +692,7 @@ int CheckAnnotate( WinEDA_SchematicFrame* frame, bool oneSheetOnly ) cmpref = CONV_FROM_UTF8( ComponentsList[ii].m_Reference ); msg.Printf( _( "item not annotated: %s%s" ), - cmpref.GetData(), Buff.GetData() ); + cmpref.GetData(), Buff.GetData() ); if( (ComponentsList[ii].m_Unit > 0) && (ComponentsList[ii].m_Unit < 0x7FFFFFFF) ) { @@ -679,10 +714,10 @@ int CheckAnnotate( WinEDA_SchematicFrame* frame, bool oneSheetOnly ) cmpref = CONV_FROM_UTF8( ComponentsList[ii].m_Reference ); msg.Printf( _( "Error item %s%s" ), cmpref.GetData(), - Buff.GetData() ); + Buff.GetData() ); Buff.Printf( _( " unit %d and no more than %d parts" ), - ComponentsList[ii].m_Unit, ComponentsList[ii].m_Entry->m_UnitCount ); + ComponentsList[ii].m_Unit, ComponentsList[ii].m_Entry->m_UnitCount ); msg << Buff; DisplayError( frame, msg ); error++; @@ -699,7 +734,7 @@ int CheckAnnotate( WinEDA_SchematicFrame* frame, bool oneSheetOnly ) msg.Empty(); Buff.Empty(); - if( (ComponentsList[ii].CompareRef(ComponentsList[ii + 1]) != 0) + if( (ComponentsList[ii].CompareRef( ComponentsList[ii + 1] ) != 0) || ( ComponentsList[ii].m_NumRef != ComponentsList[ii + 1].m_NumRef ) ) continue; @@ -714,7 +749,7 @@ int CheckAnnotate( WinEDA_SchematicFrame* frame, bool oneSheetOnly ) cmpref = CONV_FROM_UTF8( ComponentsList[ii].m_Reference ); msg.Printf( _( "Multiple item %s%s" ), - cmpref.GetData(), Buff.GetData() ); + cmpref.GetData(), Buff.GetData() ); if( (ComponentsList[ii].m_Unit > 0) && (ComponentsList[ii].m_Unit < 0x7FFFFFFF) ) { @@ -737,7 +772,7 @@ int CheckAnnotate( WinEDA_SchematicFrame* frame, bool oneSheetOnly ) cmpref = CONV_FROM_UTF8( ComponentsList[ii].m_Reference ); msg.Printf( _( "Multiple item %s%s" ), - cmpref.GetData(), Buff.GetData() ); + cmpref.GetData(), Buff.GetData() ); if( (ComponentsList[ii].m_Unit > 0) && (ComponentsList[ii].m_Unit < 0x7FFFFFFF) ) { @@ -750,30 +785,30 @@ int CheckAnnotate( WinEDA_SchematicFrame* frame, bool oneSheetOnly ) } /* Error if values are different between units, for the same reference */ - int next = ii+1; + int next = ii + 1; if( ComponentsList[ii].CompareValue( ComponentsList[next] ) != 0 ) { wxString nextcmpref; cmpref = CONV_FROM_UTF8( ComponentsList[ii].m_Reference ); nextcmpref = CONV_FROM_UTF8( ComponentsList[next].m_Reference ); -#if defined (KICAD_GOST) +#if defined(KICAD_GOST) msg.Printf( _( "Diff values for %s%d.%c (%s) and %s%d.%c (%s)" ), - cmpref.GetData(), - ComponentsList[ii].m_NumRef, - ComponentsList[ii].m_Unit + '1' - 1, - ComponentsList[ii].m_Value->GetData(), nextcmpref.GetData(), - ComponentsList[next].m_NumRef, - ComponentsList[next].m_Unit + '1' - 1, - ComponentsList[next].m_Value->GetData() ); + cmpref.GetData(), + ComponentsList[ii].m_NumRef, + ComponentsList[ii].m_Unit + '1' - 1, + ComponentsList[ii].m_Value->GetData(), nextcmpref.GetData(), + ComponentsList[next].m_NumRef, + ComponentsList[next].m_Unit + '1' - 1, + ComponentsList[next].m_Value->GetData() ); #else msg.Printf( _( "Diff values for %s%d%c (%s) and %s%d%c (%s)" ), - cmpref.GetData(), - ComponentsList[ii].m_NumRef, - ComponentsList[ii].m_Unit + 'A' - 1, - ComponentsList[ii].m_Value->GetData(), nextcmpref.GetData(), - ComponentsList[next].m_NumRef, - ComponentsList[next].m_Unit + 'A' - 1, - ComponentsList[next].m_Value->GetData() ); + cmpref.GetData(), + ComponentsList[ii].m_NumRef, + ComponentsList[ii].m_Unit + 'A' - 1, + ComponentsList[ii].m_Value->GetData(), nextcmpref.GetData(), + ComponentsList[next].m_NumRef, + ComponentsList[next].m_Unit + 'A' - 1, + ComponentsList[next].m_Value->GetData() ); #endif DisplayError( frame, msg ); @@ -781,5 +816,105 @@ int CheckAnnotate( WinEDA_SchematicFrame* frame, bool oneSheetOnly ) } } + // count the duplicated time stamps + sort( ComponentsList.begin(), ComponentsList.end(), SortByTimeStamp ); + for( int ii = 0; (ii < imax) && (error < 4); ii++ ) + { + if( (ComponentsList[ii].m_TimeStamp != ComponentsList[ii + 1].m_TimeStamp) + || ( ComponentsList[ii].m_SheetPath != ComponentsList[ii + 1].m_SheetPath ) ) + continue; + + /* Same time stamp found. */ + wxString nextcmpref; + wxString full_path; + full_path.Printf( wxT( "%s%8.8X" ), + ComponentsList[ii].m_SheetPath.Path().GetData(), + ComponentsList[ii].m_TimeStamp ); + cmpref = CONV_FROM_UTF8( ComponentsList[ii].m_Reference ); + nextcmpref = CONV_FROM_UTF8( ComponentsList[ii + 1].m_Reference ); + msg.Printf( _( "duplicate time stamp (%s) for %s%d and %s%d" ), + full_path.GetData(), + cmpref.GetData(), ComponentsList[ii].m_NumRef, + nextcmpref.GetData(), ComponentsList[ii + 1].m_NumRef ); + DisplayError( frame, msg ); + error++; + } + return error; } + + +/*********************************************** + * function to sort sch_items by time stamp + ************************************************/ +static bool SortItemByTimeStamp( const SCH_ITEM* item1, const SCH_ITEM* item2 ) +{ + int ii = item1->m_TimeStamp - item2->m_TimeStamp; + + /* if same time stamp, compare type, in order to have + * first : component + * after : sheet + * because this is the first item that have its time stamp changed + * and changing the time stamp of a sheet can loose annotation + */ + + if( ii == 0 && ( item1->Type() != item2->Type()) ) + if ( item1->Type() == DRAW_SHEET_STRUCT_TYPE ) + ii = -1; + + return ii < 0; +} + + +/** Function ReplaceDuplicatedTimeStamps + * Search for duplicate time stamps in the whole hierarchy, and replace duplicae by new time stamps + */ +int ReplaceDuplicatedTimeStamps() +{ + /* Build the whole screen list */ + EDA_ScreenList ScreenList; + + /* Build the list of items with time stamps (components and sheets) + * note: if all items have a different time stamp, this ensure also different paths in complex hierarchy + * this is the reason we have differant time stamps for components AND sheets + */ + std::vector itemlist; + SCH_SCREEN* screen; + SCH_ITEM* item; + for( screen = ScreenList.GetFirst(); screen != NULL; screen = ScreenList.GetNext() ) + { + item = screen->EEDrawList; + while( item ) + { + if( (item->Type() == DRAW_SHEET_STRUCT_TYPE) + || (item->Type() == TYPE_SCH_COMPONENT) ) + itemlist.push_back( item ); + + item = item->Next(); + } + } + + // Test and replace duplicated time stamps + + int imax = itemlist.size() - 1; + int errcount = 0; + sort( itemlist.begin(), itemlist.end(), SortItemByTimeStamp ); + for( int ii = 0; ii < imax; ii++ ) + { + item = itemlist[ii]; + SCH_ITEM* nextitem = itemlist[ii + 1]; + if( item->m_TimeStamp == nextitem->m_TimeStamp ) + { + errcount++; + // for a component, update its Time stamp and its paths (m_PathsAndReferences field) + if (item->Type() == TYPE_SCH_COMPONENT ) + ((SCH_COMPONENT*) item)->SetTimeStamp( GetTimeStamp()); + // for a sheet, update only its time stamp (annotation of its components will be lost) + // TODO: see how to change sheet paths for its cmp list (can be possible in most cases) + else + item->m_TimeStamp = GetTimeStamp(); + } + } + + return errcount; +} diff --git a/eeschema/annotate_dialog.cpp b/eeschema/annotate_dialog.cpp index 9e5b3e716c..ea9c8fc042 100644 --- a/eeschema/annotate_dialog.cpp +++ b/eeschema/annotate_dialog.cpp @@ -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(); } diff --git a/eeschema/build_BOM.cpp b/eeschema/build_BOM.cpp index daf2a62ab2..b18e54f2eb 100644 --- a/eeschema/build_BOM.cpp +++ b/eeschema/build_BOM.cpp @@ -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 & 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 & 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 & 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 ) diff --git a/eeschema/component_class.cpp b/eeschema/component_class.cpp index 14cf141b17..62d89c410a 100644 --- a/eeschema/component_class.cpp +++ b/eeschema/component_class.cpp @@ -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. diff --git a/eeschema/component_class.h b/eeschema/component_class.h index cb5b4df479..b4862c50ad 100644 --- a/eeschema/component_class.h +++ b/eeschema/component_class.h @@ -112,8 +112,7 @@ private: * with: * path = // (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(); diff --git a/eeschema/eeschema_doc.icns b/eeschema/eeschema_doc.icns new file mode 100644 index 0000000000..2d776c463d Binary files /dev/null and b/eeschema/eeschema_doc.icns differ diff --git a/eeschema/netlist_control.cpp b/eeschema/netlist_control.cpp index 792c0bdcca..3d77139590 100644 --- a/eeschema/netlist_control.cpp +++ b/eeschema/netlist_control.cpp @@ -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; diff --git a/gerbview/Info.plist b/gerbview/Info.plist index 044b41085f..7ab0359b43 100644 --- a/gerbview/Info.plist +++ b/gerbview/Info.plist @@ -1,18 +1,56 @@ - + - CFBundleDisplayName - gerbview + CFBundleDocumentTypes + + + CFBundleTypeExtensions + + pen + gbr + gbx + lgr + ger + pho + + CFBundleTypeIconFile + gerbview_doc.icns + CFBundleTypeName + gerbview document + LSHandlerRank + Default + + + CFBundleDevelopmentRegion + English CFBundleExecutable gerbview + CFBundleGetInfoString + CFBundleIconFile gerbview.icns CFBundleIdentifier org.kicad-eda.gerbview + CFBundleInfoDictionaryVersion + 6.0 + CFBundleLongVersionString + CFBundleName - Gerbview + + CFBundlePackageType + APPL + CFBundleShortVersionString + + CFBundleSignature + ???? + CFBundleVersion + + CSResourcesFileMapped + LSRequiresCarbon + NSHumanReadableCopyright + diff --git a/gerbview/gerbview_doc.icns b/gerbview/gerbview_doc.icns new file mode 100644 index 0000000000..d325316909 Binary files /dev/null and b/gerbview/gerbview_doc.icns differ diff --git a/kicad/Info.plist b/kicad/Info.plist index b24ddc720c..a5eab25f49 100644 --- a/kicad/Info.plist +++ b/kicad/Info.plist @@ -1,29 +1,47 @@ - + - CFBundleDisplayName - Kicad Project Manager CFBundleDocumentTypes - CFBundleTypeExtensions - - pro - CFBundleTypeIconFile - file_pro.icns + kicad_doc.icns + CFBundleTypeName + kicad project files + LSHandlerRank + Owner + CFBundleDevelopmentRegion + English CFBundleExecutable kicad + CFBundleGetInfoString + CFBundleIconFile kicad.icns CFBundleIdentifier org.kicad-eda.kicad + CFBundleInfoDictionaryVersion + 6.0 + CFBundleLongVersionString + CFBundleName - Kicad + + CFBundlePackageType + APPL + CFBundleShortVersionString + + CFBundleSignature + ???? + CFBundleVersion + + CSResourcesFileMapped + LSRequiresCarbon + NSHumanReadableCopyright + diff --git a/kicad/kicad_doc.icns b/kicad/kicad_doc.icns new file mode 100644 index 0000000000..27d4b54512 Binary files /dev/null and b/kicad/kicad_doc.icns differ diff --git a/pcbnew/Info.plist b/pcbnew/Info.plist index c8902115c1..af353d69ff 100644 --- a/pcbnew/Info.plist +++ b/pcbnew/Info.plist @@ -1,18 +1,49 @@ - + - CFBundleDisplayName - Pcb Router + CFBundleDocumentTypes + + + CFBundleTypeIconFile + pcbnew_doc.icns + CFBundleTypeExtensions + + brd + + CFBundleTypeName + pcbnew board + LSHandlerRank + Owner + + CFBundleExecutable pcbnew + CFBundleGetInfoString + CFBundleIconFile pcbnew.icns CFBundleIdentifier org.kicad-eda.pcbnew + CFBundleInfoDictionaryVersion + 6.0 + CFBundleLongVersionString + CFBundleName pcbnew + CFBundlePackageType + APPL + CFBundleShortVersionString + + CFBundleSignature + ???? + CFBundleVersion + + CSResourcesFileMapped + LSRequiresCarbon + NSHumanReadableCopyright + diff --git a/pcbnew/build_BOM_from_board.cpp b/pcbnew/build_BOM_from_board.cpp index a4c8048aff..637156c341 100644 --- a/pcbnew/build_BOM_from_board.cpp +++ b/pcbnew/build_BOM_from_board.cpp @@ -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 ); diff --git a/pcbnew/dialog_netlist_fbp.cpp b/pcbnew/dialog_netlist_fbp.cpp index 84a4bf9457..54baa31387 100644 --- a/pcbnew/dialog_netlist_fbp.cpp +++ b/pcbnew/dialog_netlist_fbp.cpp @@ -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 ); diff --git a/pcbnew/dialog_netlist_fbp.fbp b/pcbnew/dialog_netlist_fbp.fbp index fc8731b1ae..a0154f44f7 100644 --- a/pcbnew/dialog_netlist_fbp.fbp +++ b/pcbnew/dialog_netlist_fbp.fbp @@ -551,7 +551,7 @@ 0 - wxID_ANY + wxID_CANCEL Close diff --git a/pcbnew/pcbnew_doc.icns b/pcbnew/pcbnew_doc.icns new file mode 100644 index 0000000000..875672eb6e Binary files /dev/null and b/pcbnew/pcbnew_doc.icns differ