diff --git a/change_log.txt b/change_log.txt index 1dc33ec69f..d8b30e2c7a 100644 --- a/change_log.txt +++ b/change_log.txt @@ -5,6 +5,20 @@ Please add newer entries at the top, list the date and your name with email address. +2007-Oct-13 UPDATE Geoff Harland +================================================================================ ++ eeschema + * The previously provided "Quit" button within the "List of Material" dialog box + has been replaced with "OK", "Cancel", and "Apply" buttons. Greater consistency + has also been achieved after clicking on the "Create List" button; none of the + prevailing settings are subsequently saved (previously, some, but not all, of + the settings were subsequently saved). (However, settings can still be saved by + clicking on either of the "OK" or "Apply" buttons instead.) Assorted cleanup + and beautification of associated source code. + * The genliste.cpp file (which is no longer used) has been removed, and replaced + with genliste.cpp.notused + + 2007-Oct-11 UPDATE Dick Hollenbeck ================================================================================ + pcbnew @@ -29,10 +43,10 @@ email address. 2007-Oct-11 UPDATE Geoff Harland ================================================================================ + pcbnew - * The "Target Properties" dialog box can now (otherwise) be cancelled by pressing - the "Esc" key, and the caption of the "OK" button within the "Cotation - properties" dialog box has been capitalised (so that an icon is now provided - within that button within the Linux version of KiCad). + * The "Target Properties" and "Pads Global Edit" dialog boxes can now (otherwise) + be cancelled by pressing the "Esc" key, and the caption of the "OK" button + within the latter dialog box has been capitalised (so that an icon is now + provided within that button within the Linux version of KiCad). * The pcbpiste.cpp file (which is no longer used) has been removed, and replaced with pcbpiste.cpp.notused + cvpcb diff --git a/eeschema/dialog_build_BOM.cpp b/eeschema/dialog_build_BOM.cpp index 0d5cccd1c7..366ff15174 100644 --- a/eeschema/dialog_build_BOM.cpp +++ b/eeschema/dialog_build_BOM.cpp @@ -102,7 +102,8 @@ static bool * s_AddFieldList[] = { #define OPTION_BOM_ADD_FIELD wxT("BomAddField") /* list of separators used in bom export to spreadsheet -(selected by s_OutputSeparatorOpt, and s_OutputSeparatorOpt radiobox) */ + * (selected by s_OutputSeparatorOpt, and s_OutputSeparatorOpt radiobox) + */ static char s_ExportSeparator[] = ("\t;,."); static char s_ExportSeparatorSymbol; /*! @@ -118,13 +119,15 @@ IMPLEMENT_DYNAMIC_CLASS( WinEDA_Build_BOM_Frame, wxDialog ) BEGIN_EVENT_TABLE( WinEDA_Build_BOM_Frame, wxDialog ) ////@begin WinEDA_Build_BOM_Frame event table entries - EVT_CLOSE( WinEDA_Build_BOM_Frame::OnCloseWindow ) - EVT_RADIOBOX( ID_RADIOBOX_SELECT_FORMAT, WinEDA_Build_BOM_Frame::OnRadioboxSelectFormatSelected ) + EVT_BUTTON( ID_CREATE_LIST, WinEDA_Build_BOM_Frame::OnCreateListClick ) + EVT_BUTTON( wxID_OK, WinEDA_Build_BOM_Frame::OnOkClick ) - EVT_BUTTON( wxID_EXIT, WinEDA_Build_BOM_Frame::OnExitClick ) + EVT_BUTTON( wxID_CANCEL, WinEDA_Build_BOM_Frame::OnCancelClick ) + + EVT_BUTTON( wxID_APPLY, WinEDA_Build_BOM_Frame::OnApplyClick ) ////@end WinEDA_Build_BOM_Frame event table entries @@ -135,16 +138,15 @@ void InstallToolsFrame(WinEDA_DrawFrame *parent, wxPoint & pos) /***************************************************************/ { WinEDA_Build_BOM_Frame * frame = new WinEDA_Build_BOM_Frame(parent); - frame->ShowModal(); frame->Destroy(); + frame->ShowModal(); + frame->Destroy(); } /*! * WinEDA_Build_BOM_Frame constructors */ -WinEDA_Build_BOM_Frame::WinEDA_Build_BOM_Frame( ) -{ -} +WinEDA_Build_BOM_Frame::WinEDA_Build_BOM_Frame() { } WinEDA_Build_BOM_Frame::WinEDA_Build_BOM_Frame( WinEDA_DrawFrame* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, @@ -156,10 +158,12 @@ WinEDA_Build_BOM_Frame::WinEDA_Build_BOM_Frame( WinEDA_DrawFrame* parent, s_OutputFormOpt = m_Parent->m_Parent->m_EDA_Config->Read(OPTION_BOM_FORMAT, (long) 0); s_OutputSeparatorOpt = m_Parent->m_Parent->m_EDA_Config->Read(OPTION_BOM_SEPARATOR, (long) 0); long addfields = m_Parent->m_Parent->m_EDA_Config->Read(OPTION_BOM_ADD_FIELD, (long) 0); - for ( int ii = 0, bitmask = 1; s_AddFieldList[ii] != NULL; ii++ ) + for( int ii = 0, bitmask = 1; s_AddFieldList[ii] != NULL; ii++ ) { - if ( (addfields & bitmask) ) * s_AddFieldList[ii] = true; - else * s_AddFieldList[ii] = false; + if( (addfields & bitmask) ) + * s_AddFieldList[ii] = true; + else + * s_AddFieldList[ii] = false; bitmask <<= 1; } @@ -168,11 +172,10 @@ WinEDA_Build_BOM_Frame::WinEDA_Build_BOM_Frame( WinEDA_DrawFrame* parent, m_OutputFormCtrl->SetSelection(s_OutputFormOpt); m_OutputSeparatorCtrl->SetSelection(s_OutputSeparatorOpt); - if ( s_OutputFormOpt == 1 ) + if( s_OutputFormOpt == 1 ) m_OutputSeparatorCtrl->Enable(true); else m_OutputSeparatorCtrl->Enable(false); - } /*! @@ -206,7 +209,7 @@ bool WinEDA_Build_BOM_Frame::Create( wxWindow* parent, wxWindowID id, const wxSt wxDialog::Create( parent, id, caption, pos, size, style ); CreateControls(); - if (GetSizer()) + if( GetSizer() ) { GetSizer()->SetSizeHints(this); } @@ -224,7 +227,7 @@ void WinEDA_Build_BOM_Frame::CreateControls() SetFont(*g_DialogFont); ////@begin WinEDA_Build_BOM_Frame content construction - // Generated by DialogBlocks, 01/07/2007 21:25:39 (unregistered) + // Generated by DialogBlocks, 13/10/2007 00:04:07 (unregistered) WinEDA_Build_BOM_Frame* itemDialog1 = this; @@ -232,32 +235,32 @@ void WinEDA_Build_BOM_Frame::CreateControls() itemDialog1->SetSizer(itemBoxSizer2); wxBoxSizer* itemBoxSizer3 = new wxBoxSizer(wxHORIZONTAL); - itemBoxSizer2->Add(itemBoxSizer3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); + itemBoxSizer2->Add(itemBoxSizer3, 0, wxALIGN_CENTER_HORIZONTAL|wxLEFT|wxRIGHT, 5); wxBoxSizer* itemBoxSizer4 = new wxBoxSizer(wxVERTICAL); - itemBoxSizer3->Add(itemBoxSizer4, 0, wxGROW|wxRIGHT|wxTOP|wxBOTTOM, 5); + itemBoxSizer3->Add(itemBoxSizer4, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5); - wxStaticBox* itemStaticBoxSizer5Static = new wxStaticBox(itemDialog1, wxID_ANY, _("List items : ")); + wxStaticBox* itemStaticBoxSizer5Static = new wxStaticBox(itemDialog1, wxID_ANY, _("List items:")); wxStaticBoxSizer* itemStaticBoxSizer5 = new wxStaticBoxSizer(itemStaticBoxSizer5Static, wxVERTICAL); itemBoxSizer4->Add(itemStaticBoxSizer5, 0, wxGROW|wxALL, 5); - m_ListCmpbyRefItems = new wxCheckBox( itemDialog1, ID_CHECKBOX, _("Components by Reference"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE ); + m_ListCmpbyRefItems = new wxCheckBox( itemDialog1, ID_CHECKBOX1, _("Components by Reference"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE ); m_ListCmpbyRefItems->SetValue(true); itemStaticBoxSizer5->Add(m_ListCmpbyRefItems, 0, wxALIGN_LEFT|wxALL, 5); - m_ListSubCmpItems = new wxCheckBox( itemDialog1, ID_CHECKBOX2, _("Sub Components (i.e U2A, U2B..)"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE ); + m_ListSubCmpItems = new wxCheckBox( itemDialog1, ID_CHECKBOX2, _("Sub Components (i.e. U2A, U2B ...)"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE ); m_ListSubCmpItems->SetValue(false); itemStaticBoxSizer5->Add(m_ListSubCmpItems, 0, wxALIGN_LEFT|wxALL, 5); - m_ListCmpbyValItems = new wxCheckBox( itemDialog1, ID_CHECKBOX1, _("Components by Value"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE ); + m_ListCmpbyValItems = new wxCheckBox( itemDialog1, ID_CHECKBOX3, _("Components by Value"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE ); m_ListCmpbyValItems->SetValue(true); itemStaticBoxSizer5->Add(m_ListCmpbyValItems, 0, wxALIGN_LEFT|wxALL, 5); - m_GenListLabelsbyVal = new wxCheckBox( itemDialog1, ID_CHECKBOX3, _("Hierachy Pins by name"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE ); + m_GenListLabelsbyVal = new wxCheckBox( itemDialog1, ID_CHECKBOX4, _("Hierachy Pins by Name"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE ); m_GenListLabelsbyVal->SetValue(false); itemStaticBoxSizer5->Add(m_GenListLabelsbyVal, 0, wxALIGN_LEFT|wxALL, 5); - m_GenListLabelsbySheet = new wxCheckBox( itemDialog1, ID_CHECKBOX4, _("Hierachy Pins by Sheets"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE ); + m_GenListLabelsbySheet = new wxCheckBox( itemDialog1, ID_CHECKBOX5, _("Hierachy Pins by Sheets"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE ); m_GenListLabelsbySheet->SetValue(false); itemStaticBoxSizer5->Add(m_GenListLabelsbySheet, 0, wxALIGN_LEFT|wxALL, 5); @@ -276,66 +279,73 @@ void WinEDA_Build_BOM_Frame::CreateControls() m_OutputSeparatorCtrl->SetSelection(0); itemBoxSizer4->Add(m_OutputSeparatorCtrl, 0, wxGROW|wxLEFT|wxRIGHT|wxBOTTOM, 5); - wxStaticBox* itemStaticBoxSizer13Static = new wxStaticBox(itemDialog1, wxID_ANY, _("Options")); + wxStaticBox* itemStaticBoxSizer13Static = new wxStaticBox(itemDialog1, wxID_ANY, _("Options:")); wxStaticBoxSizer* itemStaticBoxSizer13 = new wxStaticBoxSizer(itemStaticBoxSizer13Static, wxHORIZONTAL); itemBoxSizer4->Add(itemStaticBoxSizer13, 0, wxGROW|wxALL, 5); m_GetListBrowser = new wxCheckBox( itemDialog1, ID_CHECKBOX6, _("Launch list browser"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE ); m_GetListBrowser->SetValue(false); - itemStaticBoxSizer13->Add(m_GetListBrowser, 0, wxGROW|wxALL, 5); + itemStaticBoxSizer13->Add(m_GetListBrowser, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); wxBoxSizer* itemBoxSizer15 = new wxBoxSizer(wxVERTICAL); - itemBoxSizer3->Add(itemBoxSizer15, 0, 0, 0); + itemBoxSizer3->Add(itemBoxSizer15, 0, wxALIGN_TOP|wxLEFT|wxTOP|wxBOTTOM, 5); - wxStaticBox* itemStaticBoxSizer16Static = new wxStaticBox(itemDialog1, wxID_ANY, _("Fields to Add")); + wxStaticBox* itemStaticBoxSizer16Static = new wxStaticBox(itemDialog1, wxID_ANY, _("Fields to add:")); m_FieldsToAppendListSizer = new wxStaticBoxSizer(itemStaticBoxSizer16Static, wxVERTICAL); - itemBoxSizer15->Add(m_FieldsToAppendListSizer, 0, wxGROW|wxALL, 5); + itemBoxSizer15->Add(m_FieldsToAppendListSizer, 0, wxALIGN_LEFT|wxALL, 5); - m_AddField1 = new wxCheckBox( itemDialog1, ID_CHECKBOX_FIELD1, _("Add Field 1"), wxDefaultPosition, wxDefaultSize, 0 ); + m_AddField1 = new wxCheckBox( itemDialog1, ID_CHECKBOX_FIELD1, _("Add Field 1"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE ); m_AddField1->SetValue(false); - m_FieldsToAppendListSizer->Add(m_AddField1, 0, wxGROW|wxALL, 5); + m_FieldsToAppendListSizer->Add(m_AddField1, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); - m_AddField2 = new wxCheckBox( itemDialog1, ID_CHECKBOX_FIELD2, _("Add Field 2"), wxDefaultPosition, wxDefaultSize, 0 ); + m_AddField2 = new wxCheckBox( itemDialog1, ID_CHECKBOX_FIELD2, _("Add Field 2"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE ); m_AddField2->SetValue(false); - m_FieldsToAppendListSizer->Add(m_AddField2, 0, wxGROW|wxALL, 5); + m_FieldsToAppendListSizer->Add(m_AddField2, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); - m_AddField3 = new wxCheckBox( itemDialog1, ID_CHECKBOX_FIELD1, _("Add Field 3"), wxDefaultPosition, wxDefaultSize, 0 ); + m_AddField3 = new wxCheckBox( itemDialog1, ID_CHECKBOX_FIELD3, _("Add Field 3"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE ); m_AddField3->SetValue(false); - m_FieldsToAppendListSizer->Add(m_AddField3, 0, wxGROW|wxALL, 5); + m_FieldsToAppendListSizer->Add(m_AddField3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); - m_AddField4 = new wxCheckBox( itemDialog1, ID_CHECKBOX_FIELD4, _("Add Field 4"), wxDefaultPosition, wxDefaultSize, 0 ); + m_AddField4 = new wxCheckBox( itemDialog1, ID_CHECKBOX_FIELD4, _("Add Field 4"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE ); m_AddField4->SetValue(false); - m_FieldsToAppendListSizer->Add(m_AddField4, 0, wxGROW|wxALL, 5); + m_FieldsToAppendListSizer->Add(m_AddField4, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); - m_AddField5 = new wxCheckBox( itemDialog1, ID_CHECKBOX_FIELD5, _("Add Field 5"), wxDefaultPosition, wxDefaultSize, 0 ); + m_AddField5 = new wxCheckBox( itemDialog1, ID_CHECKBOX_FIELD5, _("Add Field 5"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE ); m_AddField5->SetValue(false); - m_FieldsToAppendListSizer->Add(m_AddField5, 0, wxGROW|wxALL, 5); + m_FieldsToAppendListSizer->Add(m_AddField5, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); - m_AddField6 = new wxCheckBox( itemDialog1, ID_CHECKBOX_FIELD6, _("Add Field 6"), wxDefaultPosition, wxDefaultSize, 0 ); + m_AddField6 = new wxCheckBox( itemDialog1, ID_CHECKBOX_FIELD6, _("Add Field 6"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE ); m_AddField6->SetValue(false); - m_FieldsToAppendListSizer->Add(m_AddField6, 0, wxGROW|wxALL, 5); + m_FieldsToAppendListSizer->Add(m_AddField6, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); - m_AddField7 = new wxCheckBox( itemDialog1, ID_CHECKBOX_FIELD7, _("Add Field 7"), wxDefaultPosition, wxDefaultSize, 0 ); + m_AddField7 = new wxCheckBox( itemDialog1, ID_CHECKBOX_FIELD7, _("Add Field 7"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE ); m_AddField7->SetValue(false); - m_FieldsToAppendListSizer->Add(m_AddField7, 0, wxGROW|wxALL, 5); + m_FieldsToAppendListSizer->Add(m_AddField7, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); - m_AddField8 = new wxCheckBox( itemDialog1, ID_CHECKBOX_FIELD8, _("Add Field 8"), wxDefaultPosition, wxDefaultSize, 0 ); + m_AddField8 = new wxCheckBox( itemDialog1, ID_CHECKBOX_FIELD8, _("Add Field 8"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE ); m_AddField8->SetValue(false); - m_FieldsToAppendListSizer->Add(m_AddField8, 0, wxGROW|wxALL, 5); + m_FieldsToAppendListSizer->Add(m_AddField8, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); - itemBoxSizer15->Add(5, 5, 0, wxGROW|wxALL, 15); + itemBoxSizer15->Add(5, 5, 0, wxGROW|wxALL, 10); - wxBoxSizer* itemBoxSizer26 = new wxBoxSizer(wxVERTICAL); - itemBoxSizer15->Add(itemBoxSizer26, 0, wxGROW|wxALL, 5); + wxButton* itemButton26 = new wxButton( itemDialog1, ID_CREATE_LIST, _("Create &List"), wxDefaultPosition, wxDefaultSize, 0 ); + itemButton26->SetDefault(); + itemButton26->SetForegroundColour(wxColour(166, 0, 0)); + itemBoxSizer15->Add(itemButton26, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); - wxButton* itemButton27 = new wxButton( itemDialog1, wxID_OK, _("&Create List"), wxDefaultPosition, wxDefaultSize, 0 ); - itemButton27->SetDefault(); - itemButton27->SetForegroundColour(wxColour(166, 0, 0)); - itemBoxSizer26->Add(itemButton27, 0, wxGROW|wxALL, 5); + wxBoxSizer* itemBoxSizer27 = new wxBoxSizer(wxHORIZONTAL); + itemBoxSizer2->Add(itemBoxSizer27, 0, wxALIGN_CENTER_HORIZONTAL|wxLEFT|wxRIGHT|wxBOTTOM, 5); - wxButton* itemButton28 = new wxButton( itemDialog1, wxID_EXIT, _("&Quit"), wxDefaultPosition, wxDefaultSize, 0 ); - itemButton28->SetForegroundColour(wxColour(0, 0, 210)); - itemBoxSizer26->Add(itemButton28, 0, wxGROW|wxALL, 5); + wxButton* itemButton28 = new wxButton( itemDialog1, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0 ); + itemButton28->SetForegroundColour(wxColour(255, 0, 0)); + itemBoxSizer27->Add(itemButton28, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); + + wxButton* itemButton29 = new wxButton( itemDialog1, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); + itemButton29->SetForegroundColour(wxColour(0, 0, 255)); + itemBoxSizer27->Add(itemButton29, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); + + wxButton* itemButton30 = new wxButton( itemDialog1, wxID_APPLY, _("&Apply"), wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer27->Add(itemButton30, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); // Set validators m_ListCmpbyRefItems->SetValidator( wxGenericValidator(& s_ListByRef) ); @@ -391,27 +401,108 @@ wxIcon WinEDA_Build_BOM_Frame::GetIconResource( const wxString& name ) return wxNullIcon; ////@end WinEDA_Build_BOM_Frame icon retrieval } + + +/*! + * wxEVT_COMMAND_RADIOBOX_SELECTED event handler for ID_RADIOBOX_SELECT_FORMAT + */ + +void WinEDA_Build_BOM_Frame::OnRadioboxSelectFormatSelected( wxCommandEvent& event ) +{ + if( m_OutputFormCtrl->GetSelection() == 1 ) + m_OutputSeparatorCtrl->Enable(true); + else + m_OutputSeparatorCtrl->Enable(false); +} + + +/*! + * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_CREATE_LIST + */ + +void WinEDA_Build_BOM_Frame::OnCreateListClick( wxCommandEvent& event ) +{ + GenList(); +} + + /*! * wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK */ void WinEDA_Build_BOM_Frame::OnOkClick( wxCommandEvent& event ) { - GenList(); - event.Skip(); + SavePreferences(); + EndModal( 0 ); } /*! - * wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_EXIT + * wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL */ -void WinEDA_Build_BOM_Frame::OnExitClick( wxCommandEvent& event ) +void WinEDA_Build_BOM_Frame::OnCancelClick( wxCommandEvent& event ) { - SavePreferences(); - EndModal(0); + EndModal( -1 ); } + +/*! + * wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_APPLY + */ + +void WinEDA_Build_BOM_Frame::OnApplyClick( wxCommandEvent& event ) +{ + SavePreferences(); +} + + +/**************************************************/ +void WinEDA_Build_BOM_Frame::SavePreferences() +/**************************************************/ +{ + // Determine current settings of "List items" and "Options" checkboxes + // (NOTE: These 6 settings are restored when the dialog box is next + // invoked, but are *not* still saved after EESchema is next shut down.) + s_ListByRef = m_ListCmpbyRefItems->GetValue(); + s_ListWithSubCmponents = m_ListSubCmpItems->GetValue(); + s_ListByValue = m_ListCmpbyValItems->GetValue(); + s_ListHierarchicalPinByName = m_GenListLabelsbyVal->GetValue(); + s_ListBySheet = m_GenListLabelsbySheet->GetValue(); + s_BrowsList = m_GetListBrowser->GetValue(); + + // Determine current settings of both radiobutton groups + s_OutputFormOpt = m_OutputFormCtrl->GetSelection(); + s_OutputSeparatorOpt = m_OutputSeparatorCtrl->GetSelection(); + if( s_OutputSeparatorOpt < 0 ) + s_OutputSeparatorOpt = 0; + + // Determine current settings of all 8 "Fields to add" checkboxes + s_Add_F1_state = m_AddField1->GetValue(); + s_Add_F2_state = m_AddField2->GetValue(); + s_Add_F3_state = m_AddField3->GetValue(); + s_Add_F4_state = m_AddField4->GetValue(); + s_Add_F5_state = m_AddField5->GetValue(); + s_Add_F6_state = m_AddField6->GetValue(); + s_Add_F7_state = m_AddField7->GetValue(); + s_Add_F8_state = m_AddField8->GetValue(); + + // Now save current settings of both radiobutton groups + m_Parent->m_Parent->m_EDA_Config->Write(OPTION_BOM_FORMAT, (long)s_OutputFormOpt); + m_Parent->m_Parent->m_EDA_Config->Write(OPTION_BOM_SEPARATOR, (long) s_OutputSeparatorOpt); + + // Now save current settings of all 8 "Fields to add" checkboxes + long addfields = 0; + for( int ii = 0, bitmask = 1; s_AddFieldList[ii] != NULL; ii++ ) + { + if( * s_AddFieldList[ii] ) + addfields |= bitmask; + bitmask <<= 1; + } + m_Parent->m_Parent->m_EDA_Config->Write(OPTION_BOM_ADD_FIELD, addfields); +} + + /**********************************************************/ void WinEDA_Build_BOM_Frame::GenList() /**********************************************************/ @@ -419,23 +510,47 @@ void WinEDA_Build_BOM_Frame::GenList() #define EXT_LIST wxT(".lst") wxString mask, filename; - s_ListByRef = m_ListCmpbyRefItems->GetValue(); - s_ListByValue = m_ListCmpbyValItems->GetValue(); - s_ListWithSubCmponents = m_ListSubCmpItems->GetValue(); - s_ListHierarchicalPinByName = m_GenListLabelsbyVal->GetValue(); - s_ListBySheet = m_GenListLabelsbySheet->GetValue(); - s_BrowsList = m_GetListBrowser->GetValue(); - s_OutputFormOpt = m_OutputFormCtrl->GetSelection(); - s_OutputSeparatorOpt = m_OutputSeparatorCtrl->GetSelection(); - if ( s_OutputSeparatorOpt < 0 ) s_OutputSeparatorOpt = 0; - s_ExportSeparatorSymbol = s_ExportSeparator[s_OutputSeparatorOpt]; + // Although the currently selected options determine the contents + // and format of the subsequently generated file, they are still + // *not* "restored" if the dialog box is ever subsequently invoked + // again (unless those options had been specifically "saved" before + // now (by clicking on either of the "OK" or "Apply" buttons)). + // + // Hence the following previously provided commands are now + // commented out, and the currently selected options are now + // read "directly" by the relevant functions instead. (The previous + // behavior of the dialog box in this regard had been inconsistent, + // in that the settings of the "Fields to add" checkboxes were *not* + // "restored", whereas all of the other settings *were* "restored"; + // now, *none* of those settings are subsequently "restored".) + +// s_ListByRef = m_ListCmpbyRefItems->GetValue(); +// s_ListWithSubCmponents = m_ListSubCmpItems->GetValue(); +// s_ListByValue = m_ListCmpbyValItems->GetValue(); +// s_ListHierarchicalPinByName = m_GenListLabelsbyVal->GetValue(); +// s_ListBySheet = m_GenListLabelsbySheet->GetValue(); +// s_BrowsList = m_GetListBrowser->GetValue(); +// s_OutputFormOpt = m_OutputFormCtrl->GetSelection(); + +// s_OutputSeparatorOpt = m_OutputSeparatorCtrl->GetSelection(); +// if( s_OutputSeparatorOpt < 0 ) +// s_OutputSeparatorOpt = 0; +// s_ExportSeparatorSymbol = s_ExportSeparator[s_OutputSeparatorOpt]; + + // Updated code for determining the value of s_ExportSeparatorSymbol + if( m_OutputSeparatorCtrl->GetSelection() > 0 ) + s_ExportSeparatorSymbol + = s_ExportSeparator[m_OutputSeparatorCtrl->GetSelection()]; + else + s_ExportSeparatorSymbol = s_ExportSeparator[0]; m_ListFileName = ScreenSch->m_FileName; ChangeFileNameExt(m_ListFileName, EXT_LIST); - mask = wxT("*"); mask += EXT_LIST; + mask = wxT("*"); + mask += EXT_LIST; filename = EDA_FileSelector(_("Bill of material:"), - wxEmptyString, /* Chemin par defaut (ici dir courante) */ + wxEmptyString, /* Chemin par defaut (ici dir courante) */ m_ListFileName, /* nom fichier par defaut, et resultat */ EXT_LIST, /* extension par defaut */ mask, /* Masque d'affichage */ @@ -443,16 +558,22 @@ wxString mask, filename; wxFD_SAVE, TRUE ); - if ( filename.IsEmpty() ) return; - else m_ListFileName = filename; + if( filename.IsEmpty() ) + return; + else + m_ListFileName = filename; - /* Close dialog and show the list, if wanted */ - if ( s_OutputFormOpt == 0) GenereListeOfItems(m_ListFileName); - else CreateExportList(m_ListFileName); + /* Close dialog, then show the list (if so requested) */ +// if( s_OutputFormOpt == 0 ) + if( m_OutputFormCtrl->GetSelection() == 0 ) + GenereListeOfItems(m_ListFileName); + else + CreateExportList(m_ListFileName); - Close(); + EndModal( 1 ); - if ( s_BrowsList ) +// if( s_BrowsList ) + if( m_GetListBrowser->GetValue() ) { wxString editorname = GetEditorName(); AddDelimiterString(filename); @@ -465,10 +586,10 @@ wxString mask, filename; void WinEDA_Build_BOM_Frame::CreateExportList(const wxString & FullFileName) /****************************************************************************/ /* - Print a list of components, in a form which can be imported by a spreadsheet - form is; - cmp name;cmp val; fields; -*/ + * Print a list of components, in a form which can be imported by a spreadsheet + * form is: + * cmp name; cmp val; fields; + */ { FILE *f; EDA_BaseStruct ** List; @@ -476,30 +597,34 @@ int NbItems; wxString msg; /* Creation de la liste des elements */ - if ((f = wxFopen(FullFileName, wxT("wt"))) == NULL) + if( ( f = wxFopen( FullFileName, wxT( "wt" ) ) ) == NULL ) { - msg = _("Failed to open file "); msg << FullFileName; + msg = _("Failed to open file "); + msg << FullFileName; DisplayError(this, msg); return; } - NbItems = GenListeCmp(NULL ); - if ( NbItems ) + NbItems = GenListeCmp( NULL ); + if( NbItems ) { List = (EDA_BaseStruct **) MyZMalloc( NbItems * sizeof(EDA_BaseStruct **) ); - if (List == NULL ) + if( List == NULL ) { - fclose(f); return; + fclose( f ); + return; } - GenListeCmp(List); + GenListeCmp( List ); /* sort component list */ qsort( List, NbItems, sizeof( EDA_BaseStruct * ), - (int(*)(const void*, const void*))ListTriComposantByRef); + (int(*)(const void*, const void*))ListTriComposantByRef ); - if( ! s_ListWithSubCmponents ) DeleteSubCmp(List, NbItems); +// if( ! s_ListWithSubCmponents ) + if( ! m_ListSubCmpItems->GetValue() ) + DeleteSubCmp(List, NbItems); /* create the file */ PrintListeCmpByRef(f, List, NbItems, TRUE); @@ -507,7 +632,7 @@ wxString msg; MyFree( List ); } - fclose(f); + fclose( f ); } @@ -516,9 +641,9 @@ wxString msg; void WinEDA_Build_BOM_Frame::GenereListeOfItems(const wxString & FullFileName) /****************************************************************************/ /* - Routine principale pour la creation des listings ( composants et/ou labels - globaux et "sheet labels" ) -*/ + * Routine principale pour la creation des listings ( composants et/ou labels + * globaux et "sheet labels" ) + */ { FILE *f; EDA_BaseStruct ** List; @@ -528,24 +653,26 @@ char Line[1024]; wxString msg; /* Creation de la liste des elements */ - if ((f = wxFopen(FullFileName, wxT("wt"))) == NULL) + if( ( f = wxFopen( FullFileName, wxT( "wt" ) ) ) == NULL ) { - msg = _("Failed to open file "); msg << FullFileName; + msg = _("Failed to open file "); + msg << FullFileName; DisplayError(this, msg); return; } - NbItems = GenListeCmp(NULL ); - if ( NbItems ) + NbItems = GenListeCmp( NULL ); + if( NbItems ) { - List = (EDA_BaseStruct **) + List = ( EDA_BaseStruct **) MyZMalloc( NbItems * sizeof(EDA_BaseStruct **) ); - if (List == NULL ) + if( List == NULL ) { - fclose(f); return; + fclose( f ); + return; } - GenListeCmp(List); + GenListeCmp( List ); /* generation du fichier listing */ DateAndTime(Line); @@ -555,19 +682,23 @@ wxString msg; /* Tri et impression de la liste des composants */ qsort( List, NbItems, sizeof( EDA_BaseStruct * ), - (int(*)(const void*, const void*))ListTriComposantByRef); + (int(*)(const void*, const void*))ListTriComposantByRef ); - if( ! s_ListWithSubCmponents ) DeleteSubCmp(List, NbItems); +// if( ! s_ListWithSubCmponents ) + if( ! m_ListSubCmpItems->GetValue() ) + DeleteSubCmp(List, NbItems); - if( s_ListByRef ) +// if( s_ListByRef ) + if( m_ListCmpbyRefItems->GetValue() ) { PrintListeCmpByRef(f, List, NbItems); } - if( s_ListByValue ) +// if( s_ListByValue ) + if( m_ListCmpbyValItems->GetValue() ) { qsort( List, NbItems, sizeof( EDA_BaseStruct * ), - (int(*)(const void*, const void*))ListTriComposantByVal); + (int(*)(const void*, const void*))ListTriComposantByVal ); PrintListeCmpByVal(f, List, NbItems); } MyFree( List ); @@ -578,42 +709,45 @@ wxString msg; /***************************************/ NbItems = GenListeGLabels( NULL ); - if ( NbItems ) + if( NbItems ) { ListOfLabels = (ListLabel *) MyZMalloc( NbItems * sizeof(ListLabel) ); - if (ListOfLabels == NULL ) + if( ListOfLabels == NULL ) { - fclose(f); return; + fclose( f ); + return; } GenListeGLabels(ListOfLabels); /* Tri de la liste */ - if( s_ListBySheet ) +// if( s_ListBySheet ) + if( m_GenListLabelsbySheet->GetValue() ) { qsort( ListOfLabels, NbItems, sizeof( ListLabel ), - (int(*)(const void*, const void*))ListTriGLabelBySheet); + (int(*)(const void*, const void*))ListTriGLabelBySheet ); - msg.Printf( _("\n#Glob labels ( order = Sheet Number ) count = %d\n"), NbItems); - fprintf( f, "%s", CONV_TO_UTF8(msg)); + msg.Printf( _("\n#Glob labels ( order = Sheet Number ) count = %d\n"), NbItems ); + fprintf( f, "%s", CONV_TO_UTF8(msg) ); PrintListeGLabel(f, ListOfLabels, NbItems); } - if( s_ListHierarchicalPinByName ) +// if( s_ListHierarchicalPinByName ) + if( m_GenListLabelsbyVal->GetValue() ) { qsort( ListOfLabels, NbItems, sizeof( ListLabel ), - (int(*)(const void*, const void*))ListTriGLabelByVal); + (int(*)(const void*, const void*))ListTriGLabelByVal ); - msg.Printf(_("\n#Glob labels ( order = Alphab. ) count = %d\n\n"), NbItems); - fprintf( f, "%s", CONV_TO_UTF8(msg)); + msg.Printf(_("\n#Glob labels ( order = Alphab. ) count = %d\n\n"), NbItems ); + fprintf( f, "%s", CONV_TO_UTF8(msg) ); PrintListeGLabel(f, ListOfLabels, NbItems); } MyFree( ListOfLabels ); } msg = _("\n#End List\n"); - fprintf( f, "%s", CONV_TO_UTF8(msg)); - fclose(f); + fprintf( f, "%s", CONV_TO_UTF8(msg) ); + fclose( f ); } @@ -622,11 +756,11 @@ wxString msg; int GenListeCmp( EDA_BaseStruct ** List ) /****************************************/ /* Routine de generation de la liste des elements utiles du dessin - Si List == NULL: comptage des elements - Sinon remplissage de la liste - Initialise "FlagControlMulti" a SheetNumber pour la sortie des listes - et m_Father comme pointeur sur la sheet d'appartenance -*/ + * Si List == NULL: comptage des elements + * Sinon remplissage de la liste + * Initialise "FlagControlMulti" a SheetNumber pour la sortie des listes + * et m_Father comme pointeur sur la sheet d'appartenance + */ { int ItemCount = 0; EDA_BaseStruct *DrawList; @@ -636,41 +770,42 @@ BASE_SCREEN * screen; /* Build the screen list */ EDA_ScreenList ScreenList(NULL); - for ( screen = ScreenList.GetFirst(); screen != NULL; screen = ScreenList.GetNext() ) + for( screen = ScreenList.GetFirst(); screen != NULL; screen = ScreenList.GetNext() ) { DrawList = screen->EEDrawList; - while ( DrawList ) + while( DrawList ) { switch( DrawList->Type() ) { + case DRAW_LIB_ITEM_STRUCT_TYPE : + ItemCount++; + DrawLibItem = (EDA_SchComponentStruct *) DrawList; + DrawLibItem->m_FlagControlMulti = screen->m_SheetNumber; + DrawLibItem->m_Parent = screen; + if( List ) + { + *List = DrawList; + List++; + } + break; - case DRAW_LIB_ITEM_STRUCT_TYPE : - ItemCount++; - DrawLibItem = (EDA_SchComponentStruct *) DrawList; - DrawLibItem->m_FlagControlMulti = screen->m_SheetNumber; - DrawLibItem->m_Parent = screen; - if( List ) - { - *List = DrawList; List++; - } - break; - - - default: break; + default: + break; } DrawList = DrawList->Pnext; } } - return ( ItemCount ); + return( ItemCount ); } + /*********************************************/ static int GenListeGLabels( ListLabel * List ) /*********************************************/ /* Count the Glabels, or fill the list Listwith Glabel pointers - If List == NULL: Item count only - Else fill list of Glabels -*/ + * If List == NULL: Item count only + * Else fill list of Glabels + */ { int ItemCount = 0; EDA_BaseStruct *DrawList; @@ -680,31 +815,31 @@ BASE_SCREEN * screen; /* Build the screen list */ EDA_ScreenList ScreenList(NULL); - for ( screen = ScreenList.GetFirst(); screen != NULL; screen = ScreenList.GetNext() ) + for( screen = ScreenList.GetFirst(); screen != NULL; screen = ScreenList.GetNext() ) { DrawList = screen->EEDrawList; - while ( DrawList ) + while( DrawList ) { switch( DrawList->Type() ) { - case DRAW_GLOBAL_LABEL_STRUCT_TYPE : - ItemCount++; - if( List ) - { - List->m_LabelType = DRAW_GLOBAL_LABEL_STRUCT_TYPE; - List->m_SheetNumber = screen->m_SheetNumber; - List->m_Label = DrawList; - List++; - } - break; + case DRAW_GLOBAL_LABEL_STRUCT_TYPE : + ItemCount++; + if( List ) + { + List->m_LabelType = DRAW_GLOBAL_LABEL_STRUCT_TYPE; + List->m_SheetNumber = screen->m_SheetNumber; + List->m_Label = DrawList; + List++; + } + break; - case DRAW_SHEET_STRUCT_TYPE : + case DRAW_SHEET_STRUCT_TYPE : { #define Sheet ((DrawSheetStruct * ) DrawList) SheetLabel= Sheet->m_Label; while( SheetLabel != NULL ) { - if ( List ) + if( List ) { List->m_LabelType = DRAW_SHEETLABEL_STRUCT_TYPE; List->m_SheetNumber = screen->m_SheetNumber; @@ -714,35 +849,39 @@ BASE_SCREEN * screen; ItemCount++; SheetLabel = (DrawSheetLabelStruct*)(SheetLabel->Pnext); } - break; } + break; - default: break; + default: + break; } DrawList = DrawList->Pnext; } } - return ( ItemCount ); + return( ItemCount ); } + /**********************************************************/ static int ListTriComposantByVal(EDA_SchComponentStruct **Objet1, EDA_SchComponentStruct **Objet2) /**********************************************************/ - /* Routine de comparaison pour le tri du Tableau par qsort() - Les composants sont tries - par valeur - si meme valeur: par reference - si meme valeur: par numero d'unite - -*/ +/* Routine de comparaison pour le tri du Tableau par qsort() + * Les composants sont tries + * par valeur + * si meme valeur: par reference + * si meme valeur: par numero d'unite + */ { int ii; const wxString * Text1, *Text2; - if( (*Objet1 == NULL) && (*Objet2 == NULL ) ) return(0); - if( *Objet1 == NULL) return(-1); - if( *Objet2 == NULL) return(1); + if( ( *Objet1 == NULL ) && ( *Objet2 == NULL ) ) + return( 0 ); + if( *Objet1 == NULL ) + return( -1 ); + if( *Objet2 == NULL ) + return( 1 ); Text1 = &(*Objet1)->m_Field[VALUE].m_Text; Text2 = &(*Objet2)->m_Field[VALUE].m_Text; @@ -755,32 +894,35 @@ const wxString * Text1, *Text2; ii = Text1->CmpNoCase(*Text2); } - if ( ii == 0 ) + if( ii == 0 ) { ii = (*Objet1)->m_Multi - (*Objet2)->m_Multi; } - return(ii); + return( ii ); } + /**********************************************************/ static int ListTriComposantByRef(EDA_SchComponentStruct **Objet1, EDA_SchComponentStruct **Objet2) /**********************************************************/ - /* Routine de comparaison pour le tri du Tableau par qsort() - Les composants sont tries - par reference - si meme referenece: par valeur - si meme valeur: par numero d'unite - -*/ +/* Routine de comparaison pour le tri du Tableau par qsort() + * Les composants sont tries + * par reference + * si meme referenece: par valeur + * si meme valeur: par numero d'unite + */ { int ii; const wxString * Text1, *Text2; - if( (*Objet1 == NULL) && (*Objet2 == NULL ) ) return(0); - if( *Objet1 == NULL) return(-1); - if( *Objet2 == NULL) return(1); + if( ( *Objet1 == NULL ) && ( *Objet2 == NULL ) ) + return( 0 ); + if( *Objet1 == NULL ) + return( -1 ); + if( *Objet2 == NULL ) + return( 1 ); Text1 = &(*Objet1)->m_Field[REFERENCE].m_Text; Text2 = &(*Objet2)->m_Field[REFERENCE].m_Text; @@ -793,23 +935,23 @@ const wxString * Text1, *Text2; ii = Text1->CmpNoCase(*Text2); } - if ( ii == 0 ) + if( ii == 0 ) { ii = (*Objet1)->m_Multi - (*Objet2)->m_Multi; } - return(ii); + return( ii ); } + /******************************************************************/ static int ListTriGLabelByVal(ListLabel *Objet1, ListLabel *Objet2) /*******************************************************************/ /* Routine de comparaison pour le tri du Tableau par qsort() - Les labels sont tries - par comparaison ascii - si meme valeur: par numero de sheet - -*/ + * Les labels sont tries + * par comparaison ascii + * si meme valeur: par numero de sheet + */ { int ii; const wxString * Text1, *Text2; @@ -823,32 +965,33 @@ const wxString * Text1, *Text2; Text2 = &((DrawSheetLabelStruct *)Objet2->m_Label)->m_Text; else Text2 = &((DrawTextStruct *)Objet2->m_Label)->m_Text; + ii = Text1->CmpNoCase(*Text2); - if ( ii == 0 ) - { + if( ii == 0 ) + { ii = Objet1->m_SheetNumber - Objet2->m_SheetNumber; - } + } - return(ii); + return( ii ); } + /*******************************************************************/ static int ListTriGLabelBySheet(ListLabel *Objet1, ListLabel *Objet2) /*******************************************************************/ /* Routine de comparaison pour le tri du Tableau par qsort() - Les labels sont tries - par sheet number - si meme valeur, par ordre alphabetique - -*/ + * Les labels sont tries + * par sheet number + * si meme valeur, par ordre alphabetique + */ { int ii; const wxString * Text1, *Text2; ii = Objet1->m_SheetNumber - Objet2->m_SheetNumber; - if ( ii == 0 ) + if( ii == 0 ) { if( Objet1->m_LabelType == DRAW_SHEETLABEL_STRUCT_TYPE ) Text1 = &((DrawSheetLabelStruct *)Objet1->m_Label)->m_Text; @@ -859,33 +1002,34 @@ const wxString * Text1, *Text2; Text2 = &((DrawSheetLabelStruct *)Objet2->m_Label)->m_Text; else Text2 = &((DrawTextStruct *)Objet2->m_Label)->m_Text; + ii = Text1->CmpNoCase(*Text2); } - return(ii); + return( ii ); } - /**************************************************************/ static void DeleteSubCmp( EDA_BaseStruct ** List, int NbItems ) /**************************************************************/ /* Supprime les sous-composants, c'est a dire les descriptions redonnantes des -boitiers multiples - La liste des composant doit etre triee par reference et par num d'unite -*/ + * boitiers multiples + * La liste des composant doit etre triee par reference et par num d'unite + */ { int ii; EDA_SchComponentStruct * LibItem; const wxString * OldName = NULL; - for( ii = 0; ii < NbItems ; ii++ ) + for( ii = 0; ii < NbItems; ii++ ) { LibItem = (EDA_SchComponentStruct *) List[ii]; - if ( LibItem == NULL ) continue; + if( LibItem == NULL ) + continue; if( OldName ) { - if ( OldName->CmpNoCase( LibItem->m_Field[REFERENCE].m_Text ) == 0 ) + if( OldName->CmpNoCase( LibItem->m_Field[REFERENCE].m_Text ) == 0 ) { List[ii] = NULL; } @@ -900,7 +1044,7 @@ void WinEDA_Build_BOM_Frame::PrintFieldData(FILE * f, EDA_SchComponentStruct * D bool CompactForm) /*******************************************************************************************/ { -wxCheckBox * FieldListCtrl[FIELD8-FIELD1+1] = { +wxCheckBox * FieldListCtrl[FIELD8 - FIELD1 + 1] = { m_AddField1, m_AddField2, m_AddField3, @@ -913,29 +1057,34 @@ wxCheckBox * FieldListCtrl[FIELD8-FIELD1+1] = { int ii; wxCheckBox * FieldCtrl = FieldListCtrl[0]; - if ( CompactForm ) + if( CompactForm ) { fprintf(f, "%c%s", s_ExportSeparatorSymbol, CONV_TO_UTF8(DrawLibItem->m_Field[FOOTPRINT].m_Text)); } - for ( ii = FIELD1; ii <= FIELD8; ii ++ ) + for( ii = FIELD1; ii <= FIELD8; ii ++ ) { - FieldCtrl = FieldListCtrl[ii-FIELD1]; - if ( FieldCtrl == NULL ) continue; - if ( ! FieldCtrl->IsChecked() ) continue; - if ( CompactForm ) fprintf(f, "%c%s", s_ExportSeparatorSymbol, + FieldCtrl = FieldListCtrl[ii - FIELD1]; + if( FieldCtrl == NULL ) + continue; + if( ! FieldCtrl->IsChecked() ) + continue; + if( CompactForm ) + fprintf(f, "%c%s", s_ExportSeparatorSymbol, CONV_TO_UTF8(DrawLibItem->m_Field[ii].m_Text)); - else fprintf(f, "; %-12s", CONV_TO_UTF8(DrawLibItem->m_Field[ii].m_Text)); + else + fprintf(f, "; %-12s", CONV_TO_UTF8(DrawLibItem->m_Field[ii].m_Text)); } } + /*********************************************************************************************/ int WinEDA_Build_BOM_Frame::PrintListeCmpByRef( FILE * f, EDA_BaseStruct ** List, int NbItems, bool CompactForm ) /*********************************************************************************************/ /* Print the B.O.M sorted by reference -*/ + */ { int ii, Multi, Unit; EDA_BaseStruct *DrawList; @@ -944,12 +1093,12 @@ EDA_LibComponentStruct *Entry; char NameCmp[80]; wxString msg; - if ( CompactForm ) + if( CompactForm ) { - fprintf(f, "ref%cvalue%csheet number%csheet name%cfootprint", + fprintf( f, "ref%cvalue%csheet number%csheet name%cfootprint", s_ExportSeparatorSymbol, s_ExportSeparatorSymbol, s_ExportSeparatorSymbol, s_ExportSeparatorSymbol ); - wxCheckBox * FieldListCtrl[FIELD8-FIELD1+1] = { + wxCheckBox * FieldListCtrl[FIELD8 - FIELD1 + 1] = { m_AddField1, m_AddField2, m_AddField3, @@ -959,71 +1108,88 @@ wxString msg; m_AddField7, m_AddField8 }; - for ( ii = FIELD1; ii <= FIELD8; ii ++ ) + for( ii = FIELD1; ii <= FIELD8; ii ++ ) { - wxCheckBox * FieldCtrl = FieldListCtrl[ii-FIELD1]; - if ( FieldCtrl == NULL ) continue; - if ( ! FieldCtrl->IsChecked() ) continue; + wxCheckBox * FieldCtrl = FieldListCtrl[ii - FIELD1]; + if( FieldCtrl == NULL ) + continue; + if( ! FieldCtrl->IsChecked() ) + continue; msg = _("Field"); fprintf(f, "%c%s%d", s_ExportSeparatorSymbol, CONV_TO_UTF8(msg), ii - FIELD1 + 1); } - fprintf( f, "\n"); + fprintf( f, "\n" ); } - else { + else + { msg = _("\n#Cmp ( order = Reference )"); - if ( s_ListWithSubCmponents ) msg << _(" (with SubCmp)"); - fprintf( f, "%s\n", CONV_TO_UTF8(msg)); +// if( s_ListWithSubCmponents ) + if( m_ListSubCmpItems->GetValue() ) + msg << _(" (with SubCmp)"); + fprintf( f, "%s\n", CONV_TO_UTF8(msg) ); } - for ( ii = 0; ii < NbItems; ii++ ) + for( ii = 0; ii < NbItems; ii++ ) { DrawList = List[ii]; - if( DrawList == NULL ) continue; - if( DrawList->Type() != DRAW_LIB_ITEM_STRUCT_TYPE ) continue; + if( DrawList == NULL ) + continue; + if( DrawList->Type() != DRAW_LIB_ITEM_STRUCT_TYPE ) + continue; DrawLibItem = (EDA_SchComponentStruct *) DrawList; - if( DrawLibItem->m_Field[REFERENCE].m_Text[0] == '#' ) continue; + if( DrawLibItem->m_Field[REFERENCE].m_Text[0] == '#' ) + continue; - Multi = 0; Unit = ' '; + Multi = 0; + Unit = ' '; Entry = FindLibPart(DrawLibItem->m_ChipName.GetData(), wxEmptyString, FIND_ROOT); - if( Entry ) Multi = Entry->m_UnitCount; - if( (Multi > 1 ) && s_ListWithSubCmponents ) + if( Entry ) + Multi = Entry->m_UnitCount; +// if( ( Multi > 1 ) && s_ListWithSubCmponents ) + if( ( Multi > 1 ) && m_ListSubCmpItems->GetValue() ) Unit = DrawLibItem->m_Multi + 'A' - 1; sprintf( NameCmp,"%s", CONV_TO_UTF8(DrawLibItem->m_Field[REFERENCE].m_Text) ); - if ( ! CompactForm || Unit != ' ' ) sprintf( NameCmp+strlen(NameCmp),"%c", Unit); + if( ! CompactForm || Unit != ' ' ) + sprintf( NameCmp + strlen(NameCmp), "%c", Unit ); - if ( CompactForm ) fprintf(f, "%s%c%s", NameCmp, s_ExportSeparatorSymbol, + if( CompactForm ) + fprintf(f, "%s%c%s", NameCmp, s_ExportSeparatorSymbol, CONV_TO_UTF8(DrawLibItem->m_Field[VALUE].m_Text)); - else fprintf(f, "| %-10s %-12s", NameCmp, + else + fprintf(f, "| %-10s %-12s", NameCmp, CONV_TO_UTF8(DrawLibItem->m_Field[VALUE].m_Text)); - if ( s_ListWithSubCmponents ) +// if( s_ListWithSubCmponents ) + if( m_ListSubCmpItems->GetValue() ) { DrawSheetStruct * sheet = (DrawSheetStruct *)(DrawLibItem->m_Parent); wxString sheetname; if( sheet && sheet->Type() == DRAW_SHEET_STRUCT_TYPE ) sheetname = sheet->m_SheetName; - else sheetname = _("Root"); - if ( CompactForm ) + else + sheetname = _("Root"); + if( CompactForm ) fprintf(f, "%c%d;%s", s_ExportSeparatorSymbol, DrawLibItem->m_FlagControlMulti, CONV_TO_UTF8(sheetname)); - else fprintf(f, " (Sheet %.2d: \"%s\")", DrawLibItem->m_FlagControlMulti, + else + fprintf(f, " (Sheet %.2d: \"%s\")", DrawLibItem->m_FlagControlMulti, CONV_TO_UTF8(sheetname)); } PrintFieldData(f, DrawLibItem, CompactForm); - fprintf(f,"\n"); + fprintf(f, "\n"); } - if ( ! CompactForm ) + if( ! CompactForm ) { msg = _("#End Cmp\n"); fprintf(f, CONV_TO_UTF8(msg)); } - return(0); + return( 0 ); } /*********************************************************************************************/ @@ -1038,43 +1204,52 @@ EDA_LibComponentStruct *Entry; wxString msg; msg = _("\n#Cmp ( order = Value )"); - if ( s_ListWithSubCmponents ) msg << _(" (with SubCmp)"); +// if( s_ListWithSubCmponents ) + if( m_ListSubCmpItems->GetValue() ) + msg << _(" (with SubCmp)"); msg << wxT("\n"); fprintf(f, CONV_TO_UTF8(msg)); - for ( ii = 0; ii < NbItems; ii++ ) - { + for( ii = 0; ii < NbItems; ii++ ) + { DrawList = List[ii]; - if( DrawList == NULL ) continue; - if( DrawList->Type() != DRAW_LIB_ITEM_STRUCT_TYPE ) continue; + if( DrawList == NULL ) + continue; + if( DrawList->Type() != DRAW_LIB_ITEM_STRUCT_TYPE ) + continue; DrawLibItem = (EDA_SchComponentStruct *) DrawList; - if( DrawLibItem->m_Field[REFERENCE].m_Text[0] == '#' ) continue; + if( DrawLibItem->m_Field[REFERENCE].m_Text[0] == '#' ) + continue; - Multi = 0; Unit = ' '; + Multi = 0; + Unit = ' '; Entry = FindLibPart(DrawLibItem->m_ChipName.GetData(), wxEmptyString, FIND_ROOT); - if( Entry ) Multi = Entry->m_UnitCount; - if( (Multi > 1 ) && s_ListWithSubCmponents ) + if( Entry ) + Multi = Entry->m_UnitCount; +// if( ( Multi > 1 ) && s_ListWithSubCmponents ) + if( ( Multi > 1 ) && m_ListSubCmpItems->GetValue() ) Unit = DrawLibItem->m_Multi + 'A' - 1; msg = DrawLibItem->m_Field[REFERENCE].m_Text; msg.Append(Unit); - fprintf(f, "| %-12s %-10s", + fprintf( f, "| %-12s %-10s", CONV_TO_UTF8(DrawLibItem->m_Field[VALUE].m_Text), CONV_TO_UTF8(msg) ); - if ( s_ListWithSubCmponents ) +// if( s_ListWithSubCmponents ) + if( m_ListSubCmpItems->GetValue() ) { fprintf(f, " (Sheet %.2d)", DrawLibItem->m_FlagControlMulti); } PrintFieldData(f, DrawLibItem); - fprintf(f,"\n"); + fprintf(f, "\n"); } msg = _("#End Cmp\n"); fprintf(f, CONV_TO_UTF8(msg)); - return(0); + return( 0 ); } @@ -1088,97 +1263,49 @@ DrawSheetLabelStruct * DrawSheetLabel; ListLabel * LabelItem; wxString msg; - for ( ii = 0; ii < NbItems; ii++ ) + for( ii = 0; ii < NbItems; ii++ ) { LabelItem = & List[ii]; switch( LabelItem->m_LabelType ) { - case DRAW_GLOBAL_LABEL_STRUCT_TYPE : - DrawTextItem = (DrawGlobalLabelStruct *)(LabelItem->m_Label); - msg.Printf( + case DRAW_GLOBAL_LABEL_STRUCT_TYPE : + DrawTextItem = (DrawGlobalLabelStruct *)(LabelItem->m_Label); + msg.Printf( _("> %-28.28s Global (Sheet %.2d) pos: %3.3f, %3.3f\n"), - DrawTextItem->m_Text.GetData(), - LabelItem->m_SheetNumber, - (float)DrawTextItem->m_Pos.x / 1000, - (float)DrawTextItem->m_Pos.y / 1000); + DrawTextItem->m_Text.GetData(), + LabelItem->m_SheetNumber, + (float)DrawTextItem->m_Pos.x / 1000, + (float)DrawTextItem->m_Pos.y / 1000); - fprintf(f, CONV_TO_UTF8(msg)); - break; + fprintf(f, CONV_TO_UTF8(msg)); + break; - case DRAW_SHEETLABEL_STRUCT_TYPE : + case DRAW_SHEETLABEL_STRUCT_TYPE : { DrawSheetLabel = (DrawSheetLabelStruct *) LabelItem->m_Label; jj = DrawSheetLabel->m_Shape; - if ( jj < 0 ) jj = NET_TMAX; if ( jj > NET_TMAX ) jj = 4; + if( jj < 0 ) + jj = NET_TMAX; + if( jj > NET_TMAX ) + jj = 4; wxString labtype = CONV_FROM_UTF8(SheetLabelType[jj]); msg.Printf( _("> %-28.28s Sheet %-7.7s (Sheet %.2d) pos: %3.3f, %3.3f\n"), - DrawSheetLabel->m_Text.GetData(), - labtype.GetData(), - LabelItem->m_SheetNumber, - (float)DrawSheetLabel->m_Pos.x / 1000, - (float)DrawSheetLabel->m_Pos.y / 1000); + DrawSheetLabel->m_Text.GetData(), + labtype.GetData(), + LabelItem->m_SheetNumber, + (float)DrawSheetLabel->m_Pos.x / 1000, + (float)DrawSheetLabel->m_Pos.y / 1000); fprintf(f, CONV_TO_UTF8(msg)); } - break; + break; - default: break; + default: + break; } } msg = _("#End labels\n"); fprintf(f, CONV_TO_UTF8(msg)); - return(0); + return( 0 ); } - -/*! - * wxEVT_CLOSE_WINDOW event handler for ID_DIALOG - */ - -void WinEDA_Build_BOM_Frame::OnCloseWindow( wxCloseEvent& event ) -{ - SavePreferences(); - EndModal(0); -} - -/**************************************************/ -void WinEDA_Build_BOM_Frame::SavePreferences() -/**************************************************/ -{ - s_Add_F1_state = m_AddField1->GetValue(); - s_Add_F2_state = m_AddField2->GetValue(); - s_Add_F3_state = m_AddField3->GetValue(); - s_Add_F4_state = m_AddField4->GetValue(); - s_Add_F5_state = m_AddField5->GetValue(); - s_Add_F6_state = m_AddField6->GetValue(); - s_Add_F7_state = m_AddField7->GetValue(); - s_Add_F8_state = m_AddField8->GetValue(); - s_OutputFormOpt = m_OutputFormCtrl->GetSelection(); - s_OutputSeparatorOpt = m_OutputSeparatorCtrl->GetSelection(); - - m_Parent->m_Parent->m_EDA_Config->Write(OPTION_BOM_FORMAT, (long)s_OutputFormOpt); - m_Parent->m_Parent->m_EDA_Config->Write(OPTION_BOM_SEPARATOR, (long) s_OutputSeparatorOpt); - - long addfields = 0; - for ( int ii = 0, bitmask = 1; s_AddFieldList[ii] != NULL; ii++ ) - { - if ( * s_AddFieldList[ii] ) addfields |= bitmask; - bitmask <<= 1; - } - m_Parent->m_Parent->m_EDA_Config->Write(OPTION_BOM_ADD_FIELD, addfields); -} - - - -/*! - * wxEVT_COMMAND_RADIOBOX_SELECTED event handler for ID_RADIOBOX1 - */ - -void WinEDA_Build_BOM_Frame::OnRadioboxSelectFormatSelected( wxCommandEvent& event ) -{ - if ( m_OutputFormCtrl->GetSelection() == 1 ) - m_OutputSeparatorCtrl->Enable(true); - else - m_OutputSeparatorCtrl->Enable(false); -} - diff --git a/eeschema/dialog_build_BOM.h b/eeschema/dialog_build_BOM.h index 21c4e51e41..05f593617a 100644 --- a/eeschema/dialog_build_BOM.h +++ b/eeschema/dialog_build_BOM.h @@ -39,21 +39,23 @@ ////@begin control identifiers #define ID_DIALOG 10000 -#define ID_CHECKBOX 10001 -#define ID_CHECKBOX2 10004 -#define ID_CHECKBOX1 10003 -#define ID_CHECKBOX3 10005 -#define ID_CHECKBOX4 10006 -#define ID_RADIOBOX_SELECT_FORMAT 10009 -#define ID_RADIOBOX_SEPARATOR 10015 -#define ID_CHECKBOX6 10016 -#define ID_CHECKBOX_FIELD1 10007 -#define ID_CHECKBOX_FIELD2 10008 -#define ID_CHECKBOX_FIELD4 10010 -#define ID_CHECKBOX_FIELD5 10011 -#define ID_CHECKBOX_FIELD6 10012 -#define ID_CHECKBOX_FIELD7 10013 -#define ID_CHECKBOX_FIELD8 10014 +#define ID_CHECKBOX1 10001 +#define ID_CHECKBOX2 10002 +#define ID_CHECKBOX3 10003 +#define ID_CHECKBOX4 10004 +#define ID_CHECKBOX5 10005 +#define ID_RADIOBOX_SELECT_FORMAT 10006 +#define ID_RADIOBOX_SEPARATOR 10007 +#define ID_CHECKBOX6 10008 +#define ID_CHECKBOX_FIELD1 10009 +#define ID_CHECKBOX_FIELD2 10010 +#define ID_CHECKBOX_FIELD3 10011 +#define ID_CHECKBOX_FIELD4 10012 +#define ID_CHECKBOX_FIELD5 10013 +#define ID_CHECKBOX_FIELD6 10014 +#define ID_CHECKBOX_FIELD7 10015 +#define ID_CHECKBOX_FIELD8 10016 +#define ID_CREATE_LIST 10017 #define SYMBOL_WINEDA_BUILD_BOM_FRAME_STYLE wxDEFAULT_DIALOG_STYLE|wxCAPTION|wxSYSTEM_MENU|wxCLOSE_BOX|MAYBE_RESIZE_BORDER #define SYMBOL_WINEDA_BUILD_BOM_FRAME_TITLE _("List of Material") #define SYMBOL_WINEDA_BUILD_BOM_FRAME_IDNAME ID_DIALOG @@ -99,17 +101,20 @@ public: ////@begin WinEDA_Build_BOM_Frame event handler declarations - /// wxEVT_CLOSE_WINDOW event handler for ID_DIALOG - void OnCloseWindow( wxCloseEvent& event ); - /// wxEVT_COMMAND_RADIOBOX_SELECTED event handler for ID_RADIOBOX_SELECT_FORMAT void OnRadioboxSelectFormatSelected( wxCommandEvent& event ); + /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_CREATE_LIST + void OnCreateListClick( wxCommandEvent& event ); + /// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK void OnOkClick( wxCommandEvent& event ); - /// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_EXIT - void OnExitClick( wxCommandEvent& event ); + /// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL + void OnCancelClick( wxCommandEvent& event ); + + /// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_APPLY + void OnApplyClick( wxCommandEvent& event ); ////@end WinEDA_Build_BOM_Frame event handler declarations diff --git a/eeschema/dialog_build_BOM.pjd b/eeschema/dialog_build_BOM.pjd index dc505260af..8cf5ac8b24 100644 --- a/eeschema/dialog_build_BOM.pjd +++ b/eeschema/dialog_build_BOM.pjd @@ -10,8 +10,10 @@ 0 0 0 + 1 1 1 + 1 0 "jean-pieere Charras" "GNU license" @@ -262,7 +264,7 @@ 1 0 0 - "15/4/2006" + "12/10/2007" "wbDialogProxy" 10000 0 @@ -270,7 +272,7 @@ 0 "" 0 - "wxEVT_CLOSE_WINDOW|OnCloseWindow" + 0 "ID_DIALOG" 10000 "WinEDA_Build_BOM_Frame" @@ -291,6 +293,13 @@ 0 1 "<Any platform>" + "" + "" + "" + "" + "" + "" + "Tiled" 1 1 0 @@ -316,7 +325,7 @@ 0 1 0 - "" + "MAYBE_RESIZE_BORDER" 0 1 -1 @@ -334,7 +343,6 @@ 1 0 0 - "15/4/2006" "wbBoxSizerProxy" "Vertical" "" @@ -351,7 +359,7 @@ 1 0 0 - "15/4/2006" + "12/10/2007" "wbBoxSizerProxy" "Horizontal" "" @@ -361,8 +369,8 @@ 5 1 1 - 1 - 1 + 0 + 0 0 0 0 @@ -376,16 +384,16 @@ 1 0 0 - "9/5/2007" + "12/10/2007" "wbBoxSizerProxy" "Vertical" "" "Centre" - "Expand" + "Centre" 0 5 0 - 1 + 0 1 1 0 @@ -401,11 +409,11 @@ 1 0 0 - "9/5/2007" + "12/10/2007" "wbStaticBoxSizerProxy" "wxID_ANY" -1 - "List items : " + "List items:" "" "" "" @@ -415,7 +423,7 @@ "wxStaticBox" "Vertical" "Expand" - "Expand" + "Centre" 0 5 1 @@ -427,7 +435,7 @@ 0 "<Any platform>" - "wxCheckBox: ID_CHECKBOX" + "wxCheckBox: ID_CHECKBOX1" "dialog-control-document" "" "checkbox" @@ -435,9 +443,9 @@ 1 0 0 - "9/5/2007" + "12/10/2007" "wbCheckBoxProxy" - "ID_CHECKBOX" + "ID_CHECKBOX1" 10001 "wxCheckBox" "wxCheckBox" @@ -452,6 +460,11 @@ "" "s_ListByRef" "wxGenericValidator(& %VARIABLE%)" + "" + "" + "" + "" + "" "" "" "" @@ -493,10 +506,10 @@ 1 0 0 - "9/5/2007" + "12/10/2007" "wbCheckBoxProxy" "ID_CHECKBOX2" - 10004 + 10002 "wxCheckBox" "wxCheckBox" 1 @@ -504,70 +517,17 @@ "" "" "m_ListSubCmpItems" - "Sub Components (i.e U2A, U2B..)" + "Sub Components (i.e. U2A, U2B ...)" 0 "" "" "s_ListWithSubCmponents" "wxGenericValidator(& %VARIABLE%)" - "" - "" - "" - 0 - 1 - "<Any platform>" - 0 - 1 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Left" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "" - "" - - - "wxCheckBox: ID_CHECKBOX1" - "dialog-control-document" - "" - "checkbox" - 0 - 1 - 0 - 0 - "9/5/2007" - "wbCheckBoxProxy" - "ID_CHECKBOX1" - 10003 - "wxCheckBox" - "wxCheckBox" - 1 - 0 - "" - "" - "m_ListCmpbyValItems" - "Components by Value" - 1 - "" - "" - "s_ListByValue" - "wxGenericValidator(& %VARIABLE%)" + "" + "" + "" + "" + "" "" "" "" @@ -609,23 +569,28 @@ 1 0 0 - "9/5/2007" + "12/10/2007" "wbCheckBoxProxy" "ID_CHECKBOX3" - 10005 + 10003 "wxCheckBox" "wxCheckBox" 1 0 "" "" - "m_GenListLabelsbyVal" - "Hierachy Pins by name" - 0 + "m_ListCmpbyValItems" + "Components by Value" + 1 "" "" - "s_ListHierarchicalPinByName" + "s_ListByValue" "wxGenericValidator(& %VARIABLE%)" + "" + "" + "" + "" + "" "" "" "" @@ -667,10 +632,73 @@ 1 0 0 - "9/5/2007" + "12/10/2007" "wbCheckBoxProxy" "ID_CHECKBOX4" - 10006 + 10004 + "wxCheckBox" + "wxCheckBox" + 1 + 0 + "" + "" + "m_GenListLabelsbyVal" + "Hierachy Pins by Name" + 0 + "" + "" + "s_ListHierarchicalPinByName" + "wxGenericValidator(& %VARIABLE%)" + "" + "" + "" + "" + "" + "" + "" + "" + 0 + 1 + "<Any platform>" + 0 + 1 + 0 + 0 + 0 + 0 + 0 + "" + -1 + -1 + -1 + -1 + "Left" + "Centre" + 0 + 5 + 1 + 1 + 1 + 1 + 0 + 0 + 0 + "" + "" + + + "wxCheckBox: ID_CHECKBOX5" + "dialog-control-document" + "" + "checkbox" + 0 + 1 + 0 + 0 + "12/10/2007" + "wbCheckBoxProxy" + "ID_CHECKBOX5" + 10005 "wxCheckBox" "wxCheckBox" 1 @@ -684,6 +712,11 @@ "" "s_ListBySheet" "wxGenericValidator(& %VARIABLE%)" + "" + "" + "" + "" + "" "" "" "" @@ -726,11 +759,11 @@ 1 0 0 - "9/5/2007" + "12/10/2007" "wbRadioBoxProxy" "wxEVT_COMMAND_RADIOBOX_SELECTED|OnRadioboxSelectFormatSelected|NONE||" "ID_RADIOBOX_SELECT_FORMAT" - 10009 + 10006 "wxRadioBox" "wxRadioBox" 1 @@ -752,6 +785,11 @@ "<Any platform>" "s_OutputFormOpt" "wxGenericValidator(& %VARIABLE%)" + "" + "" + "" + "" + "" 0 1 0 @@ -785,10 +823,10 @@ 1 0 0 - "1/7/2007" + "12/10/2007" "wbRadioBoxProxy" "ID_RADIOBOX_SEPARATOR" - 10015 + 10007 "wxRadioBox" "wxRadioBox" 1 @@ -810,6 +848,11 @@ "<Any platform>" "s_OutputSeparatorOpt" "wxGenericValidator(& %VARIABLE%)" + "" + "" + "" + "" + "" 1 0 0 @@ -843,11 +886,11 @@ 1 0 0 - "1/7/2007" + "12/10/2007" "wbStaticBoxSizerProxy" "wxID_ANY" -1 - "Options" + "Options:" "" "" "" @@ -877,10 +920,10 @@ 1 0 0 - "1/7/2007" + "12/10/2007" "wbCheckBoxProxy" "ID_CHECKBOX6" - 10016 + 10008 "wxCheckBox" "wxCheckBox" 1 @@ -894,6 +937,11 @@ "" "s_BrowsList" "wxGenericValidator(& %VARIABLE%)" + "" + "" + "" + "" + "" "" "" "" @@ -913,7 +961,7 @@ -1 -1 "Left" - "Expand" + "Centre" 0 5 1 @@ -937,10 +985,18 @@ 1 0 0 - "1/7/2007" + "12/10/2007" "wbBoxSizerProxy" "Vertical" "" + "Centre" + "Top" + 0 + 5 + 1 + 0 + 1 + 1 0 0 0 @@ -954,11 +1010,11 @@ 1 0 0 - "1/7/2007" + "12/10/2007" "wbStaticBoxSizerProxy" "wxID_ANY" - "-1" - "Fields to Add" + -1 + "Fields to add:" "" "m_FieldsToAppendListSizer" "" @@ -967,8 +1023,8 @@ 1 "wxStaticBox" "Vertical" - "Expand" - "Top" + "Left" + "Centre" 0 5 1 @@ -988,10 +1044,10 @@ 1 0 0 - "1/7/2007" + "12/10/2007" "wbCheckBoxProxy" "ID_CHECKBOX_FIELD1" - 10007 + 10009 "wxCheckBox" "wxCheckBox" 1 @@ -1005,6 +1061,11 @@ "" "s_Add_F1_state" "wxGenericValidator(& %VARIABLE%)" + "" + "" + "" + "" + "" "" "" "" @@ -1012,7 +1073,7 @@ 1 "<Any platform>" 0 - 0 + 1 0 0 0 @@ -1023,7 +1084,7 @@ -1 -1 -1 - "Expand" + "Centre" "Centre" 0 5 @@ -1046,10 +1107,10 @@ 1 0 0 - "1/7/2007" + "12/10/2007" "wbCheckBoxProxy" "ID_CHECKBOX_FIELD2" - 10008 + 10010 "wxCheckBox" "wxCheckBox" 1 @@ -1063,6 +1124,11 @@ "" "s_Add_F2_state" "wxGenericValidator(& %VARIABLE%)" + "" + "" + "" + "" + "" "" "" "" @@ -1070,7 +1136,7 @@ 1 "<Any platform>" 0 - 0 + 1 0 0 0 @@ -1081,7 +1147,7 @@ -1 -1 -1 - "Expand" + "Centre" "Centre" 0 5 @@ -1096,7 +1162,7 @@ "" - "wxCheckBox: ID_CHECKBOX_FIELD1" + "wxCheckBox: ID_CHECKBOX_FIELD3" "dialog-control-document" "" "checkbox" @@ -1104,10 +1170,10 @@ 1 0 0 - "1/7/2007" + "12/10/2007" "wbCheckBoxProxy" - "ID_CHECKBOX_FIELD1" - 10007 + "ID_CHECKBOX_FIELD3" + 10011 "wxCheckBox" "wxCheckBox" 1 @@ -1121,6 +1187,11 @@ "" "s_Add_F3_state" "wxGenericValidator(& %VARIABLE%)" + "" + "" + "" + "" + "" "" "" "" @@ -1128,7 +1199,7 @@ 1 "<Any platform>" 0 - 0 + 1 0 0 0 @@ -1139,7 +1210,7 @@ -1 -1 -1 - "Expand" + "Centre" "Centre" 0 5 @@ -1162,10 +1233,10 @@ 1 0 0 - "1/7/2007" + "12/10/2007" "wbCheckBoxProxy" "ID_CHECKBOX_FIELD4" - 10010 + 10012 "wxCheckBox" "wxCheckBox" 1 @@ -1179,6 +1250,11 @@ "" "s_Add_F4_state" "wxGenericValidator(& %VARIABLE%)" + "" + "" + "" + "" + "" "" "" "" @@ -1186,7 +1262,7 @@ 1 "<Any platform>" 0 - 0 + 1 0 0 0 @@ -1197,7 +1273,7 @@ -1 -1 -1 - "Expand" + "Centre" "Centre" 0 5 @@ -1220,10 +1296,10 @@ 1 0 0 - "1/7/2007" + "12/10/2007" "wbCheckBoxProxy" "ID_CHECKBOX_FIELD5" - 10011 + 10013 "wxCheckBox" "wxCheckBox" 1 @@ -1237,6 +1313,11 @@ "" "s_Add_F5_state" "wxGenericValidator(& %VARIABLE%)" + "" + "" + "" + "" + "" "" "" "" @@ -1244,7 +1325,7 @@ 1 "<Any platform>" 0 - 0 + 1 0 0 0 @@ -1255,7 +1336,7 @@ -1 -1 -1 - "Expand" + "Centre" "Centre" 0 5 @@ -1278,10 +1359,10 @@ 1 0 0 - "1/7/2007" + "12/10/2007" "wbCheckBoxProxy" "ID_CHECKBOX_FIELD6" - 10012 + 10014 "wxCheckBox" "wxCheckBox" 1 @@ -1295,6 +1376,11 @@ "" "s_Add_F6_state" "wxGenericValidator(& %VARIABLE%)" + "" + "" + "" + "" + "" "" "" "" @@ -1302,7 +1388,7 @@ 1 "<Any platform>" 0 - 0 + 1 0 0 0 @@ -1313,7 +1399,7 @@ -1 -1 -1 - "Expand" + "Centre" "Centre" 0 5 @@ -1336,10 +1422,10 @@ 1 0 0 - "1/7/2007" + "12/10/2007" "wbCheckBoxProxy" "ID_CHECKBOX_FIELD7" - 10013 + 10015 "wxCheckBox" "wxCheckBox" 1 @@ -1353,6 +1439,11 @@ "" "s_Add_F7_state" "wxGenericValidator(& %VARIABLE%)" + "" + "" + "" + "" + "" "" "" "" @@ -1360,7 +1451,7 @@ 1 "<Any platform>" 0 - 0 + 1 0 0 0 @@ -1371,7 +1462,7 @@ -1 -1 -1 - "Expand" + "Centre" "Centre" 0 5 @@ -1394,10 +1485,10 @@ 1 0 0 - "1/7/2007" + "12/10/2007" "wbCheckBoxProxy" "ID_CHECKBOX_FIELD8" - 10014 + 10016 "wxCheckBox" "wxCheckBox" 1 @@ -1411,6 +1502,11 @@ "" "s_Add_F8_state" "wxGenericValidator(& %VARIABLE%)" + "" + "" + "" + "" + "" "" "" "" @@ -1418,7 +1514,7 @@ 1 "<Any platform>" 0 - 0 + 1 0 0 0 @@ -1429,7 +1525,7 @@ -1 -1 -1 - "Expand" + "Centre" "Centre" 0 5 @@ -1453,14 +1549,14 @@ 1 0 0 - "1/7/2007" + "12/10/2007" "wbSpacerProxy" 5 5 "Expand" "Centre" 0 - 15 + 10 1 1 1 @@ -1471,19 +1567,58 @@ "<Any platform>" - "wxBoxSizer V" + "wxButton: ID_CREATE_LIST" "dialog-control-document" "" - "sizer" + "dialogcontrol" 0 1 0 0 - "1/7/2007" - "wbBoxSizerProxy" - "Vertical" + "12/10/2007" + "wbButtonProxy" + "wxEVT_COMMAND_BUTTON_CLICKED|OnCreateListClick|NONE||" + "ID_CREATE_LIST" + 10017 + "wxButton" + "wxButton" + 1 + 0 + "" + "" "" - "Expand" + "Create &List" + 1 + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "A60000" + "" + 0 + 1 + "<Any platform>" + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + "" + -1 + -1 + -1 + -1 + "Centre" "Centre" 0 5 @@ -1494,128 +1629,235 @@ 0 0 0 - "<Any platform>" - - "wxButton: wxID_OK" - "dialog-control-document" - "" - "dialogcontrol" - 0 - 1 - 0 - 0 - "1/7/2007" - "wbButtonProxy" - "wxEVT_COMMAND_BUTTON_CLICKED|OnOkClick" - "wxID_OK" - 5100 - "wxButton" - "wxButton" - 1 - 0 - "" - "" - "" - "&Create List" - 1 - "" - "" - "" - "A60000" - "" - 0 - 1 - "<Any platform>" - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Expand" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "" - "" - - - "wxButton: wxID_EXIT" - "dialog-control-document" - "" - "dialogcontrol" - 0 - 1 - 0 - 0 - "1/7/2007" - "wbButtonProxy" - "wxEVT_COMMAND_BUTTON_CLICKED|OnExitClick" - "wxID_EXIT" - 5006 - "wxButton" - "wxButton" - 1 - 0 - "" - "" - "" - "&Quit" - 0 - "" - "" - "" - "0000D2" - "" - 0 - 1 - "<Any platform>" - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Expand" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "" - "" - + "" + "" + + "wxBoxSizer H" + "dialog-control-document" + "" + "sizer" + 0 + 1 + 0 + 0 + "12/10/2007" + "wbBoxSizerProxy" + "Horizontal" + "" + "Centre" + "Centre" + 0 + 5 + 1 + 1 + 0 + 1 + 0 + 0 + 0 + "<Any platform>" + + "wxButton: wxID_OK" + "dialog-control-document" + "" + "dialogcontrol" + 0 + 1 + 0 + 0 + "12/10/2007" + "wbButtonProxy" + "wxEVT_COMMAND_BUTTON_CLICKED|OnOkClick|NONE||" + "wxID_OK" + 5100 + "wxButton" + "wxButton" + 1 + 0 + "" + "" + "" + "&OK" + 0 + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "FF0000" + "" + 0 + 1 + "<Any platform>" + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + "" + -1 + -1 + -1 + -1 + "Centre" + "Centre" + 0 + 5 + 1 + 1 + 1 + 1 + 0 + 0 + 0 + "" + "" + + + "wxButton: wxID_CANCEL" + "dialog-control-document" + "" + "dialogcontrol" + 0 + 1 + 0 + 0 + "12/10/2007" + "wbButtonProxy" + "wxEVT_COMMAND_BUTTON_CLICKED|OnCancelClick|NONE||" + "wxID_CANCEL" + 5101 + "wxButton" + "wxButton" + 1 + 0 + "" + "" + "" + "&Cancel" + 0 + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "0000FF" + "" + 0 + 1 + "<Any platform>" + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + "" + -1 + -1 + -1 + -1 + "Centre" + "Centre" + 0 + 5 + 1 + 1 + 1 + 1 + 0 + 0 + 0 + "" + "" + + + "wxButton: wxID_APPLY" + "dialog-control-document" + "" + "dialogcontrol" + 0 + 1 + 0 + 0 + "12/10/2007" + "wbButtonProxy" + "wxEVT_COMMAND_BUTTON_CLICKED|OnApplyClick|NONE||" + "wxID_APPLY" + 5102 + "wxButton" + "wxButton" + 1 + 0 + "" + "" + "" + "&Apply" + 0 + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + 0 + 1 + "<Any platform>" + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + "" + -1 + -1 + -1 + -1 + "Centre" + "Centre" + 0 + 5 + 1 + 1 + 1 + 1 + 0 + 0 + 0 + "" + "" + + @@ -1637,7 +1879,7 @@ 0 1 0 - "15/4/2006" + "12/10/2007" "" diff --git a/eeschema/genliste.cpp b/eeschema/genliste.cpp.notused similarity index 100% rename from eeschema/genliste.cpp rename to eeschema/genliste.cpp.notused