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
cd81e546
Commit
cd81e546
authored
Sep 14, 2007
by
dickelbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Using MenuText() in onrightclick.cpp
parent
a98b11af
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
31 deletions
+9
-31
change_log.txt
change_log.txt
+1
-0
onrightclick.cpp
pcbnew/onrightclick.cpp
+7
-30
todo.txt
todo.txt
+1
-1
No files found.
change_log.txt
View file @
cd81e546
...
@@ -10,6 +10,7 @@ email address.
...
@@ -10,6 +10,7 @@ email address.
+ pcbnew
+ pcbnew
* controle.cpp, added Function AllAreModulesAndReturnSmallestIfSo() which is
* controle.cpp, added Function AllAreModulesAndReturnSmallestIfSo() which is
called from PcbGeneralLocateAndDisplay()
called from PcbGeneralLocateAndDisplay()
* onrightclick.cpp changed to calls to BOARD_ITEM::MenuText()
2007-Sep-13 UPDATE Dick Hollenbeck <dick@softplc.com>
2007-Sep-13 UPDATE Dick Hollenbeck <dick@softplc.com>
...
...
pcbnew/onrightclick.cpp
View file @
cd81e546
...
@@ -630,11 +630,9 @@ void CreatePopUpMenuForFootprints( MODULE* aModule, wxMenu* menu, bool full_menu
...
@@ -630,11 +630,9 @@ void CreatePopUpMenuForFootprints( MODULE* aModule, wxMenu* menu, bool full_menu
*/
*/
{
{
wxMenu
*
sub_menu_footprint
;
wxMenu
*
sub_menu_footprint
;
wxString
msg
;
int
flags
=
aModule
->
m_Flags
;
int
flags
=
aModule
->
m_Flags
;
msg
=
_
(
"Footprint"
);
wxString
msg
=
aModule
->
MenuText
();
msg
<<
wxT
(
" "
)
<<
aModule
->
GetReference
();
sub_menu_footprint
=
new
wxMenu
;
sub_menu_footprint
=
new
wxMenu
;
...
@@ -672,27 +670,12 @@ void CreatePopUpMenuForFpTexts( TEXTE_MODULE* FpText, wxMenu* menu )
...
@@ -672,27 +670,12 @@ void CreatePopUpMenuForFpTexts( TEXTE_MODULE* FpText, wxMenu* menu )
*/
*/
{
{
wxMenu
*
sub_menu_Fp_text
;
wxMenu
*
sub_menu_Fp_text
;
wxString
msg
;
int
flags
=
FpText
->
m_Flags
;
int
flags
=
FpText
->
m_Flags
;
switch
(
FpText
->
m_Type
)
wxString
msg
=
FpText
->
MenuText
();
{
case
TEXT_is_REFERENCE
:
msg
=
_
(
"Footprint ref"
);
break
;
case
TEXT_is_VALUE
:
msg
=
_
(
"Footprint value"
);
break
;
default
:
msg
=
_
(
"Footprint text"
);
break
;
}
msg
<<
wxT
(
" "
)
<<
FpText
->
m_Text
;
sub_menu_Fp_text
=
new
wxMenu
;
sub_menu_Fp_text
=
new
wxMenu
;
ADD_MENUITEM_WITH_SUBMENU
(
menu
,
sub_menu_Fp_text
,
-
1
,
msg
,
footprint_text_xpm
);
ADD_MENUITEM_WITH_SUBMENU
(
menu
,
sub_menu_Fp_text
,
-
1
,
msg
,
footprint_text_xpm
);
if
(
!
flags
)
if
(
!
flags
)
...
@@ -716,11 +699,9 @@ void CreatePopUpMenuForPads( D_PAD* Pad, wxMenu* menu )
...
@@ -716,11 +699,9 @@ void CreatePopUpMenuForPads( D_PAD* Pad, wxMenu* menu )
/* Create pop menu for pads */
/* Create pop menu for pads */
{
{
wxMenu
*
sub_menu_Pad
;
wxMenu
*
sub_menu_Pad
;
wxString
msg
;
int
flags
=
Pad
->
m_Flags
;
int
flags
=
Pad
->
m_Flags
;
msg
=
_
(
"Pad"
);
wxString
msg
=
Pad
->
MenuText
();
msg
<<
wxT
(
" "
)
<<
Pad
->
ReturnStringPadName
();
sub_menu_Pad
=
new
wxMenu
;
sub_menu_Pad
=
new
wxMenu
;
ADD_MENUITEM_WITH_SUBMENU
(
menu
,
sub_menu_Pad
,
-
1
,
msg
,
pad_xpm
);
ADD_MENUITEM_WITH_SUBMENU
(
menu
,
sub_menu_Pad
,
-
1
,
msg
,
pad_xpm
);
...
@@ -757,16 +738,12 @@ void CreatePopUpMenuForTexts( TEXTE_PCB* Text, wxMenu* menu )
...
@@ -757,16 +738,12 @@ void CreatePopUpMenuForTexts( TEXTE_PCB* Text, wxMenu* menu )
/* Create pop menu for pcb texts */
/* Create pop menu for pcb texts */
{
{
wxMenu
*
sub_menu_Text
;
wxMenu
*
sub_menu_Text
;
wxString
msg
;
int
flags
=
Text
->
m_Flags
;
int
flags
=
Text
->
m_Flags
;
msg
=
_
(
"Pcb Text"
);
msg
<<
wxT
(
" "
);
wxString
msg
=
Text
->
MenuText
();
if
(
Text
->
m_Text
.
Len
()
<
8
)
msg
<<
Text
->
m_Text
;
else
msg
+=
Text
->
m_Text
.
Left
(
5
)
+
wxT
(
".."
);
sub_menu_Text
=
new
wxMenu
;
sub_menu_Text
=
new
wxMenu
;
ADD_MENUITEM_WITH_SUBMENU
(
menu
,
sub_menu_Text
,
-
1
,
msg
,
add_text_xpm
);
ADD_MENUITEM_WITH_SUBMENU
(
menu
,
sub_menu_Text
,
-
1
,
msg
,
add_text_xpm
);
if
(
!
flags
)
if
(
!
flags
)
...
...
todo.txt
View file @
cd81e546
...
@@ -19,7 +19,7 @@ referenced. I think this would be an easier way to manage xpms.
...
@@ -19,7 +19,7 @@ referenced. I think this would be an easier way to manage xpms.
*** @todo: grep for @todo and finish off those tasks, scattered throughout the source.
*** @todo: grep for @todo and finish off those tasks, scattered throughout the source.
*** use BOARD_ITEM::Menu
Text() and Menu
Icon() in the onrightclick.cpp
*** use BOARD_ITEM::MenuIcon() in the onrightclick.cpp
*** make the ADD_MENUITEM macros in include/macros.h be static inline functions instead
*** make the ADD_MENUITEM macros in include/macros.h be static inline functions instead
...
...
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