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
e80d0750
Commit
e80d0750
authored
Jul 03, 2009
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make command-line invocation with relative paths work
parent
76fc4042
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
40 additions
and
30 deletions
+40
-30
edaappl.cpp
common/edaappl.cpp
+8
-5
cvpcb.cpp
cvpcb/cvpcb.cpp
+4
-6
block.cpp
eeschema/block.cpp
+1
-12
class_drawsheet.cpp
eeschema/class_drawsheet.cpp
+3
-1
eeschema.cpp
eeschema/eeschema.cpp
+5
-1
gerbview.cpp
gerbview/gerbview.cpp
+5
-1
appl_wxstruct.h
include/appl_wxstruct.h
+7
-1
kicad.cpp
kicad/kicad.cpp
+3
-2
pcbnew.cpp
pcbnew/pcbnew.cpp
+4
-1
No files found.
common/edaappl.cpp
View file @
e80d0750
...
@@ -589,12 +589,12 @@ void WinEDA_App::SetDefaultSearchPaths( void )
...
@@ -589,12 +589,12 @@ void WinEDA_App::SetDefaultSearchPaths( void )
}
}
/**
/**
Function GetSettings
* Get application settings
* Get application settings
*
*
@param aReopenLastUsedDirectory = true to switch to last opened directory, false to use current CWD
* @return none
* @return none
*/
*/
void
WinEDA_App
::
GetSettings
()
void
WinEDA_App
::
GetSettings
(
bool
aReopenLastUsedDirectory
)
{
{
wxASSERT
(
m_EDA_Config
!=
NULL
&&
m_EDA_CommonConfig
!=
NULL
);
wxASSERT
(
m_EDA_Config
!=
NULL
&&
m_EDA_CommonConfig
!=
NULL
);
...
@@ -613,9 +613,12 @@ void WinEDA_App::GetSettings()
...
@@ -613,9 +613,12 @@ void WinEDA_App::GetSettings()
m_EDA_Config
->
Read
(
wxT
(
"ShowPageLimits"
),
&
g_ShowPageLimits
);
m_EDA_Config
->
Read
(
wxT
(
"ShowPageLimits"
),
&
g_ShowPageLimits
);
if
(
m_EDA_Config
->
Read
(
wxT
(
"WorkingDir"
),
&
Line
)
&&
wxDirExists
(
Line
)
)
if
(
aReopenLastUsedDirectory
)
{
{
wxSetWorkingDirectory
(
Line
);
if
(
m_EDA_Config
->
Read
(
wxT
(
"WorkingDir"
),
&
Line
)
&&
wxDirExists
(
Line
)
)
{
wxSetWorkingDirectory
(
Line
);
}
}
}
m_EDA_Config
->
Read
(
wxT
(
"BgColor"
),
&
g_DrawBgColor
);
m_EDA_Config
->
Read
(
wxT
(
"BgColor"
),
&
g_DrawBgColor
);
...
...
cvpcb/cvpcb.cpp
View file @
e80d0750
...
@@ -43,7 +43,6 @@ bool WinEDA_App::OnInit()
...
@@ -43,7 +43,6 @@ bool WinEDA_App::OnInit()
{
{
wxFileName
fn
;
wxFileName
fn
;
wxString
msg
;
wxString
msg
;
wxString
currCWD
=
wxGetCwd
();
WinEDA_CvpcbFrame
*
frame
=
NULL
;
WinEDA_CvpcbFrame
*
frame
=
NULL
;
InitEDA_Appl
(
wxT
(
"Cvpcb"
),
APP_TYPE_CVPCB
);
InitEDA_Appl
(
wxT
(
"Cvpcb"
),
APP_TYPE_CVPCB
);
...
@@ -54,17 +53,16 @@ bool WinEDA_App::OnInit()
...
@@ -54,17 +53,16 @@ bool WinEDA_App::OnInit()
return
false
;
return
false
;
}
}
GetSettings
();
// read current setup
wxSetWorkingDirectory
(
currCWD
);
// mofifie par GetSetting
if
(
argc
>
1
)
if
(
argc
>
1
)
{
{
wxLogDebug
(
wxT
(
"CvPcb opening file <%s>"
),
argv
[
1
]
);
fn
=
argv
[
1
];
fn
=
argv
[
1
];
wxSetWorkingDirectory
(
fn
.
GetPath
()
);
wxSetWorkingDirectory
(
fn
.
GetPath
()
);
}
}
// read current setup and reopen last directory if no filename to open in command line
bool
reopenLastUsedDirectory
=
argc
==
1
;
GetSettings
(
reopenLastUsedDirectory
);
g_DrawBgColor
=
BLACK
;
g_DrawBgColor
=
BLACK
;
wxString
Title
=
GetTitle
()
+
wxT
(
" "
)
+
GetBuildVersion
();
wxString
Title
=
GetTitle
()
+
wxT
(
" "
)
+
GetBuildVersion
();
...
...
eeschema/block.cpp
View file @
e80d0750
...
@@ -869,25 +869,14 @@ static SCH_ITEM* CopyStruct( WinEDA_DrawPanel* panel,
...
@@ -869,25 +869,14 @@ static SCH_ITEM* CopyStruct( WinEDA_DrawPanel* panel,
switch
(
Struct
->
Type
()
)
switch
(
Struct
->
Type
()
)
{
{
case
TYPE_SCH_COMPONENT
:
case
TYPE_SCH_COMPONENT
:
{
(
(
SCH_COMPONENT
*
)
Struct
)
->
m_TimeStamp
=
GetTimeStamp
();
(
(
SCH_COMPONENT
*
)
Struct
)
->
m_TimeStamp
=
GetTimeStamp
();
(
(
SCH_COMPONENT
*
)
Struct
)
->
ClearAnnotation
(
NULL
);
(
(
SCH_COMPONENT
*
)
Struct
)
->
ClearAnnotation
(
NULL
);
}
break
;
break
;
case
DRAW_SHEET_STRUCT_TYPE
:
case
DRAW_SHEET_STRUCT_TYPE
:
{
//DuplicateStruct calls GenCopy, which should handle
//DuplicateStruct calls GenCopy, which should handle
//m_AssociatedScreen and m_sRefCount properly.
//m_AssociatedScreen, m_TimeStamp and m_sRefCount properly.
DrawSheetStruct
*
sheet
=
(
DrawSheetStruct
*
)
Struct
;
sheet
->
m_TimeStamp
=
GetTimeStamp
();
//sheet->m_AssociatedScreen->m_UndoList = NULL;
//sheet->m_AssociatedScreen->m_RedoList = NULL;
//keep m_AssociatedScreen pointer & associated.
//sheet->m_Son = NULL; m_son is involved in undo and redo.
break
;
break
;
}
default
:
default
:
;
;
...
...
eeschema/class_drawsheet.cpp
View file @
e80d0750
...
@@ -146,7 +146,9 @@ DrawSheetStruct* DrawSheetStruct::GenCopy()
...
@@ -146,7 +146,9 @@ DrawSheetStruct* DrawSheetStruct::GenCopy()
newitem
->
m_FileName
=
m_FileName
;
newitem
->
m_FileName
=
m_FileName
;
newitem
->
m_FileNameSize
=
m_FileNameSize
;
newitem
->
m_FileNameSize
=
m_FileNameSize
;
newitem
->
m_SheetName
=
m_SheetName
;
/* newitem->m_SheetName = m_SheetName; m_SheetName must be unique for all sub sheets in a given sheet
* so we no not duplicate sheet name
*/
newitem
->
m_SheetNameSize
=
m_SheetNameSize
;
newitem
->
m_SheetNameSize
=
m_SheetNameSize
;
newitem
->
m_Label
=
NULL
;
newitem
->
m_Label
=
NULL
;
...
...
eeschema/eeschema.cpp
View file @
e80d0750
...
@@ -151,7 +151,11 @@ bool WinEDA_App::OnInit()
...
@@ -151,7 +151,11 @@ bool WinEDA_App::OnInit()
/* init EESCHEMA */
/* init EESCHEMA */
SeedLayers
();
SeedLayers
();
GetSettings
();
// read current setup and reopen last directory if no filename to open in command line
bool
reopenLastUsedDirectory
=
argc
==
1
;
GetSettings
(
reopenLastUsedDirectory
);
Read_Hotkey_Config
(
frame
,
false
);
/* Must be called before creating
Read_Hotkey_Config
(
frame
,
false
);
/* Must be called before creating
* the main frame in order to
* the main frame in order to
* display the real hotkeys in menus
* display the real hotkeys in menus
...
...
gerbview/gerbview.cpp
View file @
e80d0750
...
@@ -45,7 +45,11 @@ bool WinEDA_App::OnInit()
...
@@ -45,7 +45,11 @@ bool WinEDA_App::OnInit()
ScreenPcb
->
m_CurrentSheetDesc
=
&
g_Sheet_GERBER
;
ScreenPcb
->
m_CurrentSheetDesc
=
&
g_Sheet_GERBER
;
ActiveScreen
=
ScreenPcb
;
ActiveScreen
=
ScreenPcb
;
GetSettings
();
// read current setup and reopen last directory if no filename to open in command line
bool
reopenLastUsedDirectory
=
argc
==
1
;
GetSettings
(
reopenLastUsedDirectory
);
extern
PARAM_CFG_BASE
*
ParamCfgList
[];
extern
PARAM_CFG_BASE
*
ParamCfgList
[];
wxGetApp
().
ReadCurrentSetupValues
(
ParamCfgList
);
wxGetApp
().
ReadCurrentSetupValues
(
ParamCfgList
);
...
...
include/appl_wxstruct.h
View file @
e80d0750
...
@@ -115,7 +115,13 @@ public:
...
@@ -115,7 +115,13 @@ public:
void
InitOnLineHelp
();
void
InitOnLineHelp
();
// Sauvegarde de configurations et options:
// Sauvegarde de configurations et options:
void
GetSettings
();
/** Function GetSettings
* Get application settings
* @param aReopenLastUsedDirectory = true to switch to last opened directory, false to use current CWD
* @return none
*/
void
GetSettings
(
bool
aReopenLastUsedDirectory
);
void
SaveSettings
();
void
SaveSettings
();
void
WriteProjectConfig
(
const
wxString
&
local_config_filename
,
void
WriteProjectConfig
(
const
wxString
&
local_config_filename
,
...
...
kicad/kicad.cpp
View file @
e80d0750
...
@@ -371,8 +371,9 @@ bool WinEDA_App::OnInit()
...
@@ -371,8 +371,9 @@ bool WinEDA_App::OnInit()
InitEDA_Appl
(
wxT
(
"KiCad"
),
APP_TYPE_KICAD
);
InitEDA_Appl
(
wxT
(
"KiCad"
),
APP_TYPE_KICAD
);
/* init kicad */
// read current setup and reopen last directory if no filename to open in command line
GetSettings
();
// read current setup
bool
reopenLastUsedDirectory
=
argc
==
1
;
GetSettings
(
reopenLastUsedDirectory
);
/* Make nameless project translatable */
/* Make nameless project translatable */
wxFileName
namelessProject
(
wxGetCwd
(),
_
(
"noname"
),
ProjectFileExtension
);
wxFileName
namelessProject
(
wxGetCwd
(),
_
(
"noname"
),
ProjectFileExtension
);
...
...
pcbnew/pcbnew.cpp
View file @
e80d0750
...
@@ -83,7 +83,10 @@ bool WinEDA_App::OnInit()
...
@@ -83,7 +83,10 @@ bool WinEDA_App::OnInit()
}
}
ScreenPcb
=
new
PCB_SCREEN
();
ScreenPcb
=
new
PCB_SCREEN
();
GetSettings
();
// read current setup and reopen last directory if no filename to open in command line
bool
reopenLastUsedDirectory
=
argc
==
1
;
GetSettings
(
reopenLastUsedDirectory
);
if
(
argc
>
1
)
if
(
argc
>
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