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
542b9441
Commit
542b9441
authored
Sep 19, 2007
by
CHARRAS
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hotkeys handling finished
parent
ef3d0491
Changes
35
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
35 changed files
with
6033 additions
and
5756 deletions
+6033
-5756
Editor.xpm
bitmaps/Editor.xpm
+84
-79
change_log.txt
change_log.txt
+5
-0
edaappl.cpp
common/edaappl.cpp
+1
-0
hotkeys_basic.cpp
common/hotkeys_basic.cpp
+177
-97
edit_label.cpp
eeschema/edit_label.cpp
+8
-10
eeconfig.cpp
eeschema/eeconfig.cpp
+29
-2
hotkeys.cpp
eeschema/hotkeys.cpp
+35
-0
hotkeys.h
eeschema/hotkeys.h
+2
-0
libedit_undo_redo.cpp
eeschema/libedit_undo_redo.cpp
+10
-4
libframe.cpp
eeschema/libframe.cpp
+12
-11
menubar.cpp
eeschema/menubar.cpp
+8
-15
schedit.cpp
eeschema/schedit.cpp
+4
-4
schematic_undo_redo.cpp
eeschema/schematic_undo_redo.cpp
+10
-4
schframe.cpp
eeschema/schframe.cpp
+1
-7
tool_lib.cpp
eeschema/tool_lib.cpp
+4
-4
tool_sch.cpp
eeschema/tool_sch.cpp
+5
-4
gerberframe.cpp
gerbview/gerberframe.cpp
+4
-4
gerbview_config.cpp
gerbview/gerbview_config.cpp
+121
-97
tool_gerber.cpp
gerbview/tool_gerber.cpp
+1
-12
bitmaps.h
include/bitmaps.h
+1
-0
build_version.h
include/build_version.h
+1
-1
hotkeys_basic.h
include/hotkeys_basic.h
+29
-19
id.h
include/id.h
+5
-1
wxstruct.h
include/wxstruct.h
+4
-4
kicad.mo
internat/fr/kicad.mo
+0
-0
kicad.po
internat/fr/kicad.po
+5304
-5234
buildmnu.cpp
kicad/buildmnu.cpp
+0
-1
controle.cpp
pcbnew/controle.cpp
+7
-10
edit.cpp
pcbnew/edit.cpp
+2
-3
hotkeys.cpp
pcbnew/hotkeys.cpp
+107
-88
hotkeys.h
pcbnew/hotkeys.h
+1
-0
menubarpcb.cpp
pcbnew/menubarpcb.cpp
+2
-8
onrightclick.cpp
pcbnew/onrightclick.cpp
+23
-26
pcbcfg.cpp
pcbnew/pcbcfg.cpp
+23
-2
pcbframe.cpp
pcbnew/pcbframe.cpp
+3
-5
No files found.
kicad/
bitmaps/Editor.xpm
→
bitmaps/Editor.xpm
View file @
542b9441
/* XPM */
/* XPM */
static char * editor_xpm[] = {
#ifndef XPMMAIN
"16 16 60 1",
extern char *editor_xpm[];
" c None",
". c #000000",
#else
"+ c #FEFEFE",
char * editor_xpm[] = {
"@ c #FDFDFD",
"16 16 60 1",
"# c #E0E0E0",
" c None",
"$ c #C1C1C1",
". c #000000",
"% c #F1F1F1",
"+ c #FEFEFE",
"& c #C3C3C3",
"@ c #FDFDFD",
"* c #FBFBFB",
"# c #E0E0E0",
"= c #A8A8A8",
"$ c #C1C1C1",
"- c #CCCCCC",
"% c #F1F1F1",
"; c #ADADAD",
"& c #C3C3C3",
"> c #767676",
"* c #FBFBFB",
", c #5D5D5D",
"= c #A8A8A8",
"' c #404040",
"- c #CCCCCC",
") c #F0F0F0",
"; c #ADADAD",
"! c #E2E2E2",
"> c #767676",
"~ c #858585",
", c #5D5D5D",
"{ c #4B4B49",
"' c #404040",
"] c #FBE73B",
") c #F0F0F0",
"^ c #F2B64D",
"! c #E2E2E2",
"/ c #CACACA",
"~ c #858585",
"( c #EFEFEF",
"{ c #4B4B49",
"_ c #C9C9C9",
"] c #FBE73B",
": c #FCEB3D",
"^ c #F2B64D",
"< c #F7B544",
"/ c #CACACA",
"[ c #61542E",
"( c #EFEFEF",
"} c #EEEEEE",
"_ c #C9C9C9",
"| c #FCE93B",
": c #FCEB3D",
"1 c #F7B545",
"< c #F7B544",
"2 c #6C5F34",
"[ c #61542E",
"3 c #F9DF39",
"} c #EEEEEE",
"4 c #F4B244",
"| c #FCE93B",
"5 c #665D3E",
"1 c #F7B545",
"6 c #EDEDED",
"2 c #6C5F34",
"7 c #ECECEC",
"3 c #F9DF39",
"8 c #EBEBEB",
"4 c #F4B244",
"9 c #F6D236",
"5 c #665D3E",
"0 c #EFB44D",
"6 c #EDEDED",
"a c #5C4F2B",
"7 c #ECECEC",
"b c #C4C4C4",
"8 c #EBEBEB",
"c c #E8E8E8",
"9 c #F6D236",
"d c #D7AE74",
"0 c #EFB44D",
"e c #655930",
"a c #5C4F2B",
"f c #C0C0C0",
"b c #C4C4C4",
"g c #EAEAEA",
"c c #E8E8E8",
"h c #E9E9E9",
"d c #D7AE74",
"i c #4F4115",
"e c #655930",
"j c #E7E7E7",
"f c #C0C0C0",
"k c #BFBFBF",
"g c #EAEAEA",
"l c #C2C2C2",
"h c #E9E9E9",
"m c #E6E6E6",
"i c #4F4115",
"n c #E5E5E5",
"j c #E7E7E7",
"o c #BEBEBE",
"k c #BFBFBF",
"p c #E4E4E4",
"l c #C2C2C2",
"q c #BDBDBD",
"m c #E6E6E6",
"r c #E3E3E3",
"n c #E5E5E5",
"s c #BBBBBB",
"o c #BEBEBE",
"t c #BCBCBC",
"p c #E4E4E4",
"u c #A0A0A0",
"q c #BDBDBD",
" ......... ",
"r c #E3E3E3",
" .++++++@#$. ",
"s c #BBBBBB",
" .+%%%%%%&*=. ",
"t c #BCBCBC",
" .+%---%%;>,'.. ",
"u c #A0A0A0",
" .+%%%%%)!~{.]^.",
" ......... ",
" .+%////(/_.:<[.",
" .++++++@#$. ",
" .+(((}}}}.|12. ",
" .+%%%%%%&*=. ",
" .@}__}__.345. ",
" .+%---%%;>,'.. ",
" .@67778.90a.. ",
" .+%%%%%)!~{.]^.",
" .@8bbbc.de.f. ",
" .+%////(/_.:<[.",
" .@gghh.i..jk. ",
" .+(((}}}}.|12. ",
" .@clml..mmno. ",
" .@}__}__.345. ",
" .@jjmmmnnppq. ",
" .@67778.90a.. ",
" .@mnnnpprrrs. ",
" .@8bbbc.de.f. ",
" .lqqqttssssu. ",
" .@gghh.i..jk. ",
" ........... "};
" .@clml..mmno. ",
" .@jjmmmnnppq. ",
" .@mnnnpprrrs. ",
" .lqqqttssssu. ",
" ........... "};
#endif
change_log.txt
View file @
542b9441
...
@@ -4,6 +4,11 @@ Started 2007-June-11
...
@@ -4,6 +4,11 @@ Started 2007-June-11
Please add newer entries at the top, list the date and your name with
Please add newer entries at the top, list the date and your name with
email address.
email address.
2007-sept-19 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
+ all
* hotkeys handling finished
2007-Sep-14 UPDATE Dick Hollenbeck <dick@softplc.com>
2007-Sep-14 UPDATE Dick Hollenbeck <dick@softplc.com>
================================================================================
================================================================================
...
...
common/edaappl.cpp
View file @
542b9441
...
@@ -250,6 +250,7 @@ unsigned ii;
...
@@ -250,6 +250,7 @@ unsigned ii;
{
{
m_LanguageId
=
m_EDA_CommonConfig
->
Read
(
wxT
(
"Language"
),
wxLANGUAGE_DEFAULT
);
m_LanguageId
=
m_EDA_CommonConfig
->
Read
(
wxT
(
"Language"
),
wxLANGUAGE_DEFAULT
);
g_EditorName
=
m_EDA_CommonConfig
->
Read
(
wxT
(
"Editor"
));
g_EditorName
=
m_EDA_CommonConfig
->
Read
(
wxT
(
"Editor"
));
g_ConfigFileLocationChoice
=
m_EDA_CommonConfig
->
Read
(
HOTKEY_CFG_PATH_OPT
,
0L
);
}
}
if
(
!
m_EDA_Config
)
return
;
if
(
!
m_EDA_Config
)
return
;
...
...
common/hotkeys_basic.cpp
View file @
542b9441
This diff is collapsed.
Click to expand it.
eeschema/edit_label.cpp
View file @
542b9441
...
@@ -236,17 +236,17 @@ EDA_BaseStruct* WinEDA_SchematicFrame::CreateNewText( wxDC* DC, int type )
...
@@ -236,17 +236,17 @@ EDA_BaseStruct* WinEDA_SchematicFrame::CreateNewText( wxDC* DC, int type )
/************************************/
/************************************/
/* Redraw a Text
e
while moving */
/* Redraw a Text while moving */
/************************************/
/************************************/
static
void
ShowWhileMoving
(
WinEDA_DrawPanel
*
panel
,
wxDC
*
DC
,
bool
erase
)
static
void
ShowWhileMoving
(
WinEDA_DrawPanel
*
panel
,
wxDC
*
DC
,
bool
erase
)
{
{
EDA_BaseStruct
*
TextStruct
=
panel
->
GetScreen
()
->
GetCurItem
();
EDA_BaseStruct
*
TextStruct
=
panel
->
GetScreen
()
->
GetCurItem
();
/*
effacement ancienne position
*/
/*
"Undraw" the current text at its old position
*/
if
(
erase
)
if
(
erase
)
RedrawOneStruct
(
panel
,
DC
,
TextStruct
,
g_XorMode
);
RedrawOneStruct
(
panel
,
DC
,
TextStruct
,
g_XorMode
);
/*
Redessin du texte
*/
/*
redraw the text
*/
switch
(
TextStruct
->
Type
()
)
switch
(
TextStruct
->
Type
()
)
{
{
case
DRAW_LABEL_STRUCT_TYPE
:
case
DRAW_LABEL_STRUCT_TYPE
:
...
@@ -266,7 +266,7 @@ static void ShowWhileMoving( WinEDA_DrawPanel* panel, wxDC* DC, bool erase )
...
@@ -266,7 +266,7 @@ static void ShowWhileMoving( WinEDA_DrawPanel* panel, wxDC* DC, bool erase )
/*************************************************************/
/*************************************************************/
static
void
ExitMoveTexte
(
WinEDA_DrawPanel
*
Panel
,
wxDC
*
DC
)
static
void
ExitMoveTexte
(
WinEDA_DrawPanel
*
Panel
,
wxDC
*
DC
)
/*************************************************************/
/*************************************************************/
/*
Routine de sortie des menus de Texte
*/
/*
Abort function for the command move text
*/
{
{
SCH_SCREEN
*
screen
=
(
SCH_SCREEN
*
)
Panel
->
m_Parent
->
m_CurrentScreen
;
SCH_SCREEN
*
screen
=
(
SCH_SCREEN
*
)
Panel
->
m_Parent
->
m_CurrentScreen
;
EDA_BaseStruct
*
Struct
=
screen
->
GetCurItem
();
EDA_BaseStruct
*
Struct
=
screen
->
GetCurItem
();
...
@@ -275,22 +275,20 @@ static void ExitMoveTexte( WinEDA_DrawPanel* Panel, wxDC* DC )
...
@@ -275,22 +275,20 @@ static void ExitMoveTexte( WinEDA_DrawPanel* Panel, wxDC* DC )
Panel
->
ManageCurseur
=
NULL
;
Panel
->
ManageCurseur
=
NULL
;
Panel
->
ForceCloseManageCurseur
=
NULL
;
Panel
->
ForceCloseManageCurseur
=
NULL
;
if
(
Struct
==
NULL
)
/*
Pas de trace en cours
*/
if
(
Struct
==
NULL
)
/*
no current item
*/
{
{
return
;
return
;
}
}
/* ici : trace en cours */
/* "Undraw" the text, and delete it if new (i.e. it was beiing just created)*/
/* Effacement du trace en cours et suppression eventuelle de la structure */
RedrawOneStruct
(
Panel
,
DC
,
Struct
,
g_XorMode
);
RedrawOneStruct
(
Panel
,
DC
,
Struct
,
g_XorMode
);
if
(
Struct
->
m_Flags
&
IS_NEW
)
/* Suppression du nouveau texte en cours de placement */
if
(
Struct
->
m_Flags
&
IS_NEW
)
{
{
delete
Struct
;
delete
Struct
;
screen
->
SetCurItem
(
NULL
);
screen
->
SetCurItem
(
NULL
);
}
}
else
/*
Remise a jour des anciens parametres du texte
*/
else
/*
this was a move command on an "old" text: restore its old settings.
*/
{
{
switch
(
Struct
->
Type
()
)
switch
(
Struct
->
Type
()
)
{
{
...
...
eeschema/eeconfig.cpp
View file @
542b9441
...
@@ -77,7 +77,7 @@ wxString FullFileName;
...
@@ -77,7 +77,7 @@ wxString FullFileName;
break
;
break
;
case
ID_PREFERENCES_CREATE_CONFIG_HOTKEYS
:
case
ID_PREFERENCES_CREATE_CONFIG_HOTKEYS
:
FullFileName
=
DEFAULT_HOTKEY_FILENAME_PATH
;
FullFileName
=
ReturnHotkeyConfigFilePath
(
g_ConfigFileLocationChoice
)
;
FullFileName
+=
HOTKEY_FILENAME
;
FullFileName
+=
HOTKEY_FILENAME
;
FullFileName
+=
DEFAULT_HOTKEY_FILENAME_EXT
;
FullFileName
+=
DEFAULT_HOTKEY_FILENAME_EXT
;
WriteHotkeyConfigFile
(
FullFileName
,
s_Eeschema_Hokeys_Descr
,
true
);
WriteHotkeyConfigFile
(
FullFileName
,
s_Eeschema_Hokeys_Descr
,
true
);
...
@@ -87,6 +87,33 @@ wxString FullFileName;
...
@@ -87,6 +87,33 @@ wxString FullFileName;
Read_Hotkey_Config
(
this
,
true
);
Read_Hotkey_Config
(
this
,
true
);
break
;
break
;
case
ID_PREFERENCES_EDIT_CONFIG_HOTKEYS
:
{
FullFileName
=
ReturnHotkeyConfigFilePath
(
g_ConfigFileLocationChoice
);
FullFileName
+=
HOTKEY_FILENAME
;
FullFileName
+=
DEFAULT_HOTKEY_FILENAME_EXT
;
wxString
editorname
=
GetEditorName
();
if
(
!
editorname
.
IsEmpty
()
)
ExecuteFile
(
this
,
editorname
,
FullFileName
);
break
;
}
case
ID_PREFERENCES_HOTKEY_PATH_IS_HOME
:
if
(
g_ConfigFileLocationChoice
!=
0
)
{
g_ConfigFileLocationChoice
=
0
;
m_Parent
->
m_EDA_CommonConfig
->
Write
(
HOTKEY_CFG_PATH_OPT
,
g_ConfigFileLocationChoice
);
}
break
;
case
ID_PREFERENCES_HOTKEY_PATH_IS_KICAD
:
if
(
g_ConfigFileLocationChoice
!=
1
)
{
g_ConfigFileLocationChoice
=
1
;
m_Parent
->
m_EDA_CommonConfig
->
Write
(
HOTKEY_CFG_PATH_OPT
,
g_ConfigFileLocationChoice
);
}
break
;
default
:
default
:
DisplayError
(
this
,
wxT
(
"WinEDA_SchematicFrame::Process_Config internal error"
)
);
DisplayError
(
this
,
wxT
(
"WinEDA_SchematicFrame::Process_Config internal error"
)
);
}
}
...
@@ -100,7 +127,7 @@ bool Read_Hotkey_Config( WinEDA_DrawFrame * frame, bool verbose )
...
@@ -100,7 +127,7 @@ bool Read_Hotkey_Config( WinEDA_DrawFrame * frame, bool verbose )
* Read the hotkey files config for eeschema and libedit
* Read the hotkey files config for eeschema and libedit
*/
*/
{
{
wxString
FullFileName
=
DEFAULT_HOTKEY_FILENAME_PATH
;
wxString
FullFileName
=
ReturnHotkeyConfigFilePath
(
g_ConfigFileLocationChoice
)
;
FullFileName
+=
HOTKEY_FILENAME
;
FullFileName
+=
HOTKEY_FILENAME
;
FullFileName
+=
DEFAULT_HOTKEY_FILENAME_EXT
;
FullFileName
+=
DEFAULT_HOTKEY_FILENAME_EXT
;
frame
->
ReadHotkeyConfigFile
(
FullFileName
,
s_Eeschema_Hokeys_Descr
,
verbose
);
frame
->
ReadHotkeyConfigFile
(
FullFileName
,
s_Eeschema_Hokeys_Descr
,
verbose
);
...
...
eeschema/hotkeys.cpp
View file @
542b9441
...
@@ -34,6 +34,7 @@
...
@@ -34,6 +34,7 @@
* Note: If an hotkey is a special key be sure the corresponding wxWidget keycode (WXK_XXXX)
* Note: If an hotkey is a special key be sure the corresponding wxWidget keycode (WXK_XXXX)
* is handled in the hotkey_name_descr s_Hotkey_Name_List list (see hotkeys_basic.cpp)
* is handled in the hotkey_name_descr s_Hotkey_Name_List list (see hotkeys_basic.cpp)
* and see this list for some ascii keys (space ...)
* and see this list for some ascii keys (space ...)
* Key modifier are: GR_KB_CTRL GR_KB_ALT
*/
*/
...
@@ -47,6 +48,8 @@ static Ki_HotkeyInfo HkZoomOut( wxT( "Zoom Out" ), HK_ZOOM_OUT, WXK_F2 );
...
@@ -47,6 +48,8 @@ static Ki_HotkeyInfo HkZoomOut( wxT( "Zoom Out" ), HK_ZOOM_OUT, WXK_F2 );
static
Ki_HotkeyInfo
HkZoomIn
(
wxT
(
"Zoom In"
),
HK_ZOOM_IN
,
WXK_F1
);
static
Ki_HotkeyInfo
HkZoomIn
(
wxT
(
"Zoom In"
),
HK_ZOOM_IN
,
WXK_F1
);
static
Ki_HotkeyInfo
HkHelp
(
wxT
(
"Help: this message"
),
HK_HELP
,
'?'
);
static
Ki_HotkeyInfo
HkHelp
(
wxT
(
"Help: this message"
),
HK_HELP
,
'?'
);
static
Ki_HotkeyInfo
HkResetLocalCoord
(
wxT
(
"Reset local coord."
),
HK_RESET_LOCAL_COORD
,
' '
);
static
Ki_HotkeyInfo
HkResetLocalCoord
(
wxT
(
"Reset local coord."
),
HK_RESET_LOCAL_COORD
,
' '
);
static
Ki_HotkeyInfo
HkUndo
(
wxT
(
"Undo"
),
HK_UNDO
,
GR_KB_CTRL
+
'Z'
);
static
Ki_HotkeyInfo
HkRedo
(
wxT
(
"Redo"
),
HK_REDO
,
GR_KB_CTRL
+
'Y'
);
// Schematic editor
// Schematic editor
static
Ki_HotkeyInfo
HkBeginWire
(
wxT
(
"begin Wire"
),
HK_BEGIN_WIRE
,
'W'
);
static
Ki_HotkeyInfo
HkBeginWire
(
wxT
(
"begin Wire"
),
HK_BEGIN_WIRE
,
'W'
);
...
@@ -77,6 +80,7 @@ Ki_HotkeyInfo* s_Common_Hotkey_List[] =
...
@@ -77,6 +80,7 @@ Ki_HotkeyInfo* s_Common_Hotkey_List[] =
&
HkHelp
,
&
HkHelp
,
&
HkZoomIn
,
&
HkZoomOut
,
&
HkZoomRedraw
,
&
HkZoomCenter
,
&
HkZoomIn
,
&
HkZoomOut
,
&
HkZoomRedraw
,
&
HkZoomCenter
,
&
HkResetLocalCoord
,
&
HkResetLocalCoord
,
&
HkUndo
,
&
HkRedo
,
NULL
NULL
};
};
...
@@ -183,6 +187,20 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey,
...
@@ -183,6 +187,20 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey,
OnZoom
(
ID_ZOOM_CENTER_KEY
);
OnZoom
(
ID_ZOOM_CENTER_KEY
);
break
;
break
;
case
HK_UNDO
:
{
wxCommandEvent
event
(
wxEVT_COMMAND_TOOL_CLICKED
,
ID_SCHEMATIC_UNDO
);
wxPostEvent
(
this
,
event
);
}
break
;
case
HK_REDO
:
{
wxCommandEvent
event
(
wxEVT_COMMAND_TOOL_CLICKED
,
ID_SCHEMATIC_REDO
);
wxPostEvent
(
this
,
event
);
}
break
;
case
HK_MOVEBLOCK_TO_DRAGBLOCK
:
// Switch to drag mode, when block moving
case
HK_MOVEBLOCK_TO_DRAGBLOCK
:
// Switch to drag mode, when block moving
HandleBlockEndByPopUp
(
BLOCK_DRAG
,
DC
);
HandleBlockEndByPopUp
(
BLOCK_DRAG
,
DC
);
break
;
break
;
...
@@ -367,6 +385,9 @@ void WinEDA_LibeditFrame::OnHotKey( wxDC* DC, int hotkey,
...
@@ -367,6 +385,9 @@ void WinEDA_LibeditFrame::OnHotKey( wxDC* DC, int hotkey,
wxPoint
MousePos
=
m_CurrentScreen
->
m_MousePosition
;
wxPoint
MousePos
=
m_CurrentScreen
->
m_MousePosition
;
// Remap the control key Ctrl A (0x01) to GR_KB_CTRL + 'A' (easier to handle...)
if
(
(
hotkey
&
GR_KB_CTRL
)
!=
0
)
hotkey
+=
'A'
-
1
;
/* Convert lower to upper case (the usual toupper function has problem with non ascii codes like function keys */
/* Convert lower to upper case (the usual toupper function has problem with non ascii codes like function keys */
if
(
(
hotkey
>=
'a'
)
&&
(
hotkey
<=
'z'
)
)
if
(
(
hotkey
>=
'a'
)
&&
(
hotkey
<=
'z'
)
)
hotkey
+=
'A'
-
'a'
;
hotkey
+=
'A'
-
'a'
;
...
@@ -405,6 +426,20 @@ void WinEDA_LibeditFrame::OnHotKey( wxDC* DC, int hotkey,
...
@@ -405,6 +426,20 @@ void WinEDA_LibeditFrame::OnHotKey( wxDC* DC, int hotkey,
OnZoom
(
ID_ZOOM_CENTER_KEY
);
OnZoom
(
ID_ZOOM_CENTER_KEY
);
break
;
break
;
case
HK_UNDO
:
{
wxCommandEvent
event
(
wxEVT_COMMAND_TOOL_CLICKED
,
ID_LIBEDIT_UNDO
);
wxPostEvent
(
this
,
event
);
}
break
;
case
HK_REDO
:
{
wxCommandEvent
event
(
wxEVT_COMMAND_TOOL_CLICKED
,
ID_LIBEDIT_REDO
);
wxPostEvent
(
this
,
event
);
}
break
;
case
HK_REPEAT_LAST
:
case
HK_REPEAT_LAST
:
if
(
LibItemToRepeat
&&
(
LibItemToRepeat
->
m_Flags
==
0
)
if
(
LibItemToRepeat
&&
(
LibItemToRepeat
->
m_Flags
==
0
)
&&
(
LibItemToRepeat
->
Type
()
==
COMPONENT_PIN_DRAW_TYPE
)
)
&&
(
LibItemToRepeat
->
Type
()
==
COMPONENT_PIN_DRAW_TYPE
)
)
...
...
eeschema/hotkeys.h
View file @
542b9441
...
@@ -17,6 +17,8 @@ enum hotkey_id_commnand {
...
@@ -17,6 +17,8 @@ enum hotkey_id_commnand {
HK_NEXT_SEARCH
,
HK_NEXT_SEARCH
,
HK_DELETE
,
HK_DELETE
,
HK_REPEAT_LAST
,
HK_REPEAT_LAST
,
HK_UNDO
,
HK_REDO
,
HK_MOVEBLOCK_TO_DRAGBLOCK
,
HK_MOVEBLOCK_TO_DRAGBLOCK
,
HK_ROTATE_COMPONENT
,
HK_ROTATE_COMPONENT
,
HK_MIRROR_X_COMPONENT
,
HK_MIRROR_X_COMPONENT
,
...
...
eeschema/libedit_undo_redo.cpp
View file @
542b9441
...
@@ -39,14 +39,15 @@ EDA_LibComponentStruct * CopyItem;
...
@@ -39,14 +39,15 @@ EDA_LibComponentStruct * CopyItem;
}
}
/******************************************************/
/******************************************************/
void
WinEDA_LibeditFrame
::
GetComponentFromRedoList
()
bool
WinEDA_LibeditFrame
::
GetComponentFromRedoList
()
/******************************************************/
/******************************************************/
/* Redo the last edition:
/* Redo the last edition:
- Place the current edited library component in undo list
- Place the current edited library component in undo list
- Get old version of the current edited library component
- Get old version of the current edited library component
* @return FALSE if nothing done, else TRUE
*/
*/
{
{
if
(
GetScreen
()
->
m_RedoList
==
NULL
)
return
;
if
(
GetScreen
()
->
m_RedoList
==
NULL
)
return
FALSE
;
GetScreen
()
->
AddItemToUndoList
((
EDA_BaseStruct
*
)
CurrentLibEntry
);
GetScreen
()
->
AddItemToUndoList
((
EDA_BaseStruct
*
)
CurrentLibEntry
);
CurrentLibEntry
=
CurrentLibEntry
=
...
@@ -56,17 +57,20 @@ void WinEDA_LibeditFrame::GetComponentFromRedoList()
...
@@ -56,17 +57,20 @@ void WinEDA_LibeditFrame::GetComponentFromRedoList()
GetScreen
()
->
SetModify
();
GetScreen
()
->
SetModify
();
ReCreateHToolbar
();
ReCreateHToolbar
();
SetToolbars
();
SetToolbars
();
return
TRUE
;
}
}
/******************************************************/
/******************************************************/
void
WinEDA_LibeditFrame
::
GetComponentFromUndoList
()
bool
WinEDA_LibeditFrame
::
GetComponentFromUndoList
()
/******************************************************/
/******************************************************/
/* Undo the last edition:
/* Undo the last edition:
- Place the current edited library component in Redo list
- Place the current edited library component in Redo list
- Get old version of the current edited library component
- Get old version of the current edited library component
* @return FALSE if nothing done, else TRUE
*/
*/
{
{
if
(
GetScreen
()
->
m_UndoList
==
NULL
)
return
;
if
(
GetScreen
()
->
m_UndoList
==
NULL
)
return
FALSE
;
GetScreen
()
->
AddItemToRedoList
((
EDA_BaseStruct
*
)
CurrentLibEntry
);
GetScreen
()
->
AddItemToRedoList
((
EDA_BaseStruct
*
)
CurrentLibEntry
);
CurrentLibEntry
=
CurrentLibEntry
=
...
@@ -77,4 +81,6 @@ void WinEDA_LibeditFrame::GetComponentFromUndoList()
...
@@ -77,4 +81,6 @@ void WinEDA_LibeditFrame::GetComponentFromUndoList()
GetScreen
()
->
SetModify
();
GetScreen
()
->
SetModify
();
ReCreateHToolbar
();
ReCreateHToolbar
();
SetToolbars
();
SetToolbars
();
return
TRUE
;
}
}
eeschema/libframe.cpp
View file @
542b9441
...
@@ -59,11 +59,11 @@ EVT_MENU_RANGE( ID_POPUP_GENERAL_START_RANGE, ID_POPUP_GENERAL_END_RANGE,
...
@@ -59,11 +59,11 @@ EVT_MENU_RANGE( ID_POPUP_GENERAL_START_RANGE, ID_POPUP_GENERAL_END_RANGE,
END_EVENT_TABLE
()
END_EVENT_TABLE
()
WinEDA_LibeditFrame
::
WinEDA_LibeditFrame
(
wxWindow
*
father
,
WinEDA_LibeditFrame
::
WinEDA_LibeditFrame
(
wxWindow
*
father
,
WinEDA_App
*
parent
,
WinEDA_App
*
parent
,
const
wxString
&
title
,
const
wxString
&
title
,
const
wxPoint
&
pos
,
const
wxPoint
&
pos
,
const
wxSize
&
size
)
:
const
wxSize
&
size
)
:
WinEDA_DrawFrame
(
father
,
LIBEDITOR_FRAME
,
parent
,
title
,
pos
,
size
)
WinEDA_DrawFrame
(
father
,
LIBEDITOR_FRAME
,
parent
,
title
,
pos
,
size
)
{
{
m_FrameName
=
wxT
(
"LibeditFrame"
);
m_FrameName
=
wxT
(
"LibeditFrame"
);
...
@@ -205,7 +205,8 @@ void WinEDA_LibeditFrame::SetToolbars()
...
@@ -205,7 +205,8 @@ void WinEDA_LibeditFrame::SetToolbars()
{
{
int
AliasLocation
=
LocateAlias
(
CurrentLibEntry
->
m_AliasList
,
CurrentAliasName
);
int
AliasLocation
=
LocateAlias
(
CurrentLibEntry
->
m_AliasList
,
CurrentAliasName
);
if
(
AliasLocation
>=
0
)
if
(
AliasLocation
>=
0
)
if
(
!
CurrentLibEntry
->
m_AliasList
[
AliasLocation
+
ALIAS_DOC_FILENAME
].
IsEmpty
()
)
if
(
!
CurrentLibEntry
->
m_AliasList
[
AliasLocation
+
ALIAS_DOC_FILENAME
].
IsEmpty
()
)
enable_dtool
=
TRUE
;
enable_dtool
=
TRUE
;
}
}
else
if
(
!
CurrentLibEntry
->
m_DocFile
.
IsEmpty
()
)
else
if
(
!
CurrentLibEntry
->
m_DocFile
.
IsEmpty
()
)
...
@@ -289,8 +290,8 @@ int WinEDA_LibeditFrame::BestZoom()
...
@@ -289,8 +290,8 @@ int WinEDA_LibeditFrame::BestZoom()
void
WinEDA_LibeditFrame
::
Process_Special_Functions
(
wxCommandEvent
&
event
)
void
WinEDA_LibeditFrame
::
Process_Special_Functions
(
wxCommandEvent
&
event
)
/*************************************************************************/
/*************************************************************************/
{
{
int
id
=
event
.
GetId
();
int
id
=
event
.
GetId
();
wxPoint
pos
;
wxPoint
pos
;
wxClientDC
dc
(
DrawPanel
);
wxClientDC
dc
(
DrawPanel
);
...
@@ -709,13 +710,13 @@ void WinEDA_LibeditFrame::Process_Special_Functions( wxCommandEvent& event )
...
@@ -709,13 +710,13 @@ void WinEDA_LibeditFrame::Process_Special_Functions( wxCommandEvent& event )
break
;
break
;
case
ID_LIBEDIT_UNDO
:
case
ID_LIBEDIT_UNDO
:
GetComponentFromUndoList
();
if
(
GetComponentFromUndoList
()
)
DrawPanel
->
Refresh
(
TRUE
);
DrawPanel
->
Refresh
(
TRUE
);
break
;
break
;
case
ID_LIBEDIT_REDO
:
case
ID_LIBEDIT_REDO
:
GetComponentFromRedoList
();
if
(
GetComponentFromRedoList
()
)
DrawPanel
->
Refresh
(
TRUE
);
DrawPanel
->
Refresh
(
TRUE
);
break
;
break
;
default
:
default
:
...
...
eeschema/menubar.cpp
View file @
542b9441
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
#include "bitmaps.h"
#include "bitmaps.h"
#include "protos.h"
#include "protos.h"
#include "id.h"
#include "id.h"
#include "hotkeys.h"
/************************************************/
/************************************************/
...
@@ -26,6 +27,7 @@ void WinEDA_SchematicFrame::ReCreateMenuBar()
...
@@ -26,6 +27,7 @@ void WinEDA_SchematicFrame::ReCreateMenuBar()
{
{
int
ii
;
int
ii
;
wxMenuBar
*
menuBar
=
GetMenuBar
();
wxMenuBar
*
menuBar
=
GetMenuBar
();
wxString
msg
;
if
(
menuBar
==
NULL
)
if
(
menuBar
==
NULL
)
{
{
...
@@ -117,18 +119,16 @@ wxMenuBar * menuBar = GetMenuBar();
...
@@ -117,18 +119,16 @@ wxMenuBar * menuBar = GetMenuBar();
// Menu Edit:
// Menu Edit:
wxMenu
*
editMenu
=
new
wxMenu
;
wxMenu
*
editMenu
=
new
wxMenu
;
msg
=
AddHotkeyName
(
_
(
"&Undo
\t
"
),
s_Schematic_Hokeys_Descr
,
HK_UNDO
);
item
=
new
wxMenuItem
(
editMenu
,
ID_SCHEMATIC_UNDO
,
item
=
new
wxMenuItem
(
editMenu
,
ID_SCHEMATIC_UNDO
,
_
(
"&Undo
\t
CTRL+Z"
)
,
msg
,
_
(
"Undo last edition"
)
);
_
(
"Undo last edition"
)
);
item
->
SetBitmap
(
undo_xpm
);
item
->
SetBitmap
(
undo_xpm
);
editMenu
->
Append
(
item
);
editMenu
->
Append
(
item
);
/* if ( GetScreen()->m_UndoList )
editMenu->Enable(ID_SCHEMATIC_UNDO,TRUE);
msg
=
AddHotkeyName
(
_
(
"&Redo
\t
"
),
s_Schematic_Hokeys_Descr
,
HK_REDO
);
else
editMenu->Enable(ID_SCHEMATIC_UNDO,FALSE);
*/
item
=
new
wxMenuItem
(
editMenu
,
ID_SCHEMATIC_REDO
,
item
=
new
wxMenuItem
(
editMenu
,
ID_SCHEMATIC_REDO
,
_
(
"&Redo
\t
CTRL+Y"
)
,
msg
,
_
(
"Redo the last undo command"
)
);
_
(
"Redo the last undo command"
)
);
item
->
SetBitmap
(
redo_xpm
);
item
->
SetBitmap
(
redo_xpm
);
editMenu
->
Append
(
item
);
editMenu
->
Append
(
item
);
...
@@ -165,14 +165,7 @@ wxMenuBar * menuBar = GetMenuBar();
...
@@ -165,14 +165,7 @@ wxMenuBar * menuBar = GetMenuBar();
configmenu
->
Append
(
item
);
configmenu
->
Append
(
item
);
configmenu
->
AppendSeparator
();
configmenu
->
AppendSeparator
();
item
=
new
wxMenuItem
(
configmenu
,
ID_PREFERENCES_CREATE_CONFIG_HOTKEYS
,
_
(
"Create Eeschema &Hotkey config file"
),
AddHotheyConfigMenu
(
configmenu
);
_
(
"Create or Recreate the hotkey config file from current hotkey list"
)
);
item
->
SetBitmap
(
save_setup_xpm
);
configmenu
->
Append
(
item
);
item
=
new
wxMenuItem
(
configmenu
,
ID_PREFERENCES_READ_CONFIG_HOTKEYS
,
_
(
"Reread &Eeschema Hotkey config file"
),
_
(
"Reread the hotkey config file"
)
);
item
->
SetBitmap
(
reload_xpm
);
configmenu
->
Append
(
item
);
// Menu Help:
// Menu Help:
wxMenu
*
helpMenu
=
new
wxMenu
;
wxMenu
*
helpMenu
=
new
wxMenu
;
...
...
eeschema/schedit.cpp
View file @
542b9441
...
@@ -746,13 +746,13 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event )
...
@@ -746,13 +746,13 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event )
break
;
break
;
case
ID_SCHEMATIC_UNDO
:
case
ID_SCHEMATIC_UNDO
:
GetSchematicFromUndoList
();
if
(
GetSchematicFromUndoList
()
)
DrawPanel
->
Refresh
(
TRUE
);
DrawPanel
->
Refresh
(
TRUE
);
break
;
break
;
case
ID_SCHEMATIC_REDO
:
case
ID_SCHEMATIC_REDO
:
GetSchematicFromRedoList
();
if
(
GetSchematicFromRedoList
()
)
DrawPanel
->
Refresh
(
TRUE
);
DrawPanel
->
Refresh
(
TRUE
);
break
;
break
;
default
:
// Log error:
default
:
// Log error:
...
...
eeschema/schematic_undo_redo.cpp
View file @
542b9441
...
@@ -291,16 +291,17 @@ void WinEDA_SchematicFrame::SaveCopyInUndoList( EDA_BaseStruct* ItemToCopy,
...
@@ -291,16 +291,17 @@ void WinEDA_SchematicFrame::SaveCopyInUndoList( EDA_BaseStruct* ItemToCopy,
/**********************************************************/
/**********************************************************/
void
WinEDA_SchematicFrame
::
GetSchematicFromRedoList
()
bool
WinEDA_SchematicFrame
::
GetSchematicFromRedoList
()
/**********************************************************/
/**********************************************************/
/* Redo the last edition:
/* Redo the last edition:
* - Save the current schematic in undo list
* - Save the current schematic in undo list
* - Get the old version
* - Get the old version
* @return FALSE if nothing done, else TRUE
*/
*/
{
{
if
(
GetScreen
()
->
m_RedoList
==
NULL
)
if
(
GetScreen
()
->
m_RedoList
==
NULL
)
return
;
return
FALSE
;
/* Get the old wrapper and put it in UndoList */
/* Get the old wrapper and put it in UndoList */
DrawPickedStruct
*
List
=
(
DrawPickedStruct
*
)
GetScreen
()
->
GetItemFromRedoList
();
DrawPickedStruct
*
List
=
(
DrawPickedStruct
*
)
GetScreen
()
->
GetItemFromRedoList
();
...
@@ -312,6 +313,8 @@ void WinEDA_SchematicFrame::GetSchematicFromRedoList()
...
@@ -312,6 +313,8 @@ void WinEDA_SchematicFrame::GetSchematicFromRedoList()
GetScreen
()
->
SetModify
();
GetScreen
()
->
SetModify
();
ReCreateHToolbar
();
ReCreateHToolbar
();
SetToolbars
();
SetToolbars
();
return
TRUE
;
}
}
...
@@ -463,16 +466,17 @@ void WinEDA_SchematicFrame::PutDataInPreviousState( DrawPickedStruct* List )
...
@@ -463,16 +466,17 @@ void WinEDA_SchematicFrame::PutDataInPreviousState( DrawPickedStruct* List )
/**********************************************************/
/**********************************************************/
void
WinEDA_SchematicFrame
::
GetSchematicFromUndoList
()
bool
WinEDA_SchematicFrame
::
GetSchematicFromUndoList
()
/**********************************************************/
/**********************************************************/
/* Undo the last edition:
/* Undo the last edition:
* - Save the current schematic in Redo list
* - Save the current schematic in Redo list
* - Get an old version of the schematic
* - Get an old version of the schematic
* @return FALSE if nothing done, else TRUE
*/
*/
{
{
if
(
GetScreen
()
->
m_UndoList
==
NULL
)
if
(
GetScreen
()
->
m_UndoList
==
NULL
)
return
;
return
FALSE
;
/* Get the old wrapper and put it in RedoList (the real data list is the m_Son member) */
/* Get the old wrapper and put it in RedoList (the real data list is the m_Son member) */
DrawPickedStruct
*
List
=
(
DrawPickedStruct
*
)
GetScreen
()
->
GetItemFromUndoList
();
DrawPickedStruct
*
List
=
(
DrawPickedStruct
*
)
GetScreen
()
->
GetItemFromUndoList
();
...
@@ -484,6 +488,8 @@ void WinEDA_SchematicFrame::GetSchematicFromUndoList()
...
@@ -484,6 +488,8 @@ void WinEDA_SchematicFrame::GetSchematicFromUndoList()
GetScreen
()
->
SetModify
();
GetScreen
()
->
SetModify
();
ReCreateHToolbar
();
ReCreateHToolbar
();
SetToolbars
();
SetToolbars
();
return
TRUE
;
}
}
...
...
eeschema/schframe.cpp
View file @
542b9441
...
@@ -56,13 +56,7 @@ BEGIN_EVENT_TABLE(WinEDA_SchematicFrame, wxFrame)
...
@@ -56,13 +56,7 @@ BEGIN_EVENT_TABLE(WinEDA_SchematicFrame, wxFrame)
EVT_MENU
(
ID_GEN_COPY_BLOCK_TO_CLIPBOARD
,
WinEDA_DrawFrame
::
CopyToClipboard
)
EVT_MENU
(
ID_GEN_COPY_BLOCK_TO_CLIPBOARD
,
WinEDA_DrawFrame
::
CopyToClipboard
)
EVT_MENU
(
ID_EXIT
,
WinEDA_SchematicFrame
::
Process_Special_Functions
)
EVT_MENU
(
ID_EXIT
,
WinEDA_SchematicFrame
::
Process_Special_Functions
)
EVT_MENU
(
ID_CONFIG_REQ
,
WinEDA_SchematicFrame
::
Process_Config
)
EVT_MENU_RANGE
(
ID_CONFIG_AND_PREFERENCES_START
,
ID_CONFIG_AND_PREFERENCES_END
,
WinEDA_SchematicFrame
::
Process_Config
)
EVT_MENU
(
ID_CONFIG_READ
,
WinEDA_SchematicFrame
::
Process_Config
)
EVT_MENU
(
ID_CONFIG_SAVE
,
WinEDA_SchematicFrame
::
Process_Config
)
EVT_MENU
(
ID_COLORS_SETUP
,
WinEDA_SchematicFrame
::
Process_Config
)
EVT_MENU
(
ID_OPTIONS_SETUP
,
WinEDA_SchematicFrame
::
Process_Config
)
EVT_MENU
(
ID_PREFERENCES_CREATE_CONFIG_HOTKEYS
,
WinEDA_SchematicFrame
::
Process_Config
)
EVT_MENU
(
ID_PREFERENCES_READ_CONFIG_HOTKEYS
,
WinEDA_SchematicFrame
::
Process_Config
)
EVT_MENU_RANGE
(
ID_LANGUAGE_CHOICE
,
ID_LANGUAGE_CHOICE_END
,
EVT_MENU_RANGE
(
ID_LANGUAGE_CHOICE
,
ID_LANGUAGE_CHOICE_END
,
WinEDA_DrawFrame
::
SetLanguage
)
WinEDA_DrawFrame
::
SetLanguage
)
...
...
eeschema/tool_lib.cpp
View file @
542b9441
...
@@ -147,10 +147,10 @@ void WinEDA_LibeditFrame::ReCreateHToolbar()
...
@@ -147,10 +147,10 @@ void WinEDA_LibeditFrame::ReCreateHToolbar()
_
(
"Create a new library an save current part into"
)
);
_
(
"Create a new library an save current part into"
)
);
m_HToolBar
->
AddSeparator
();
m_HToolBar
->
AddSeparator
();
m_HToolBar
->
AddTool
(
ID_LIBEDIT_UNDO
,
wxEmptyString
,
BITMAP
(
undo_xpm
),
msg
=
AddHotkeyName
(
_
(
"Undo last edition"
),
s_Schematic_Hokeys_Descr
,
HK_UNDO
);
_
(
"Undo last edition"
)
);
m_HToolBar
->
AddTool
(
ID_LIBEDIT_UNDO
,
wxEmptyString
,
BITMAP
(
undo_xpm
),
msg
);
m_HToolBar
->
AddTool
(
ID_LIBEDIT_REDO
,
wxEmptyString
,
BITMAP
(
redo_xpm
),
msg
=
AddHotkeyName
(
_
(
"Redo the last undo command"
),
s_Schematic_Hokeys_Descr
,
HK_REDO
);
_
(
"Redo the last undo command"
)
);
m_HToolBar
->
AddTool
(
ID_LIBEDIT_REDO
,
wxEmptyString
,
BITMAP
(
redo_xpm
),
msg
);
m_HToolBar
->
AddSeparator
();
m_HToolBar
->
AddSeparator
();
m_HToolBar
->
AddTool
(
ID_LIBEDIT_GET_FRAME_EDIT_PART
,
BITMAP
(
part_properties_xpm
),
m_HToolBar
->
AddTool
(
ID_LIBEDIT_GET_FRAME_EDIT_PART
,
BITMAP
(
part_properties_xpm
),
...
...
eeschema/tool_sch.cpp
View file @
542b9441
...
@@ -87,10 +87,11 @@ void WinEDA_SchematicFrame::ReCreateHToolbar()
...
@@ -87,10 +87,11 @@ void WinEDA_SchematicFrame::ReCreateHToolbar()
_
(
"Paste"
)
);
_
(
"Paste"
)
);
m_HToolBar
->
AddSeparator
();
m_HToolBar
->
AddSeparator
();
m_HToolBar
->
AddTool
(
ID_SCHEMATIC_UNDO
,
wxEmptyString
,
BITMAP
(
undo_xpm
),
msg
=
AddHotkeyName
(
_
(
"Undo last edition"
),
s_Schematic_Hokeys_Descr
,
HK_UNDO
);
_
(
"Undo last edition"
)
);
m_HToolBar
->
AddTool
(
ID_SCHEMATIC_UNDO
,
wxEmptyString
,
BITMAP
(
undo_xpm
),
msg
);
m_HToolBar
->
AddTool
(
ID_SCHEMATIC_REDO
,
wxEmptyString
,
BITMAP
(
redo_xpm
),
_
(
"Redo the last undo command"
)
);
msg
=
AddHotkeyName
(
_
(
"Redo the last undo command"
),
s_Schematic_Hokeys_Descr
,
HK_REDO
);
m_HToolBar
->
AddTool
(
ID_SCHEMATIC_REDO
,
wxEmptyString
,
BITMAP
(
redo_xpm
),
msg
);
m_HToolBar
->
AddSeparator
();
m_HToolBar
->
AddSeparator
();
m_HToolBar
->
AddTool
(
ID_GEN_PRINT
,
wxEmptyString
,
BITMAP
(
print_button
),
m_HToolBar
->
AddTool
(
ID_GEN_PRINT
,
wxEmptyString
,
BITMAP
(
print_button
),
...
...
gerbview/gerberframe.cpp
View file @
542b9441
...
@@ -57,13 +57,13 @@ BEGIN_EVENT_TABLE(WinEDA_GerberFrame, wxFrame)
...
@@ -57,13 +57,13 @@ BEGIN_EVENT_TABLE(WinEDA_GerberFrame, wxFrame)
EVT_MENU
(
ID_EXIT
,
WinEDA_GerberFrame
::
Process_Special_Functions
)
EVT_MENU
(
ID_EXIT
,
WinEDA_GerberFrame
::
Process_Special_Functions
)
// menu Config
// menu Config
EVT_MENU
(
ID_CONFIG_REQ
,
WinEDA_GerberFrame
::
Process_Config
)
EVT_MENU_RANGE
(
ID_CONFIG_AND_PREFERENCES_START
,
ID_CONFIG_AND_PREFERENCES_END
,
WinEDA_GerberFrame
::
Process_Config
)
EVT_MENU
(
ID_COLORS_SETUP
,
WinEDA_GerberFrame
::
Process_Config
)
EVT_MENU
(
ID_COLORS_SETUP
,
WinEDA_GerberFrame
::
Process_Config
)
EVT_MENU
(
ID_OPTIONS_SETUP
,
WinEDA_GerberFrame
::
Process_Config
)
EVT_MENU
(
ID_OPTIONS_SETUP
,
WinEDA_GerberFrame
::
Process_Config
)
EVT_MENU
(
ID_PCB_LOOK_SETUP
,
WinEDA_GerberFrame
::
Process_Config
)
EVT_MENU
(
ID_PCB_LOOK_SETUP
,
WinEDA_GerberFrame
::
Process_Config
)
EVT_MENU
(
ID_CONFIG_SAVE
,
WinEDA_GerberFrame
::
Process_Config
)
EVT_MENU
(
ID_PREFERENCES_CREATE_CONFIG_HOTKEYS
,
WinEDA_GerberFrame
::
Process_Config
)
EVT_MENU
(
ID_PREFERENCES_READ_CONFIG_HOTKEYS
,
WinEDA_GerberFrame
::
Process_Config
)
EVT_MENU_RANGE
(
ID_LANGUAGE_CHOICE
,
ID_LANGUAGE_CHOICE_END
,
EVT_MENU_RANGE
(
ID_LANGUAGE_CHOICE
,
ID_LANGUAGE_CHOICE_END
,
WinEDA_DrawFrame
::
SetLanguage
)
WinEDA_DrawFrame
::
SetLanguage
)
...
...
gerbview/gerbview_config.cpp
View file @
542b9441
/
******************************************/
/******
******************************************/
/** gerbview_config.cpp : configuration pour Gerbview
*/
/** gerbview_config.cpp : Gerbview configuration
*/
/
******************************************/
/******
******************************************/
/*
lit ou met a jour la configuration de PCBNEW
*/
/*
Functions to handle Gerbview configuration
*/
#include "fctsys.h"
#include "fctsys.h"
...
@@ -20,125 +20,149 @@
...
@@ -20,125 +20,149 @@
/* Variables locales */
/* Variables locales */
#define HOTKEY_FILENAME wxT(
"gerbview"
)
#define HOTKEY_FILENAME wxT(
"gerbview"
)
/*************************************************************/
/*************************************************************/
void
WinEDA_GerberFrame
::
Process_Config
(
wxCommandEvent
&
event
)
void
WinEDA_GerberFrame
::
Process_Config
(
wxCommandEvent
&
event
)
/*************************************************************/
/*************************************************************/
{
{
int
id
=
event
.
GetId
();
int
id
=
event
.
GetId
();
wxPoint
pos
;
wxPoint
pos
;
wxString
FullFileName
;
wxString
FullFileName
;
pos
=
GetPosition
();
pos
=
GetPosition
();
pos
.
x
+=
20
;
pos
.
y
+=
20
;
pos
.
x
+=
20
;
pos
.
y
+=
20
;
switch
(
id
)
switch
(
id
)
{
{
case
ID_COLORS_SETUP
:
case
ID_COLORS_SETUP
:
DisplayColorSetupFrame
(
this
,
pos
);
DisplayColorSetupFrame
(
this
,
pos
);
break
;
break
;
case
ID_CONFIG_REQ
:
// Creation de la fenetre de configuration
case
ID_CONFIG_REQ
:
// Creation de la fenetre de configuration
{
{
InstallConfigFrame
(
pos
);
InstallConfigFrame
(
pos
);
break
;
break
;
}
}
case
ID_PCB_TRACK_SIZE_SETUP
:
case
ID_PCB_TRACK_SIZE_SETUP
:
case
ID_PCB_LOOK_SETUP
:
case
ID_PCB_LOOK_SETUP
:
case
ID_OPTIONS_SETUP
:
case
ID_OPTIONS_SETUP
:
InstallPcbOptionsFrame
(
pos
,
id
);
InstallPcbOptionsFrame
(
pos
,
id
);
break
;
break
;
case
ID_CONFIG_SAVE
:
case
ID_CONFIG_SAVE
:
Update_config
();
Update_config
();
break
;
break
;
case
ID_PREFERENCES_CREATE_CONFIG_HOTKEYS
:
case
ID_PREFERENCES_CREATE_CONFIG_HOTKEYS
:
FullFileName
=
DEFAULT_HOTKEY_FILENAME_PATH
;
FullFileName
=
ReturnHotkeyConfigFilePath
(
g_ConfigFileLocationChoice
);
FullFileName
+=
HOTKEY_FILENAME
;
FullFileName
+=
HOTKEY_FILENAME
;
FullFileName
+=
DEFAULT_HOTKEY_FILENAME_EXT
;
FullFileName
+=
DEFAULT_HOTKEY_FILENAME_EXT
;
WriteHotkeyConfigFile
(
FullFileName
,
s_Gerbview_Hokeys_Descr
,
true
);
WriteHotkeyConfigFile
(
FullFileName
,
s_Gerbview_Hokeys_Descr
,
true
);
break
;
break
;
case
ID_PREFERENCES_READ_CONFIG_HOTKEYS
:
case
ID_PREFERENCES_READ_CONFIG_HOTKEYS
:
Read_Hotkey_Config
(
this
,
true
);
Read_Hotkey_Config
(
this
,
true
);
break
;
break
;
default
:
case
ID_PREFERENCES_HOTKEY_PATH_IS_HOME
:
DisplayError
(
this
,
wxT
(
"WinEDA_GerberFrame::Process_Config internal error"
));
if
(
g_ConfigFileLocationChoice
!=
0
)
}
{
g_ConfigFileLocationChoice
=
0
;
m_Parent
->
m_EDA_CommonConfig
->
Write
(
HOTKEY_CFG_PATH_OPT
,
g_ConfigFileLocationChoice
);
}
break
;
case
ID_PREFERENCES_HOTKEY_PATH_IS_KICAD
:
if
(
g_ConfigFileLocationChoice
!=
1
)
{
g_ConfigFileLocationChoice
=
1
;
m_Parent
->
m_EDA_CommonConfig
->
Write
(
HOTKEY_CFG_PATH_OPT
,
g_ConfigFileLocationChoice
);
}
break
;
default
:
DisplayError
(
this
,
wxT
(
"WinEDA_GerberFrame::Process_Config internal error"
)
);
}
}
}
/*****************************************************/
/*****************************************************/
bool
Read_Config
()
bool
Read_Config
()
/*****************************************************/
/*****************************************************/
/* lit la configuration, si elle n'a pas deja etee lue
1 - lit gerbview.cnf
2 - si non trouve lit <chemin de gerbview.exe>/gerbview.cnf
3 - si non trouve: init des variables aux valeurs par defaut
Retourne un pointeur su le message d'erreur a afficher
/* lit la configuration, si elle n'a pas deja etee lue
*/
* 1 - lit gerbview.cnf
* 2 - si non trouve lit <chemin de gerbview.exe>/gerbview.cnf
* 3 - si non trouve: init des variables aux valeurs par defaut
*
* Retourne un pointeur su le message d'erreur a afficher
*/
{
{
g_Prj_Config_Filename_ext
=
wxT
(
".cnf"
);
g_Prj_Config_Filename_ext
=
wxT
(
".cnf"
);
EDA_Appl
->
ReadProjectConfig
(
wxT
(
"gerbview"
),
GROUP
,
ParamCfgList
,
FALSE
);
EDA_Appl
->
ReadProjectConfig
(
wxT
(
"gerbview"
),
GROUP
,
ParamCfgList
,
FALSE
);
/* Inits autres variables */
/* Inits autres variables */
if
(
ScreenPcb
)
ScreenPcb
->
SetGrid
(
TmpGrid
);
if
(
ScreenPcb
)
if
(
g_PhotoFilenameExt
.
IsEmpty
()
)
g_PhotoFilenameExt
=
wxT
(
".pho"
);
ScreenPcb
->
SetGrid
(
TmpGrid
);
if
(
g_DrillFilenameExt
.
IsEmpty
()
)
g_DrillFilenameExt
=
wxT
(
".drl"
);
if
(
g_PhotoFilenameExt
.
IsEmpty
()
)
if
(
g_PenFilenameExt
.
IsEmpty
()
)
g_PenFilenameExt
=
wxT
(
".pen"
);
g_PhotoFilenameExt
=
wxT
(
".pho"
);
if
(
g_DrillFilenameExt
.
IsEmpty
()
)
return
TRUE
;
g_DrillFilenameExt
=
wxT
(
".drl"
);
if
(
g_PenFilenameExt
.
IsEmpty
()
)
g_PenFilenameExt
=
wxT
(
".pen"
);
return
TRUE
;
}
}
/******************************************/
/******************************************/
void
WinEDA_GerberFrame
::
Update_config
()
void
WinEDA_GerberFrame
::
Update_config
()
/******************************************/
/******************************************/
/*
/*
creation du fichier de config
*
creation du fichier de config
*/
*/
{
{
wxString
FullFileName
;
wxString
FullFileName
;
wxString
mask
(
wxT
(
"*"
)
),
wxString
mask
(
wxT
(
"*"
)
),
g_Prj_Config_Filename_ext
=
wxT
(
".cnf"
;)
g_Prj_Config_Filename_ext
=
wxT
(
".cnf"
;
)
mask
+=
g_Prj_Config_Filename_ext
;
mask
+=
g_Prj_Config_Filename_ext
;
FullFileName
=
wxT
(
"gerbview"
);
ChangeFileNameExt
(
FullFileName
,
g_Prj_Config_Filename_ext
);
FullFileName
=
wxT
(
"gerbview"
);
ChangeFileNameExt
(
FullFileName
,
g_Prj_Config_Filename_ext
);
FullFileName
=
EDA_FileSelector
(
_
(
"Save config file"
),
wxEmptyString
,
/* Chemin par defaut */
FullFileName
=
EDA_FileSelector
(
_
(
"Save config file"
),
FullFileName
,
/* nom fichier par defaut */
wxEmptyString
,
/* Chemin par defaut */
g_Prj_Config_Filename_ext
,
/* extension par defaut */
FullFileName
,
/* nom fichier par defaut */
mask
,
/* Masque d'affichage */
g_Prj_Config_Filename_ext
,
/* extension par defaut */
this
,
mask
,
/* Masque d'affichage */
wxFD_SAVE
,
this
,
TRUE
wxFD_SAVE
,
);
TRUE
if
(
FullFileName
.
IsEmpty
()
)
return
;
);
if
(
FullFileName
.
IsEmpty
()
)
/* ecriture de la configuration */
return
;
EDA_Appl
->
WriteProjectConfig
(
FullFileName
,
GROUP
,
ParamCfgList
);
/* ecriture de la configuration */
EDA_Appl
->
WriteProjectConfig
(
FullFileName
,
GROUP
,
ParamCfgList
);
}
}
/***************************************************************/
/***************************************************************/
bool
Read_Hotkey_Config
(
WinEDA_DrawFrame
*
frame
,
bool
verbose
)
bool
Read_Hotkey_Config
(
WinEDA_DrawFrame
*
frame
,
bool
verbose
)
/***************************************************************/
/***************************************************************/
/*
/*
* Read the hotkey files config for pcbnew and module_edit
* Read the hotkey files config for pcbnew and module_edit
*/
*/
{
{
wxString
FullFileName
=
DEFAULT_HOTKEY_FILENAME_PATH
;
wxString
FullFileName
=
ReturnHotkeyConfigFilePath
(
g_ConfigFileLocationChoice
);
FullFileName
+=
HOTKEY_FILENAME
;
FullFileName
+=
DEFAULT_HOTKEY_FILENAME_EXT
;
return
frame
->
ReadHotkeyConfigFile
(
FullFileName
,
s_Gerbview_Hokeys_Descr
,
verbose
);
}
FullFileName
+=
HOTKEY_FILENAME
;
FullFileName
+=
DEFAULT_HOTKEY_FILENAME_EXT
;
return
frame
->
ReadHotkeyConfigFile
(
FullFileName
,
s_Gerbview_Hokeys_Descr
,
verbose
);
}
gerbview/tool_gerber.cpp
View file @
542b9441
...
@@ -124,18 +124,7 @@ void WinEDA_GerberFrame::ReCreateMenuBar( void )
...
@@ -124,18 +124,7 @@ void WinEDA_GerberFrame::ReCreateMenuBar( void )
_
(
"Save application preferences"
),
save_setup_xpm
);
_
(
"Save application preferences"
),
save_setup_xpm
);
configmenu
->
AppendSeparator
();
configmenu
->
AppendSeparator
();
item
=
new
wxMenuItem
(
configmenu
,
ID_PREFERENCES_CREATE_CONFIG_HOTKEYS
,
AddHotheyConfigMenu
(
configmenu
);
_
(
"Create Pcbnew &Hotkey config file"
),
_
(
"Create or Recreate the hotkey config file from current hotkey list"
)
);
item
->
SetBitmap
(
save_setup_xpm
);
configmenu
->
Append
(
item
);
item
=
new
wxMenuItem
(
configmenu
,
ID_PREFERENCES_READ_CONFIG_HOTKEYS
,
_
(
"Reread &Pcbnew Hotkey config file"
),
_
(
"Reread the hotkey config file"
)
);
item
->
SetBitmap
(
reload_xpm
);
configmenu
->
Append
(
item
);
// Menu drill ( generation fichiers percage)
// Menu drill ( generation fichiers percage)
...
...
include/bitmaps.h
View file @
542b9441
...
@@ -21,6 +21,7 @@
...
@@ -21,6 +21,7 @@
#include "../bitmaps/Save_NetList.xpm"
#include "../bitmaps/Save_NetList.xpm"
#include "../bitmaps/Save_SetUp.xpm"
#include "../bitmaps/Save_SetUp.xpm"
#include "../bitmaps/Read_SetUp.xpm"
#include "../bitmaps/Read_SetUp.xpm"
#include "../bitmaps/Editor.xpm"
#include "../bitmaps/Open_Library.xpm"
#include "../bitmaps/Open_Library.xpm"
#include "../bitmaps/New_Library.xpm"
#include "../bitmaps/New_Library.xpm"
...
...
include/build_version.h
View file @
542b9441
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
COMMON_GLOBL
wxString
g_BuildVersion
COMMON_GLOBL
wxString
g_BuildVersion
#ifdef EDA_BASE
#ifdef EDA_BASE
(
wxT
(
"(2007-09-
06
)"
))
(
wxT
(
"(2007-09-
19
)"
))
#endif
#endif
;
;
...
...
include/hotkeys_basic.h
View file @
542b9441
...
@@ -15,15 +15,15 @@
...
@@ -15,15 +15,15 @@
#define DEFAULT_HOTKEY_FILENAME_EXT wxT( ".key" )
#define DEFAULT_HOTKEY_FILENAME_EXT wxT( ".key" )
/* define default path for config key file */
/* define default path for config key file */
#
ifdef __WINDOWS__
#
define DEFAULT_HOTKEY_FILENAME_PATH_IS_HOME wxGetHomeDir() + wxT( "/" )
#define DEFAULT_HOTKEY_FILENAME_PATH EDA_Appl->m_BinDir + wxT( "../template/" )
#define DEFAULT_HOTKEY_FILENAME_PATH
_IS_KICAD
EDA_Appl->m_BinDir + wxT( "../template/" )
#else
#define DEFAULT_HOTKEY_FILENAME_PATH wxGetHomeDir() + wxT( "/" )
/* keyword idetifier in kicad config use ti store/retrieve path option */
#
endif
#
define HOTKEY_CFG_PATH_OPT wxT("HotkeyPathOption")
/* Class to handle hotkey commnands. hotkeys have a default value
/* Class to handle hotkey commnands. hotkeys have a default value
* This class allows
(for the future..) the real key code changed by user(from a key code list file, TODO
)
* This class allows
the real key code changed by user(from a key code list file
)
*/
*/
class
Ki_HotkeyInfo
class
Ki_HotkeyInfo
{
{
...
@@ -36,22 +36,25 @@ public:
...
@@ -36,22 +36,25 @@ public:
Ki_HotkeyInfo
(
const
wxChar
*
infomsg
,
int
idcommand
,
int
keycode
);
Ki_HotkeyInfo
(
const
wxChar
*
infomsg
,
int
idcommand
,
int
keycode
);
};
};
/* handle a Section name and the corresponding list of hotkeys (Ki_HotkeyInfo list) */
/* handle a Section name and the corresponding list of hotkeys (Ki_HotkeyInfo list)
* hotkeys are grouped by section.
* a section is a list of hotkey infos ( a Ki_HotkeyInfo list).
* A full list of hoteys can used one or many sections
* for instance:
* the schematic editor uses a common section (zoom hotkeys list ..) and a specific section
* the library editor uses the same common section and a specific section
* this feature avoid duplications and made hotkey file config easier to understand ane edit
*/
struct
Ki_HotkeyInfoSectionDescriptor
struct
Ki_HotkeyInfoSectionDescriptor
{
{
public
:
public
:
wxString
*
m_SectionTag
;
// The section name
wxString
*
m_SectionTag
;
// The section name
Ki_HotkeyInfo
**
m_HK_InfoList
;
//
pointer on List of Ki_HotkeyInfo
Ki_HotkeyInfo
**
m_HK_InfoList
;
//
List of Ki_HotkeyInfo pointers
char
*
m_Comment
;
// comment: will be printed in the config file
char
*
m_Comment
;
// comment: will be printed in the config file
// Info usage only
/*
* public:
* Ki_HotkeyInfoSectionDescriptor( wxString * SectionTag, Ki_HotkeyInfo ** HK_InfoList )
* { m_SectionTag = SectionTag; m_HK_InfoList = HK_InfoList; }
*/
};
};
/* Identifiers (tags) in key code configuration file
file
/* Identifiers (tags) in key code configuration file
(or section names)
* .m_SectionTag member of a Ki_HotkeyInfoSectionDescriptor
* .m_SectionTag member of a Ki_HotkeyInfoSectionDescriptor
*/
*/
COMMON_GLOBL
wxString
g_CommonSectionTag
COMMON_GLOBL
wxString
g_CommonSectionTag
...
@@ -80,15 +83,22 @@ COMMON_GLOBL wxString g_ModuleEditSectionTag
...
@@ -80,15 +83,22 @@ COMMON_GLOBL wxString g_ModuleEditSectionTag
#endif
#endif
;
;
COMMON_GLOBL
int
g_ConfigFileLocationChoice
;
/* 0 = files are in Home directory (usefull under unix)
* 1 = kicad/template ( usefull only under windows )
* 2 ... = unused
*/
/* Functions:
/* Functions:
*/
*/
wxString
ReturnHotkeyConfigFilePath
(
int
choice
);
void
AddHotheyConfigMenu
(
wxMenu
*
menu
);
wxString
ReturnKeyNameFromKeyCode
(
int
keycode
);
wxString
ReturnKeyNameFromKeyCode
(
int
keycode
);
wxString
ReturnKeyNameFromCommandId
(
Ki_HotkeyInfo
**
List
,
int
CommandId
);
wxString
ReturnKeyNameFromCommandId
(
Ki_HotkeyInfo
**
List
,
int
CommandId
);
wxString
AddHotkeyName
(
const
wxString
&
text
,
Ki_HotkeyInfo
**
List
,
int
CommandId
);
wxString
AddHotkeyName
(
const
wxString
&
text
,
Ki_HotkeyInfo
**
List
,
int
CommandId
);
wxString
AddHotkeyName
(
const
wxString
&
text
,
wxString
AddHotkeyName
(
const
wxString
&
text
,
struct
Ki_HotkeyInfoSectionDescriptor
*
DescrList
,
struct
Ki_HotkeyInfoSectionDescriptor
*
DescrList
,
int
CommandId
);
int
CommandId
);
void
DisplayHotkeyList
(
WinEDA_DrawFrame
*
frame
,
void
DisplayHotkeyList
(
WinEDA_DrawFrame
*
frame
,
struct
Ki_HotkeyInfoSectionDescriptor
*
List
);
struct
Ki_HotkeyInfoSectionDescriptor
*
List
);
int
GetCommandCodeFromHotkey
(
int
key
,
Ki_HotkeyInfo
**
List
);
int
GetCommandCodeFromHotkey
(
int
key
,
Ki_HotkeyInfo
**
List
);
...
...
include/id.h
View file @
542b9441
...
@@ -63,15 +63,19 @@ enum main_id {
...
@@ -63,15 +63,19 @@ enum main_id {
ID_SAVE_ONE_SHEET
,
ID_SAVE_ONE_SHEET
,
ID_SAVE_ONE_SHEET_AS
,
ID_SAVE_ONE_SHEET_AS
,
ID_CONFIG_AND_PREFERENCES_START
,
ID_CONFIG_REQ
,
ID_CONFIG_REQ
,
ID_CONFIG_SAVE
,
ID_CONFIG_SAVE
,
ID_CONFIG_READ
,
ID_CONFIG_READ
,
ID_PREFERENCES_CREATE_CONFIG_HOTKEYS
,
ID_PREFERENCES_CREATE_CONFIG_HOTKEYS
,
ID_PREFERENCES_READ_CONFIG_HOTKEYS
,
ID_PREFERENCES_READ_CONFIG_HOTKEYS
,
ID_PREFERENCES_UNUSED0
,
ID_PREFERENCES_EDIT_CONFIG_HOTKEYS
,
ID_PREFERENCES_HOTKEY_PATH_IS_HOME
,
ID_PREFERENCES_HOTKEY_PATH_IS_KICAD
,
ID_PREFERENCES_UNUSED1
,
ID_PREFERENCES_UNUSED1
,
ID_PREFERENCES_UNUSED2
,
ID_PREFERENCES_UNUSED2
,
ID_PREFERENCES_UNUSED3
,
ID_PREFERENCES_UNUSED3
,
ID_CONFIG_AND_PREFERENCES_END
,
ID_GEN_PRINT
,
ID_GEN_PRINT
,
ID_GEN_PLOT
,
ID_GEN_PLOT
,
...
...
include/wxstruct.h
View file @
542b9441
...
@@ -1152,8 +1152,8 @@ public:
...
@@ -1152,8 +1152,8 @@ public:
private
:
private
:
void
PutDataInPreviousState
(
DrawPickedStruct
*
List
);
void
PutDataInPreviousState
(
DrawPickedStruct
*
List
);
void
GetSchematicFromRedoList
();
bool
GetSchematicFromRedoList
();
void
GetSchematicFromUndoList
();
bool
GetSchematicFromUndoList
();
public
:
public
:
...
@@ -1230,8 +1230,8 @@ public:
...
@@ -1230,8 +1230,8 @@ public:
void
SaveCopyInUndoList
(
EDA_BaseStruct
*
ItemToCopy
,
int
flag_type_command
=
0
);
void
SaveCopyInUndoList
(
EDA_BaseStruct
*
ItemToCopy
,
int
flag_type_command
=
0
);
private
:
private
:
void
GetComponentFromUndoList
();
bool
GetComponentFromUndoList
();
void
GetComponentFromRedoList
();
bool
GetComponentFromRedoList
();
// Edition des Pins:
// Edition des Pins:
void
CreatePin
(
wxDC
*
DC
);
void
CreatePin
(
wxDC
*
DC
);
...
...
internat/fr/kicad.mo
View file @
542b9441
No preview for this file type
internat/fr/kicad.po
View file @
542b9441
This diff is collapsed.
Click to expand it.
kicad/buildmnu.cpp
View file @
542b9441
...
@@ -23,7 +23,6 @@
...
@@ -23,7 +23,6 @@
#include "zip.xpm"
#include "zip.xpm"
#include "unzip.xpm"
#include "unzip.xpm"
#include "Browse_Files.xpm"
#include "Browse_Files.xpm"
#include "Editor.xpm"
#include "New_Project.xpm"
#include "New_Project.xpm"
#include "Open_Project.xpm"
#include "Open_Project.xpm"
#include "../bitmaps/icon_python.xpm"
#include "../bitmaps/icon_python.xpm"
...
...
pcbnew/controle.cpp
View file @
542b9441
...
@@ -2,11 +2,7 @@
...
@@ -2,11 +2,7 @@
/* Routines generales de gestion des commandes usuelles */
/* Routines generales de gestion des commandes usuelles */
/********************************************************/
/********************************************************/
/* fichier controle.cpp */
/* controle.cpp */
/*
* Routines d'affichage grille, Boite de coordonnees, Curseurs, marqueurs ...
*/
#include "fctsys.h"
#include "fctsys.h"
#include "gr_basic.h"
#include "gr_basic.h"
...
@@ -28,9 +24,9 @@
...
@@ -28,9 +24,9 @@
/* Variables Locales */
/* Variables Locales */
/**********************************/
/**********************************
******
/
void
RemoteCommand
(
const
char
*
cmdline
)
void
RemoteCommand
(
const
char
*
cmdline
)
/**********************************/
/**********************************
******
/
/* Read a remote command send by eeschema via a socket,
/* Read a remote command send by eeschema via a socket,
* port KICAD_PCB_PORT_SERVICE_NUMBER (currently 4242)
* port KICAD_PCB_PORT_SERVICE_NUMBER (currently 4242)
...
@@ -129,7 +125,7 @@ wxString BOARD_ITEM::MenuText( const BOARD* aPcb ) const
...
@@ -129,7 +125,7 @@ wxString BOARD_ITEM::MenuText( const BOARD* aPcb ) const
wxString
text
;
wxString
text
;
const
BOARD_ITEM
*
item
=
this
;
const
BOARD_ITEM
*
item
=
this
;
EQUIPOT
*
net
;
EQUIPOT
*
net
;
switch
(
item
->
Type
()
)
switch
(
item
->
Type
()
)
{
{
case
PCB_EQUIPOT_STRUCT_TYPE
:
case
PCB_EQUIPOT_STRUCT_TYPE
:
...
@@ -138,6 +134,7 @@ wxString BOARD_ITEM::MenuText( const BOARD* aPcb ) const
...
@@ -138,6 +134,7 @@ wxString BOARD_ITEM::MenuText( const BOARD* aPcb ) const
case
TYPEMODULE
:
case
TYPEMODULE
:
text
<<
_
(
"Footprint"
)
<<
wxT
(
" "
)
<<
((
MODULE
*
)
item
)
->
GetReference
();
text
<<
_
(
"Footprint"
)
<<
wxT
(
" "
)
<<
((
MODULE
*
)
item
)
->
GetReference
();
text
<<
wxT
(
" ("
)
<<
ReturnPcbLayerName
(
item
->
m_Layer
)
<<
wxT
(
")"
);
break
;
break
;
case
TYPEPAD
:
case
TYPEPAD
:
...
@@ -188,13 +185,13 @@ wxString BOARD_ITEM::MenuText( const BOARD* aPcb ) const
...
@@ -188,13 +185,13 @@ wxString BOARD_ITEM::MenuText( const BOARD* aPcb ) const
case
S_RECT
:
cp
=
_
(
"Rect"
);
break
;
case
S_RECT
:
cp
=
_
(
"Rect"
);
break
;
case
S_ARC
:
cp
=
_
(
"Arc"
);
break
;
case
S_ARC
:
cp
=
_
(
"Arc"
);
break
;
case
S_CIRCLE
:
cp
=
_
(
"Circle"
);
break
;
case
S_CIRCLE
:
cp
=
_
(
"Circle"
);
break
;
/* used
?
/* used
in Gerbview: */
case
S_ARC_RECT
:
cp
=
wxT
(
"arc_rect"
);
break
;
case
S_ARC_RECT
:
cp
=
wxT
(
"arc_rect"
);
break
;
case
S_SPOT_OVALE
:
cp
=
wxT
(
"spot_oval"
);
break
;
case
S_SPOT_OVALE
:
cp
=
wxT
(
"spot_oval"
);
break
;
case
S_SPOT_CIRCLE
:
cp
=
wxT
(
"spot_circle"
);
break
;
case
S_SPOT_CIRCLE
:
cp
=
wxT
(
"spot_circle"
);
break
;
case
S_SPOT_RECT
:
cp
=
wxT
(
"spot_rect"
);
break
;
case
S_SPOT_RECT
:
cp
=
wxT
(
"spot_rect"
);
break
;
case
S_POLYGON
:
cp
=
wxT
(
"polygon"
);
break
;
case
S_POLYGON
:
cp
=
wxT
(
"polygon"
);
break
;
*/
default
:
cp
=
wxT
(
"??EDGE??"
);
break
;
default
:
cp
=
wxT
(
"??EDGE??"
);
break
;
}
}
text
<<
*
cp
<<
_
(
" of "
)
text
<<
*
cp
<<
_
(
" of "
)
...
...
pcbnew/edit.cpp
View file @
542b9441
...
@@ -23,8 +23,7 @@ static void Process_Move_Item( WinEDA_PcbFrame* frame,
...
@@ -23,8 +23,7 @@ static void Process_Move_Item( WinEDA_PcbFrame* frame,
void
WinEDA_PcbFrame
::
OnLeftClick
(
wxDC
*
DC
,
const
wxPoint
&
MousePos
)
void
WinEDA_PcbFrame
::
OnLeftClick
(
wxDC
*
DC
,
const
wxPoint
&
MousePos
)
/********************************************************************/
/********************************************************************/
/* Traite les commandes declench�e par le bouton gauche de la souris,
/* Handle the left buttom mouse click, when a tool is active
* quand un outil est deja selectionn�
*/
*/
{
{
BOARD_ITEM
*
DrawStruct
=
GetCurItem
();
BOARD_ITEM
*
DrawStruct
=
GetCurItem
();
...
@@ -35,7 +34,7 @@ void WinEDA_PcbFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
...
@@ -35,7 +34,7 @@ void WinEDA_PcbFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
if
(
(
m_ID_current_state
==
0
)
||
(
DrawStruct
&&
DrawStruct
->
m_Flags
)
)
if
(
(
m_ID_current_state
==
0
)
||
(
DrawStruct
&&
DrawStruct
->
m_Flags
)
)
{
{
DrawPanel
->
m_AutoPAN_Request
=
FALSE
;
DrawPanel
->
m_AutoPAN_Request
=
FALSE
;
if
(
DrawStruct
&&
DrawStruct
->
m_Flags
)
//
Commande "POPUP" en cour
s
if
(
DrawStruct
&&
DrawStruct
->
m_Flags
)
//
"POPUP" in progres
s
{
{
switch
(
DrawStruct
->
Type
()
)
switch
(
DrawStruct
->
Type
()
)
{
{
...
...
pcbnew/hotkeys.cpp
View file @
542b9441
This diff is collapsed.
Click to expand it.
pcbnew/hotkeys.h
View file @
542b9441
...
@@ -20,6 +20,7 @@ enum hotkey_id_commnand {
...
@@ -20,6 +20,7 @@ enum hotkey_id_commnand {
HK_MOVE_FOOTPRINT
,
HK_MOVE_FOOTPRINT
,
HK_DRAG_FOOTPRINT
,
HK_DRAG_FOOTPRINT
,
HK_FLIP_FOOTPRINT
,
HK_FLIP_FOOTPRINT
,
HK_GET_AND_MOVE_FOOTPRINT
,
HK_LOCK_UNLOCK_FOOTPRINT
,
HK_LOCK_UNLOCK_FOOTPRINT
,
HK_ADD_VIA
,
HK_END_TRACK
,
HK_ADD_VIA
,
HK_END_TRACK
,
HK_SAVE_BOARD
,
HK_LOAD_BOARD
,
HK_SAVE_BOARD
,
HK_LOAD_BOARD
,
...
...
pcbnew/menubarpcb.cpp
View file @
542b9441
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
#include "bitmaps.h"
#include "bitmaps.h"
#include "protos.h"
#include "protos.h"
#include "hotkeys.h"
#include "id.h"
#include "id.h"
#include "Swap_Layer.xpm"
#include "Swap_Layer.xpm"
...
@@ -183,14 +184,7 @@ wxMenuBar * menuBar = GetMenuBar();
...
@@ -183,14 +184,7 @@ wxMenuBar * menuBar = GetMenuBar();
configmenu
->
Append
(
item
);
configmenu
->
Append
(
item
);
configmenu
->
AppendSeparator
();
configmenu
->
AppendSeparator
();
item
=
new
wxMenuItem
(
configmenu
,
ID_PREFERENCES_CREATE_CONFIG_HOTKEYS
,
_
(
"Create Pcbnew &Hotkey config file"
),
AddHotheyConfigMenu
(
configmenu
);
_
(
"Create or Recreate the hotkey config file from current hotkey list"
)
);
item
->
SetBitmap
(
save_setup_xpm
);
configmenu
->
Append
(
item
);
item
=
new
wxMenuItem
(
configmenu
,
ID_PREFERENCES_READ_CONFIG_HOTKEYS
,
_
(
"Reread &Pcbnew Hotkey config file"
),
_
(
"Reread the hotkey config file"
)
);
item
->
SetBitmap
(
reload_xpm
);
configmenu
->
Append
(
item
);
/////////////////////////////
/////////////////////////////
// Ajustage de dimensions: //
// Ajustage de dimensions: //
...
...
pcbnew/onrightclick.cpp
View file @
542b9441
...
@@ -59,17 +59,19 @@
...
@@ -59,17 +59,19 @@
static
wxMenu
*
Append_Track_Width_List
()
static
wxMenu
*
Append_Track_Width_List
()
/********************************************/
/********************************************/
/*
Ajoute au menu wxMenu * menu un sous-menu liste des epaisseurs de piste
s
/*
create a wxMenu * which shows the last used track widths and via diameter
s
*
disponibles
*
@return a pointeur to the menu
*/
*/
{
{
#define TRACK_HISTORY_NUMBER_MAX 6
#define VIA_HISTORY_NUMBER_MAX 4
int
ii
;
int
ii
;
wxString
msg
;
wxString
msg
;
wxMenu
*
trackwidth
;
wxMenu
*
trackwidth
_menu
;
double
value
;
double
value
;
trackwidth
=
new
wxMenu
;
trackwidth
_menu
=
new
wxMenu
;
for
(
ii
=
0
;
ii
<
6
;
ii
++
)
for
(
ii
=
0
;
(
ii
<
HIST0RY_NUMBER
)
&&
(
ii
<
TRACK_HISTORY_NUMBER_MAX
)
;
ii
++
)
{
{
if
(
g_DesignSettings
.
m_TrackWidhtHistory
[
ii
]
==
0
)
if
(
g_DesignSettings
.
m_TrackWidhtHistory
[
ii
]
==
0
)
break
;
break
;
...
@@ -81,13 +83,13 @@ static wxMenu* Append_Track_Width_List()
...
@@ -81,13 +83,13 @@ static wxMenu* Append_Track_Width_List()
else
else
msg
.
Printf
(
_
(
"Track %.3f"
),
value
);
msg
.
Printf
(
_
(
"Track %.3f"
),
value
);
trackwidth
->
Append
(
ID_POPUP_PCB_SELECT_WIDTH1
+
ii
,
msg
,
wxEmptyString
,
TRUE
);
trackwidth
_menu
->
Append
(
ID_POPUP_PCB_SELECT_WIDTH1
+
ii
,
msg
,
wxEmptyString
,
TRUE
);
if
(
g_DesignSettings
.
m_TrackWidhtHistory
[
ii
]
==
g_DesignSettings
.
m_CurrentTrackWidth
)
if
(
g_DesignSettings
.
m_TrackWidhtHistory
[
ii
]
==
g_DesignSettings
.
m_CurrentTrackWidth
)
trackwidth
->
Check
(
ID_POPUP_PCB_SELECT_WIDTH1
+
ii
,
TRUE
);
trackwidth
_menu
->
Check
(
ID_POPUP_PCB_SELECT_WIDTH1
+
ii
,
TRUE
);
}
}
trackwidth
->
AppendSeparator
();
trackwidth
_menu
->
AppendSeparator
();
for
(
ii
=
0
;
ii
<
4
;
ii
++
)
for
(
ii
=
0
;
(
ii
<
HIST0RY_NUMBER
)
&&
(
ii
<
VIA_HISTORY_NUMBER_MAX
)
;
ii
++
)
{
{
if
(
g_DesignSettings
.
m_ViaSizeHistory
[
ii
]
==
0
)
if
(
g_DesignSettings
.
m_ViaSizeHistory
[
ii
]
==
0
)
break
;
break
;
...
@@ -98,12 +100,12 @@ static wxMenu* Append_Track_Width_List()
...
@@ -98,12 +100,12 @@ static wxMenu* Append_Track_Width_List()
msg
.
Printf
(
_
(
"Via %.1f"
),
value
*
1000
);
msg
.
Printf
(
_
(
"Via %.1f"
),
value
*
1000
);
else
else
msg
.
Printf
(
_
(
"Via %.3f"
),
value
);
msg
.
Printf
(
_
(
"Via %.3f"
),
value
);
trackwidth
->
Append
(
ID_POPUP_PCB_SELECT_VIASIZE1
+
ii
,
msg
,
wxEmptyString
,
TRUE
);
trackwidth
_menu
->
Append
(
ID_POPUP_PCB_SELECT_VIASIZE1
+
ii
,
msg
,
wxEmptyString
,
TRUE
);
if
(
g_DesignSettings
.
m_ViaSizeHistory
[
ii
]
==
g_DesignSettings
.
m_CurrentViaSize
)
if
(
g_DesignSettings
.
m_ViaSizeHistory
[
ii
]
==
g_DesignSettings
.
m_CurrentViaSize
)
trackwidth
->
Check
(
ID_POPUP_PCB_SELECT_VIASIZE1
+
ii
,
TRUE
);
trackwidth
_menu
->
Check
(
ID_POPUP_PCB_SELECT_VIASIZE1
+
ii
,
TRUE
);
}
}
return
trackwidth
;
return
trackwidth
_menu
;
}
}
...
@@ -120,20 +122,7 @@ void WinEDA_PcbFrame::OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu )
...
@@ -120,20 +122,7 @@ void WinEDA_PcbFrame::OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu )
BOARD_ITEM
*
item
=
GetCurItem
();
BOARD_ITEM
*
item
=
GetCurItem
();
DrawPanel
->
CursorOff
(
&
dc
);
DrawPanel
->
CursorOff
(
&
dc
);
DrawPanel
->
m_CanStartBlock
=
-
1
;
// Ne pas engager un debut de bloc sur validation menu
DrawPanel
->
m_CanStartBlock
=
-
1
;
// Avoid to start a block coomand when clicking on menu
/* The user must now left click to first make the selection. OnRightClick()
is now only an action mechanism, not a selection mechanism. The selection
mechanism sometimes involves a popup menu, so it is too complex to try
and do that here.
// Only offer user a new selection if there is currently none.
if( item == NULL )
{
item = PcbGeneralLocateAndDisplay();
}
*/
// If command in progress: Put the Cancel command (if needed) and End command
// If command in progress: Put the Cancel command (if needed) and End command
if
(
m_ID_current_state
)
if
(
m_ID_current_state
)
...
@@ -171,6 +160,14 @@ void WinEDA_PcbFrame::OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu )
...
@@ -171,6 +160,14 @@ void WinEDA_PcbFrame::OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu )
return
;
return
;
}
}
/* Select a proper item */
if
(
(
item
==
NULL
)
||
(
item
->
m_Flags
==
0
)
)
{
item
=
PcbGeneralLocateAndDisplay
();
SetCurItem
(
item
);
}
item
=
GetCurItem
();
if
(
item
)
if
(
item
)
flags
=
item
->
m_Flags
;
flags
=
item
->
m_Flags
;
else
else
...
...
pcbnew/pcbcfg.cpp
View file @
542b9441
...
@@ -85,7 +85,7 @@ wxString FullFileName;
...
@@ -85,7 +85,7 @@ wxString FullFileName;
break
;
break
;
case
ID_PREFERENCES_CREATE_CONFIG_HOTKEYS
:
case
ID_PREFERENCES_CREATE_CONFIG_HOTKEYS
:
FullFileName
=
DEFAULT_HOTKEY_FILENAME_PATH
;
FullFileName
=
ReturnHotkeyConfigFilePath
(
g_ConfigFileLocationChoice
)
;
FullFileName
+=
HOTKEY_FILENAME
;
FullFileName
+=
HOTKEY_FILENAME
;
FullFileName
+=
DEFAULT_HOTKEY_FILENAME_EXT
;
FullFileName
+=
DEFAULT_HOTKEY_FILENAME_EXT
;
WriteHotkeyConfigFile
(
FullFileName
,
s_Pcbnew_Editor_Hokeys_Descr
,
true
);
WriteHotkeyConfigFile
(
FullFileName
,
s_Pcbnew_Editor_Hokeys_Descr
,
true
);
...
@@ -95,6 +95,27 @@ wxString FullFileName;
...
@@ -95,6 +95,27 @@ wxString FullFileName;
Read_Hotkey_Config
(
this
,
true
);
Read_Hotkey_Config
(
this
,
true
);
break
;
break
;
case
ID_PREFERENCES_EDIT_CONFIG_HOTKEYS
:
{
FullFileName
=
ReturnHotkeyConfigFilePath
(
g_ConfigFileLocationChoice
);
FullFileName
+=
HOTKEY_FILENAME
;
FullFileName
+=
DEFAULT_HOTKEY_FILENAME_EXT
;
wxString
editorname
=
GetEditorName
();
if
(
!
editorname
.
IsEmpty
()
)
ExecuteFile
(
this
,
editorname
,
FullFileName
);
break
;
}
case
ID_PREFERENCES_HOTKEY_PATH_IS_HOME
:
g_ConfigFileLocationChoice
=
0
;
m_Parent
->
m_EDA_CommonConfig
->
Write
(
HOTKEY_CFG_PATH_OPT
,
g_ConfigFileLocationChoice
);
break
;
case
ID_PREFERENCES_HOTKEY_PATH_IS_KICAD
:
g_ConfigFileLocationChoice
=
1
;
m_Parent
->
m_EDA_CommonConfig
->
Write
(
HOTKEY_CFG_PATH_OPT
,
g_ConfigFileLocationChoice
);
break
;
default
:
default
:
DisplayError
(
this
,
wxT
(
"WinEDA_PcbFrame::Process_Config internal error"
));
DisplayError
(
this
,
wxT
(
"WinEDA_PcbFrame::Process_Config internal error"
));
}
}
...
@@ -108,7 +129,7 @@ bool Read_Hotkey_Config( WinEDA_DrawFrame * frame, bool verbose )
...
@@ -108,7 +129,7 @@ bool Read_Hotkey_Config( WinEDA_DrawFrame * frame, bool verbose )
* Read the hotkey files config for pcbnew and module_edit
* Read the hotkey files config for pcbnew and module_edit
*/
*/
{
{
wxString
FullFileName
=
DEFAULT_HOTKEY_FILENAME_PATH
;
wxString
FullFileName
=
ReturnHotkeyConfigFilePath
(
g_ConfigFileLocationChoice
)
;
FullFileName
+=
HOTKEY_FILENAME
;
FullFileName
+=
HOTKEY_FILENAME
;
FullFileName
+=
DEFAULT_HOTKEY_FILENAME_EXT
;
FullFileName
+=
DEFAULT_HOTKEY_FILENAME_EXT
;
return
frame
->
ReadHotkeyConfigFile
(
FullFileName
,
s_Pcbnew_Editor_Hokeys_Descr
,
verbose
);
return
frame
->
ReadHotkeyConfigFile
(
FullFileName
,
s_Pcbnew_Editor_Hokeys_Descr
,
verbose
);
...
...
pcbnew/pcbframe.cpp
View file @
542b9441
...
@@ -64,11 +64,9 @@ BEGIN_EVENT_TABLE( WinEDA_PcbFrame, WinEDA_BasePcbFrame )
...
@@ -64,11 +64,9 @@ BEGIN_EVENT_TABLE( WinEDA_PcbFrame, WinEDA_BasePcbFrame )
EVT_MENU
(
ID_EXIT
,
WinEDA_PcbFrame
::
Process_Special_Functions
)
EVT_MENU
(
ID_EXIT
,
WinEDA_PcbFrame
::
Process_Special_Functions
)
// menu Config
// menu Config
EVT_MENU
(
ID_CONFIG_REQ
,
WinEDA_PcbFrame
::
Process_Config
)
EVT_MENU_RANGE
(
ID_CONFIG_AND_PREFERENCES_START
,
ID_CONFIG_AND_PREFERENCES_END
,
EVT_MENU
(
ID_COLORS_SETUP
,
WinEDA_PcbFrame
::
Process_Config
)
WinEDA_PcbFrame
::
Process_Config
)
EVT_MENU
(
ID_OPTIONS_SETUP
,
WinEDA_PcbFrame
::
Process_Config
)
EVT_MENU
(
ID_PREFERENCES_CREATE_CONFIG_HOTKEYS
,
WinEDA_PcbFrame
::
Process_Config
)
EVT_MENU
(
ID_PREFERENCES_READ_CONFIG_HOTKEYS
,
WinEDA_PcbFrame
::
Process_Config
)
EVT_MENU
(
ID_PCB_TRACK_SIZE_SETUP
,
WinEDA_PcbFrame
::
Process_Config
)
EVT_MENU
(
ID_PCB_TRACK_SIZE_SETUP
,
WinEDA_PcbFrame
::
Process_Config
)
EVT_MENU
(
ID_PCB_DRAWINGS_WIDTHS_SETUP
,
WinEDA_PcbFrame
::
Process_Config
)
EVT_MENU
(
ID_PCB_DRAWINGS_WIDTHS_SETUP
,
WinEDA_PcbFrame
::
Process_Config
)
EVT_MENU
(
ID_PCB_PAD_SETUP
,
WinEDA_PcbFrame
::
Process_Config
)
EVT_MENU
(
ID_PCB_PAD_SETUP
,
WinEDA_PcbFrame
::
Process_Config
)
...
...
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