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
7bb04c8f
Commit
7bb04c8f
authored
Apr 08, 2013
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make some messages translatable.
Make dialog footprint wizard list resizable.
parent
e04b6a04
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
35 deletions
+45
-35
class_track.cpp
pcbnew/class_track.cpp
+25
-17
dialog_footprint_wizard_list.fbp
pcbnew/dialogs/dialog_footprint_wizard_list.fbp
+7
-7
dialog_footprint_wizard_list_base.cpp
pcbnew/dialogs/dialog_footprint_wizard_list_base.cpp
+9
-9
dialog_footprint_wizard_list_base.h
pcbnew/dialogs/dialog_footprint_wizard_list_base.h
+4
-2
No files found.
pcbnew/class_track.cpp
View file @
7bb04c8f
...
...
@@ -197,40 +197,46 @@ EDA_ITEM* SEGVIA::Clone() const
wxString
SEGVIA
::
GetSelectMenuText
()
const
{
// Note: we use here Printf to make message translatable.
wxString
text
;
wxString
format
;
NETINFO_ITEM
*
net
;
BOARD
*
board
=
GetBoard
();
int
shape
=
GetShape
();
if
(
shape
==
VIA_BLIND_BURIED
)
text
<<
wxT
(
" "
)
<<
_
(
"Blind/Buried
"
);
format
=
_
(
"Blind/Buried Via %s, net[%s] (%d) on layers %s/%s
"
);
else
if
(
shape
==
VIA_MICROVIA
)
text
<<
wxT
(
" "
)
<<
_
(
"Micro
"
);
format
=
_
(
"Micro Via %s, Net [%s] (%d) on layers %s/%s
"
);
// else say nothing about normal (through) vias
text
<<
_
(
"Via"
)
<<
wxT
(
" "
)
<<
ShowWidth
();
else
format
=
_
(
"Via %s net [%s] (%d) on layers %s/%s"
);
if
(
board
)
{
net
=
board
->
FindNet
(
GetNet
()
);
wxString
netname
;
if
(
net
)
text
<<
wxT
(
" ["
)
<<
net
->
GetNetname
()
<<
wxT
(
"]"
);
text
<<
wxChar
(
' '
)
<<
_
(
"Net:"
)
<<
GetNet
();
netname
=
net
->
GetNetname
();
// say which layers, only two for now
LAYER_NUM
topLayer
;
LAYER_NUM
botLayer
;
ReturnLayerPair
(
&
topLayer
,
&
botLayer
);
text
<<
_
(
" on "
)
<<
board
->
GetLayerName
(
topLayer
)
<<
wxT
(
"/"
)
<<
board
->
GetLayerName
(
botLayer
);
text
.
Printf
(
format
.
GetData
(),
GetChars
(
ShowWidth
()
),
GetChars
(
netname
),
GetNet
(),
GetChars
(
board
->
GetLayerName
(
topLayer
)
),
GetChars
(
board
->
GetLayerName
(
botLayer
)
)
);
}
else
{
wxFAIL_MSG
(
wxT
(
"SEGVIA::GetSelectMenuText: BOARD is NULL"
)
);
text
<<
wxT
(
"???"
);
text
.
Printf
(
format
.
GetData
(),
GetChars
(
ShowWidth
()
),
wxT
(
"???"
),
0
,
wxT
(
"??"
),
wxT
(
"??"
)
);
}
return
text
;
...
...
@@ -1507,29 +1513,31 @@ int TRACK::GetEndSegments( int aCount, TRACK** aStartTrace, TRACK** aEndTrace )
wxString
TRACK
::
GetSelectMenuText
()
const
{
wxString
text
;
wxString
temp
;
wxString
netname
;
NETINFO_ITEM
*
net
;
BOARD
*
board
=
GetBoard
();
// deleting tracks requires all the information we can get to
// disambiguate all the choices under the cursor!
text
<<
_
(
"Track"
)
<<
wxT
(
" "
)
<<
ShowWidth
();
if
(
board
)
{
net
=
board
->
FindNet
(
GetNet
()
);
if
(
net
)
text
<<
wxT
(
" ["
)
<<
net
->
GetNetname
()
<<
wxT
(
"]"
);
netname
=
net
->
GetNetname
();
else
netname
=
_
(
"Not found"
);
}
else
{
wxFAIL_MSG
(
wxT
(
"TRACK::GetSelectMenuText: BOARD is NULL"
)
);
text
<<
wxT
(
"???"
);
netname
=
wxT
(
"???"
);
}
text
<<
_
(
" on "
)
<<
GetLayerName
()
<<
wxT
(
", "
)
<<
_
(
"Net:"
)
<<
GetNet
()
<<
wxT
(
", "
)
<<
_
(
"Length:"
)
<<
::
LengthDoubleToString
(
GetLength
()
);
text
.
Printf
(
_
(
"Track %s, net [%s] (%d) on layer %s, length: %s"
),
GetChars
(
ShowWidth
()
),
GetChars
(
netname
),
GetNet
(),
GetLayerName
(),
GetChars
(
::
LengthDoubleToString
(
GetLength
()
)
)
);
return
text
;
}
...
...
pcbnew/dialogs/dialog_footprint_wizard_list.fbp
View file @
7bb04c8f
...
...
@@ -39,11 +39,11 @@
<property
name=
"hidden"
>
0
</property>
<property
name=
"id"
>
wxID_ANY
</property>
<property
name=
"maximum_size"
></property>
<property
name=
"minimum_size"
></property>
<property
name=
"minimum_size"
>
400,200
</property>
<property
name=
"name"
>
DIALOG_FOOTPRINT_WIZARD_LIST_BASE
</property>
<property
name=
"pos"
></property>
<property
name=
"size"
></property>
<property
name=
"style"
>
wxDEFAULT_DIALOG_STYLE
</property>
<property
name=
"size"
>
404,200
</property>
<property
name=
"style"
>
wxDEFAULT_DIALOG_STYLE
|wxRESIZE_BORDER
</property>
<property
name=
"subclass"
>
DIALOG_SHIM; dialog_shim.h
</property>
<property
name=
"title"
>
Footprint Wizards
</property>
<property
name=
"tooltip"
></property>
...
...
@@ -88,12 +88,12 @@
<event
name=
"OnUpdateUI"
></event>
<object
class=
"wxBoxSizer"
expanded=
"1"
>
<property
name=
"minimum_size"
></property>
<property
name=
"name"
>
bSizer
4
</property>
<property
name=
"name"
>
bSizer
Main
</property>
<property
name=
"orient"
>
wxVERTICAL
</property>
<property
name=
"permission"
>
none
</property>
<object
class=
"sizeritem"
expanded=
"1"
>
<property
name=
"border"
>
5
</property>
<property
name=
"flag"
>
wxALL
</property>
<property
name=
"flag"
>
wxALL
|wxEXPAND
</property>
<property
name=
"proportion"
>
1
</property>
<object
class=
"wxGrid"
expanded=
"1"
>
<property
name=
"BottomDockable"
>
1
</property>
...
...
@@ -153,7 +153,7 @@
<property
name=
"maximum_size"
></property>
<property
name=
"min_size"
></property>
<property
name=
"minimize_button"
>
0
</property>
<property
name=
"minimum_size"
>
-1
,120
</property>
<property
name=
"minimum_size"
>
485
,120
</property>
<property
name=
"moveable"
>
1
</property>
<property
name=
"name"
>
m_footprintWizardsGrid
</property>
<property
name=
"pane_border"
>
1
</property>
...
...
@@ -255,7 +255,7 @@
<property
name=
"close_button"
>
1
</property>
<property
name=
"context_help"
></property>
<property
name=
"context_menu"
>
1
</property>
<property
name=
"default"
>
0
</property>
<property
name=
"default"
>
1
</property>
<property
name=
"default_pane"
>
0
</property>
<property
name=
"dock"
>
Dock
</property>
<property
name=
"dock_fixed"
>
0
</property>
...
...
pcbnew/dialogs/dialog_footprint_wizard_list_base.cpp
View file @
7bb04c8f
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version
Apr 10
2012)
// C++ code generated with wxFormBuilder (version
Oct 8
2012)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
...
...
@@ -11,10 +11,10 @@
DIALOG_FOOTPRINT_WIZARD_LIST_BASE
::
DIALOG_FOOTPRINT_WIZARD_LIST_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
(
wx
DefaultSize
,
wxDefaultSize
);
this
->
SetSizeHints
(
wx
Size
(
400
,
200
)
,
wxDefaultSize
);
wxBoxSizer
*
bSizer
4
;
bSizer
4
=
new
wxBoxSizer
(
wxVERTICAL
);
wxBoxSizer
*
bSizer
Main
;
bSizer
Main
=
new
wxBoxSizer
(
wxVERTICAL
);
m_footprintWizardsGrid
=
new
wxGrid
(
this
,
wxID_ANY
,
wxDefaultPosition
,
wxDefaultSize
,
0
);
...
...
@@ -47,17 +47,17 @@ DIALOG_FOOTPRINT_WIZARD_LIST_BASE::DIALOG_FOOTPRINT_WIZARD_LIST_BASE( wxWindow*
// Cell Defaults
m_footprintWizardsGrid
->
SetDefaultCellAlignment
(
wxALIGN_LEFT
,
wxALIGN_TOP
);
m_footprintWizardsGrid
->
SetMinSize
(
wxSize
(
-
1
,
120
)
);
m_footprintWizardsGrid
->
SetMinSize
(
wxSize
(
485
,
120
)
);
bSizer
4
->
Add
(
m_footprintWizardsGrid
,
1
,
wxALL
,
5
);
bSizer
Main
->
Add
(
m_footprintWizardsGrid
,
1
,
wxALL
|
wxEXPAND
,
5
);
m_btOpen
=
new
wxButton
(
this
,
wxID_ANY
,
_
(
"Open"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
bSizer4
->
Add
(
m_btOpen
,
0
,
wxALIGN_CENTER
|
wxALL
,
5
);
m_btOpen
->
SetDefault
();
bSizerMain
->
Add
(
m_btOpen
,
0
,
wxALIGN_CENTER
|
wxALL
,
5
);
this
->
SetSizer
(
bSizer
4
);
this
->
SetSizer
(
bSizer
Main
);
this
->
Layout
();
bSizer4
->
Fit
(
this
);
this
->
Centre
(
wxBOTH
);
...
...
pcbnew/dialogs/dialog_footprint_wizard_list_base.h
View file @
7bb04c8f
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version
Apr 10
2012)
// C++ code generated with wxFormBuilder (version
Oct 8
2012)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
...
...
@@ -11,6 +11,8 @@
#include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/intl.h>
class
DIALOG_SHIM
;
#include "dialog_shim.h"
#include <wx/colour.h>
#include <wx/settings.h>
...
...
@@ -43,7 +45,7 @@ class DIALOG_FOOTPRINT_WIZARD_LIST_BASE : public DIALOG_SHIM
public
:
DIALOG_FOOTPRINT_WIZARD_LIST_BASE
(
wxWindow
*
parent
,
wxWindowID
id
=
wxID_ANY
,
const
wxString
&
title
=
_
(
"Footprint Wizards"
),
const
wxPoint
&
pos
=
wxDefaultPosition
,
const
wxSize
&
size
=
wx
DefaultSize
,
long
style
=
wxDEFAULT_DIALOG_STYLE
);
DIALOG_FOOTPRINT_WIZARD_LIST_BASE
(
wxWindow
*
parent
,
wxWindowID
id
=
wxID_ANY
,
const
wxString
&
title
=
_
(
"Footprint Wizards"
),
const
wxPoint
&
pos
=
wxDefaultPosition
,
const
wxSize
&
size
=
wx
Size
(
404
,
200
),
long
style
=
wxDEFAULT_DIALOG_STYLE
|
wxRESIZE_BORDER
);
~
DIALOG_FOOTPRINT_WIZARD_LIST_BASE
();
};
...
...
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