Symbol rescue dialog improvements.
Make the user prompt an HTML control for improved layout. Fix some column title sizing issues. This is not a complete fix but it seems better than the default sizing done by wxWidgets. Use symbol terminology instead of part and/or component. Create trace string source files for a common place for them and their Doxygen comments.
This commit is contained in:
parent
48a37c2998
commit
b4e9d9b6f7
|
@ -81,13 +81,44 @@ DIALOG_RESCUE_EACH::DIALOG_RESCUE_EACH( SCH_EDIT_FRAME* aParent, RESCUER& aRescu
|
||||||
m_stdButtonsOK->SetDefault();
|
m_stdButtonsOK->SetDefault();
|
||||||
|
|
||||||
// Set the info message, customized to include the proper suffix.
|
// Set the info message, customized to include the proper suffix.
|
||||||
wxString info_message =
|
wxString info =
|
||||||
_( "It looks like this project was made using older schematic symbol libraries.\n"
|
_( "This schematic was made using older symbol libraries which may break the "
|
||||||
"Some parts may need to be relinked to a different symbol name, and some symbols\n"
|
"schematic. Some symbols may need to be linked to a different symbol name. "
|
||||||
"may need to be \"rescued\" (cloned and renamed) into a new library.\n"
|
"Some symbols may need to be \"rescued\" (copied and renamed) into a new library.\n\n"
|
||||||
"\n"
|
|
||||||
"The following changes are recommended to update the project." );
|
"The following changes are recommended to update the project." );
|
||||||
m_lblInfo->SetLabel( info_message );
|
m_htmlPrompt->AppendToPage( info );
|
||||||
|
|
||||||
|
// wxDataViewListCtrl seems to do a poor job of laying itself out so help it along here.
|
||||||
|
wxString header = _( "Accept" );
|
||||||
|
wxFont font = m_ListOfConflicts->GetFont();
|
||||||
|
|
||||||
|
font.MakeBold();
|
||||||
|
|
||||||
|
wxClientDC dc( this );
|
||||||
|
|
||||||
|
dc.SetFont( font );
|
||||||
|
|
||||||
|
int padding = 30;
|
||||||
|
int width = dc.GetTextExtent( header ).GetWidth();
|
||||||
|
|
||||||
|
m_ListOfConflicts->AppendToggleColumn( header, wxDATAVIEW_CELL_ACTIVATABLE, width,
|
||||||
|
wxALIGN_CENTER );
|
||||||
|
|
||||||
|
header = _( "Symbol Name" );
|
||||||
|
width = dc.GetTextExtent( header ).GetWidth() + padding;
|
||||||
|
m_ListOfConflicts->AppendTextColumn( header, wxDATAVIEW_CELL_INERT, width );
|
||||||
|
|
||||||
|
header = _( "Action Taken" );
|
||||||
|
width = dc.GetTextExtent( header ).GetWidth() + padding;
|
||||||
|
m_ListOfConflicts->AppendTextColumn( header, wxDATAVIEW_CELL_INERT, width );
|
||||||
|
|
||||||
|
header = _( "Reference" );
|
||||||
|
width = dc.GetTextExtent( header ).GetWidth() + padding;
|
||||||
|
m_ListOfInstances->AppendTextColumn( header, wxDATAVIEW_CELL_INERT, width );
|
||||||
|
|
||||||
|
header = _( "Value" );
|
||||||
|
width = dc.GetTextExtent( header ).GetWidth() + padding;
|
||||||
|
m_ListOfInstances->AppendTextColumn( header, wxDATAVIEW_CELL_INERT, width );
|
||||||
|
|
||||||
m_componentViewOld->SetLayoutDirection( wxLayout_LeftToRight );
|
m_componentViewOld->SetLayoutDirection( wxLayout_LeftToRight );
|
||||||
m_componentViewNew->SetLayoutDirection( wxLayout_LeftToRight );
|
m_componentViewNew->SetLayoutDirection( wxLayout_LeftToRight );
|
||||||
|
@ -104,11 +135,6 @@ bool DIALOG_RESCUE_EACH::TransferDataToWindow()
|
||||||
if( !wxDialog::TransferDataToWindow() )
|
if( !wxDialog::TransferDataToWindow() )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
m_ListOfConflicts->AppendToggleColumn( _( "Accept" ) );
|
|
||||||
m_ListOfConflicts->AppendTextColumn( _( "Symbol" ) );
|
|
||||||
m_ListOfConflicts->AppendTextColumn( _( "Action" ) );
|
|
||||||
m_ListOfInstances->AppendTextColumn( _( "Reference" ) );
|
|
||||||
m_ListOfInstances->AppendTextColumn( _( "Value" ) );
|
|
||||||
PopulateConflictList();
|
PopulateConflictList();
|
||||||
PopulateInstanceList();
|
PopulateInstanceList();
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// C++ code generated with wxFormBuilder (version May 6 2016)
|
// C++ code generated with wxFormBuilder (version Nov 22 2017)
|
||||||
// http://www.wxformbuilder.org/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#include "dialog_rescue_each_base.h"
|
#include "dialog_rescue_each_base.h"
|
||||||
|
@ -11,20 +11,19 @@
|
||||||
|
|
||||||
DIALOG_RESCUE_EACH_BASE::DIALOG_RESCUE_EACH_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
|
DIALOG_RESCUE_EACH_BASE::DIALOG_RESCUE_EACH_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
|
||||||
{
|
{
|
||||||
this->SetSizeHints( wxSize( 450,100 ), wxDefaultSize );
|
this->SetSizeHints( wxSize( 500,-1 ), wxDefaultSize );
|
||||||
|
|
||||||
wxBoxSizer* bSizerMain;
|
wxBoxSizer* bSizerMain;
|
||||||
bSizerMain = new wxBoxSizer( wxVERTICAL );
|
bSizerMain = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
m_lblInfo = new wxStaticText( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
m_htmlPrompt = new wxHtmlWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO );
|
||||||
m_lblInfo->Wrap( 500 );
|
bSizerMain->Add( m_htmlPrompt, 1, wxALL|wxEXPAND, 5 );
|
||||||
bSizerMain->Add( m_lblInfo, 0, wxALL|wxEXPAND, 5 );
|
|
||||||
|
|
||||||
m_titleSymbols = new wxStaticText( this, wxID_ANY, _("Symbols to update:"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_titleSymbols = new wxStaticText( this, wxID_ANY, _("Symbols to update:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
m_titleSymbols->Wrap( -1 );
|
m_titleSymbols->Wrap( -1 );
|
||||||
m_titleSymbols->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
|
m_titleSymbols->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
|
||||||
|
|
||||||
bSizerMain->Add( m_titleSymbols, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
bSizerMain->Add( m_titleSymbols, 0, wxLEFT|wxRIGHT, 5 );
|
||||||
|
|
||||||
m_ListOfConflicts = new wxDataViewListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
m_ListOfConflicts = new wxDataViewListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
bSizerMain->Add( m_ListOfConflicts, 2, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
bSizerMain->Add( m_ListOfConflicts, 2, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||||
|
@ -44,7 +43,7 @@ DIALOG_RESCUE_EACH_BASE::DIALOG_RESCUE_EACH_BASE( wxWindow* parent, wxWindowID i
|
||||||
wxBoxSizer* bSizer6;
|
wxBoxSizer* bSizer6;
|
||||||
bSizer6 = new wxBoxSizer( wxVERTICAL );
|
bSizer6 = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
m_staticText2 = new wxStaticText( this, wxID_ANY, _("Cached Part:"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_staticText2 = new wxStaticText( this, wxID_ANY, _("Cached Symbol:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
m_staticText2->Wrap( -1 );
|
m_staticText2->Wrap( -1 );
|
||||||
m_staticText2->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
|
m_staticText2->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
|
||||||
|
|
||||||
|
@ -61,7 +60,7 @@ DIALOG_RESCUE_EACH_BASE::DIALOG_RESCUE_EACH_BASE( wxWindow* parent, wxWindowID i
|
||||||
wxBoxSizer* bSizer7;
|
wxBoxSizer* bSizer7;
|
||||||
bSizer7 = new wxBoxSizer( wxVERTICAL );
|
bSizer7 = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
m_staticText3 = new wxStaticText( this, wxID_ANY, _("Library Part:"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_staticText3 = new wxStaticText( this, wxID_ANY, _("Library Symbol:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
m_staticText3->Wrap( -1 );
|
m_staticText3->Wrap( -1 );
|
||||||
m_staticText3->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
|
m_staticText3->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
|
||||||
|
|
||||||
|
|
|
@ -41,10 +41,10 @@
|
||||||
<property name="hidden">0</property>
|
<property name="hidden">0</property>
|
||||||
<property name="id">wxID_ANY</property>
|
<property name="id">wxID_ANY</property>
|
||||||
<property name="maximum_size"></property>
|
<property name="maximum_size"></property>
|
||||||
<property name="minimum_size">450,100</property>
|
<property name="minimum_size">500,-1</property>
|
||||||
<property name="name">DIALOG_RESCUE_EACH_BASE</property>
|
<property name="name">DIALOG_RESCUE_EACH_BASE</property>
|
||||||
<property name="pos"></property>
|
<property name="pos"></property>
|
||||||
<property name="size">529,593</property>
|
<property name="size">500,-1</property>
|
||||||
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
|
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
|
||||||
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
|
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
|
||||||
<property name="title">Project Rescue Helper</property>
|
<property name="title">Project Rescue Helper</property>
|
||||||
|
@ -96,8 +96,8 @@
|
||||||
<object class="sizeritem" expanded="1">
|
<object class="sizeritem" expanded="1">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxALL|wxEXPAND</property>
|
<property name="flag">wxALL|wxEXPAND</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">1</property>
|
||||||
<object class="wxStaticText" expanded="1">
|
<object class="wxHtmlWindow" expanded="1">
|
||||||
<property name="BottomDockable">1</property>
|
<property name="BottomDockable">1</property>
|
||||||
<property name="LeftDockable">1</property>
|
<property name="LeftDockable">1</property>
|
||||||
<property name="RightDockable">1</property>
|
<property name="RightDockable">1</property>
|
||||||
|
@ -125,7 +125,6 @@
|
||||||
<property name="gripper">0</property>
|
<property name="gripper">0</property>
|
||||||
<property name="hidden">0</property>
|
<property name="hidden">0</property>
|
||||||
<property name="id">wxID_ANY</property>
|
<property name="id">wxID_ANY</property>
|
||||||
<property name="label"></property>
|
|
||||||
<property name="max_size"></property>
|
<property name="max_size"></property>
|
||||||
<property name="maximize_button">0</property>
|
<property name="maximize_button">0</property>
|
||||||
<property name="maximum_size"></property>
|
<property name="maximum_size"></property>
|
||||||
|
@ -133,7 +132,7 @@
|
||||||
<property name="minimize_button">0</property>
|
<property name="minimize_button">0</property>
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size"></property>
|
||||||
<property name="moveable">1</property>
|
<property name="moveable">1</property>
|
||||||
<property name="name">m_lblInfo</property>
|
<property name="name">m_htmlPrompt</property>
|
||||||
<property name="pane_border">1</property>
|
<property name="pane_border">1</property>
|
||||||
<property name="pane_position"></property>
|
<property name="pane_position"></property>
|
||||||
<property name="pane_size"></property>
|
<property name="pane_size"></property>
|
||||||
|
@ -143,17 +142,19 @@
|
||||||
<property name="resize">Resizable</property>
|
<property name="resize">Resizable</property>
|
||||||
<property name="show">1</property>
|
<property name="show">1</property>
|
||||||
<property name="size"></property>
|
<property name="size"></property>
|
||||||
<property name="style"></property>
|
<property name="style">wxHW_SCROLLBAR_AUTO</property>
|
||||||
<property name="subclass"></property>
|
<property name="subclass">; forward_declare</property>
|
||||||
<property name="toolbar_pane">0</property>
|
<property name="toolbar_pane">0</property>
|
||||||
<property name="tooltip"></property>
|
<property name="tooltip"></property>
|
||||||
<property name="window_extra_style"></property>
|
<property name="window_extra_style"></property>
|
||||||
<property name="window_name"></property>
|
<property name="window_name"></property>
|
||||||
<property name="window_style"></property>
|
<property name="window_style"></property>
|
||||||
<property name="wrap">500</property>
|
|
||||||
<event name="OnChar"></event>
|
<event name="OnChar"></event>
|
||||||
<event name="OnEnterWindow"></event>
|
<event name="OnEnterWindow"></event>
|
||||||
<event name="OnEraseBackground"></event>
|
<event name="OnEraseBackground"></event>
|
||||||
|
<event name="OnHtmlCellClicked"></event>
|
||||||
|
<event name="OnHtmlCellHover"></event>
|
||||||
|
<event name="OnHtmlLinkClicked"></event>
|
||||||
<event name="OnKeyDown"></event>
|
<event name="OnKeyDown"></event>
|
||||||
<event name="OnKeyUp"></event>
|
<event name="OnKeyUp"></event>
|
||||||
<event name="OnKillFocus"></event>
|
<event name="OnKillFocus"></event>
|
||||||
|
@ -178,7 +179,7 @@
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="1">
|
<object class="sizeritem" expanded="1">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
|
<property name="flag">wxLEFT|wxRIGHT</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxStaticText" expanded="1">
|
<object class="wxStaticText" expanded="1">
|
||||||
<property name="BottomDockable">1</property>
|
<property name="BottomDockable">1</property>
|
||||||
|
@ -528,7 +529,7 @@
|
||||||
<property name="gripper">0</property>
|
<property name="gripper">0</property>
|
||||||
<property name="hidden">0</property>
|
<property name="hidden">0</property>
|
||||||
<property name="id">wxID_ANY</property>
|
<property name="id">wxID_ANY</property>
|
||||||
<property name="label">Cached Part:</property>
|
<property name="label">Cached Symbol:</property>
|
||||||
<property name="max_size"></property>
|
<property name="max_size"></property>
|
||||||
<property name="maximize_button">0</property>
|
<property name="maximize_button">0</property>
|
||||||
<property name="maximum_size"></property>
|
<property name="maximum_size"></property>
|
||||||
|
@ -702,7 +703,7 @@
|
||||||
<property name="gripper">0</property>
|
<property name="gripper">0</property>
|
||||||
<property name="hidden">0</property>
|
<property name="hidden">0</property>
|
||||||
<property name="id">wxID_ANY</property>
|
<property name="id">wxID_ANY</property>
|
||||||
<property name="label">Library Part:</property>
|
<property name="label">Library Symbol:</property>
|
||||||
<property name="max_size"></property>
|
<property name="max_size"></property>
|
||||||
<property name="maximize_button">0</property>
|
<property name="maximize_button">0</property>
|
||||||
<property name="maximum_size"></property>
|
<property name="maximum_size"></property>
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// C++ code generated with wxFormBuilder (version May 6 2016)
|
// C++ code generated with wxFormBuilder (version Nov 22 2017)
|
||||||
// http://www.wxformbuilder.org/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef __DIALOG_RESCUE_EACH_BASE_H__
|
#ifndef __DIALOG_RESCUE_EACH_BASE_H__
|
||||||
|
@ -11,15 +11,14 @@
|
||||||
#include <wx/artprov.h>
|
#include <wx/artprov.h>
|
||||||
#include <wx/xrc/xmlres.h>
|
#include <wx/xrc/xmlres.h>
|
||||||
#include <wx/intl.h>
|
#include <wx/intl.h>
|
||||||
class DIALOG_SHIM;
|
|
||||||
|
|
||||||
#include "dialog_shim.h"
|
#include "dialog_shim.h"
|
||||||
#include <wx/string.h>
|
#include <wx/html/htmlwin.h>
|
||||||
#include <wx/stattext.h>
|
|
||||||
#include <wx/gdicmn.h>
|
#include <wx/gdicmn.h>
|
||||||
#include <wx/font.h>
|
#include <wx/font.h>
|
||||||
#include <wx/colour.h>
|
#include <wx/colour.h>
|
||||||
#include <wx/settings.h>
|
#include <wx/settings.h>
|
||||||
|
#include <wx/string.h>
|
||||||
|
#include <wx/stattext.h>
|
||||||
#include <wx/dataview.h>
|
#include <wx/dataview.h>
|
||||||
#include <wx/panel.h>
|
#include <wx/panel.h>
|
||||||
#include <wx/sizer.h>
|
#include <wx/sizer.h>
|
||||||
|
@ -37,7 +36,7 @@ class DIALOG_RESCUE_EACH_BASE : public DIALOG_SHIM
|
||||||
private:
|
private:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
wxStaticText* m_lblInfo;
|
wxHtmlWindow* m_htmlPrompt;
|
||||||
wxStaticText* m_titleSymbols;
|
wxStaticText* m_titleSymbols;
|
||||||
wxDataViewListCtrl* m_ListOfConflicts;
|
wxDataViewListCtrl* m_ListOfConflicts;
|
||||||
wxStaticText* m_titleInstances;
|
wxStaticText* m_titleInstances;
|
||||||
|
@ -62,7 +61,7 @@ class DIALOG_RESCUE_EACH_BASE : public DIALOG_SHIM
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
DIALOG_RESCUE_EACH_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Project Rescue Helper"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 529,593 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
DIALOG_RESCUE_EACH_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Project Rescue Helper"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 500,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||||
~DIALOG_RESCUE_EACH_BASE();
|
~DIALOG_RESCUE_EACH_BASE();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue