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
8eff8df9
Commit
8eff8df9
authored
Feb 19, 2008
by
dickelbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
beautify
parent
ce04867e
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
649 additions
and
581 deletions
+649
-581
common.cpp
common/common.cpp
+18
-18
edaappl.cpp
common/edaappl.cpp
+13
-7
projet_config.cpp
common/projet_config.cpp
+452
-397
pcbcfg.cpp
pcbnew/pcbcfg.cpp
+166
-159
No files found.
common/common.cpp
View file @
8eff8df9
...
...
@@ -277,10 +277,10 @@ wxString ReturnPcbLayerName( int layer_number, bool omitSpacePadding )
*/
{
#if
0 && defined(DEBUG)
#if
1 && defined(DEBUG)
// Dick: this code is working fine, but we have no place to store the layer names yet.
const
unsigned
LAYER_LIMIT
=
29
;
// @todo: these layer names should be configurable on a per project basis.
...
...
@@ -288,17 +288,17 @@ wxString ReturnPcbLayerName( int layer_number, bool omitSpacePadding )
// deriving the file names from the "configured" layer names.
// The main idea is to use a single array of names, and then remove
// spaces on the fly from the names when writing to disk.
#if 1 // my specific layer names
#if 1 // my specific layer names
static
const
wxString
layer_name_list
[]
=
{
_
(
"H2 Bottom"
),
_
(
"Power"
),
_
(
"V2 Signal"
),
_
(
"H1 Signal"
),
_( "Ground" ), _( "Inner L5
" ), _( "Inner L6 " ), _( "Inner L7
" ),
_( "Inner L8
" ), _( "Inner L9 " ),
_( "Inner L10" ), _( "Inner L11" ),
_
(
"Ground"
),
_
(
"Inner L5
"
),
_
(
"Inner L6"
),
_
(
"Inner L7
"
),
_
(
"Inner L8
"
),
_
(
"Inner L9"
),
_
(
"Inner L10"
),
_
(
"Inner L11"
),
_
(
"Inner L12"
),
_
(
"Inner L13"
),
_
(
"Inner L14"
),
_
(
"Component"
),
_
(
"Adhes Cop"
),
_
(
"Adhes Cmp"
),
_
(
"SoldP Cop"
),
_
(
"SoldP Cmp"
),
_( "SilkS Cop" ), _( "SilkS Cmp" ), _( "Mask Cop
" ), _( "Mask Cmp
" ),
_( "Drawings " ), _( "Comments
" ), _( "Eco1 " ), _( "Eco2
" ),
_
(
"SilkS Cop"
),
_
(
"SilkS Cmp"
),
_
(
"Mask Cop
"
),
_
(
"Mask Cmp
"
),
_
(
"Drawings "
),
_
(
"Comments
"
),
_
(
"Eco1"
),
_
(
"Eco2
"
),
_
(
"Edges Pcb"
),
_
(
"BAD INDEX"
),
};
#else
...
...
@@ -319,22 +319,22 @@ wxString ReturnPcbLayerName( int layer_number, bool omitSpacePadding )
layer_number
=
LAYER_LIMIT
;
const
wxString
*
p
=
&
layer_name_list
[
layer_number
];
if
(
omitSpacePadding
)
{
wxString
ret
=
*
p
;
// copy the string
// modify the copy
ret
.
Trim
();
ret
.
Replace
(
wxT
(
" "
),
wxT
(
"_"
)
);
return
ret
;
}
else
return
*
p
;
#else // long standing established code:
static
const
wxString
layer_name_list
[]
=
{
_
(
"Copper "
),
_
(
"Inner L1 "
),
_
(
"Inner L2 "
),
_
(
"Inner L3 "
),
_
(
"Inner L4 "
),
_
(
"Inner L5 "
),
_
(
"Inner L6 "
),
_
(
"Inner L7 "
),
...
...
@@ -346,7 +346,7 @@ wxString ReturnPcbLayerName( int layer_number, bool omitSpacePadding )
_
(
"Edges Pcb"
),
_
(
"--- "
),
_
(
"--- "
),
_
(
"--- "
)
};
// Same as layer_name_list, without space, not internationalized
static
const
wxString
layer_name_list_for_filename
[]
=
{
wxT
(
"Copper"
),
wxT
(
"InnerL1"
),
wxT
(
"InnerL2"
),
wxT
(
"InnerL3"
),
...
...
@@ -358,16 +358,16 @@ wxString ReturnPcbLayerName( int layer_number, bool omitSpacePadding )
wxT
(
"Drawings"
),
wxT
(
"Comments"
),
wxT
(
"Eco1"
),
wxT
(
"Eco2"
),
wxT
(
"EdgesPcb"
),
wxT
(
"---"
),
wxT
(
"---"
),
wxT
(
"---"
)
};
if
(
(
unsigned
)
layer_number
>=
31u
)
layer_number
=
31
;
return
omitSpacePadding
?
return
omitSpacePadding
?
layer_name_list_for_filename
[
layer_number
]
:
layer_name_list
[
layer_number
];
#endif
}
...
...
@@ -509,6 +509,6 @@ const wxString& valeur_param( int valeur, wxString& buf_texte )
{
buf_texte
.
Printf
(
wxT
(
"%2.4f
\"
"
),
valeur
*
0.0001
);
}
return
buf_texte
;
}
common/edaappl.cpp
View file @
8eff8df9
...
...
@@ -118,8 +118,8 @@ void WinEDA_App::InitEDA_Appl( const wxString& name )
/* Init kicad environment
* the environment variable KICAD (if exists) gives the kicad path:
* something like set KICAD=d:\kicad
*/
* something like set KICAD=d:\kicad
*/
m_Env_Defined
=
wxGetEnv
(
wxT
(
"KICAD"
),
&
m_KicadEnv
);
if
(
m_Env_Defined
)
// ensure m_KicadEnv ends by "/"
{
...
...
@@ -214,7 +214,7 @@ bool WinEDA_App::SetBinDir()
if
(
str
==
NULL
)
return
false
;
char
*
native_str
=
NULL
;
int
len
=
CFStringGetMaximumSizeForEncoding
(
CFStringGetLength
(
str
),
kCFStringEncodingUTF8
)
+
1
;
kCFStringEncodingUTF8
)
+
1
;
native_str
=
new
char
[
len
];
CFStringGetCString
(
str
,
native_str
,
len
,
kCFStringEncodingUTF8
);
m_BinDir
=
CONV_FROM_UTF8
(
native_str
);
...
...
@@ -222,7 +222,7 @@ bool WinEDA_App::SetBinDir()
#elif defined(__UNIX__)
// Under Linux, if argv[0] doesn't the complete path to the executable,
// Under Linux, if argv[0] doesn't the complete path to the executable,
// it's necessary to obtain it using "which <filename>".
FILE
*
ftmp
;
...
...
@@ -270,7 +270,8 @@ void WinEDA_App::GetSettings()
wxString
Line
,
Ident
;
unsigned
ii
;
m_HelpSize
.
x
=
500
;
m_HelpSize
.
y
=
400
;
m_HelpSize
.
x
=
500
;
m_HelpSize
.
y
=
400
;
if
(
m_EDA_CommonConfig
)
{
...
...
@@ -285,8 +286,11 @@ void WinEDA_App::GetSettings()
for
(
ii
=
0
;
ii
<
10
;
ii
++
)
{
Ident
=
wxT
(
"LastProject"
);
if
(
ii
)
Ident
=
wxT
(
"LastProject"
);
if
(
ii
)
Ident
<<
ii
;
if
(
m_EDA_Config
->
Read
(
Ident
,
&
Line
)
)
m_LastProject
.
Add
(
Line
);
}
...
...
@@ -299,6 +303,7 @@ void WinEDA_App::GetSettings()
Line
=
m_EDA_Config
->
Read
(
wxT
(
"SdtFontType"
),
wxEmptyString
);
if
(
!
Line
.
IsEmpty
()
)
g_StdFont
->
SetFaceName
(
Line
);
ii
=
m_EDA_Config
->
Read
(
wxT
(
"SdtFontStyle"
),
wxFONTFAMILY_ROMAN
);
g_StdFont
->
SetStyle
(
ii
);
ii
=
m_EDA_Config
->
Read
(
wxT
(
"SdtFontWeight"
),
wxNORMAL
);
...
...
@@ -309,6 +314,7 @@ void WinEDA_App::GetSettings()
Line
=
m_EDA_Config
->
Read
(
wxT
(
"MsgFontType"
),
wxEmptyString
);
if
(
!
Line
.
IsEmpty
()
)
g_MsgFont
->
SetFaceName
(
Line
);
ii
=
m_EDA_Config
->
Read
(
wxT
(
"MsgFontStyle"
),
wxFONTFAMILY_ROMAN
);
g_MsgFont
->
SetStyle
(
ii
);
ii
=
m_EDA_Config
->
Read
(
wxT
(
"MsgFontWeight"
),
wxNORMAL
);
...
...
@@ -318,6 +324,7 @@ void WinEDA_App::GetSettings()
Line
=
m_EDA_Config
->
Read
(
wxT
(
"DialogFontType"
),
wxEmptyString
);
if
(
!
Line
.
IsEmpty
()
)
g_DialogFont
->
SetFaceName
(
Line
);
ii
=
m_EDA_Config
->
Read
(
wxT
(
"DialogFontStyle"
),
wxFONTFAMILY_ROMAN
);
g_DialogFont
->
SetStyle
(
ii
);
ii
=
m_EDA_Config
->
Read
(
wxT
(
"DialogFontWeight"
),
wxNORMAL
);
...
...
@@ -343,7 +350,6 @@ void WinEDA_App::SaveSettings()
{
unsigned
int
ii
;
if
(
m_EDA_Config
==
NULL
)
return
;
...
...
common/projet_config.cpp
View file @
8eff8df9
This diff is collapsed.
Click to expand it.
pcbnew/pcbcfg.cpp
View file @
8eff8df9
This diff is collapsed.
Click to expand it.
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