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
2075ac84
Commit
2075ac84
authored
Feb 07, 2009
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor (and old) bugs fixed.
minor changes in search paths for help and translation files.
parent
3a618567
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
66 additions
and
29 deletions
+66
-29
edaappl.cpp
common/edaappl.cpp
+45
-14
dialog_eeschema_config.cpp
eeschema/dialog_eeschema_config.cpp
+5
-2
dialog_setup_libs.cpp
pcbnew/dialog_setup_libs.cpp
+14
-11
set_grid.cpp
pcbnew/set_grid.cpp
+2
-2
No files found.
common/edaappl.cpp
View file @
2075ac84
...
...
@@ -735,13 +735,20 @@ void WinEDA_App::SetLanguagePath( void )
for
(
i
=
0
;
i
<
m_searchPaths
.
GetCount
();
i
++
)
{
wxFileName
fn
(
m_searchPaths
[
i
],
wxEmptyString
);
// Append path for Windows and unix kicad pack install
fn
.
AppendDir
(
wxT
(
"share"
)
);
#ifndef __WXMSW__
fn
.
AppendDir
(
wxT
(
"internat"
)
);
if
(
fn
.
DirExists
()
)
{
wxLogDebug
(
wxT
(
"Adding locale lookup path: "
)
+
fn
.
GetPath
()
);
wxLocale
::
AddCatalogLookupPathPrefix
(
fn
.
GetPath
()
);
}
fn
.
RemoveLastDir
();
/* Up on level relative to binary path with "share/kicad" appended
* for all other platforms. */
// Append path for unix standard install
fn
.
AppendDir
(
wxT
(
"kicad"
)
);
#endif
fn
.
AppendDir
(
wxT
(
"internat"
)
);
if
(
fn
.
DirExists
()
)
{
...
...
@@ -749,6 +756,7 @@ void WinEDA_App::SetLanguagePath( void )
fn
.
GetPath
()
);
wxLocale
::
AddCatalogLookupPathPrefix
(
fn
.
GetPath
()
);
}
}
}
}
...
...
@@ -854,21 +862,33 @@ wxString WinEDA_App::FindFileInSearchPaths( const wxString& filename,
wxString
WinEDA_App
::
GetHelpFile
(
void
)
{
wxString
fn
;
wxArrayString
subdirs
;
wxArrayString
subdirs
,
altsubdirs
;
/* FIXME: This is not the ideal way to handle this. Unfortunely, the
* CMake install paths seem to be a moving target so this crude
* hack solve the problem of install path differences between
* Windows and non-Windows platforms. */
#ifndef __WXMSW__
// Partially fixed, but must be enhanced
// Create subdir tree for "standard" linux distributions, when kicad comes from a distribution
// files are in /usr/share/doc/kicad/help
// and binaries in /usr/bin or /usr/local/bin
subdirs
.
Add
(
wxT
(
"share"
)
);
#endif
subdirs
.
Add
(
_T
(
"doc"
)
);
#ifndef __WXMSW__
subdirs
.
Add
(
wxT
(
"kicad"
)
);
#endif
subdirs
.
Add
(
_T
(
"help"
)
);
// Create subdir tree for linux and Windows kicad pack
// Note the pack form under linux is also useful if an user want to install kicad to a server.
// because there is only one path to mount or export (something like /usr/local/kicad).
// files are in <install dir>/kicad/doc/help
// (often /usr/local/kicad/kicad/doc/help)
// <install dir>/kicad/ is retrievered from m_BinDir
altsubdirs
.
Add
(
_T
(
"doc"
)
);
altsubdirs
.
Add
(
_T
(
"help"
)
);
/* Search for a help file.
* we *must* find a help file.
* so help is searched in directories in this order:
...
...
@@ -879,13 +899,20 @@ wxString WinEDA_App::GetHelpFile( void )
// Step 1 : Try to find help file in help/<canonical name>
subdirs
.
Add
(
m_Locale
->
GetCanonicalName
()
);
altsubdirs
.
Add
(
m_Locale
->
GetCanonicalName
()
);
fn
=
FindFileInSearchPaths
(
m_HelpFileName
,
&
altsubdirs
);
if
(
!
fn
)
fn
=
FindFileInSearchPaths
(
m_HelpFileName
,
&
subdirs
);
// Step 2 : if not found Try to find help file in help/<short name>
if
(
!
fn
)
{
subdirs
.
RemoveAt
(
subdirs
.
GetCount
()
-
1
);
altsubdirs
.
RemoveAt
(
altsubdirs
.
GetCount
()
-
1
);
subdirs
.
Add
(
m_Locale
->
GetName
().
BeforeLast
(
'_'
)
);
// GetName( ) does not return always the short name
altsubdirs
.
Add
(
m_Locale
->
GetName
().
BeforeLast
(
'_'
)
);
// GetName( ) does not return always the short name
fn
=
FindFileInSearchPaths
(
m_HelpFileName
,
&
altsubdirs
);
if
(
!
fn
)
fn
=
FindFileInSearchPaths
(
m_HelpFileName
,
&
subdirs
);
}
...
...
@@ -893,7 +920,11 @@ wxString WinEDA_App::GetHelpFile( void )
if
(
!
fn
)
{
subdirs
.
RemoveAt
(
subdirs
.
GetCount
()
-
1
);
altsubdirs
.
RemoveAt
(
altsubdirs
.
GetCount
()
-
1
);
subdirs
.
Add
(
_T
(
"en"
)
);
altsubdirs
.
Add
(
_T
(
"en"
)
);
fn
=
FindFileInSearchPaths
(
m_HelpFileName
,
&
altsubdirs
);
if
(
!
fn
)
fn
=
FindFileInSearchPaths
(
m_HelpFileName
,
&
subdirs
);
}
...
...
@@ -918,7 +949,7 @@ wxString WinEDA_App::GetLibraryFile( const wxString& filename )
/**
* Run init scripts
* @return the def
ua
lt OnRun() value (exit codes not used in kicad, so value has no special mening)
* @return the def
au
lt OnRun() value (exit codes not used in kicad, so value has no special mening)
*/
/**********************/
int
WinEDA_App
::
OnRun
()
...
...
eeschema/dialog_eeschema_config.cpp
View file @
2075ac84
...
...
@@ -361,7 +361,10 @@ wxString FullLibName,ShortLibName, Mask;
wxEmptyString
,
Mask
,
wxFD_DEFAULT_STYLE
|
wxFD_MULTIPLE
);
FilesDialog
.
ShowModal
();
int
diag
=
FilesDialog
.
ShowModal
();
if
(
diag
!=
wxID_OK
)
return
;
wxArrayString
Filenames
;
FilesDialog
.
GetPaths
(
Filenames
);
...
...
@@ -372,7 +375,7 @@ wxString FullLibName,ShortLibName, Mask;
if
(
ShortLibName
.
IsEmpty
()
)
//Just in case...
continue
;
//Add or insert new library name
if
(
FindLibrary
(
ShortLibName
)
==
NULL
)
if
(
g_LibName_List
.
Index
(
ShortLibName
)
==
wxNOT_FOUND
)
{
m_LibListChanged
=
TRUE
;
g_LibName_List
.
Insert
(
ShortLibName
,
ii
);
...
...
pcbnew/dialog_setup_libs.cpp
View file @
2075ac84
...
...
@@ -360,7 +360,10 @@ wxString mask = wxT("*");
wxEmptyString
,
mask
,
wxFD_DEFAULT_STYLE
|
wxFD_MULTIPLE
);
FilesDialog
.
ShowModal
();
int
diag
=
FilesDialog
.
ShowModal
();
if
(
diag
!=
wxID_OK
)
return
;
wxArrayString
Filenames
;
FilesDialog
.
GetPaths
(
Filenames
);
...
...
pcbnew/set_grid.cpp
View file @
2075ac84
...
...
@@ -37,7 +37,7 @@ void WinEDA_PcbGridFrame::AcceptPcbOptions(wxCommandEvent& event)
// If the user grid is the current selection , ensure grid size value = new user grid value
int
ii
=
m_Parent
->
m_SelGridBox
->
GetSelection
();
if
(
ii
==
m_Parent
->
m_SelGridBox
->
GetCount
()
-
1
)
if
(
ii
==
(
int
)(
m_Parent
->
m_SelGridBox
->
GetCount
()
-
1
)
)
m_Parent
->
GetScreen
()
->
SetGrid
(
ID_POPUP_GRID_USER
);
m_Parent
->
DrawPanel
->
Refresh
(
TRUE
);
...
...
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