Skip to content

Commit ea80c91

Browse files
committed
Add a hard reset option to Danger area
1 parent fc0dd25 commit ea80c91

File tree

4 files changed

+51
-21
lines changed

4 files changed

+51
-21
lines changed

Rsc/PIMSync_Rsc.h

+21-19
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,25 @@
11
/* pilrc generated file. Do not edit!*/
2-
#define AboutVersionLabel 1024
3-
#define AboutDescriptionLabel 1023
4-
#define AboutOKButton 1022
5-
#define AboutForm 1021
6-
#define DEBUG_ALERT 1020
7-
#define WIPE_ALERT 1019
8-
#define DELETE_ALERT 1018
9-
#define MainHelpButton 1017
10-
#define MainFromSDSubtitleLabel 1016
11-
#define MainFromSDTitleLabel 1015
12-
#define MainFromSDButton 1014
13-
#define MainToSDSubtitleLabel 1013
14-
#define MainToSDTitleLabel 1012
15-
#define MainToSDButton 1011
16-
#define MainSubtitleLabel 1010
17-
#define MainTitleLabel 1009
18-
#define MainForm 1008
19-
#define RomIncompatibleAlert 1007
20-
#define OptionsAbout 1006
2+
#define AboutVersionLabel 1027
3+
#define AboutDescriptionLabel 1026
4+
#define AboutOKButton 1025
5+
#define AboutForm 1024
6+
#define DEBUG_ALERT 1023
7+
#define RESET_ALERT 1022
8+
#define WIPE_ALERT 1021
9+
#define DELETE_ALERT 1020
10+
#define MainHelpButton 1019
11+
#define MainFromSDSubtitleLabel 1018
12+
#define MainFromSDTitleLabel 1017
13+
#define MainFromSDButton 1016
14+
#define MainToSDSubtitleLabel 1015
15+
#define MainToSDTitleLabel 1014
16+
#define MainToSDButton 1013
17+
#define MainSubtitleLabel 1012
18+
#define MainTitleLabel 1011
19+
#define MainForm 1010
20+
#define RomIncompatibleAlert 1009
21+
#define OptionsAbout 1008
22+
#define OptionsHardReset 1007
2123
#define OptionsWipe 1005
2224
#define MainMenuBar 1004
2325
#define ToSDBitmapFamily 1003

Rsc/PIMSync_Rsc.rcp

+12-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ DATA "code" ID 1 "code0001.bin"
88
GENERATEHEADER "Rsc/PIMSync_Rsc.h"
99

1010
APPLICATIONICONNAME ID 1000 "PIMSync"
11-
VERSION ID 1 "0.4"
11+
VERSION ID 1 "0.5"
1212

1313
RESETAUTOID 1000
1414

@@ -33,6 +33,8 @@ BEGIN
3333
PULLDOWN "Danger"
3434
BEGIN
3535
MENUITEM "Wipe PIM in RAM" ID OptionsWipe
36+
MENUITEM SEPARATOR
37+
MENUITEM "HARD RESET" ID OptionsHardReset
3638
END
3739

3840
PULLDOWN "About"
@@ -85,6 +87,14 @@ BEGIN
8587
BUTTONS "Yes, continue" "No, cancel"
8688
END
8789

90+
ALERT ID RESET_ALERT
91+
WARNING
92+
BEGIN
93+
TITLE "Confirm"
94+
MESSAGE "You will now be asked if a Hard (UP) or Soft (other keys) reset is needed."
95+
BUTTONS "Continue" "Cancel"
96+
END
97+
8898
ALERT ID DEBUG_ALERT
8999
CONFIRMATION
90100
BEGIN
@@ -101,6 +111,6 @@ BEGIN
101111
BUTTON "OK" ID AboutOKButton AT (55 142 40 12)
102112
FORMBITMAP AT (50 86) BITMAP PIMSyncBitmapFamily
103113
LABEL "PIMSync allows you to use the SD\rcard to transfer the memo, address\rbook, todo and datebook databases\rfrom your Palm OS device and back.\rYou can use this workflow with\rprograms like J-Pilot on the PC." ID AboutDescriptionLabel AT (5 16)
104-
LABEL "V: 0.4" ID AboutVersionLabel AT (132 145)
114+
LABEL "V: 0.5" ID AboutVersionLabel AT (132 145)
105115
END
106116

Src/Main.c

+17
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@ static Boolean MainFormDoCommand(UInt16 command)
3737
break;
3838
}
3939

40+
case OptionsHardReset:
41+
{
42+
HandleHardReset();
43+
handled = true;
44+
break;
45+
}
46+
4047
case MainFromSDButton:
4148
{
4249
HandleFromSD();
@@ -431,3 +438,13 @@ void HandleWipe()
431438
}
432439
}
433440

441+
void HandleHardReset()
442+
{
443+
UInt8 selection;
444+
445+
selection = FrmAlert( RESET_ALERT );
446+
if ( selection == 0 ) {
447+
SysColdBoot (0, 0, 0, 0, 0);
448+
}
449+
}
450+

Src/PIMSync.h

+1
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,4 @@ void DeleteDB( Char* dbName, Boolean* missingP );
4545
void HandleFromSD();
4646
void HandleToSD();
4747
void HandleWipe();
48+
void HandleHardReset();

0 commit comments

Comments
 (0)