FIX: wx 2.8 convert to UTF8 differently than 2.9 caused problems in DIALOG_FP_PLUGIN_OPTIONS.

This commit is contained in:
Dick Hollenbeck 2013-11-19 14:38:29 -06:00
parent abe9801d3d
commit abfeab02d7
5 changed files with 22 additions and 10 deletions

View File

@ -188,7 +188,9 @@ void GRID_TRICKS::onKeyDown( wxKeyEvent& ev )
cutcopy( true );
}
else
ev.Skip();
{
ev.Skip( true );
}
}

View File

@ -257,14 +257,15 @@ private:
void onListBoxItemSelected( wxCommandEvent& event )
{
// change the help text based on the m_listbox selection:
if( event.IsSelection() )
{
const char* option = TO_UTF8( event.GetString() );
string help_text;
string option = TO_UTF8( event.GetString() );
string help_text;
if( m_choices.Value( option, &help_text ) )
if( m_choices.Value( option.c_str(), &help_text ) )
{
wxString page( FROM_UTF8( help_text.c_str() ) );
wxString page = FROM_UTF8( help_text.c_str() );
m_html->SetPage( page );
}

View File

@ -93,7 +93,7 @@ DIALOG_FP_PLUGIN_OPTIONS_BASE::DIALOG_FP_PLUGIN_OPTIONS_BASE( wxWindow* parent,
m_listbox = new wxListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_ALWAYS_SB|wxLB_SINGLE );
m_listbox->SetToolTip( _("Options supported by current plugin") );
m_options_sizer->Add( m_listbox, 0, wxALL|wxEXPAND, 5 );
m_options_sizer->Add( m_listbox, 2, wxALL|wxEXPAND, 5 );
m_append_choice_button = new wxButton( this, wxID_ANY, _("<< Append Selected Option"), wxDefaultPosition, wxDefaultSize, 0 );
m_options_sizer->Add( m_append_choice_button, 0, wxALIGN_CENTER|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
@ -105,7 +105,7 @@ DIALOG_FP_PLUGIN_OPTIONS_BASE::DIALOG_FP_PLUGIN_OPTIONS_BASE( wxWindow* parent,
m_html = new wxHtmlWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO|wxVSCROLL );
m_html->SetMinSize( wxSize( 300,300 ) );
m_options_sizer->Add( m_html, 1, wxALL|wxEXPAND, 5 );
m_options_sizer->Add( m_html, 3, wxALL|wxEXPAND, 5 );
m_horizontal_sizer->Add( m_options_sizer, 2, wxEXPAND, 5 );

View File

@ -651,7 +651,7 @@
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<property name="proportion">2</property>
<object class="wxListBox" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
@ -910,7 +910,7 @@
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">1</property>
<property name="proportion">3</property>
<object class="wxHtmlWindow" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>

View File

@ -112,9 +112,10 @@ bool PLUGIN::IsFootprintLibWritable( const wxString& aLibraryPath )
void PLUGIN::FootprintLibOptions( PROPERTIES* aListToAppendTo ) const
{
// disable all these in another couple of months, after everyone has seen them:
#if 1
(*aListToAppendTo)["debug_level"] = wxString( _(
"Enable debug logging for Footprint*() functions in this PLUGIN."
"Enable <b>debug</b> logging for Footprint*() functions in this PLUGIN."
)).utf8_str();
(*aListToAppendTo)["read_filter_regex"] = wxString( _(
@ -125,6 +126,14 @@ void PLUGIN::FootprintLibOptions( PROPERTIES* aListToAppendTo ) const
"Enable transaction logging. The mere presence of this option turns on the "
" logging, no need to set a Value."
)).utf8_str();
(*aListToAppendTo)["username"] = wxString( _(
"User name for <b>login</b> to some special library server."
)).utf8_str();
(*aListToAppendTo)["password"] = wxString( _(
"Password for <b>login</b> to some special library server."
)).utf8_str();
#endif
#if 1