FreeCalypso > hg > fc-tourmaline
annotate src/ui/bmi/mmiBand.c @ 221:5bf097aeaad7
LLS: when turning off all LEDs on boot, skip LED-C
Having LLS turn off LED-A and LED-B on boot is normally unnecessary
(they should already be off in Iota), but it is harmless, hence this
logic is kept for robustness. However, having LLS read-modify-write
the BCICTL2 register (to turn off LED-C) creates a potential race
condition with FCHG writes to this register, especially in the case
when baseband switch-on is caused by VCHG and charging is expected
to start right away. Furthermore, control of the charging LED itself
(on those hw targets that have it) is the responsibility of the FCHG
SWE, hence LLS should leave it alone.
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 26 Apr 2021 21:55:13 +0000 |
parents | 63dffa10b00a |
children |
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 |
137
63dffa10b00a
mmiBand.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 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
12 $Project name: Basic MMI |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
13 $Project code: BMI |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
14 $Module: Frequency band selection |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
15 $File: MmiBand.c |
63dffa10b00a
mmiBand.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 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
18 $Author: Condat(UK) |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
19 $Date: 03/04/02 |
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 |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
25 This provides the functionality for menu options to select and display the current |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
26 band used. |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
27 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
28 ******************************************************************************** |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
29 $History: MmiBand.c |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
30 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
31 03/04/02 Original Condat(UK) BMI version. |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
32 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
33 $End |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
34 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
35 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
36 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
37 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
38 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
39 /******************************************************************************* |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
40 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
41 Include files |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
42 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
43 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
44 #define ENTITY_MFW |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
45 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
46 /* includes */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
47 #include <string.h> |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
48 #include <stdio.h> |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
49 #include <stdlib.h> |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
50 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
51 #if defined (NEW_FRAME) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
52 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
53 #include "typedefs.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
54 #include "vsi.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
55 #include "pei.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
56 #include "custom.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
57 #include "gsm.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
58 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
59 #else |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
60 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
61 #include "STDDEFS.H" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
62 #include "custom.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
63 #include "gsm.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
64 #include "vsi.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
65 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
66 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
67 #include "mfw_sys.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
68 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
69 #include "cus_aci.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
70 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
71 #include "mfw_mfw.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
72 #include "mfw_win.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
73 #include "mfw_kbd.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
74 /* SPR#1428 - SH - New Editor changes */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
75 #ifndef NEW_EDITOR |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
76 #include "mfw_edt.h" |
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 #include "mfw_lng.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
79 #include "mfw_tim.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
80 #include "mfw_icn.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
81 #include "mfw_mnu.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
82 #include "mfw_phb.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
83 #include "mfw_cm.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
84 #include "mfw_sim.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
85 #include "mfw_nm.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
86 #include "mfw_sat.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
87 #include "mfw_ss.h" /*for convert*/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
88 #include "mfw_phb.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
89 #include "ksd.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
90 #include "psa.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
91 #include "mfw_sms.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
92 #include "mfw_cphs.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
93 #include "mfw_sat.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
94 #include "Mfw_band.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
95 #include "mfw_ffs.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
96 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
97 #include "dspl.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
98 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
99 #include "MmiMmi.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
100 #include "MmiDialogs.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
101 #include "MmiLists.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
102 #include "MmiBand.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
103 #include "MmiCPHS.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
104 #include "mmiColours.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 /***********************************Macros**********************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
107 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
108 #define MAX_NUMBER_OF_FREQS 5 |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
109 #define NO_OF_BAND_MODES 2 |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
110 #define BAND_INIT 1 |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
111 #define BAND_DESTROY 2 |
3
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 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
115 /*********************Structure Definitions********************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
116 typedef struct |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
117 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
118 T_MMI_CONTROL mmi_control; |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
119 T_MFW_HND freq_win; /* MFW win handler */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
120 T_MFW_HND parent; |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
121 UBYTE available_freqs; |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
122 UBYTE selected_freqs; /* SPR#998 - SH - Used to store list of selected frequencies */ |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
123 T_MFW_BAND_MODE mode; /* SPR#998 - SH */ |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
124 UBYTE type[MAX_NUMBER_OF_FREQS]; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
125 ListMenuData * menu_list_data; |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
126 UBYTE no_of_entries; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
127 } T_FREQ_INFO; |
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 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
130 static const MfwMnuAttr Freq_menuAttrib = |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
131 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
132 &melody_menuArea, |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
133 MNU_LEFT | MNU_LIST | MNU_CUR_LINE, /* centered page menu */ |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
134 (U8)-1, /* use default font */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
135 NULL, /* with these items */ |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
136 0, /* number of items */ |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
137 COLOUR_LIST_SMS, |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
138 TxtNull, |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
139 MNUATTRSPARE}; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
140 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
141 /* List of all possible frequencies */ |
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 static const int band_list[MAX_NUMBER_OF_FREQS] = { |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
144 MFW_BAND_GSM_900, |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
145 MFW_BAND_DCS_1800, |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
146 MFW_BAND_PCS_1900, |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
147 MFW_BAND_E_GSM, |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
148 MFW_BAND_GSM_850 |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
149 }; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
150 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
151 /* SPR#998 - SH - Static handle to allow callback functions to access data */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
152 static T_FREQ_INFO *current_data = NULL; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
153 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
154 /*********************************Function Prototypes*****************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
155 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
156 char* Freq2Str(int freq); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
157 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
158 int Freq2StrID(int freq); |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
159 static T_MFW_HND mmi_band_build_freq_list( MfwHnd parent_window, UBYTE available_freqs); |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
160 static int mmi_band_display_status(T_MFW_HND parent); |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
161 static int mmi_band_display_status_cb(T_MFW_HND parent, USHORT identifier, USHORT reason); |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
162 void mmi_band_freq_exec_cb (T_MFW_HND win, USHORT event, SHORT value, void * parameter); |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
163 void mmi_band_freq_list_cb(T_MFW_HND * Parent, ListMenuData * ListData); |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
164 static void mmi_band_freq_list_destroy(MfwHnd own_window); |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
165 static int mmi_band_freq_win_cb (MfwEvt e, MfwWin *w); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
166 /* SPR#998 - SH - Functions used by new checkbox menus */ |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
167 int mmi_band_menu_func(MfwMnu* menu, MfwMnuItem* item); |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
168 USHORT mmi_band_menu_flag( struct MfwMnuTag *menu, struct MfwMnuAttrTag *attr, struct MfwMnuItemTag *item ); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
169 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
170 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
171 /************************************Public Functions************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
172 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
173 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
174 /************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
175 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
176 $Function: mmi_band_radio_mode_change_auto |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
177 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
178 $Description: Changes multiband mode to automatic. Selected from menu. |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
179 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
180 $Returns: status int |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
181 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
182 $Arguments: menu and menu item (not used) |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
183 |
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
184 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
185 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
186 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
187 int mmi_band_radio_mode_change_auto(MfwMnu* m, MfwMnuItem* i) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
188 { |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
189 T_MFW_HND parent = mfwParent( mfw_header()); |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
190 // T_MFW_BAND_MODE mode; // RAVI |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
191 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
192 TRACE_FUNCTION("mmi_band_radio_mode_change_auto"); |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
193 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
194 if (band_radio_mode_switch(MFW_BAND_MODE_Auto, 0) >= MFW_BAND_OK) |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
195 { |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
196 ShowMessage(parent, TxtDone, TxtNull); |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
197 } |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
198 else |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
199 ShowMessage(parent, TxtFailed, TxtNull); |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
200 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
201 return MFW_EVENT_CONSUMED; |
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 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
204 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
205 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
206 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
207 $Function: mmi_band_radio_mode_change_manual |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
208 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
209 $Description: Gets a list of available manual bands. Selected from menu. |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
210 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
211 $Returns: status int |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
212 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
213 $Arguments: menu and menu item (not used) |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
214 |
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
215 |
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 int mmi_band_radio_mode_change_manual(MfwMnu* m, MfwMnuItem* i) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
219 { |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
220 T_MFW_HND parent = mfwParent( mfw_header()); |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
221 T_MFW_BAND_MODE maxMode; |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
222 UBYTE available_freqs; |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
223 T_MFW_HND win; |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
224 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
225 if (band_get_radio_modes(&maxMode, &available_freqs) >= MFW_BAND_OK) |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
226 { |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
227 if (maxMode >= MFW_BAND_MODE_Manual) /* Make sure manual is an accepted mode */ |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
228 { |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
229 win = mmi_band_build_freq_list(parent, available_freqs); |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
230 if (win NEQ NULL) |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
231 { |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
232 SEND_EVENT (win, BAND_INIT, 0, 0); |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
233 } |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
234 else |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
235 ShowMessage(parent, TxtManual, TxtNotSupported); |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
236 } |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
237 } |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
238 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
239 return MFW_EVENT_CONSUMED; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
240 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
241 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
242 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
243 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
244 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
245 $Function: mmi_band_radio_mode_info |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
246 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
247 $Description: Get current band setting |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
248 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
249 $Returns: status int |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
250 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
251 $Arguments: menu and menu item (not used) |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
252 |
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
253 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
254 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
255 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
256 int mmi_band_radio_mode_info(MfwMnu* m, MfwMnuItem* i) |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
257 { T_MFW_HND parent = mfwParent( mfw_header()); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
258 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
259 mmi_band_display_status(parent); |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
260 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
261 return MFW_EVENT_CONSUMED; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
262 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
263 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
264 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
265 /*******************************Private Functions**********************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
266 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
267 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
268 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
269 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
270 $Function: Freq2Str |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
271 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
272 $Description: Converts the band enum into an appropraite string |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
273 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
274 $Returns: string |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
275 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
276 $Arguments: Band (integer) |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
277 |
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
278 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
279 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
280 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
281 char* Freq2Str(int freq) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
282 { |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
283 switch (freq) |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
284 { |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
285 case MFW_BAND_DCS_1800: return MmiRsrcGetText(TxtDCS_1800); //break; // RAVI |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
286 case MFW_BAND_PCS_1900: return MmiRsrcGetText(TxtPCS_1900); //break; // RAVI |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
287 case MFW_BAND_E_GSM: return MmiRsrcGetText(TxtE_GSM); //break; // RAVI |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
288 case MFW_BAND_GSM_850: return MmiRsrcGetText(TxtGSM_850); // break; // RAVI |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
289 case MFW_BAND_GSM_900: return MmiRsrcGetText(TxtGSM_900); // break; // RAVI |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
290 default: return MmiRsrcGetText(TxtError); // break; // RAVI |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
291 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
292 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
293 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
294 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
295 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
296 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
297 $Function: Freq2Str |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
298 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
299 $Description: Converts the band enum into an appropraite string ID |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
300 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
301 $Returns: string ID |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
302 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
303 $Arguments: Band (integer) |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
304 |
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
305 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
306 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
307 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
308 int Freq2StrID(int freq) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
309 { |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
310 switch (freq) |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
311 { |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
312 case MFW_BAND_DCS_1800: return TxtDCS_1800; //break; // RAVI |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
313 case MFW_BAND_PCS_1900: return TxtPCS_1900; //break; // RAVI |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
314 case MFW_BAND_E_GSM: return TxtE_GSM; //break; // RAVI |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
315 case MFW_BAND_GSM_850: return TxtGSM_850; // break; // RAVI |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
316 case MFW_BAND_GSM_900: return TxtGSM_900; //break; // RAVI |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
317 default: return TxtError; //break; // RAVI |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
318 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
319 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
320 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
321 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
322 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
323 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
324 $Function: mmi_band_display_status |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
325 $Description: Displays the current band status |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
326 $Returns: none |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
327 $Arguments: parent - parent window |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
328 |
3
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 static int mmi_band_display_status(T_MFW_HND parent) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
332 { |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
333 /* SPR#998 - SH - Now store mode in data->mode */ |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
334 T_MFW_WIN *win_data = ((T_MFW_HDR *) parent)->data; |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
335 T_FREQ_INFO *data = (T_FREQ_INFO *)win_data->user; |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
336 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
337 if (band_get_current_radio_mode(&data->mode, &data->selected_freqs) >= MFW_BAND_OK) |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
338 { |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
339 if (data->mode == MFW_BAND_MODE_Auto) |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
340 { |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
341 ShowMessage(parent, TxtAutomatic, TxtNull); |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
342 } |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
343 else |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
344 { |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
345 ShowMessage(parent, TxtManual, TxtNull); |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
346 } |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
347 } |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
348 else |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
349 { |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
350 ShowMessage(parent, TxtReadError, TxtNull); |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
351 } |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
352 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
353 return 1; // RAVI - Changed return to return 1. |
3
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 #if(0) /* x0039298 - Lint warning fix */ |
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 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
359 $Function: mmi_band_display_status_cb |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
360 $Description: Callback for status list window - currently does nothing |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
361 $Returns: none |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
362 $Arguments: parent - parent window |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
363 identifier - length of status string |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
364 reason - not used |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
365 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
366 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
367 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
368 static int mmi_band_display_status_cb(T_MFW_HND parent, USHORT identifier, USHORT reason) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
369 { |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
370 return 1; // RAVI - Changed return to return 1. |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
371 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
372 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
373 |
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 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
376 $Function: mmi_band_build_freq_list |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
377 $Description: Creates window for frequency list |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
378 $Returns: window created |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
379 $Arguments: parent window |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
380 |
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 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
383 static T_MFW_HND mmi_band_build_freq_list( MfwHnd parent_window, UBYTE available_freqs) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
384 { |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
385 T_FREQ_INFO *data = (T_FREQ_INFO *)ALLOC_MEMORY (sizeof (T_FREQ_INFO)); |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
386 T_MFW_WIN *win; |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
387 // int index; // RAVI |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
388 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
389 TRACE_FUNCTION("mmi_band_build_freq_list()"); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
390 /* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
391 * Create window handler |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
392 */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
393 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
394 data->freq_win = win_create (parent_window, 0, E_WIN_VISIBLE, (T_MFW_CB)mmi_band_freq_win_cb); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
395 if (data->freq_win EQ NULL) |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
396 { |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
397 return NULL; |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
398 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
399 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
400 current_data = data; /* SPR#998 - SH - Store handle for data; used by callbacks */ |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
401 |
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
402 /* |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
403 * connect the dialog data to the MFW-window |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
404 */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
405 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
406 data->mmi_control.dialog = (T_DIALOG_FUNC)mmi_band_freq_exec_cb; |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
407 data->mmi_control.data = data; |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
408 win = ((T_MFW_HDR *)data->freq_win)->data; |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
409 win->user = (void *)data; |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
410 data->parent = parent_window; |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
411 data->available_freqs = available_freqs; |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
412 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
413 winShow(data->freq_win); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
414 /* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
415 * return window handle |
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 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
418 return data->freq_win; |
3
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 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
421 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
422 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
423 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
424 $Function: mmi_band_freq_exec_cb |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
425 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
426 $Description: Exec callback function of the information Numbers window |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
427 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
428 $Returns: none |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
429 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
430 $Arguments: win - window handler |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
431 event - mfw event |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
432 parameter - optional data. |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
433 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
434 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
435 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
436 void mmi_band_freq_exec_cb (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
|
437 { |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
438 T_MFW_WIN *win_data = ((T_MFW_HDR *) win)->data; |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
439 T_FREQ_INFO *data = (T_FREQ_INFO *)win_data->user; |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
440 UBYTE numberOfEntries; |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
441 int index; |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
442 T_MFW_BAND_MODE maxMode; |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
443 // char *menuItem; // RAVI |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
444 /* SPR#998 - SH - Remove code that implements custom checkbox implementaton, |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
445 * as checkboxes now handled by mfw */ |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
446 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
447 TRACE_FUNCTION ("mmi_band_freq_exec_cb()"); |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
448 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
449 switch (event) |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
450 { |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
451 case BAND_INIT: |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
452 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
453 TRACE_EVENT("mmi_band_freq_exec_cb() Event:BAND_INIT"); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
454 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
455 /* initialization of administrative data */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
456 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
457 data->menu_list_data = (ListMenuData *)ALLOC_MEMORY(sizeof(ListMenuData)); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
458 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
459 if(!data->menu_list_data) |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
460 { |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
461 TRACE_EVENT("Failed memory alloc 1 "); |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
462 return; |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
463 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
464 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
465 band_get_radio_modes(&maxMode, &data->available_freqs); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
466 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
467 /* Run through the list of possible frequencies first to obtain |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
468 the number of frequencies permitted (how many will be in the menu) */ |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
469 /* SPR#998 - SH - Removed custom checkbox implementation */ |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
470 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
471 numberOfEntries = 0; |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
472 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
473 for (index=0; index<MAX_NUMBER_OF_FREQS; index++) |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
474 { |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
475 if (data->available_freqs & band_list[index]) |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
476 { |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
477 data->type[numberOfEntries] = band_list[index]; |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
478 numberOfEntries++; |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
479 } |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
480 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
481 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
482 /* If there are no entries, show "Empty List" message and exit */ |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
483 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
484 if (numberOfEntries==0) |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
485 { |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
486 ShowMessage(data->parent, TxtEmptyList, TxtNull); |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
487 mmi_band_freq_list_destroy(win); |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
488 return; |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
489 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
490 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
491 /* Get the status of all the frequencies */ |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
492 /* SPR#998 - SH - Use data->mode */ |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
493 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
494 if (band_get_current_radio_mode(&data->mode, &data->selected_freqs) >= MFW_BAND_OK) |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
495 { |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
496 /* If we're not in manual choose manual */ |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
497 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
498 if (data->mode!=MFW_BAND_MODE_Manual) |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
499 { |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
500 data->selected_freqs = data->available_freqs; /* SH - default when choosing manual is all */ |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
501 band_radio_mode_switch(MFW_BAND_MODE_Manual, data->selected_freqs); |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
502 } |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
503 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
504 /* Allocate the memory for the list structure */ |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
505 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
506 data->no_of_entries = numberOfEntries; |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
507 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
508 data->menu_list_data->List = (T_MFW_MNU_ITEM *)ALLOC_MEMORY( numberOfEntries * sizeof(T_MFW_MNU_ITEM) ); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
509 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
510 if(!data->menu_list_data->List) |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
511 { |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
512 TRACE_EVENT("Failed memory alloc 2"); |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
513 return; |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
514 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
515 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
516 /* Allocate memory for the menu texts, and populate the list structure */ |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
517 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
518 numberOfEntries = 0; |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
519 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
520 for (index=0; index<MAX_NUMBER_OF_FREQS; index++) |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
521 { |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
522 if (data->available_freqs & band_list[index]) |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
523 { |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
524 /* SPR#998 - SH - Removed code, checkboxes now handled by MFW */ |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
525 mnuInitDataItem(&data->menu_list_data->List[numberOfEntries]); |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
526 /* Here we specify the function that checks and unchecks the checkboxes */ |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
527 data->menu_list_data->List[numberOfEntries].func = mmi_band_menu_func; |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
528 data->menu_list_data->List[numberOfEntries].str = (char *)Freq2StrID(band_list[index]); |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
529 /* Here we specify the function that returns the checkbox status of any menu item */ |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
530 data->menu_list_data->List[numberOfEntries].flagFunc = mmi_band_menu_flag; |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
531 numberOfEntries++; |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
532 } |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
533 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
534 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
535 data->menu_list_data->ListLength =numberOfEntries; |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
536 data->menu_list_data->ListPosition = 1; |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
537 data->menu_list_data->CursorPosition = 1; |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
538 data->menu_list_data->SnapshotSize = numberOfEntries; |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
539 data->menu_list_data->Font = 0; |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
540 data->menu_list_data->LeftSoftKey = TxtSoftSelect; |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
541 data->menu_list_data->RightSoftKey = TxtSoftBack; |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
542 data->menu_list_data->KeyEvents = KEY_ALL; |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
543 data->menu_list_data->Reason = 0; |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
544 data->menu_list_data->Strings = FALSE; /* SPR#998 - SH - We no longer alter the menu strings */ |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
545 data->menu_list_data->Attr = (MfwMnuAttr*)&Freq_menuAttrib; |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
546 data->menu_list_data->autoDestroy = FALSE; |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
547 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
548 /* Create the dynamic menu window */ |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
549 listDisplayListMenu(win, data->menu_list_data,(ListCbFunc)mmi_band_freq_list_cb,0); |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
550 } |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
551 else /* We haven't been able to read the status */ |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
552 { |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
553 ShowMessage(win, TxtReadError, TxtNull); |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
554 } |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
555 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
556 break; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
557 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
558 case BAND_DESTROY: |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
559 TRACE_EVENT("mmi_band_freq_exec_cb() Event:BAND_DESTROY"); |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
560 /* |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
561 * Free Memory |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
562 */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
563 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
564 /* SPR#998 - SH - No longer free allocated strings here */ |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
565 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
566 numberOfEntries = data->no_of_entries; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
567 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
568 if (data->menu_list_data != NULL) |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
569 { |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
570 FREE_MEMORY ((void *)data->menu_list_data->List, numberOfEntries * sizeof (T_MFW_MNU_ITEM)); |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
571 FREE_MEMORY ((void *)data->menu_list_data, sizeof (ListMenuData)); |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
572 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
573 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
574 FREE_MEMORY ((void *)data, sizeof (T_FREQ_INFO)); |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
575 break; |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
576 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
577 default: |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
578 break; |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
579 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
580 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
581 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
582 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
583 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
584 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
585 $Function: mmi_band_freq_list_cb |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
586 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
587 $Description: Callback function for the info num list. |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
588 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
589 $Returns: none |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
590 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
591 $Arguments: Parent - parent window. |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
592 ListData - Menu item list |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
593 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
594 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
595 void mmi_band_freq_list_cb(T_MFW_HND * Parent, ListMenuData * ListData) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
596 { |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
597 /* SPR#998 - SH - Selecting a checkbox is handled now by the checkbox functions, |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
598 * so much less is required here */ |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
599 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
600 T_MFW_WIN *win_data = ((T_MFW_HDR *)Parent)->data; |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
601 T_FREQ_INFO *data = (T_FREQ_INFO *)win_data->user; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
602 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
603 TRACE_FUNCTION("mmi_band_freq_list_cb"); |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
604 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
605 if ((ListData->Reason EQ LISTS_REASON_BACK) || (ListData->Reason EQ LISTS_REASON_CLEAR)) |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
606 { |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
607 listsDestroy(ListData->win); |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
608 mmi_band_freq_list_destroy(data->freq_win); |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
609 } |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
610 else if(ListData->Reason EQ LISTS_REASON_SELECT) |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
611 { |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
612 winShow(Parent); |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
613 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
614 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
615 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
616 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
617 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
618 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
619 $Function: mmi_band_freq_list_destroy |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
620 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
621 $Description: Destroy the info num window. |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
622 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
623 $Returns: none |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
624 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
625 $Arguments: own_window- current window |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
626 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
627 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
628 static void mmi_band_freq_list_destroy(MfwHnd own_window) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
629 { |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
630 T_MFW_WIN *win_data; |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
631 T_FREQ_INFO *data; |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
632 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
633 TRACE_FUNCTION ("mmi_band_freq_list_destroy()"); |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
634 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
635 if (own_window) |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
636 { |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
637 win_data = ((T_MFW_HDR *)own_window)->data; |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
638 data = (T_FREQ_INFO *)win_data->user; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
639 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
640 if (data) |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
641 { |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
642 /* |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
643 * Free Memory |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
644 */ |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
645 SEND_EVENT (own_window, BAND_DESTROY, 0, 0); |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
646 /* |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
647 * Delete WIN handler |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
648 */ |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
649 win_delete (own_window); |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
650 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
651 current_data = NULL; /* SPR#998 - SH - Set the data handle to NULL */ |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
652 } |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
653 else |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
654 { |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
655 TRACE_EVENT ("mmi_band_freq_list_destroy() called twice"); |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
656 } |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
657 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
658 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
659 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
660 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
661 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
662 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
663 $Function: mmi_band_freq_win_cb |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
664 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
665 $Description: Window callback function for the info numbers window. |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
666 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
667 $Returns: none |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
668 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
669 $Arguments: w - mfw window handler |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
670 e - mfw event |
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 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
673 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
674 static int mmi_band_freq_win_cb (MfwEvt e, MfwWin *w) /* yyy window event handler */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
675 { |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
676 TRACE_FUNCTION ("mmi_band_freq_win_cb()"); |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
677 switch (e) |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
678 { |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
679 case MfwWinVisible: /* window is visible */ |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
680 break; |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
681 case MfwWinFocussed: /* input focus / selected */ |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
682 case MfwWinDelete: /* window will be deleted */ |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
683 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
684 default: |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
685 return MFW_EVENT_REJECTED; |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
686 } |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
687 return MFW_EVENT_CONSUMED; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
688 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
689 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
690 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
691 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
692 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
693 $Function: mmi_band_menu_func |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
694 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
695 $Description: SPR#998 - SH - Added |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
696 Select or deselect a checkbox item. The appropriate band function is |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
697 called, to ensure that the selection is valid. |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
698 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
699 $Returns: None. |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
700 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
701 $Arguments: m, ma, mi - not used |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
702 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
703 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
704 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
705 int mmi_band_menu_func(MfwMnu* menu, MfwMnuItem* item) |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
706 { |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
707 T_FREQ_INFO *data = current_data; |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
708 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
709 TRACE_FUNCTION("mmi_band_menu_func"); |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
710 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
711 data->selected_freqs ^= data->type[menu->lCursor[menu->level]]; /* Toggle this band */ |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
712 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
713 if (band_radio_mode_switch(MFW_BAND_MODE_Manual, data->selected_freqs) >= MFW_BAND_OK) |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
714 { |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
715 mnuUpdate(menu); |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
716 } |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
717 else |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
718 { |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
719 data->selected_freqs ^= data->type[menu->lCursor[menu->level]]; /* Undo change */ |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
720 ShowMessage(data->freq_win, TxtFailed, TxtNull); |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
721 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
722 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
723 return 1; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
724 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
725 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
726 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
727 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
728 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
729 $Function: mmi_band_menu_flag |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
730 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
731 $Description: Attribut function for menu entries. |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
732 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
733 $Returns: Checked or unchecked |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
734 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
735 $Arguments: m, ma, mi - not used |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
736 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
737 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
738 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
739 USHORT mmi_band_menu_flag( struct MfwMnuTag *menu, struct MfwMnuAttrTag *attr, struct MfwMnuItemTag *item ) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
740 { |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
741 T_FREQ_INFO *data = current_data; /* SPR#998 - SH - Get data from static handle */ |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
742 int currentOption; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
743 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
744 TRACE_FUNCTION("mmi_band_menu_flag()"); |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
745 TRACE_EVENT_P1("Freq info data: %x", data); |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
746 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
747 /* Identify current menu option */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
748 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
749 currentOption = mnuIdentify(attr, item); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
750 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
751 /* If we find it, work out if it's checked or not */ |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
752 |
137
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
753 if (currentOption>-1) |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
754 { |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
755 if (data->selected_freqs & data->type[currentOption]) |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
756 return MNU_ITEM_CHECKED; |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
757 else |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
758 return MNU_ITEM_UNCHECKED; |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
759 } |
63dffa10b00a
mmiBand.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
760 return 0; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
761 } |