annotate src/ui/bmi/mmiBookMenuWindow.c @ 251:1fe443ccb656

.../etm/etm.h: add ETM_BSIM
author Mychaela Falconia <falcon@freecalypso.org>
date Wed, 12 May 2021 03:13:48 +0000
parents ec9f955fc487
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
3 CONDAT (UK)
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
5 ********************************************************************************
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 This software product is the property of Condat (UK) Ltd and may not be
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
8 disclosed to any third party without the express permission of the owner.
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
9
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 ********************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
12 $Project name: Basic MMI
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
13 $Project code: BMI (6349)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
14 $Module: PhoneBook
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
15 $File: MmiBookMenuWindow.c
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
16 $Revision: 1.0
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
17
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
18 $Author: Condat(UK)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
19 $Date: 25/10/00
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
20
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 ********************************************************************************
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
22
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 Description:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 Menu handling for the phone book
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
26
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 ********************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 $History: MmiBookMenuWindow.c
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
29 Mar 30, 2007 OMAPS00123019 a0393213(R.Prabakar)
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 Description : Reboot of the target when you unplug/plug USB cable using camera application
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
31
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
32 xrashmic 28 Jun 2006, OMAPS00084172
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
33 On pressing back from options menu in camera, the midi stopped playing.
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
34 Hence added stopRingerVolSettingInactivityTimer under the if(getSoundsReason() == SettingVolume)
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
35
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
36 Sep 01, 2005 REF: CRR 32707 x0021334
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
37 Description: Select Softkey dosen't work for the second time on choosing Volume option in Ringer menu
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
38 Fix: Select soft key operation in volume menu has been modified to fix this problem.
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
39
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
40 Apr 05, 2005 REF: ENH 29994 xdeepadh
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
41 Description: Implementation of Generic Midi Ringer and Modification of existing Midi Test Application
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
42 Solution: Generic Midi Ringer and Midi Test Application were implemented.
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
43
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
44 25/10/00 Original Condat(UK) BMI version.
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
45
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46 $End
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50 /*******************************************************************************
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
51
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52 Include Files
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
53
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
54 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
55 #define ENTITY_MFW
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
56
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
57 /* includes */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
58 #include <string.h>
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
59 #include <stdio.h>
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
60 #include <stdlib.h>
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
61
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
62 #if defined (NEW_FRAME)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
63
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
64 #include "typedefs.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
65 #include "vsi.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
66 #include "pei.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
67 #include "custom.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
68 #include "gsm.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
69
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
70 #else
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
71
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
72 #include "STDDEFS.H"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
73 #include "custom.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
74 #include "gsm.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
75 #include "vsi.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
76
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
77 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
78
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
79 #include "mfw_sys.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
80
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
81 #include "mfw_mfw.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
82 #include "mfw_win.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
83 #include "mfw_kbd.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
84 #include "mfw_lng.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
85 /* SPR#1428 - SH - New Editor changes */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
86 #ifndef NEW_EDITOR
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
87 #include "mfw_edt.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
88 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
89 #include "mfw_icn.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
90 #include "mfw_mnu.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
91 #include "mfw_tim.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
92
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
93 #include "mfw_sim.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
94 #include "mfw_cm.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
95 #include "mfw_nm.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
96 #include "mfw_phb.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
97 #include "mfw_mme.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
98 #include "mfw_sat.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
99 #include "mfw_sms.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
100
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
101 #include "dspl.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
102
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
103 #include "ksd.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
104 #include "psa.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
105
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
106 #include "MmiMain.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
107 #include "MmiBookController.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
108 #include "MmiDummy.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
109 #include "MmiDialogs.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
110 #include "MmiLists.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
111 #include "mmiColours.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
112
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
113
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
114 #include "MmiMenu.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
115 #include "mmiCall.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
116 #include "Mmiicons.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
117 #include "MmiIdle.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
118
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
119 #include "MmiSoftKeys.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
120 #include "MmiSounds.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
121 #include "MmiIdle.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
122 #include "MmiNetwork.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
123 #include "mmiSat_i.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
124 #include "MmiAoc.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
125
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
126 #include "gdi.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
127 #include "audio.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
128
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
129 #include "cus_aci.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
130 #include "mfw_ffs.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
131 #include "MmiTimers.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
132
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
133 #include "MmiBookShared.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
134 #include "MmiSettings.h" // for keypadlock
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
135 #include "MmiSounds.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
136 #include "MmiIdle.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
137
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
138 extern UBYTE HUPKeyOrigin; // Variable to indicate that long end key press is coming from menu
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
139
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
140 /*******************************************************************************
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
141 External Function Prototype
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
142
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
143 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
144 /* Fix for the melody and volume settings. 3/4/01 MZ */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
145 extern BOOL getScrollSelectMenuItem(void);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
146 extern clearScrollSelectMenuItem(void);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
147 extern void volMenuItemSelected(void);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
148 extern USHORT getSoundsReason(void);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
149 extern void startRingerVolSettingInactivityTimer(void);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
150 extern void stopRingerVolSettingInactivityTimer(void);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
151 extern void restartVolSettingInactivityTimer(void);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
152 //Apr 05, 2005 REF: ENH 29994 xdeepadh
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
153 #ifdef FF_MIDI_RINGER
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
154 extern MfwHnd hPlayerStartTimer; /* timeout till start of midi file */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
155 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
156
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
157 /*******************************************************************************
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
158
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
159 Private Methods
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
160
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
161 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
162
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
163
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
164 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
165
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
166 $Function: bookMenuMenuCB
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
167
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
168 $Description: Menu handler for the menu window
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
169
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
170 $Returns: MFW_EVENT_CONSUMED if event handled, otherwise
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
171 MFW_EVENT_PASSED
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
172
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
173 $Arguments: e, event, m, menu handle
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
174
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
175 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
176
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
177 static int bookMenuMenuCB( MfwEvt e, MfwMnu *m )
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
178 {
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
179 T_MFW_HND window = mfwParent( mfw_header() );
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
180 T_MFW_WIN *win_data = ((T_MFW_HDR *)window)->data;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
181 tBookStandard *data = (tBookStandard *) win_data->user;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
182
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
183 TRACE_FUNCTION( "bookMenuMenuCB()" );
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
184
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
185 /* We only handle the ESCAPE event in here
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
186 */
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
187 switch( e )
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
188 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
189 case E_MNU_ESCAPE:
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
190 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
191 /* Escape requested, we need to shut down this window
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
192 */
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
193 if (data->Callback)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
194 (data->Callback) (data->parent_win, NULL, NULL);
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
195 bookMenuDestroy( window );
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
196 //xrashmic 28 Jun 2006, OMAPS00084172
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
197 //On pressing back from options menu in camera, the midi stopped playing.
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
198 if(getSoundsReason() == SettingVolume)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
199 stopRingerVolSettingInactivityTimer();
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
200 }
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
201 break;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
202
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
203 default:
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
204 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
205 /* unknown event, pass it up the tree for handling elsewhere
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
206 */
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
207 return MFW_EVENT_PASSED;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
208 }
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
209 /* break; */ /* RAVI */
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
210 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
211
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
212 /* We got here, event handled, prevent anyone else
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
213 dealing with it
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
214 */
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
215 return MFW_EVENT_CONSUMED;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
216 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
217
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
218
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
219 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
220
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
221 $Function: bookMenuDialog
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
222
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
223 $Description: Menu window dialog function
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
224
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
225 $Returns: none
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
226
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
227 $Arguments: win, window handle
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
228 event, event to be handled
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
229 value, not used
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
230 parameter, not used
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
231
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
232 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
233
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
234 void bookMenuDialog( T_MFW_HND win, USHORT event, SHORT value, void *parameter )
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
235 {
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
236 T_MFW_WIN *win_data = ((T_MFW_HDR *)win)->data;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
237 tBookStandard *data = (tBookStandard *) win_data->user;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
238 /* MfwMnu *mnu; */ /* RAVI */
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
239
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
240 TRACE_FUNCTION( "bookMenuDialog()" );
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
241
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
242 /* The menu dialog function has to deal with initialisation
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
243 and responses from the PIN2 validation methods
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
244 */
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
245 switch( event )
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
246 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
247 case MENU_INIT:
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
248 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
249 /* On initialisation, we can create the menus and
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
250 display the window
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
251 */
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
252 data->menu = mnuCreate( data->win, (MfwMnuAttr *) parameter, E_MNU_ESCAPE, (MfwCb) bookMenuMenuCB );
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
253 mnuLang( data->menu, mainMmiLng );
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
254 mnuUnhide( data->menu );
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
255 winShow( data->win );
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
256
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
257 if (value EQ PhbkMainMenu)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
258 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
259 // start the timer for the keypadlock
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
260 tim_start (data->menu_tim);
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
261 data->status_of_timer = FALSE;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
262 }
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
263 else
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
264 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
265 data->status_of_timer = TRUE;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
266 }
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
267 if(value == SettingVolume)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
268 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
269 /*
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
270 The ringer volume settings dialog has been invoked, create and start the
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
271 4 second time out.
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
272 */
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
273 /* RAVI - 20-1-2006 */
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
274 #ifdef NEPTUNE_BOARD
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
275 setSoundsReason(SettingVolume);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
276 #endif
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
277 /* END RAVI */
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
278 startRingerVolSettingInactivityTimer();
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
279 }
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
280
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
281 }
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
282 break;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
283
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
284 case ADD_CALLBACK:
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
285 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
286 /* Change the callback from the default menu callback to one specified
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
287 * in parameter */
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
288 data->Callback = (T_VOID_FUNC)parameter;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
289 }
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
290 break;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
291
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
292 case DEFAULT_OPTION:
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
293 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
294 /* Highlight an option in the menu when it is opened. Parameter points to a UBYTE. */
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
295
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
296 mnuChooseVisibleItem(data->menu, *((UBYTE *)parameter));
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
297 }
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
298 break;
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
299
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
300 case PIN2_OK:
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
301 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
302 /* We have received a PIN2 authorisation, so we can execute the
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
303 the requested function
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
304 */
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
305
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
306 TRACE_EVENT("PIN2_OK: Should carry on to perform phonebook op");
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
307 (data->phbk->pin2_next)( data->phbk->menu, data->phbk->item);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
308
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
309 }
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
310 break;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
311 case E_MNU_ESCAPE:
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
312 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
313 /* Escape requested, we need to shut down this window
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
314 */
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
315 bookMenuDestroy( win);
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
316 }
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
317 break;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
318 default:
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
319 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
320 /* In situations where a PIN2 abort is returned, we can handle it
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
321 as a default event, and just ignore it
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
322 */
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
323 TRACE_EVENT("PIN2 not OK");
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
324 }
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
325 break;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
326 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
327 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
328
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
329
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
330 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
331
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
332 $Function: bookMenuTimCB
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
333
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
334 $Description: Menu tim handler
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
335
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
336 $Returns:
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
337
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
338 $Arguments:
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
339
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
340 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
341
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
342 static int bookMenuTimCB (T_MFW_EVENT event, T_MFW_TIM *tc)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
343 {
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
344 T_MFW_HND window = mfwParent( mfw_header() );
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
345 T_MFW_WIN *win_data = ((T_MFW_HDR *)window)->data;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
346 tBookStandard *data = (tBookStandard *) win_data->user;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
347
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
348 data->status_of_timer = TRUE;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
349
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
350 /* ADDED RAVI - 25-11-2005 */
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
351 return 0;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
352 /* END RAVI */
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
353
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
354 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
355
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
356
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
357 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
358
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
359 $Function: bookMenuWindowCB
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
360
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
361 $Description: Menu window handler
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
362
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
363 $Returns: MFW_EVENT_CONSUMED if event handled, otherwise
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
364 MFW_EVENT_PASSED
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
365
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
366 $Arguments: e, event, m, window handle
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
367
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
368 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
369
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
370 static int bookMenuWindowCB( MfwEvt e, MfwWin *w )
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
371 {
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
372 tBookStandard * data = (tBookStandard *)w->user;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
373 MfwMnu * mnu;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
374
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
375 TRACE_FUNCTION( "bookMenuWindowCB()" );
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
376
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
377 if (!w)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
378 return MFW_EVENT_PASSED;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
379
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
380 switch( e )
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
381 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
382 case MfwWinVisible:
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
383 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
384 dspl_ClearAll(); // sbh - clear screen before update
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
385 mnu = (MfwMnu *) mfwControl( data->menu );
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
386
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
387 /*
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
388 **Check whether the data is valid, if not use 'sensible' default values
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
389 */
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
390 if (mnu)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
391 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
392 if (mnu->curAttr)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
393 softKeys_displayId( TxtSoftSelect, TxtSoftBack, 0, mnu->curAttr->mnuColour);
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
394 else
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
395 softKeys_displayId( TxtSoftSelect, TxtSoftBack, 0, COLOUR_LIST_SUBMENU);
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
396
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
397 }
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
398 else
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
399 softKeys_displayId( TxtSoftSelect, TxtSoftBack, 0, COLOUR_LIST_SUBMENU);
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
400 }
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
401 break;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
402
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
403 default:
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
404 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
405 /* unknown event, pass it up the tree for handling elsewhere
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
406 */
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
407 return MFW_EVENT_PASSED;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
408 }
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
409 /* break; */ /* RAVI */
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
410 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
411
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
412 /* We got here, event handled, prevent anyone else
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
413 dealing with it
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
414 */
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
415 return MFW_EVENT_CONSUMED;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
416 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
417
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
418
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
419 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
420
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
421 $Function: bookMenuKbdCB
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
422
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
423 $Description: tbd
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
424
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
425 $Returns: MFW_EVENT_CONSUMED always
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
426
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
427 $Arguments: e, event, k, key handle
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
428
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
429 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
430
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
431 static int bookMenuKbdCB( MfwEvt e, MfwKbd *k )
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
432 {
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
433 static BOOL storeSelectedItemToPcm=FALSE;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
434 T_MFW_HND window = mfwParent( mfw_header() );
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
435 T_MFW_WIN *win_data = ((T_MFW_HDR *)window)->data;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
436 tBookStandard *data = (tBookStandard *) win_data->user;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
437 MfwMnu *mnu;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
438 U8 keycode; /* SPR#1608 - SH */
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
439
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
440 TRACE_FUNCTION( "bookMenuKbdCB()" );
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
441
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
442 /* handle the keypress
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
443 */
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
444 switch (k->code)
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
445 {
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
446 case KCD_MNUUP:
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
447 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
448 // keypadLock will not activate anymore
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
449 data->status_of_timer = TRUE;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
450 /* Update the window with the previous element
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
451 */
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
452 mnuUp( data->menu );
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
453 /*
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
454 Special case when setting up ringer volume, the current ringer
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
455 is played as user scrolls the volume settings Silent -> cresendo.
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
456 MZ.
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
457 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
458 /* RAVI - 20-1-2006 */
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
459 #ifdef NEPTUNE_BOARD
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
460 if (getSoundsReason () == SettingVolume)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
461 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
462 volumeMenuScrollUp();
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
463 }
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
464 #endif
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
465 /* END RAVI */
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
466
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
467 if(getScrollSelectMenuItem() == TRUE ||(getSoundsReason() == SettingVolume) )
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
468 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
469 mnuSelect(data->menu);
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
470 /* Scroll up in volume setting */
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
471 restartVolSettingInactivityTimer();
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
472 }
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
473 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
474 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
475
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
476 case KCD_MNUDOWN:
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
477 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
478 // keypadLock will not activate anymore
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
479 data->status_of_timer = TRUE;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
480 /* Update the window with the next element
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
481 */
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
482 mnuDown( data->menu );
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
483
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
484 /*
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
485 Special case when setting up ringer volume, the current ringer
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
486 is played as user scrolls the volume settings Silent -> cresendo.
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
487 MZ.
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
488 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
489 /* RAVI - 20-1-2006 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
490 #ifdef NEPTUNE_BOARD
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
491 if (getSoundsReason () == SettingVolume)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
492 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
493 volumeMenuScrollDown();
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
494 }
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
495 #endif
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
496 /* END RAVI */
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
497
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
498 if((getScrollSelectMenuItem() == TRUE) || (getSoundsReason() == SettingVolume))
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
499 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
500 mnuSelect(data->menu);
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
501 restartVolSettingInactivityTimer();
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
502 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
503
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
504 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
505 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
506
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
507 case KCD_MNUSELECT:
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
508 case KCD_LEFT:
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
509 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
510 // keypadLock will not activate anymore
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
511 data->status_of_timer = TRUE;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
512
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
513 // Select this element
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
514 mnuSelect( data->menu );
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
515 /*30 Mar 2007 a0393213 (R.Prabakar)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
516 OMAPS00123019 ( Reboot of the target when you unplug/plug USB cable using camera application)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
517 The usb enumeration option window has to be destroyed automatically once the user selects an option.
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
518 Earlier the menu was destroyed in the menu select call back function (mmi_usb_enumeration) and the same menu was
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
519 accesed further in this function. This was resulting in crash.
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
520 Now the menu is destroyed in this function and returned immediately.
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
521 */
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
522 #ifdef FF_MMI_USBMS
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
523 if(usb_opt_win &&
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
524 data->menu==((tBookStandard*)(((MfwWin*)(((T_MFW_HDR *)usb_opt_win)->data))->user))->menu)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
525 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
526 bookMenuDestroy(usb_opt_win);
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
527 usb_opt_win=NULL;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
528 break;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
529 }
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
530 #endif
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
531 mnu = (MfwMnu *) mfwControl( data->menu );
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
532
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
533 if (mnu != NULL)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
534 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
535 if (mnu->curAttr != NULL)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
536 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
537 // API - 24-01-03 - 1606 - Soft Key updating add this win Focus check
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
538 if( winIsFocussed(window) )
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
539 softKeys_displayId( TxtSoftSelect, TxtSoftBack, 0, mnu->curAttr->mnuColour);
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
540 }
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
541 }
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
542
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
543 // A volume or tone setting menu has been entered. MZ 2/4/01
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
544 if((getScrollSelectMenuItem() == TRUE) || (getSoundsReason() == SettingVolume))
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
545 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
546 TRACE_FUNCTION("@@@@ A volume or tone settin");
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
547
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
548 /*
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
549 First time pcm flag is false, subsequent selection of menu item
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
550 will select and terminate the volume settings menu. 3/4/01 MZ.
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
551 */
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
552 if(storeSelectedItemToPcm ==TRUE || getSoundsReason() == SettingVolume )
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
553 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
554 clearScrollSelectMenuItem();
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
555 volMenuItemSelected();
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
556 storeSelectedItemToPcm =FALSE;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
557 mnuEscape( data->menu );
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
558 if(getSoundsReason() == SettingVolume)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
559 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
560 setSoundsReason(SoundsNone);
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
561 stopRingerVolSettingInactivityTimer();
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
562 }
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
563 //Apr 05, 2005 REF: ENH 29994 xdeepadh
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
564 #ifdef FF_MIDI_RINGER
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
565 //Delete the timer for volume scrolling
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
566 if(hPlayerStartTimer!=NULL)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
567 timDelete(hPlayerStartTimer);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
568 #endif
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
569 break;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
570 }
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
571 /*
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
572 Second time the left soft key is used, store the setting in pcm and terminate the
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
573 volume settings menu.
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
574 */
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
575 storeSelectedItemToPcm =TRUE;
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
576
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
577 }
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
578 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
579 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
580
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
581 // POWER key takes us to idle screen.
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
582 case KCD_POWER:
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
583 data->status_of_timer = TRUE;
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
584
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
585 HUPKeyOrigin = 0; // sbh - we're coming from the menu screen, so don't shut down right away
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
586
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
587 //return to idle screen
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
588
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
589 if (data->Callback)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
590 (data->Callback) (data->parent_win, NULL, NULL);
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
591
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
592 bookMenuDestroy(data->win);
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
593 stopRingerVolSettingInactivityTimer();
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
594
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
595 SEND_EVENT(idle_get_window(), IDLE_UPDATE, 0, 0);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
596 break;
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
597
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
598 case KCD_RIGHT:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
599 case KCD_HUP:
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
600 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
601 // keypadLock will not activate anymore
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
602 data->status_of_timer = TRUE;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
603
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
604 // Sep 01, 2005 REF: CRR 32707 x0021334
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
605 // Set storeSelectedItemToPcm to FALSE to enable proper operation every time instead of
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
606 // handling it in alterate attempts.
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
607 storeSelectedItemToPcm = FALSE;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
608
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
609 HUPKeyOrigin = 0; // sbh - we're coming from the menu screen, so don't shut down right away
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
610
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
611 /* get us out of here
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
612 */
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
613 mnuEscape( data->menu );
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
614 mnu = (MfwMnu *) mfwControl( data->menu );
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
615 if (mnu != NULL)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
616 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
617 if (mnu->curAttr != NULL)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
618 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
619 // API - 24-01-03 - 1606 - Soft Key updating add this win Focus check
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
620 if( winIsFocussed(window) )
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
621 softKeys_displayId( TxtSoftSelect, TxtSoftBack, 0, mnu->curAttr->mnuColour);
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
622 }
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
623 }
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
624
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
625 // Return the menu scroll behavior to normal.
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
626 if(getScrollSelectMenuItem() == TRUE)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
627 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
628 clearScrollSelectMenuItem();
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
629 }
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
630 /*
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
631 If user exits the volume settings menu from the Idle or Incoming call screen.
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
632 clear the soundsReason.
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
633 */
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
634 if(getSoundsReason() == SettingVolume)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
635 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
636 /* RAVI - 20-1-2006 */
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
637 #ifdef NEPTUNE_BOARD
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
638 /* Restore the volume setting */
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
639 restorePreviousVolumeSetting ();
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
640 #endif
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
641 /* END RAVI */
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
642 stopRingerVolSettingInactivityTimer();
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
643 setSoundsReason(SoundsNone);
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
644 //Apr 05, 2005 REF: ENH 29994 xdeepadh
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
645 #ifdef FF_MIDI_RINGER
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
646 //Delete teh timer for volume scrolling
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
647 if(hPlayerStartTimer!=NULL)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
648 timDelete(hPlayerStartTimer);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
649 #endif
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
650 }
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
651
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
652 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
653 break;
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
654
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
655 case KCD_STAR:
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
656 {
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
657
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
658 /*
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
659 * Keypadlock will lock only
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
660 * within two seconds by press "*"
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
661 */
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
662
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
663 if(data->status_of_timer EQ FALSE)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
664 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
665 TRACE_EVENT ("activate KEYpadLOCK");
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
666 mnuEscape( data->menu );
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
667 settingsKeyPadLockOn ();
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
668 }
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
669
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
670 /* SPR#1608 - SH - Otherwise, send '*' keypress to idle screen */
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
671
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
672 else if (window == data->phbk->menu_main_win)
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
673 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
674 /* Number key presses in phonebook menu returns user to idle screen,
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
675 add key press to Idle edit screen. */
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
676
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
677 keycode = k->code;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
678
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
679 bookMenuDestroy(data->win);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
680
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
681 SEND_EVENT(idle_get_window(), IDLE_START_DIALLING_NUMBER, 0, &keycode);
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
682 }
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
683 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
684 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
685
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
686 case KCD_HASH:
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
687 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
688 /*
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
689 * Keypadlock will lock only
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
690 * within two seconds by press "*"
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
691 */
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
692 if(data->status_of_timer EQ FALSE)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
693 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
694 TRACE_EVENT ("activate Silent mode");
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
695
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
696 if(FFS_flashData.settings_status & SettingsSilentMode)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
697 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
698 settingsSilentModeOff();
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
699 }
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
700 else
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
701 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
702 settingsSilentModeOn();
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
703 }
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
704 mnuEscape( data->menu );
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
705 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
706
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
707 /* SPR#1608 - SH - Otherwise, send '#' keypress to idle screen */
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
708
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
709 else if (window == data->phbk->menu_main_win)
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
710 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
711 /* Number key presses in phonebook menu returns user to idle screen,
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
712 add key press to Idle edit screen. */
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
713
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
714 keycode = k->code;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
715
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
716 bookMenuDestroy(data->win);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
717
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
718 SEND_EVENT(idle_get_window(), IDLE_START_DIALLING_NUMBER, 0, &keycode);
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
719 }
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
720 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
721 break;
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
722
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
723 default:
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
724 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
725 TRACE_EVENT("bookMenuKbdCb - DEFAULT!");
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
726 /* SH - only allow dialling if we are in the main menu */
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
727 if (window == data->phbk->menu_main_win)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
728 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
729 /* keypadLock will not activate anymore */
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
730 data->status_of_timer = TRUE;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
731
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
732 /* Number key presses in phonebook menu returns user to idle screen,
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
733 add key press to Idle edit screen. */
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
734
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
735 keycode = k->code;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
736
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
737 bookMenuDestroy(data->win);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
738
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
739 /* x0045876, 14-Aug-2006 (WR - pointless comparison of unsigned integer with zero) */
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
740 /* if ((k->code>=KCD_0 && k->code<=KCD_9)) */
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
741 if (k->code<=KCD_9)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
742 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
743 TRACE_EVENT("Idle Editor Start!");
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
744 SEND_EVENT(idle_get_window(), IDLE_START_DIALLING_NUMBER, 0, &keycode);
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
745 }
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
746 }
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
747 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
748 break;
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
749 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
750
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
751 /* always consume the event
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
752 */
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
753 return MFW_EVENT_CONSUMED;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
754 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
755
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
756
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
757 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
758
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
759 $Function: bookMenuKbdLongCB
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
760
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
761 $Description: keyboard long press event handler
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
762
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
763 $Returns: MFW_EVENT_CONSUMED always
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
764
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
765 $Arguments: e, event, k, key handle
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
766
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
767 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
768
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
769 static int bookMenuKbdLongCB( MfwEvt e, MfwKbd *k )
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
770 {
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
771 T_MFW_HND window = mfwParent( mfw_header() );
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
772 T_MFW_WIN *win_data = ((T_MFW_HDR *)window)->data;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
773 tBookStandard *data = (tBookStandard *) win_data->user;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
774
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
775 TRACE_FUNCTION( "bookMenuKbdLongCB()" );
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
776
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
777 if ( ( e & KEY_CLEAR ) && ( e & KEY_LONG ) )
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
778 { mnuEscape( data->menu );
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
779 return MFW_EVENT_CONSUMED;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
780 }
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
781 /*if long press on END key*/
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
782 if ( ( e & KEY_HUP) && ( e & KEY_LONG ) )
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
783 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
784 U8 keycode;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
785 U8 uMode;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
786 uMode = dspl_Enable(0);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
787
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
788 // keypadLock will not activate anymore
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
789 data->status_of_timer = TRUE;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
790
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
791 //return to idle screen
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
792
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
793 keycode = k->code;
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
794
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
795 if (data->Callback)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
796 (data->Callback) (data->parent_win, NULL, NULL);
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
797
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
798 bookMenuDestroy(data->win);
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
799 stopRingerVolSettingInactivityTimer();
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
800
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
801 SEND_EVENT(idle_get_window(), IDLE_UPDATE, 0, &keycode);
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
802
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
803 dspl_Enable(uMode);
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
804 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
805
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
806 return MFW_EVENT_CONSUMED;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
807 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
808
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
809
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
810 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
811
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
812 $Function: bookMenuCreate
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
813
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
814 $Description: Create the menu window
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
815
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
816 $Returns: handle of newly created window, or NULL if error
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
817
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
818 $Arguments: parent, handle of the parent window
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
819
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
820 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
821
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
822 static T_MFW_HND bookMenuCreate( MfwHnd parent )
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
823 {
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
824 T_MFW_WIN *parent_win_data = ( (T_MFW_HDR *) parent )->data;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
825 T_phbk *phbk = (T_phbk *)parent_win_data->user;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
826 T_MFW_WIN *win_data;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
827 tBookStandard *data;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
828
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
829 TRACE_FUNCTION( "bookMenuCreate()" );
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
830
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
831 /* allocate memory for our control block
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
832 */
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
833 if ( ( data = (tBookStandard *) ALLOC_MEMORY( sizeof( tBookStandard ) ) ) == NULL )
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
834 return NULL;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
835
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
836 /* Create the window if we can
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
837 */
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
838 if ( ( data->win = win_create( parent, 0, E_WIN_VISIBLE, (T_MFW_CB) bookMenuWindowCB ) ) == NULL )
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
839 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
840 FREE_MEMORY( (void *)data, sizeof( tBookStandard ) );
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
841 return NULL;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
842 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
843
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
844 /* Okay, we have created the control block and the window, so
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
845 we now need to configure the dialog and data pointers
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
846 */
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
847 data->mmi_control.dialog = (T_DIALOG_FUNC) bookMenuDialog;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
848 data->mmi_control.data = data;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
849 win_data = ((T_MFW_HDR *)data->win)->data;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
850 win_data->user = (void *) data;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
851 data->phbk = phbk;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
852 data->parent_win = parent;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
853
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
854 /* create keyboards and menus for our window
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
855 */
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
856 data->kbd = kbdCreate ( data->win, KEY_ALL, (MfwCb) bookMenuKbdCB );
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
857 data->kbd_long = kbdCreate ( data->win, KEY_ALL | KEY_LONG, (MfwCb) bookMenuKbdLongCB );
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
858 data->menu_tim = tim_create (data->win, THREE_SECS, (MfwCb) bookMenuTimCB);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
859
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
860 data->Callback = NULL; // Use standard menu callback (changed by sending event ADD_CALLBACK)
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
861
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
862 /* And return the handle of the newly created window
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
863 */
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
864 return data->win;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
865 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
866
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
867
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
868 /*******************************************************************************
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
869
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
870 Public Methods
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
871
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
872 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
873
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
874 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
875
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
876 $Function: bookMenuStart
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
877
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
878 $Description: tbd
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
879
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
880 $Returns: tbd
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
881
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
882 $Arguments: tbd
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
883
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
884 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
885
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
886 T_MFW_HND bookMenuStart( MfwHnd parent, MfwMnuAttr *menuAttr,SHORT reason )
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
887 {
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
888 T_MFW_HND win;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
889
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
890 win = bookMenuCreate( parent );
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
891
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
892 if ( win != NULL )
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
893 SEND_EVENT( win, MENU_INIT, reason, (MfwMnuAttr *) menuAttr );
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
894 return win;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
895 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
896
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
897
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
898 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
899
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
900 $Function: bookMenuDestroy
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
901
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
902 $Description: Destroy the menu window
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
903
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
904 $Returns: none
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
905
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
906 $Arguments: window, handle of the window being destroyed
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
907
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
908 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
909
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
910 void bookMenuDestroy( MfwHnd window )
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
911 {
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
912 T_MFW_WIN *win_data = ((T_MFW_HDR *)window)->data;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
913 tBookStandard *data = (tBookStandard *) win_data->user;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
914 char test_string[40];
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
915
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
916 TRACE_FUNCTION( "bookMenuDestroy()" );
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
917
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
918 if (window == NULL)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
919 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
920 TRACE_EVENT ("Error : Called with NULL Pointer");
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
921 return;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
922 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
923
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
924 if ( data )
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
925 {
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
926
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
927 /* If we have the root window here then we use the main phone
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
928 book destroy method
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
929 */
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
930 if ( data->phbk->root_win == window )
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
931 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
932 bookPhonebookDestroy( data->phbk->win );
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
933 return;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
934 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
935
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
936 /* Otherwise clear down our pointers and free the current
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
937 menu window structures
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
938 */
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
939 if ( data->phbk->search_win == window )
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
940 data->phbk->search_win = 0;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
941 if ( data->phbk->menu_main_win == window )
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
942 data->phbk->menu_main_win = 0;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
943 if ( data->phbk->menu_options_win == window )
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
944 data->phbk->menu_options_win = 0;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
945 if ( data->phbk->menu_options_win_2 == window )
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
946 data->phbk->menu_options_win_2 = 0;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
947 if ( data->phbk->menu_call_options_win == window )
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
948 data->phbk->menu_call_options_win = 0;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
949 if ( data->phbk->menu_call_options_win_2 == window )
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
950 data->phbk->menu_call_options_win_2 = 0;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
951
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
952 winDelete( data->win );
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
953 FREE_MEMORY( (void *)data, sizeof( tBookStandard ) );
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
954 sprintf(test_string, "Bookmenudestroy: %d", mfwCheckMemoryLeft());
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
955 TRACE_EVENT(test_string);
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
956 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
957
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
958 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
959
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
960
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
961 /*******************************************************************************
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
962
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
963 End of File
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
964
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
965 *******************************************************************************/