Merge lp:~mangelajo/kicad/highcontrast-hotkey into lp:kicad/product

Proposed by Miguel Angel Ajo
Status: Merged
Merge reported by: Dick Hollenbeck
Merged at revision: not available
Proposed branch: lp:~mangelajo/kicad/highcontrast-hotkey
Merge into: lp:kicad/product
Diff against target: 50 lines (+9/-2)
3 files modified
pcbnew/hotkeys.cpp (+3/-1)
pcbnew/hotkeys.h (+2/-1)
pcbnew/hotkeys_board_editor.cpp (+4/-0)
To merge this branch: bzr merge lp:~mangelajo/kicad/highcontrast-hotkey
Reviewer Review Type Date Requested Status
Dick Hollenbeck (community) Approve
Review via email: mp+93742@code.launchpad.net

Commit message

High contrast mode hotkey.

Description of the change

Hotkey for high contrast mode

To post a comment you must log in.
3421. By Miguel Angel Ajo

Gray out edge in modules in High contrast mode

Revision history for this message
Dick Hollenbeck (dickelbeck) wrote :

Looks good enough to commit to me.

Sad we did not use the word "Toggle" and "Switch" in these variable names and descriptions, since they have slightly different meanings.

Also, there was an indentation offset in front of a break statement.

review: Approve
Revision history for this message
Miguel Angel Ajo (mangelajo) wrote :

Thanks a lot for the review/merge.

I'm not used yet to the bazaar workflow, but, if I fix such things in my
branch, then the new changes
could be merged into "trunk" ? In that case I'll fix my little
contribution, it's something easy to do.
Toggle would be more appropriate in this context, right?

I'm used to write a lot in English, but it's not my mother tongue, which
should be quite easily noticeable :-)

Greetings,
Miguel

PS: good work with the refactoring you've been doing lately. :-)

2012/2/20 <email address hidden>

> The proposal to merge lp:~miguelangel-r/kicad/highcontrast-hotkey into
> lp:kicad has been updated.
>
> Status: Needs review => Merged
>
> For more details, see:
>
> https://code.launchpad.net/~miguelangel-r/kicad/highcontrast-hotkey/+merge/93742<https://code.launchpad.net/%7Emiguelangel-r/kicad/highcontrast-hotkey/+merge/93742>
> --
>
> https://code.launchpad.net/~miguelangel-r/kicad/highcontrast-hotkey/+merge/93742<https://code.launchpad.net/%7Emiguelangel-r/kicad/highcontrast-hotkey/+merge/93742>
> You are the owner of lp:~miguelangel-r/kicad/highcontrast-hotkey.
>

--

Miguel Angel Ajo Pelayo
http://www.nbee.es
+34 636 52 25 69
skype: ajoajoajo

Revision history for this message
Dick Hollenbeck (dickelbeck) wrote :

> Greetings,
> Miguel

> Thanks a lot for the review/merge.
>
> I'm not used yet to the bazaar workflow, but, if I fix such things in my
> branch, then the new changes
> could be merged into "trunk" ? In that case I'll fix my little
> contribution, it's something easy to do.

We always reserve the right to make our contributions better, right? :)

After your changes have been committed, it is probably best to branch from testing again
for the next round of changes.

> Toggle would be more appropriate in this context, right?

Indeed, but it is not important relative to other things, and it is not the lone hotkey
suffering from this.
I would not bother with it, but thats up to you.

> I'm used to write a lot in English, but it's not my mother tongue, which
> should be quite easily noticeable :-)
>
>
> Greetings,
> Miguel
>
> PS: good work with the refactoring you've been doing lately. :-)

Yes thanks, many lines of code for only three weekend days of work.
Even now, no-one is screaming. Maybe the changes actually work.

JEdit under my fingers is a fairly big hammer.

With the addition of my personal roadmap/TODO list in TODO.txt, folks can see that there
is some reason to the journey, even if it looks like I am merely picking up litter along
the roadside, randomly.

Dick

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'pcbnew/hotkeys.cpp'
2--- pcbnew/hotkeys.cpp 2012-02-09 20:33:38 +0000
3+++ pcbnew/hotkeys.cpp 2012-02-19 21:34:18 +0000
4@@ -78,7 +78,8 @@
5 static EDA_HOTKEY HkDelete( wxT( "Delete Track or Footprint" ), HK_DELETE, WXK_DELETE );
6 static EDA_HOTKEY HkResetLocalCoord( wxT( "Reset Local Coordinates" ),
7 HK_RESET_LOCAL_COORD, ' ' );
8-
9+static EDA_HOTKEY HkSwitchHighContrastMode( wxT("Switch Highcontrast mode"),
10+ HK_SWITCH_HIGHCONTRAST_MODE,'H');
11 /* Fit on Screen */
12 #if !defined( __WXMAC__ )
13 static EDA_HOTKEY HkZoomAuto( wxT( "Zoom Auto" ), HK_ZOOM_AUTO, WXK_HOME );
14@@ -224,6 +225,7 @@
15 &HkRecordMacros4, &HkCallMacros4, &HkRecordMacros5, &HkCallMacros5,
16 &HkRecordMacros6, &HkCallMacros6, &HkRecordMacros7, &HkCallMacros7,
17 &HkRecordMacros8, &HkCallMacros8, &HkRecordMacros9, &HkCallMacros9,
18+ &HkSwitchHighContrastMode,
19 NULL
20 };
21
22
23=== modified file 'pcbnew/hotkeys.h'
24--- pcbnew/hotkeys.h 2012-02-09 20:33:38 +0000
25+++ pcbnew/hotkeys.h 2012-02-19 21:34:18 +0000
26@@ -76,7 +76,8 @@
27 HK_RECORD_MACROS_8,
28 HK_CALL_MACROS_8,
29 HK_RECORD_MACROS_9,
30- HK_CALL_MACROS_9
31+ HK_CALL_MACROS_9,
32+ HK_SWITCH_HIGHCONTRAST_MODE,
33 };
34
35 // Full list of hotkey descriptors for board editor and footprint editor
36
37=== modified file 'pcbnew/hotkeys_board_editor.cpp'
38--- pcbnew/hotkeys_board_editor.cpp 2012-02-15 13:10:52 +0000
39+++ pcbnew/hotkeys_board_editor.cpp 2012-02-19 21:34:18 +0000
40@@ -625,6 +625,10 @@
41 case HK_FLIP_FOOTPRINT: // move to other side
42 OnHotkeyRotateItem( HK_FLIP_FOOTPRINT );
43 break;
44+ case HK_SWITCH_HIGHCONTRAST_MODE: // switch to high contrast mode and refresh the canvas
45+ DisplayOpt.ContrastModeDisplay = !DisplayOpt.ContrastModeDisplay;
46+ m_canvas->Refresh();
47+ break;
48 }
49
50 if( evt_type != 0 )