Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
abfeab02
Commit
abfeab02
authored
Nov 19, 2013
by
Dick Hollenbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FIX: wx 2.8 convert to UTF8 differently than 2.9 caused problems in DIALOG_FP_PLUGIN_OPTIONS.
parent
abe9801d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
10 deletions
+22
-10
grid_tricks.cpp
common/grid_tricks.cpp
+3
-1
dialog_fp_plugin_options.cpp
pcbnew/dialogs/dialog_fp_plugin_options.cpp
+5
-4
dialog_fp_plugin_options_base.cpp
pcbnew/dialogs/dialog_fp_plugin_options_base.cpp
+2
-2
dialog_fp_plugin_options_base.fbp
pcbnew/dialogs/dialog_fp_plugin_options_base.fbp
+2
-2
plugin.cpp
pcbnew/plugin.cpp
+10
-1
No files found.
common/grid_tricks.cpp
View file @
abfeab02
...
@@ -188,7 +188,9 @@ void GRID_TRICKS::onKeyDown( wxKeyEvent& ev )
...
@@ -188,7 +188,9 @@ void GRID_TRICKS::onKeyDown( wxKeyEvent& ev )
cutcopy
(
true
);
cutcopy
(
true
);
}
}
else
else
ev
.
Skip
();
{
ev
.
Skip
(
true
);
}
}
}
...
...
pcbnew/dialogs/dialog_fp_plugin_options.cpp
View file @
abfeab02
...
@@ -257,14 +257,15 @@ private:
...
@@ -257,14 +257,15 @@ private:
void
onListBoxItemSelected
(
wxCommandEvent
&
event
)
void
onListBoxItemSelected
(
wxCommandEvent
&
event
)
{
{
// change the help text based on the m_listbox selection:
if
(
event
.
IsSelection
()
)
if
(
event
.
IsSelection
()
)
{
{
const
char
*
option
=
TO_UTF8
(
event
.
GetString
()
);
string
option
=
TO_UTF8
(
event
.
GetString
()
);
string
help_text
;
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
);
m_html
->
SetPage
(
page
);
}
}
...
...
pcbnew/dialogs/dialog_fp_plugin_options_base.cpp
View file @
abfeab02
...
@@ -93,7 +93,7 @@ DIALOG_FP_PLUGIN_OPTIONS_BASE::DIALOG_FP_PLUGIN_OPTIONS_BASE( wxWindow* parent,
...
@@ -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
=
new
wxListBox
(
this
,
wxID_ANY
,
wxDefaultPosition
,
wxDefaultSize
,
0
,
NULL
,
wxLB_ALWAYS_SB
|
wxLB_SINGLE
);
m_listbox
->
SetToolTip
(
_
(
"Options supported by current plugin"
)
);
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_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
);
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,
...
@@ -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
=
new
wxHtmlWindow
(
this
,
wxID_ANY
,
wxDefaultPosition
,
wxDefaultSize
,
wxHW_SCROLLBAR_AUTO
|
wxVSCROLL
);
m_html
->
SetMinSize
(
wxSize
(
300
,
300
)
);
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
);
m_horizontal_sizer
->
Add
(
m_options_sizer
,
2
,
wxEXPAND
,
5
);
...
...
pcbnew/dialogs/dialog_fp_plugin_options_base.fbp
View file @
abfeab02
...
@@ -651,7 +651,7 @@
...
@@ -651,7 +651,7 @@
<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"
>
2
</property>
<object
class=
"wxListBox"
expanded=
"1"
>
<object
class=
"wxListBox"
expanded=
"1"
>
<property
name=
"BottomDockable"
>
1
</property>
<property
name=
"BottomDockable"
>
1
</property>
<property
name=
"LeftDockable"
>
1
</property>
<property
name=
"LeftDockable"
>
1
</property>
...
@@ -910,7 +910,7 @@
...
@@ -910,7 +910,7 @@
<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"
>
1
</property>
<property
name=
"proportion"
>
3
</property>
<object
class=
"wxHtmlWindow"
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>
...
...
pcbnew/plugin.cpp
View file @
abfeab02
...
@@ -112,9 +112,10 @@ bool PLUGIN::IsFootprintLibWritable( const wxString& aLibraryPath )
...
@@ -112,9 +112,10 @@ bool PLUGIN::IsFootprintLibWritable( const wxString& aLibraryPath )
void
PLUGIN
::
FootprintLibOptions
(
PROPERTIES
*
aListToAppendTo
)
const
void
PLUGIN
::
FootprintLibOptions
(
PROPERTIES
*
aListToAppendTo
)
const
{
{
// disable all these in another couple of months, after everyone has seen them:
#if 1
#if 1
(
*
aListToAppendTo
)[
"debug_level"
]
=
wxString
(
_
(
(
*
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
();
)).
utf8_str
();
(
*
aListToAppendTo
)[
"read_filter_regex"
]
=
wxString
(
_
(
(
*
aListToAppendTo
)[
"read_filter_regex"
]
=
wxString
(
_
(
...
@@ -125,6 +126,14 @@ void PLUGIN::FootprintLibOptions( PROPERTIES* aListToAppendTo ) const
...
@@ -125,6 +126,14 @@ void PLUGIN::FootprintLibOptions( PROPERTIES* aListToAppendTo ) const
"Enable transaction logging. The mere presence of this option turns on the "
"Enable transaction logging. The mere presence of this option turns on the "
" logging, no need to set a Value."
" logging, no need to set a Value."
)).
utf8_str
();
)).
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
#endif
#if 1
#if 1
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment