Skip to content

Commit

Permalink
Give cursor radio buttons their own sequential IDs in propsheet (#6231)
Browse files Browse the repository at this point in the history
For a radio button group to work properly, they need sequential IDs.
This moves the cursor radio buttons on the `conhost` property sheet to
be sequential.

## References
- Introduced with #2663
- Found while investigating #4186

## PR Checklist
* [x] Closes unfiled issue found while investigating #4186
* [x] I work here.
* [x] Manual test.
* [x] No documentation required.
* [x] Am core contributor.

## Detailed Description of the Pull Request / Additional comments
- `CheckRadioButton` takes a contiguous group of IDs. It will set one
  item in the list and then uncheck the rest. When a new one was added
  to the group, it was added to the end of the segment in the IDs file,
  but not immediately after the existing radio buttons. This means it
  accidentally turned off all the other buttons in the middle.
- To resolve this, I moved all the cursor buttons into their own
  sequential group number and I deprecated the old values.

## Validation Steps Performed
- [x] Ensured that the "Discard Old Duplicates" value was set in the
  registry, walked through debugger as `conhost` packed the `TRUE` value
  into the property sheet blob, walked through the property sheet
  `console.dll` as it unpacked the `TRUE`, then observed that the
  checkbox was actually set instead of getting unset by the
  `CheckRadioButton` call that went from 107 to 119 and accidentally
  unchecked number 112, `IDD_HISTORY_NODUP` even though I swear it was
  just set.
  • Loading branch information
miniksa authored May 28, 2020
1 parent c30aff0 commit e390111
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/propsheet/dialogs.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ Revision History:
// unused 102
#define IDD_QUICKEDIT 103
#define IDD_INSERT 104
#define IDD_CURSOR_SMALL 105
#define IDD_CURSOR_MEDIUM 106
#define IDD_CURSOR_LARGE 107
// unused 105, moved to 150
// unused 106, moved to 151
// unused 107, moved to 152
#define IDD_HISTORY_SIZE 108
#define IDD_HISTORY_SIZESCROLL 109
#define IDD_HISTORY_NUM 110
Expand All @@ -43,7 +43,12 @@ Revision History:
#define IDD_LANGUAGE_GROUPBOX 116
#define DID_SETTINGS_COMCTL5 117
#define DID_SETTINGS2_COMCTL5 118
#define IDD_CURSOR_ADVANCED 119
// unused 119, moved to 153

#define IDD_CURSOR_SMALL 150
#define IDD_CURSOR_MEDIUM 151
#define IDD_CURSOR_LARGE 152
#define IDD_CURSOR_ADVANCED 153

#define DID_FONTDLG 200
#define IDD_STATIC 201
Expand Down

0 comments on commit e390111

Please sign in to comment.