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
94372b81
Commit
94372b81
authored
May 16, 2011
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Eeschema: fix bug 783535. Minor code cleaning.
Pcbnew: fix very minor issue.
parent
a367dea4
Changes
11
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
323 additions
and
405 deletions
+323
-405
basicframe.cpp
common/basicframe.cpp
+3
-14
hotkeys_basic.cpp
common/hotkeys_basic.cpp
+12
-19
edit_label.cpp
eeschema/edit_label.cpp
+3
-2
libeditframe.cpp
eeschema/libeditframe.cpp
+1
-0
menubar.cpp
eeschema/menubar.cpp
+180
-221
menubar_libedit.cpp
eeschema/menubar_libedit.cpp
+117
-146
operations_on_items_lists.cpp
eeschema/operations_on_items_lists.cpp
+2
-0
schedit.cpp
eeschema/schedit.cpp
+1
-0
schframe.cpp
eeschema/schframe.cpp
+1
-1
files.cpp
pcbnew/files.cpp
+1
-1
pcbnew.cpp
pcbnew/pcbnew.cpp
+2
-1
No files found.
common/basicframe.cpp
View file @
94372b81
...
@@ -339,22 +339,11 @@ void EDA_BASE_FRAME::AddHelpVersionInfoMenuEntry( wxMenu* aMenu )
...
@@ -339,22 +339,11 @@ void EDA_BASE_FRAME::AddHelpVersionInfoMenuEntry( wxMenu* aMenu )
{
{
wxASSERT
(
aMenu
!=
NULL
);
wxASSERT
(
aMenu
!=
NULL
);
wxMenuItem
*
item
=
NULL
;
// Copy version string to clipboard for bug report purposes.
// Copy version string to clipboard for bug report purposes.
item
=
new
wxMenuItem
(
aMenu
,
ID_HELP_COPY_VERSION_STRING
,
ADD_MENUITEM_WITH_HELP
(
aMenu
,
ID_HELP_COPY_VERSION_STRING
,
_
(
"Copy &Version Information"
),
_
(
"Copy &Version Information"
),
_
(
"Copy the version string to clipboard to send with bug reports"
)
);
_
(
"Copy the version string to clipboard to send with bug reports"
),
copy_button
);
// For some reason images are not always added to the OSX menu items. Anyone want
// to clarify as to why this is the case? Putting this information in some formal
// developer notes would be helpful. A good place to put this information would be
// ./documentation/guidelines/UIpolicies.txt.
#if !defined( __WXMAC__ )
item
->
SetBitmap
(
copy_button
);
#endif
aMenu
->
Append
(
item
);
}
}
...
...
common/hotkeys_basic.cpp
View file @
94372b81
...
@@ -632,41 +632,34 @@ void AddHotkeyConfigMenu( wxMenu* aMenu )
...
@@ -632,41 +632,34 @@ void AddHotkeyConfigMenu( wxMenu* aMenu )
if
(
aMenu
==
NULL
)
if
(
aMenu
==
NULL
)
return
;
return
;
wxMenuItem
*
item
;
wxMenu
*
HotkeySubmenu
=
new
wxMenu
();
wxMenu
*
HotkeySubmenu
=
new
wxMenu
();
/* List existing hotkey menu*/
/* List existing hotkey menu*/
item
=
new
wxMenuItem
(
HotkeySubmenu
,
ADD_MENUITEM_WITH_HELP
(
HotkeySubmenu
,
ID_PREFERENCES_HOTKEY_SHOW_CURRENT_LIST
,
ID_PREFERENCES_HOTKEY_SHOW_CURRENT_LIST
,
_
(
"List Current Keys"
),
_
(
"List Current Keys"
),
_
(
"Displays the current hotkeys list and corresponding commands"
)
);
_
(
"Displays the current hotkeys list and corresponding commands"
),
item
->
SetBitmap
(
info_xpm
);
info_xpm
);
HotkeySubmenu
->
Append
(
item
);
/* Call hotkeys editor*/
/* Call hotkeys editor*/
item
=
new
wxMenuItem
(
HotkeySubmenu
,
ID_PREFERENCES_HOTKEY_SHOW_EDITOR
,
ADD_MENUITEM_WITH_HELP
(
HotkeySubmenu
,
ID_PREFERENCES_HOTKEY_SHOW_EDITOR
,
_
(
"Edit Hotkeys"
),
_
(
"Edit Hotkeys"
),
_
(
"Call the hotkeys editor"
)
);
_
(
"Call the hotkeys editor"
),
item
->
SetBitmap
(
editor_xpm
);
editor_xpm
);
HotkeySubmenu
->
Append
(
item
);
HotkeySubmenu
->
AppendSeparator
();
HotkeySubmenu
->
AppendSeparator
();
/* create hotkey file to export current hotkeys config */
/* create hotkey file to export current hotkeys config */
item
=
new
wxMenuItem
(
HotkeySubmenu
,
ID_PREFERENCES_HOTKEY_EXPORT_CONFIG
,
ADD_MENUITEM_WITH_HELP
(
HotkeySubmenu
,
ID_PREFERENCES_HOTKEY_EXPORT_CONFIG
,
_
(
"Export Hotkeys Config"
),
_
(
"Export Hotkeys Config"
),
_
(
_
(
"Create a hotkey configuration file to export the current hotkey config"
),
"Create a hotkey configuration file to export the current hotkey config"
)
save_setup_xpm
);
);
item
->
SetBitmap
(
save_setup_xpm
);
HotkeySubmenu
->
Append
(
item
);
/* Reload hotkey file */
/* Reload hotkey file */
item
=
new
wxMenuItem
(
HotkeySubmenu
,
ID_PREFERENCES_HOTKEY_IMPORT_CONFIG
,
ADD_MENUITEM_WITH_HELP
(
HotkeySubmenu
,
ID_PREFERENCES_HOTKEY_IMPORT_CONFIG
,
_
(
"Import Hotkeys Config"
),
_
(
"Import Hotkeys Config"
),
_
(
"Load an existing hotkey configuration file"
)
);
_
(
"Load an existing hotkey configuration file"
),
item
->
SetBitmap
(
reload_xpm
);
reload_xpm
);
HotkeySubmenu
->
Append
(
item
);
/* Append HotkeySubmenu to menu */
/* Append HotkeySubmenu to menu */
ADD_MENUITEM_WITH_HELP_AND_SUBMENU
(
aMenu
,
HotkeySubmenu
,
ADD_MENUITEM_WITH_HELP_AND_SUBMENU
(
aMenu
,
HotkeySubmenu
,
...
...
eeschema/edit_label.cpp
View file @
94372b81
...
@@ -60,7 +60,8 @@ static void abortMoveText( EDA_DRAW_PANEL* aPanel, wxDC* aDC )
...
@@ -60,7 +60,8 @@ static void abortMoveText( EDA_DRAW_PANEL* aPanel, wxDC* aDC )
if
(
item
->
IsNew
()
)
if
(
item
->
IsNew
()
)
{
{
SAFE_DELETE
(
item
);
delete
item
;
item
=
NULL
;
}
}
else
// Move command on an existing text item, restore the copy of the original.
else
// Move command on an existing text item, restore the copy of the original.
{
{
...
@@ -77,7 +78,7 @@ static void abortMoveText( EDA_DRAW_PANEL* aPanel, wxDC* aDC )
...
@@ -77,7 +78,7 @@ static void abortMoveText( EDA_DRAW_PANEL* aPanel, wxDC* aDC )
item
->
ClearFlags
();
item
->
ClearFlags
();
}
}
screen
->
SetCurItem
(
NULL
);
screen
->
SetCurItem
(
item
);
}
}
...
...
eeschema/libeditframe.cpp
View file @
94372b81
...
@@ -115,6 +115,7 @@ BEGIN_EVENT_TABLE( LIB_EDIT_FRAME, EDA_DRAW_FRAME )
...
@@ -115,6 +115,7 @@ BEGIN_EVENT_TABLE( LIB_EDIT_FRAME, EDA_DRAW_FRAME )
EVT_MENU
(
ID_LIBEDIT_GEN_PNG_FILE
,
LIB_EDIT_FRAME
::
OnPlotCurrentComponent
)
EVT_MENU
(
ID_LIBEDIT_GEN_PNG_FILE
,
LIB_EDIT_FRAME
::
OnPlotCurrentComponent
)
EVT_MENU
(
ID_LIBEDIT_GEN_SVG_FILE
,
LIB_EDIT_FRAME
::
OnPlotCurrentComponent
)
EVT_MENU
(
ID_LIBEDIT_GEN_SVG_FILE
,
LIB_EDIT_FRAME
::
OnPlotCurrentComponent
)
EVT_MENU
(
wxID_HELP
,
EDA_DRAW_FRAME
::
GetKicadHelp
)
EVT_MENU
(
wxID_HELP
,
EDA_DRAW_FRAME
::
GetKicadHelp
)
EVT_MENU
(
wxID_ABOUT
,
EDA_BASE_FRAME
::
GetKicadAbout
)
EVT_MENU
(
ID_COLORS_SETUP
,
LIB_EDIT_FRAME
::
OnColorConfig
)
EVT_MENU
(
ID_COLORS_SETUP
,
LIB_EDIT_FRAME
::
OnColorConfig
)
EVT_MENU
(
ID_CONFIG_REQ
,
LIB_EDIT_FRAME
::
InstallConfigFrame
)
EVT_MENU
(
ID_CONFIG_REQ
,
LIB_EDIT_FRAME
::
InstallConfigFrame
)
...
...
eeschema/menubar.cpp
View file @
94372b81
This diff is collapsed.
Click to expand it.
eeschema/menubar_libedit.cpp
View file @
94372b81
This diff is collapsed.
Click to expand it.
eeschema/operations_on_items_lists.cpp
View file @
94372b81
...
@@ -144,6 +144,8 @@ void DeleteItemsInList( EDA_DRAW_PANEL* panel, PICKED_ITEMS_LIST& aItemsList )
...
@@ -144,6 +144,8 @@ void DeleteItemsInList( EDA_DRAW_PANEL* panel, PICKED_ITEMS_LIST& aItemsList )
void
SCH_EDIT_FRAME
::
DeleteItem
(
SCH_ITEM
*
aItem
)
void
SCH_EDIT_FRAME
::
DeleteItem
(
SCH_ITEM
*
aItem
)
{
{
wxCHECK_RET
(
aItem
!=
NULL
,
wxT
(
"Cannot delete invalid item."
)
);
wxCHECK_RET
(
aItem
!=
NULL
,
wxT
(
"Cannot delete invalid item."
)
);
if
(
aItem
==
NULL
)
return
;
SCH_SCREEN
*
screen
=
GetScreen
();
SCH_SCREEN
*
screen
=
GetScreen
();
...
...
eeschema/schedit.cpp
View file @
94372b81
...
@@ -103,6 +103,7 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
...
@@ -103,6 +103,7 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
}
}
INSTALL_UNBUFFERED_DC
(
dc
,
DrawPanel
);
INSTALL_UNBUFFERED_DC
(
dc
,
DrawPanel
);
item
=
screen
->
GetCurItem
();
// Can be modified by previous calls.
switch
(
id
)
switch
(
id
)
{
{
...
...
eeschema/schframe.cpp
View file @
94372b81
...
@@ -101,7 +101,7 @@ BEGIN_EVENT_TABLE( SCH_EDIT_FRAME, EDA_DRAW_FRAME )
...
@@ -101,7 +101,7 @@ BEGIN_EVENT_TABLE( SCH_EDIT_FRAME, EDA_DRAW_FRAME )
EVT_TOOL
(
ID_POPUP_SCH_MOVE_ITEM
,
SCH_EDIT_FRAME
::
OnMoveItem
)
EVT_TOOL
(
ID_POPUP_SCH_MOVE_ITEM
,
SCH_EDIT_FRAME
::
OnMoveItem
)
EVT_MENU
(
wxID_HELP
,
EDA_DRAW_FRAME
::
GetKicadHelp
)
EVT_MENU
(
wxID_HELP
,
EDA_DRAW_FRAME
::
GetKicadHelp
)
EVT_MENU
(
wxID_ABOUT
,
EDA_
DRAW
_FRAME
::
GetKicadAbout
)
EVT_MENU
(
wxID_ABOUT
,
EDA_
BASE
_FRAME
::
GetKicadAbout
)
// Tools and buttons for vertical toolbar.
// Tools and buttons for vertical toolbar.
EVT_TOOL
(
ID_CANCEL_CURRENT_COMMAND
,
SCH_EDIT_FRAME
::
OnCancelCurrentCommand
)
EVT_TOOL
(
ID_CANCEL_CURRENT_COMMAND
,
SCH_EDIT_FRAME
::
OnCancelCurrentCommand
)
...
...
pcbnew/files.cpp
View file @
94372b81
...
@@ -328,7 +328,7 @@ bool PCB_EDIT_FRAME::SavePcbFile( const wxString& FileName )
...
@@ -328,7 +328,7 @@ bool PCB_EDIT_FRAME::SavePcbFile( const wxString& FileName )
GetScreen
()
->
GetFileName
(),
PcbFileWildcard
,
GetScreen
()
->
GetFileName
(),
PcbFileWildcard
,
wxFD_SAVE
|
wxFD_OVERWRITE_PROMPT
);
wxFD_SAVE
|
wxFD_OVERWRITE_PROMPT
);
if
(
dlg
.
ShowModal
()
==
wxID_CANCEL
)
if
(
dlg
.
ShowModal
()
!=
wxID_OK
)
return
false
;
return
false
;
GetScreen
()
->
SetFileName
(
dlg
.
GetPath
()
);
GetScreen
()
->
SetFileName
(
dlg
.
GetPath
()
);
...
...
pcbnew/pcbnew.cpp
View file @
94372b81
...
@@ -156,7 +156,8 @@ Changing extension to .brd." ), GetChars( fn.GetFullPath() ) );
...
@@ -156,7 +156,8 @@ Changing extension to .brd." ), GetChars( fn.GetFullPath() ) );
frame
->
GetScreen
()
->
SetFileName
(
fn
.
GetFullPath
(
wxPATH_UNIX
)
);
frame
->
GetScreen
()
->
SetFileName
(
fn
.
GetFullPath
(
wxPATH_UNIX
)
);
frame
->
SetTitle
(
frame
->
GetScreen
()
->
GetFileName
()
);
frame
->
SetTitle
(
frame
->
GetScreen
()
->
GetFileName
()
);
frame
->
UpdateFileHistory
(
frame
->
GetScreen
()
->
GetFileName
()
);
frame
->
UpdateFileHistory
(
frame
->
GetScreen
()
->
GetFileName
()
);
frame
->
OnModify
();
// Ready to save the new empty board
frame
->
OnModify
();
// Ready to save the new empty board
g_SaveTime
=
time
(
NULL
);
// Init the time out to save the board
wxString
msg
;
wxString
msg
;
msg
.
Printf
(
_
(
"File <%s> does not exist.
\n
This is normal for a new project"
),
msg
.
Printf
(
_
(
"File <%s> does not exist.
\n
This is normal for a new project"
),
...
...
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