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
0acb404f
Commit
0acb404f
authored
Nov 16, 2009
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed a libedit crash when editing a pin. Enable translation of static strings
parent
4c6bbb85
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
9 deletions
+19
-9
class_pin.cpp
eeschema/class_pin.cpp
+19
-9
No files found.
eeschema/class_pin.cpp
View file @
0acb404f
...
...
@@ -42,7 +42,7 @@ static const int pin_orientation_codes[] =
#define PIN_ORIENTATION_CNT ( sizeof( pin_orientation_names ) / \
sizeof( wxString
*
) )
sizeof( wxString ) )
static
const
wxString
pin_style_names
[]
=
...
...
@@ -57,7 +57,7 @@ static const wxString pin_style_names[] =
};
#define PIN_STYLE_CNT ( sizeof( pin_style_names ) / sizeof( wxString
*
) )
#define PIN_STYLE_CNT ( sizeof( pin_style_names ) / sizeof( wxString ) )
static
const
int
pin_style_codes
[]
=
...
...
@@ -89,7 +89,7 @@ static const wxString pin_electrical_type_names[] =
#define PIN_ELECTRICAL_TYPE_CNT ( sizeof( pin_electrical_type_names ) / \
sizeof( wxString
*
) )
sizeof( wxString ) )
const
wxChar
*
MsgPinElectricType
[]
=
...
...
@@ -1609,8 +1609,9 @@ void LIB_PIN::DisplayInfo( WinEDA_DrawFrame* frame )
frame
->
AppendMsgPanel
(
_
(
"Number"
),
Text
,
DARKCYAN
);
frame
->
AppendMsgPanel
(
_
(
"Type"
),
pin_electrical_type_names
[
m_PinType
],
RED
);
Text
=
pin_style_names
[
GetStyleCodeIndex
(
m_PinShape
)
];
wxGetTranslation
(
pin_electrical_type_names
[
m_PinType
]),
RED
);
Text
=
wxGetTranslation
(
pin_style_names
[
GetStyleCodeIndex
(
m_PinShape
)
]);
frame
->
AppendMsgPanel
(
_
(
"Style"
),
Text
,
BLUE
);
if
(
IsVisible
()
)
Text
=
_
(
"Yes"
);
...
...
@@ -1623,7 +1624,7 @@ void LIB_PIN::DisplayInfo( WinEDA_DrawFrame* frame )
EESCHEMA_INTERNAL_UNIT
,
true
);
frame
->
AppendMsgPanel
(
_
(
"Length"
),
Text
,
MAGENTA
);
Text
=
pin_orientation_names
[
GetOrientationCodeIndex
(
m_Orient
)
]
;
Text
=
wxGetTranslation
(
pin_orientation_names
[
GetOrientationCodeIndex
(
m_Orient
)
])
;
frame
->
AppendMsgPanel
(
_
(
"Orientation"
),
Text
,
DARKMAGENTA
);
}
...
...
@@ -1643,7 +1644,10 @@ EDA_Rect LIB_PIN::GetBoundingBox()
wxArrayString
LIB_PIN
::
GetOrientationNames
(
void
)
{
return
wxArrayString
(
PIN_ORIENTATION_CNT
,
pin_orientation_names
);
wxArrayString
tmp
;
for
(
unsigned
ii
=
0
;
ii
<
PIN_ORIENTATION_CNT
;
ii
++
)
tmp
.
Add
(
wxGetTranslation
(
pin_orientation_names
[
ii
]));
return
tmp
;
}
...
...
@@ -1672,7 +1676,10 @@ int LIB_PIN::GetOrientationCodeIndex( int code )
wxArrayString
LIB_PIN
::
GetStyleNames
(
void
)
{
return
wxArrayString
(
PIN_STYLE_CNT
,
pin_style_names
);
wxArrayString
tmp
;
for
(
unsigned
ii
=
0
;
ii
<
PIN_STYLE_CNT
;
ii
++
)
tmp
.
Add
(
wxGetTranslation
(
pin_style_names
[
ii
]));
return
tmp
;
}
...
...
@@ -1701,5 +1708,8 @@ int LIB_PIN::GetStyleCodeIndex( int code )
wxArrayString
LIB_PIN
::
GetElectricalTypeNames
(
void
)
{
return
wxArrayString
(
PIN_ELECTRICAL_TYPE_CNT
,
pin_electrical_type_names
);
wxArrayString
tmp
;
for
(
unsigned
ii
=
0
;
ii
<
PIN_ELECTRICAL_TYPE_CNT
;
ii
++
)
tmp
.
Add
(
wxGetTranslation
(
pin_electrical_type_names
[
ii
]));
return
tmp
;
}
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