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
ba92f94f
Commit
ba92f94f
authored
Apr 24, 2008
by
dickelbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ProcessExecute instead of wxExecute
parent
080746ac
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
256 additions
and
214 deletions
+256
-214
common.cpp
common/common.cpp
+13
-2
eda_doc.cpp
common/eda_doc.cpp
+221
-202
gestfich.cpp
common/gestfich.cpp
+3
-3
netform.cpp
eeschema/netform.cpp
+1
-1
common.h
include/common.h
+16
-4
dialog_freeroute_exchange.cpp
pcbnew/dialog_freeroute_exchange.cpp
+1
-1
router.cpp
pcbnew/router.cpp
+1
-1
No files found.
common/common.cpp
View file @
ba92f94f
...
...
@@ -12,7 +12,7 @@
#include "common.h"
#include "macros.h"
#include "build_version.h"
#include <wx/process.h>
/*****************************/
wxString
GetBuildVersion
()
...
...
@@ -30,7 +30,9 @@ Ki_PageDescr::Ki_PageDescr( const wxSize& size, const wxPoint& offset, const wxS
/*********************************************************************************************/
{
// All sizes are in 1/1000 inch
m_Size
=
size
;
m_Offset
=
offset
,
m_Name
=
name
;
m_Size
=
size
;
m_Offset
=
offset
;
m_Name
=
name
;
// Adjust the default value for margins to 400 mils (0,4 inch or 10 mm)
m_LeftMargin
=
m_RightMargin
=
m_TopMargin
=
m_BottomMargin
=
400
;
...
...
@@ -205,6 +207,7 @@ wxString GenDate()
wxT
(
"jan"
),
wxT
(
"feb"
),
wxT
(
"mar"
),
wxT
(
"apr"
),
wxT
(
"may"
),
wxT
(
"jun"
),
wxT
(
"jul"
),
wxT
(
"aug"
),
wxT
(
"sep"
),
wxT
(
"oct"
),
wxT
(
"nov"
),
wxT
(
"dec"
)
};
time_t
buftime
;
struct
tm
*
Date
;
wxString
string_date
;
...
...
@@ -241,6 +244,14 @@ void* MyMalloc( size_t nb_octets )
}
bool
ProcessExecute
(
const
wxString
&
aCommandLine
,
int
aFlags
)
{
wxProcess
*
process
=
wxProcess
::
Open
(
aCommandLine
,
aFlags
);
return
process
!=
NULL
;
}
/************************************/
void
*
MyZMalloc
(
size_t
nb_octets
)
/************************************/
...
...
common/eda_doc.cpp
View file @
ba92f94f
This diff is collapsed.
Click to expand it.
common/gestfich.cpp
View file @
ba92f94f
...
...
@@ -533,7 +533,7 @@ int ExecuteFile( wxWindow* frame, const wxString& ExecFile, const wxString& para
{
if
(
!
param
.
IsEmpty
()
)
FullFileName
+=
wxT
(
" "
)
+
param
;
wx
Execute
(
FullFileName
);
Process
Execute
(
FullFileName
);
return
0
;
}
...
...
@@ -748,7 +748,7 @@ void OpenPDF( const wxString& file )
}
if
(
!
command
.
IsEmpty
()
)
wx
Execute
(
command
);
Process
Execute
(
command
);
}
...
...
@@ -771,5 +771,5 @@ void OpenFile( const wxString& file )
delete
filetype
;
if
(
success
&&
!
command
.
IsEmpty
()
)
wx
Execute
(
command
);
Process
Execute
(
command
);
}
eeschema/netform.cpp
View file @
ba92f94f
...
...
@@ -342,7 +342,7 @@ void Write_GENERIC_NetList( WinEDA_SchematicFrame* frame,
CommandFile
+=
wxT
(
" "
)
+
TmpFullFileName
;
CommandFile
+=
wxT
(
" "
)
+
FullFileName
;
wx
Execute
(
CommandFile
,
wxEXEC_SYNC
);
Process
Execute
(
CommandFile
,
wxEXEC_SYNC
);
}
...
...
include/common.h
View file @
ba92f94f
...
...
@@ -354,6 +354,18 @@ class WinEDA_DrawPanel;
/* COMMON.CPP */
/**
* Function ProcessExecute
* runs a child process.
* @param aCommandLine The process and any arguments to it all in a single string.
* @param aFlags The same args as allowed for wxExecute()
* @return bool - true if success, else false
*/
bool
ProcessExecute
(
const
wxString
&
aCommandLine
,
int
aFlags
=
wxEXEC_ASYNC
);
wxString
ReturnPcbLayerName
(
int
layer_number
,
bool
is_filename
=
FALSE
);
/* Return the name of the layer number "layer_number".
...
...
@@ -431,10 +443,10 @@ wxString MakeFileName( const wxString& dir,
* dir = prefixe (chemin)
* shortname = nom avec ou sans chemin ou extension
* ext = extension
*
*
* si la chaine name possede deja un chemin ou une extension, elles
* ne seront pas modifiees
*
*
* retourne la chaine calculee */
wxString
MakeReducedFileName
(
const
wxString
&
fullfilename
,
...
...
@@ -445,12 +457,12 @@ wxString MakeReducedFileName( const wxString& fullfilename,
* fullfilename = nom complet
* default_path = prefixe (chemin) par defaut
* default_ext = extension par defaut
*
*
* retourne le nom reduit, c'est a dire:
* sans le chemin si le chemin est default_path
* avec ./ si si le chemin est le chemin courant
* sans l'extension si l'extension est default_ext
*
*
* Renvoie un chemin en notation unix ('/' en separateur de repertoire)
*/
...
...
pcbnew/dialog_freeroute_exchange.cpp
View file @
ba92f94f
...
...
@@ -305,7 +305,7 @@ void dialog_freeroute_exchange::OnButton5Click( wxCommandEvent& event )
if
(
wxFileExists
(
FullFileName
)
)
{
command
<<
wxT
(
"javaws"
)
<<
wxT
(
" "
)
+
FullFileName
;
wx
Execute
(
command
);
Process
Execute
(
command
);
return
;
}
...
...
pcbnew/router.cpp
View file @
ba92f94f
...
...
@@ -134,7 +134,7 @@ void WinEDA_PcbFrame::GlobalRoute( wxDC* DC )
Affiche_Message
(
ExecFileName
);
wx
Execute
(
ExecFileName
);
Process
Execute
(
ExecFileName
);
#else
wxMessageBox
(
wxT
(
"TODO, currently not available"
)
);
...
...
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