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
9f8e1d9d
Commit
9f8e1d9d
authored
Jan 18, 2009
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed some warning when compiling. Added comments
parent
21faf9d3
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
58 additions
and
82 deletions
+58
-82
edaappl.cpp
common/edaappl.cpp
+36
-36
tool_cvpcb.cpp
cvpcb/tool_cvpcb.cpp
+2
-2
menubar.cpp
eeschema/menubar.cpp
+1
-1
tool_gerber.cpp
gerbview/tool_gerber.cpp
+1
-1
appl_wxstruct.h
include/appl_wxstruct.h
+7
-1
buildmnu.cpp
kicad/buildmnu.cpp
+1
-1
dialog_print_using_printer.cpp
pcbnew/dialog_print_using_printer.cpp
+9
-34
menubarpcb.cpp
pcbnew/menubarpcb.cpp
+1
-6
No files found.
common/edaappl.cpp
View file @
9f8e1d9d
/* TODO ENGLISH BRIEF TODO */
/***************/
/* edaappl.cpp */
/***************/
/***
* @file edaapl.cpp
* @brief methodes relative a la classe winEDA_App, communes
* aux environements window et linux
* @brief For the main application: init functions, and language selection (locale handling)
***/
#define EDA_BASE
...
...
@@ -649,8 +650,8 @@ void WinEDA_App::SaveSettings()
* the files are in kicad/internat/xx or kicad/internat/xx_XX
* and are named kicad.mo
*
* @param first_time
TODO
* @return
TODO
* @param first_time
must be set to true the first time this funct is called, false otherwise
* @return
true if the language can be set (i.e. if the locale is available)
*/
/*********************************************/
bool
WinEDA_App
::
SetLanguage
(
bool
first_time
)
...
...
@@ -705,10 +706,10 @@ bool WinEDA_App::SetLanguage( bool first_time )
}
/**
*
Return in m_LanguageId
the wxWidgets language identifier Id
/**
Function SetLanguageIdentifier
*
Set in .m_LanguageId member
the wxWidgets language identifier Id
* from the kicad menu id (internal menu identifier)
* @param menu_id
TODO
* @param menu_id
= the kicad menuitem id (returned by Menu Event, when clicking on a menu item)
* @return none
*/
/**************************************************/
...
...
@@ -731,23 +732,24 @@ void WinEDA_App::SetLanguageIdentifier( int menu_id )
}
/**
* Create menu list for language choice
.
* @param MasterMenu
TODO
* @return
TODO
/**
Function AddMenuLanguageList
* Create menu list for language choice
, and add it as submenu to a main menu
* @param MasterMenu
: The main menu. The sub menu list will be accessible from the menu item with id ID_LANGUAGE_CHOICE
* @return
none
*/
/*********************************************************/
wxMenu
*
WinEDA_App
::
Set
LanguageList
(
wxMenu
*
MasterMenu
)
void
WinEDA_App
::
AddMenu
LanguageList
(
wxMenu
*
MasterMenu
)
/*********************************************************/
{
wxMenu
*
menu
;
wxMenu
*
menu
=
NULL
;
wxMenuItem
*
item
;
unsigned
int
ii
;
item
=
MasterMenu
->
FindItem
(
ID_LANGUAGE_CHOICE
);
if
(
item
==
NULL
)
{
if
(
item
)
// This menu exists, do nothing
return
;
menu
=
new
wxMenu
;
for
(
ii
=
0
;
ii
<
LANGUAGE_DESCR_COUNT
;
ii
++
)
{
...
...
@@ -768,8 +770,8 @@ wxMenu* WinEDA_App::SetLanguageList( wxMenu* MasterMenu )
_
(
"Language"
),
_
(
"Select application language (only for testing!)"
),
language_xpm
);
}
// Set Check mark on current selected language
for
(
ii
=
0
;
ii
<
LANGUAGE_DESCR_COUNT
;
ii
++
)
{
if
(
m_LanguageId
==
s_Language_List
[
ii
].
m_WX_Lang_Identifier
)
...
...
@@ -777,14 +779,12 @@ wxMenu* WinEDA_App::SetLanguageList( wxMenu* MasterMenu )
else
menu
->
Check
(
s_Language_List
[
ii
].
m_KI_Lang_Identifier
,
false
);
}
return
menu
;
}
/**
* Run init scripts
* @return
TODO
* @return
the defualt OnRun() value (exit codes not used in kicad, so value has no special mening)
*/
/**********************/
int
WinEDA_App
::
OnRun
()
...
...
cvpcb/tool_cvpcb.cpp
View file @
9f8e1d9d
...
...
@@ -100,7 +100,7 @@ void WinEDA_CvpcbFrame::ReCreateMenuBar()
*/
{
wxMenuItem
*
item
;
wxMenuBar
*
menuBar
;
wxMenuBar
*
menuBar
=
GetMenuBar
()
;
/* Destroy the existing menu bar so it can be rebuilt. This allows
* language changes of the menu text on the fly. */
if
(
menuBar
)
...
...
@@ -141,7 +141,7 @@ void WinEDA_CvpcbFrame::ReCreateMenuBar()
// Font selection and setup
AddFontSelectionMenu
(
configmenu
);
wxGetApp
().
Set
LanguageList
(
configmenu
);
wxGetApp
().
AddMenu
LanguageList
(
configmenu
);
configmenu
->
AppendSeparator
();
item
=
new
wxMenuItem
(
configmenu
,
ID_CONFIG_SAVE
,
...
...
eeschema/menubar.cpp
View file @
9f8e1d9d
...
...
@@ -302,7 +302,7 @@ void WinEDA_SchematicFrame::ReCreateMenuBar()
// Font selection and setup
AddFontSelectionMenu
(
configmenu
);
wxGetApp
().
Set
LanguageList
(
configmenu
);
wxGetApp
().
AddMenu
LanguageList
(
configmenu
);
configmenu
->
AppendSeparator
();
item
=
new
wxMenuItem
(
configmenu
,
ID_CONFIG_SAVE
,
_
(
"&Save preferences"
),
...
...
gerbview/tool_gerber.cpp
View file @
9f8e1d9d
...
...
@@ -97,7 +97,7 @@ void WinEDA_GerberFrame::ReCreateMenuBar( void )
// Font selection and setup
AddFontSelectionMenu
(
configmenu
);
wxGetApp
().
Set
LanguageList
(
configmenu
);
wxGetApp
().
AddMenu
LanguageList
(
configmenu
);
configmenu
->
AppendSeparator
();
ADD_MENUITEM_WITH_HELP
(
configmenu
,
ID_CONFIG_SAVE
,
_
(
"&Save Setup"
),
...
...
include/appl_wxstruct.h
View file @
9f8e1d9d
...
...
@@ -62,7 +62,13 @@ public:
void
SetDefaultSearchPaths
(
void
);
void
InitEDA_Appl
(
const
wxString
&
name
);
bool
SetLanguage
(
bool
first_time
=
FALSE
);
wxMenu
*
SetLanguageList
(
wxMenu
*
MasterMenu
);
/** Function AddMenuLanguageList
* Create menu list for language choice, and add it as submenu to a main menu
* @param MasterMenu : The main menu. The sub menu list will be accessible from the menu item with id ID_LANGUAGE_CHOICE
* @return the sub menu Language list
*/
void
AddMenuLanguageList
(
wxMenu
*
MasterMenu
);
void
SetLanguageIdentifier
(
int
menu_id
);
void
InitOnLineHelp
();
...
...
kicad/buildmnu.cpp
View file @
9f8e1d9d
...
...
@@ -247,7 +247,7 @@ void WinEDA_MainFrame::ReCreateMenuBar()
datasheet_xpm
);
PreferencesMenu
->
AppendSeparator
();
wxGetApp
().
Set
LanguageList
(
PreferencesMenu
);
wxGetApp
().
AddMenu
LanguageList
(
PreferencesMenu
);
/**********************************************************************/
...
...
pcbnew/dialog_print_using_printer.cpp
View file @
9f8e1d9d
...
...
@@ -65,7 +65,6 @@ private:
void
OnButtonCancelClick
(
wxCommandEvent
&
event
){
Close
();
}
void
SetScale
(
wxCommandEvent
&
event
);
void
SetPenWidth
();
wxString
BuildPrintTitle
();
public
:
bool
IsMirrored
()
{
return
m_Print_Mirror
->
IsChecked
();
}
bool
ExcludeEdges
()
{
return
m_Exclude_Edges_Pcb
->
IsChecked
();
}
...
...
@@ -111,8 +110,8 @@ public:
void
WinEDA_DrawFrame
::
ToPrinter
(
wxCommandEvent
&
event
)
/*******************************************************/
/*
Prepare les structures de donn�es de gestion de l'impression
*
et affiche la fenetre de dialogue de gestion de l'impression des feuilles
/*
Virtual function:
*
Display the print dialog
*/
{
if
(
g_PrintData
==
NULL
)
// First print
...
...
@@ -302,22 +301,6 @@ void DIALOG_PRINT_USING_PRINTER::OnCloseWindow( wxCloseEvent& event )
}
/*****************************************************/
wxString
DIALOG_PRINT_USING_PRINTER
::
BuildPrintTitle
()
/*****************************************************/
/* return a valid filename to create a print file
*/
{
wxString
name
,
ext
;
wxFileName
::
SplitPath
(
m_Parent
->
GetBaseScreen
()
->
m_FileName
,
(
wxString
*
)
NULL
,
&
name
,
&
ext
);
name
+=
wxT
(
"-"
)
+
ext
;
return
name
;
}
/******************************************************************/
void
DIALOG_PRINT_USING_PRINTER
::
SetScale
(
wxCommandEvent
&
event
)
/******************************************************************/
...
...
@@ -387,10 +370,6 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintPreview( wxCommandEvent& event )
/* Open and display a previewer frame for printing
*/
{
wxSize
WSize
;
wxPoint
WPos
;
int
x
,
y
;
SetScale
(
event
);
SetPenWidth
();
...
...
@@ -402,7 +381,7 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintPreview( wxCommandEvent& event )
s_Print_Sheet_Ref
=
m_Print_Sheet_Ref
->
GetValue
();
// Pass two printout objects: for preview, and possible printing.
wxString
title
=
BuildPrintTitle
(
);
wxString
title
=
_
(
"Print Preview"
);
wxPrintPreview
*
preview
=
new
wxPrintPreview
(
new
EDA_Printout
(
this
,
m_Parent
,
title
,
s_Print_Sheet_Ref
),
new
EDA_Printout
(
this
,
m_Parent
,
title
,
s_Print_Sheet_Ref
),
...
...
@@ -416,16 +395,12 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintPreview( wxCommandEvent& event )
if
(
s_OptionPrintPage
)
SetLayerMaskFromListSelection
();
m_Parent
->
GetPosition
(
&
x
,
&
y
);
WPos
.
x
=
x
+
4
;
WPos
.
y
=
y
+
25
;
WSize
=
m_Parent
->
GetSize
();
WSize
.
x
-=
3
;
WSize
.
y
+=
6
;
// Uses the parent position and size.
// @todo uses last position and size ans store them when exit in m_Config
wxPoint
WPos
=
m_Parent
->
GetPosition
();
wxSize
WSize
=
m_Parent
->
GetSize
();
wxPreviewFrame
*
frame
=
new
wxPreviewFrame
(
preview
,
this
,
title
,
WPos
,
WSize
);
wxPreviewFrame
*
frame
=
new
wxPreviewFrame
(
preview
,
this
,
title
,
WPos
,
WSize
);
frame
->
Initialize
();
frame
->
Show
(
TRUE
);
...
...
@@ -458,7 +433,7 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintButtonClick( wxCommandEvent& event )
wxPrinter
printer
(
&
printDialogData
);
wxString
title
=
BuildPrintTitle
(
);
wxString
title
=
_
(
"Print"
);
EDA_Printout
printout
(
this
,
m_Parent
,
title
,
s_Print_Sheet_Ref
);
#ifndef __WINDOWS__
...
...
pcbnew/menubarpcb.cpp
View file @
9f8e1d9d
/******************************************************************/
/* menubarpcb.cpp - creation du menu general de l'editeur de board*/
/******************************************************************/
#ifdef __GNUG__
#pragma implementation
#endif
#include "fctsys.h"
#include "common.h"
...
...
@@ -198,7 +193,7 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
// Font selection and setup
AddFontSelectionMenu
(
configmenu
);
wxGetApp
().
Set
LanguageList
(
configmenu
);
wxGetApp
().
AddMenu
LanguageList
(
configmenu
);
configmenu
->
AppendSeparator
();
item
=
new
wxMenuItem
(
configmenu
,
ID_CONFIG_SAVE
,
_
(
"&Save Preferences"
),
...
...
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