FreeCalypso > hg > fc-magnetite
annotate src/ui3/bmi/mmiBookServices.c @ 668:4011858168a1
AT@LPG and AT@PWL implemented in aci3
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Thu, 28 May 2020 02:13:50 +0000 |
parents | 6a4d9f47793e |
children |
rev | line source |
---|---|
420
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 /******************************************************************************* |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 CONDAT (UK) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 ******************************************************************************** |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 This software product is the property of Condat (UK) Ltd and may not be |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 disclosed to any third party without the express permission of the owner. |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 ******************************************************************************** |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 $Project name: Basic MMI |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 $Project code: BMI (6349) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 $Module: PhoneBook |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 $File: MmiBookServices.c |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 $Revision: 1.0 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 $Author: Condat(UK) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 $Date: 25/10/00 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 ******************************************************************************** |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 Description: |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
24 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
25 This provides the implementation of service functions for use with the |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
26 phone book module |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
27 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
28 ******************************************************************************** |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
29 $History: MmiBookServices.c |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
30 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
31 Sep 20, 2006 REF: OMAPS00145786 x0080701 (Bharat) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
32 Bug:PhoneBook: Wrong confirmation message in Phonebook storage when copying/moving a contact |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
33 after adding one or making a change |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
34 Fix: ACI shall not send rAT_OK for entry addition / entry change operations in Internal PHB |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
35 Hence, the "addname_flag" and "changename_flag" are immdtly reset incase of Internal PHB |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
36 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
37 June 22, 2006 REF: DRT OMAPS00081761 x0012849 : Jagannatha |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
38 Description:Handset crash when adding new entry with more then 20 digits to phonebook SIM card |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
39 Solution: Number editor will be restricted to 20 characters when EXT1 is not supported. |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
40 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
41 June 14, 2006 REF: OMAPS00079308 x0039928 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
42 Bug:Validation and Optimization of Memory consumption |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
43 Fix: Memory optimization is done in bookFindNameInSpecificPhonebook to save around 450 bytes of memory. |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
44 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
45 May 29, 2006 DR: OMAPS00079431 - xreddymn |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
46 Description: Name field is not limited to 14 bytes in case of SIM phonebook. |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
47 Solution: In bookInputStartNameEditor, limit the number of characters after |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
48 checking if SIM or ME phonebook is being used. |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
49 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
50 Jan 22, 2006 REF: OMAPS00061930 x0039928 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
51 Bug:PhoneBook -Change entry and view entry through Change option-failed |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
52 Fix: Phonebook is populated with phone numbers after some time and not immediately while saving the changed entries. |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
53 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
54 June 07, 2005 REF: CRR MMI-FIX-31545 x0021334 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
55 Issue description: SIM: wrong behavior when FDN is not allocated in SST |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
56 Solution: Before displaying the FDN options, a check is made if FDN is allocated. Only if |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
57 FDN is allocated, the options are displayed. |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
58 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
59 Sep 29, 2004 REF: CRR 25041 xvilliva |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
60 Bug: add new entry in the FDN , phone gets rebooted. |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
61 Fix: The bookMenuStart() is called with the window data->phbk->win, |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
62 similar to the function bookFDNMenu() to avoid crash. The menu |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
63 window thus created is stored, which will be deleted while |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
64 phonebook menu is destroyed. |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
65 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
66 Jul 29, 2004 REF: CRR 20888 Deepa M.D |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
67 Bug:Message received not showing with name, name stored in phonebook |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
68 Fix:Memset the structure(p_pszNumberText.data) to 0 and then memcpy. |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
69 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
70 Jul 28, 2004 REF: CRR:20887 xrashmic - SASKEN |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
71 Description: Current state of FDN not highlighted |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
72 Fix: Instead of showing the submenu directly we call this function |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
73 where we set the menu and also higlight the previously selected menu item |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
74 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
75 June 25, 2004 REF: CRR 21547 xvilliva |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
76 Bug: Taking blank entries in phonebook if select book is either SIM or Phone. |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
77 Fix: We check for presence of either phone number or name before add/modify. |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
78 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
79 Jun 23, 2004 REF: CRR MMI-SPR-21636 Rashmi C N(Sasken) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
80 Description: The confirmation for deleting entry from address book was a timed confirmation |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
81 screen. |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
82 Solution: Now the time is set to 'FOREVER' from 'TEN_SECS' |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
83 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
84 Issue Number : SPR#12722 on 29/03/04 by Deepa M.D |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
85 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
86 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
87 25/10/00 Original Condat(UK) BMI version. |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
88 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
89 $End |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
90 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
91 *******************************************************************************/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
92 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
93 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
94 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
95 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
96 /******************************************************************************* |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
97 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
98 Include Files |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
99 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
100 *******************************************************************************/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
101 #define ENTITY_MFW |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
102 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
103 /* includes */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
104 #include <string.h> |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
105 #include <stdio.h> |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
106 #include <stdlib.h> |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
107 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
108 #if defined (NEW_FRAME) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
109 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
110 #include "typedefs.h" |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
111 #include "vsi.h" |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
112 #include "pei.h" |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
113 #include "custom.h" |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
114 #include "gsm.h" |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
115 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
116 #else |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
117 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
118 #include "STDDEFS.H" |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
119 #include "custom.h" |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
120 #include "gsm.h" |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
121 #include "vsi.h" |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
122 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
123 #endif |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
124 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
125 #include "mfw_sys.h" |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
126 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
127 #include "mfw_mfw.h" |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
128 #include "mfw_win.h" |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
129 #include "mfw_kbd.h" |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
130 #include "mfw_lng.h" |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
131 /* SPR#1428 - SH - New Editor changes */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
132 #ifndef NEW_EDITOR |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
133 #include "mfw_edt.h" |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
134 #endif |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
135 #include "mfw_icn.h" |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
136 #include "mfw_mnu.h" |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
137 #include "mfw_tim.h" |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
138 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
139 #include "mfw_sim.h" |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
140 #include "mfw_cm.h" |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
141 #include "mfw_nm.h" |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
142 #include "mfw_phb.h" |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
143 #include "mfw_mme.h" |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
144 #include "mfw_sat.h" |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
145 #include "mfw_sms.h" |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
146 #include "mfw_cnvt.h" //GW Added for 'mfw_SIM2GsmStr' |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
147 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
148 #include "dspl.h" |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
149 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
150 #include "ksd.h" |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
151 #include "psa.h" |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
152 #include "psa_sim.h" // June 07, 2005 REF: CRR MMI-FIX-31545 x0021334 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
153 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
154 #include "MmiMain.h" |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
155 #include "MmiBookController.h" |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
156 #include "MmiDummy.h" |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
157 #include "MmiDialogs.h" |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
158 #include "MmiLists.h" |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
159 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
160 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
161 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
162 #include "MmiMenu.h" |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
163 #include "mmiCall.h" |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
164 #include "Mmiicons.h" |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
165 #include "MmiIdle.h" |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
166 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
167 #include "MmiSoftKeys.h" |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
168 #include "MmiSounds.h" |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
169 #include "MmiIdle.h" |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
170 #include "MmiNetwork.h" |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
171 #include "mmiSat_i.h" |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
172 #include "MmiAoc.h" |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
173 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
174 #include "gdi.h" |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
175 #include "audio.h" |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
176 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
177 #include "cus_aci.h" |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
178 #include "mfw_ffs.h" |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
179 #include "MmiTimers.h" |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
180 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
181 #include "MmiBookShared.h" |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
182 #include "MmiBookController.h" |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
183 #include "MmiDialogs.h" |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
184 #include "mmiColours.h" |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
185 #include "MmiBookMenuWindow.h" |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
186 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
187 /* SPR#1428 - SH - New Editor: Include needed for MmiBookInputWindow functions, see below*/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
188 #ifdef NEW_EDITOR |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
189 #ifdef EASY_TEXT_ENABLED |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
190 #include "MmiChineseInput.h" |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
191 #endif |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
192 #endif |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
193 #include "psa_sim.h" // June 22, 2006 REF: DRT OMAPS00081761 x0012849 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
194 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
195 #define TRACE_PB_DEBUG |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
196 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
197 extern int menuFDN; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
198 extern T_call call_data; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
199 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
200 /******************************************************************************* |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
201 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
202 Private data elements |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
203 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
204 *******************************************************************************/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
205 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
206 static MfwHnd phb; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
207 /* SPR#1112 - SH - Internal phonebook flags */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
208 #ifdef INT_PHONEBOOK |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
209 BOOL ipbBookSelected = FALSE; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
210 BOOL ipbBookAvailable = FALSE; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
211 #endif |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
212 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
213 // June 14, 2006 REF: OMAPS00079308 x0039928 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
214 // Fix: All optimized code is put under flag FF_MMI_PB_OPTIM |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
215 #ifdef FF_MMI_PB_OPTIM |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
216 # define PB_MAX_FIND_ENTRIES 1 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
217 #else |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
218 # define PB_MAX_FIND_ENTRIES 4 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
219 #endif |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
220 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
221 // Jul 28, 2004 REF: CRR:20887 xrashmic - SASKEN |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
222 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
223 #define FIRSTMENUITEM 0 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
224 #define SECONDMENUITEM 1 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
225 #define OLD_NUM_LENGTH 21 // June 22, 2006 REF: DRT OMAPS00081761 x0012849 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
226 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
227 /******************************************************************************* |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
228 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
229 Private methods |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
230 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
231 *******************************************************************************/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
232 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
233 /* Sep 20, 2006 REF: OMAPS00145786 x0080701 (Bharat) -- Start */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
234 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
235 extern BOOL addname_flag; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
236 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
237 extern BOOL changename_flag; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
238 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
239 static void mmi_int_phb_store_change_completion(); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
240 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
241 /* Sep 20, 2006 REF: OMAPS00145786 x0080701 (Bharat) -- End */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
242 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
243 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
244 /******************************************************************************* |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
245 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
246 $Function: bookDeleteEntryCB |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
247 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
248 $Description: Delete the current entry from the phone book. |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
249 This routine is invoked as a callback from the confirmation |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
250 dialog and will perform the delete if the OK key has been |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
251 selected. |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
252 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
253 $Returns: None |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
254 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
255 $Arguments: win, handle of parent window, |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
256 id, of invocation, |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
257 reason, for invocation |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
258 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
259 *******************************************************************************/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
260 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
261 static void bookDeleteEntryCB( T_MFW_HND win, USHORT id, UBYTE reason ) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
262 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
263 T_MFW_WIN *win_data = ( (T_MFW_HDR *) win )->data; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
264 tBookStandard *data = (tBookStandard *) win_data->user; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
265 T_phbk *Phbk = data->phbk; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
266 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
267 TRACE_EVENT_P1("bookDeleteEntryCB index %d", Phbk->current.entry[Phbk->current.selectedName].index); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
268 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
269 /* This call back is invoked from the delete entry dialog confirmation |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
270 screen, and will only respond to the left key (OK) being selected. |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
271 */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
272 switch ( reason ) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
273 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
274 case INFO_KCD_LEFT: |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
275 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
276 if (( Phbk->current.status.book == PHB_UPN) || |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
277 (Phbk->current.status.book == PHB_FDN )) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
278 deleteFromFile( Phbk, Phbk->current.status.book ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
279 else |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
280 deleteFromFile( Phbk, bookActiveBook(WRITE) ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
281 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
282 /* retrieve he status of the book, and create a string for output |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
283 based on the status |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
284 */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
285 bookShowInformation( Phbk->win, MmiBookCurrentText(), NULL,NULL ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
286 SEND_EVENT(win, E_MNU_ESCAPE, NULL, NULL); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
287 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
288 break; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
289 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
290 default: |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
291 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
292 /* No action required |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
293 */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
294 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
295 break; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
296 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
297 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
298 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
299 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
300 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
301 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
302 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
303 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
304 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
305 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
306 /******************************************************************************* |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
307 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
308 Public Methods |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
309 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
310 *******************************************************************************/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
311 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
312 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
313 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
314 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
315 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
316 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
317 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
318 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
319 /******************************************************************************* |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
320 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
321 $Function: bookInitialise |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
322 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
323 $Description: Initialise the phone book application |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
324 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
325 $Returns: none, side effect is to set up the static phone |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
326 book element |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
327 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
328 $Arguments: none |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
329 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
330 *******************************************************************************/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
331 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
332 void bookInitialise( MfwHnd parent ) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
333 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
334 TRACE_FUNCTION( "bookInitialise()" ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
335 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
336 /* SPR#1112 - SH - Added E_PHB_READY and E_PHB_BUSY */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
337 phb = phb_create( 0, (MfwEvt) (E_PHB_UPN_LIST | E_PHB_ERROR | E_PHB_STATUS |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
338 | E_PHB_READY | E_PHB_BUSY), (MfwCb) bookEvent ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
339 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
340 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
341 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
342 /* SPR#1112 - Initialise internal phonebook */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
343 #ifdef INT_PHONEBOOK |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
344 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
345 /******************************************************************************* |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
346 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
347 $Function: bookInitInternal |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
348 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
349 $Description: Initialise the internal phone book application |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
350 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
351 $Returns: none, side effect is to set up the static phone |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
352 book element |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
353 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
354 $Arguments: none |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
355 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
356 *******************************************************************************/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
357 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
358 void bookInitInternal( void ) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
359 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
360 UBYTE intphonebook; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
361 T_MFW ret; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
362 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
363 ret = GI_pb_GetPhonebook(&intphonebook); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
364 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
365 if (ret==MFW_PHB_OK) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
366 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
367 bookSetBookAvailable(TRUE); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
368 GI_pb_Initialise(); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
369 if (intphonebook) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
370 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
371 bookSetBookSelected(TRUE); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
372 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
373 else |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
374 bookSetBookSelected(FALSE); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
375 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
376 else |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
377 bookSetBookAvailable(FALSE); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
378 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
379 return; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
380 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
381 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
382 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
383 /******************************************************************************* |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
384 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
385 $Function: bookGetBookSelected |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
386 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
387 $Description: Is the internal phonebook selected? |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
388 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
389 $Returns: TRUE if internal phonebook is selected, FALSE otherwise |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
390 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
391 $Arguments: none |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
392 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
393 *******************************************************************************/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
394 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
395 BOOL bookGetBookSelected() |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
396 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
397 return ipbBookSelected; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
398 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
399 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
400 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
401 /******************************************************************************* |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
402 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
403 $Function: bookSetBookSelected |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
404 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
405 $Description: Select or deselect the internal phonebook |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
406 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
407 $Returns: None. |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
408 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
409 $Arguments: TRUE to select internal phonebook, FALSE to select SIM phonebook |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
410 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
411 *******************************************************************************/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
412 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
413 void bookSetBookSelected(UBYTE bookSelected) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
414 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
415 ipbBookSelected = bookSelected; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
416 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
417 return; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
418 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
419 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
420 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
421 /******************************************************************************* |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
422 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
423 $Function: bookGetBookAvailable |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
424 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
425 $Description: Is the internal phonebook available for use? |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
426 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
427 $Returns: TRUE if internal phonebook is available, FALSE otherwise |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
428 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
429 $Arguments: none |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
430 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
431 *******************************************************************************/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
432 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
433 BOOL bookGetBookAvailable() |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
434 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
435 return ipbBookAvailable; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
436 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
437 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
438 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
439 /******************************************************************************* |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
440 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
441 $Function: bookSetBookAvailable |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
442 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
443 $Description: Indicate whether or not the internal phonebook is available for use |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
444 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
445 $Returns: None. |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
446 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
447 $Arguments: TRUE to if internal phonebook is available, FALSE otherwise |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
448 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
449 *******************************************************************************/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
450 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
451 void bookSetBookAvailable(UBYTE bookAvailable) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
452 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
453 ipbBookAvailable = bookAvailable; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
454 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
455 return; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
456 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
457 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
458 #endif |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
459 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
460 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
461 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
462 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
463 /******************************************************************************* |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
464 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
465 $Function: bookExit |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
466 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
467 $Description: Exit the phone book application, this will delete the static |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
468 phone book element |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
469 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
470 $Returns: none |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
471 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
472 $Arguments: none |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
473 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
474 *******************************************************************************/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
475 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
476 void bookExit( void ) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
477 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
478 TRACE_FUNCTION( "bookExit()" ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
479 phb_delete( phb ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
480 /* SPR#1112 - SH - Now redundant */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
481 // bookDeletePhoneBook(); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
482 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
483 /* SPR#1112 - SH - Exit internal phonebook if activated */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
484 #ifdef INT_PHONEBOOK |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
485 if (bookGetBookAvailable()) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
486 GI_pb_Exit(); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
487 #endif |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
488 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
489 return; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
490 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
491 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
492 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
493 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
494 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
495 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
496 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
497 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
498 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
499 /******************************************************************************* |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
500 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
501 $Function: bookAddName |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
502 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
503 $Description: Adds a new number to the phone book |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
504 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
505 $Returns: tbd |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
506 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
507 $Arguments: tbd |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
508 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
509 *******************************************************************************/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
510 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
511 void bookAddName( T_MFW_HND win, char *number ) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
512 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
513 T_MFW_WIN *win_data = ( (T_MFW_HDR *) win )->data; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
514 tBookStandard *data = (tBookStandard *) win_data->user; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
515 T_phbk *Phbk = (T_phbk *)data->phbk; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
516 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
517 /* Populate the name and number records with the provided number |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
518 */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
519 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
520 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
521 /*MC SPR 1257, name strings should use MAX_ALPHA_LEN*/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
522 memset( Phbk->edt_buf_name, 0, MAX_ALPHA_LEN ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
523 memcpy( Phbk->edt_buf_number, (char*)number, PHB_MAX_LEN ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
524 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
525 /* Populate the input specifier structure and use it to |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
526 perform the next action, note when we return we start |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
527 adding a new name. |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
528 */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
529 TRACE_EVENT ("bookAddName"); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
530 data->phbk->input_name_win = bookInputStartNameEditor( |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
531 data->win, (char*)Phbk->edt_buf_name ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
532 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
533 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
534 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
535 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
536 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
537 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
538 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
539 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
540 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
541 /******************************************************************************* |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
542 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
543 $Function: bookShowInformation |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
544 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
545 $Description: general information dialog routine |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
546 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
547 $Returns: none |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
548 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
549 $Arguments: parent, window, |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
550 text, to be displayed, |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
551 cb_function, call back on completion of window |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
552 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
553 *******************************************************************************/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
554 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
555 void bookShowInformation( MfwHnd parent, int txtId, char *text, T_VOID_FUNC cb_function ) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
556 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
557 T_DISPLAY_DATA display_info; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
558 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
559 TRACE_FUNCTION( "bookShowInformation()" ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
560 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
561 dlg_initDisplayData_TextId( &display_info, TxtNull, TxtNull, txtId, TxtNull, COLOUR_BOOK_POPUP); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
562 dlg_initDisplayData_events( &display_info, (T_VOID_FUNC) cb_function, THREE_SECS, KEY_CLEAR ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
563 display_info.TextString = text; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
564 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
565 /* Call Info Screen |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
566 */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
567 info_dialog( parent, &display_info ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
568 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
569 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
570 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
571 /******************************************************************************* |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
572 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
573 $Function: bookShowInfoScreen |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
574 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
575 $Description: SPR1112 - SH - Show an info screen |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
576 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
577 $Returns: none |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
578 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
579 $Arguments: parent, window, |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
580 txtId1 - first line ID |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
581 txtId2 - second line ID |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
582 time - timeout for dialog |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
583 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
584 *******************************************************************************/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
585 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
586 T_MFW_HND bookShowInfoScreen( MfwHnd parent, int txtId1, int txtId2, T_VOID_FUNC cb_function, |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
587 USHORT Identifier, ULONG Time) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
588 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
589 T_DISPLAY_DATA display_info; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
590 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
591 TRACE_FUNCTION( "bookShowInformation()" ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
592 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
593 dlg_initDisplayData_TextId(&display_info, TxtNull, TxtNull, txtId1, txtId2, COLOUR_BOOK_POPUP); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
594 dlg_initDisplayData_events(&display_info, (T_VOID_FUNC)cb_function, Time, KEY_CLEAR); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
595 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
596 display_info.Identifier = Identifier; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
597 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
598 /* Call Info Screen |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
599 */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
600 return info_dialog( parent, &display_info ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
601 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
602 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
603 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
604 /******************************************************************************* |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
605 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
606 $Function: bookFindIndexMatchPB |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
607 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
608 $Description: Locates the best match from a supplied list of phonebook entries |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
609 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
610 $Returns: 0 if error, 1 if successful |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
611 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
612 $Arguments: listPB, pointer to phonebook entries |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
613 numEntries, number of entries in listPB |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
614 srcNumberr, pointer to pattern to match |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
615 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
616 $History: |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
617 SPR#1727 - DS - Merged from 1.6 branch. |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
618 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
619 *******************************************************************************/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
620 int bookFindIndexMatchPB(T_MFW_PHB_LIST* listPB, UBYTE numEntries, const char* srcNumber) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
621 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
622 int indexMatch = -1; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
623 int i = 0; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
624 int j = 0; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
625 int maxMatchChars = 0; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
626 int count; /* Number of matching characters */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
627 int lenNum; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
628 int lenNumPB; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
629 int firstNotMatch=0; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
630 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
631 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
632 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
633 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
634 TRACE_FUNCTION("bookFindIndexMatchPB()"); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
635 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
636 #ifdef TRACE_PB_DEBUG |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
637 TRACE_EVENT_P1("numEntries to examine: %d", numEntries); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
638 #endif /* TRACE_PB_DEBUG */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
639 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
640 if ( (listPB == NULL) || (srcNumber == NULL) ) /* Invalid data */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
641 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
642 TRACE_EVENT("Invalid data passed to findIndexMatchPB"); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
643 return (-1); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
644 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
645 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
646 if (numEntries <= 0) /* Invalid number of entries */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
647 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
648 TRACE_EVENT_P1("Invalid number of entries passed into findIndexMatchPB: %d", numEntries); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
649 return (-1); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
650 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
651 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
652 /* Calculate length of number */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
653 lenNum = strlen(srcNumber); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
654 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
655 #ifdef TRACE_PB_DEBUG |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
656 TRACE_EVENT_P1("Len of number: %d", lenNum); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
657 #endif /* TRACE_PB_DEBUG */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
658 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
659 /* Loop round number of entries */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
660 for (i=0; i<numEntries; i++) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
661 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
662 char* entryPB = (char*)listPB->entry[i].number; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
663 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
664 /* Calculate length of number in PB entry */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
665 lenNumPB = strlen(entryPB); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
666 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
667 #ifdef TRACE_PB_DEBUG |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
668 TRACE_EVENT_P2("Len of PB number for entry %d: %d", i, lenNumPB); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
669 #endif /* TRACE_PB_DEBUG */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
670 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
671 /* Set count and loop-counter to 0 before comparing numbers */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
672 count = 0; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
673 j = 0; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
674 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
675 /* Determine number of matching digits |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
676 * Exit loop if digits don't match or if reached end of either number buffer |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
677 */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
678 while ( (!firstNotMatch) && !(j > lenNumPB) && !(j > lenNum) ) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
679 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
680 /* Compare digits */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
681 if (srcNumber[lenNum-j] == entryPB[lenNumPB-j]) /* Matching character */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
682 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
683 #ifdef TRACE_PB_DEBUG |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
684 TRACE_EVENT_P1("Found match at pos %d", j); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
685 #endif /* TRACE_PB_DEBUG */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
686 count = count + 1; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
687 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
688 else |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
689 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
690 /* Digits don't match */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
691 firstNotMatch=1; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
692 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
693 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
694 /* Increment index to point at next set of digits */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
695 j = j + 1; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
696 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
697 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
698 /* If better match store count and index */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
699 /* SPR#1727 - DS - Added numbersMatch() check */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
700 if ( (count > maxMatchChars) && numbersMatch((char*)srcNumber, entryPB) ) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
701 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
702 #ifdef TRACE_PB_DEBUG |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
703 TRACE_EVENT_P2("Entry %d is better match. Matches %d chars", i, count); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
704 #endif /* TRACE_PB_DEBUG */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
705 maxMatchChars = count; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
706 indexMatch = i; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
707 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
708 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
709 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
710 /* Return index of best match */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
711 return indexMatch; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
712 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
713 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
714 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
715 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
716 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
717 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
718 /******************************************************************************* |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
719 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
720 $Function: bookFindNameInPhonebook |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
721 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
722 $Description: SPR#1112 - Modified function to search in alternate phonebook. |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
723 Locates the name in the current phonebook. If the current phonebook is |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
724 the internal phonebook and no result is found, the SIM phonebook is also |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
725 searched. |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
726 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
727 $Returns: 0 if error, 1 if successful |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
728 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
729 $Arguments: p_pszNumber, pointer to pattern to match, p_pEntry, pointer |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
730 to buffer into which to store result. |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
731 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
732 *******************************************************************************/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
733 //GW-SPR#810-Simplified phonebook entry search based on 1.3.3 code. |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
734 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
735 int bookFindNameInPhonebook( const char *p_pszNumber, T_MFW_PHB_ENTRY *p_pEntry ) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
736 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
737 int result; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
738 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
739 TRACE_FUNCTION( "bookFindNameInPhonebook()" ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
740 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
741 if(p_pszNumber == 0 || p_pEntry == 0) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
742 return (0); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
743 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
744 if (strlen(p_pszNumber) < 1) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
745 return (0); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
746 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
747 result = bookFindNameInSpecificPhonebook(p_pszNumber, p_pEntry); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
748 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
749 #ifdef INT_PHONEBOOK |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
750 /* If not found in internal phonebook, try SIM */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
751 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
752 if (!result && bookGetBookAvailable() && bookGetBookSelected()) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
753 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
754 bookSetBookSelected(FALSE); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
755 result = bookFindNameInSpecificPhonebook(p_pszNumber, p_pEntry); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
756 bookSetBookSelected(TRUE); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
757 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
758 #endif |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
759 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
760 return result; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
761 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
762 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
763 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
764 /******************************************************************************* |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
765 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
766 $Function: bookFindNameInSpecificPhonebook |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
767 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
768 $Description: Locates the name in a specified phone book |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
769 SPR#1112 - SH - Separate this part of function, so we can call it twice |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
770 $Returns: 0 if error, 1 if successful |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
771 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
772 $Arguments: p_pszNumber, pointer to pattern to match, p_pEntry, pointer |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
773 to buffer into which to store result. |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
774 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
775 SPR#1727 - Modified to use bookFindIndexMatchPB. |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
776 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
777 *******************************************************************************/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
778 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
779 int bookFindNameInSpecificPhonebook( const char *p_pszNumber, T_MFW_PHB_ENTRY *p_pEntry ) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
780 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
781 #ifdef NO_ASCIIZ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
782 T_MFW_PHB_TEXT p_pszNumberText; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
783 #endif |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
784 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
785 T_MFW_PHB_LIST phb_list; //, new_list; // RAVI |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
786 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
787 SHORT phb_index = 0; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
788 UBYTE l_name[MAX_ALPHA_LEN]; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
789 // June 14, 2006 REF: OMAPS00079308 x0039928 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
790 // Fix: All optimized code is put under flag FF_MMI_PB_OPTIM |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
791 #ifndef FF_MMI_PB_OPTIM |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
792 T_MFW_PHB_ENTRY temp_pEntry[PB_MAX_FIND_ENTRIES]; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
793 #endif |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
794 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
795 /*MC SPR 1319*/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
796 #ifdef EASY_TEXT_ENABLED |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
797 #ifndef FF_MMI_PB_OPTIM |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
798 char debug[MAX_ALPHA_LEN]; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
799 int k; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
800 #endif |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
801 #endif |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
802 int indexMatch; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
803 int ret; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
804 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
805 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
806 if(p_pszNumber == 0 || p_pEntry == 0) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
807 return (0); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
808 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
809 if (strlen(p_pszNumber) < 1) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
810 return (0); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
811 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
812 memset( p_pEntry, 0, sizeof(T_MFW_PHB_ENTRY) ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
813 memset( &phb_list, 0, sizeof(phb_list) ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
814 #ifdef FF_MMI_PB_OPTIM |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
815 phb_list.entry = p_pEntry; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
816 #else |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
817 phb_list.entry = temp_pEntry; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
818 #endif |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
819 phb_list.num_entries = PB_MAX_FIND_ENTRIES; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
820 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
821 /* Search phonebook for up to 4 entries with the last 6 digits matching number */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
822 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
823 #ifdef NO_ASCIIZ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
824 /* GW Set up data structure for NO_ASCIIZ */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
825 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
826 p_pszNumberText.dcs = MFW_DCS_8bits; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
827 p_pszNumberText.len = strlen(p_pszNumber); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
828 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
829 // strcpy((char*)p_pszNumberText.data, p_pszNumber); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
830 /* cq15688 copy number into the text info structure using memcpy() instead of strcpy()3/03/04 MZ */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
831 //Jul 29, 2004 REF: CRR 20888 Deepa M.D |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
832 //First memset the structure and then memcpy. |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
833 memset(p_pszNumberText.data, 0, sizeof(p_pszNumberText.data)); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
834 memcpy( (char*)p_pszNumberText.data, p_pszNumber , p_pszNumberText.len ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
835 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
836 ret = phb_find_entries( |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
837 bookActiveBook(READ), /* phonebook */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
838 &phb_index, /* returns index in phb */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
839 MFW_PHB_NUMBER, /* searching for number */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
840 PB_MAX_FIND_ENTRIES, /* return max. four entry */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
841 &p_pszNumberText, /* search this pattern */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
842 &phb_list /* return structure */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
843 ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
844 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
845 #else |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
846 ret = phb_find_entries( |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
847 bookActiveBook(READ), /* phonebook */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
848 &phb_index, /* returns index in phb */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
849 MFW_PHB_NUMBER, /* searching for number */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
850 PB_MAX_FIND_ENTRIES, /* return max. four entry */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
851 (char *)p_pszNumber, /* search this pattern */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
852 &phb_list /* return structure */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
853 ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
854 #endif //NO_ASCIIZ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
855 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
856 //Check return from phb_find_entries |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
857 if (ret == MFW_PHB_FAIL) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
858 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
859 return (0); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
860 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
861 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
862 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
863 /* SPR#1727 - DS - Examine returned PB entries and find best match */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
864 indexMatch = bookFindIndexMatchPB(&phb_list, phb_list.num_entries, p_pszNumber); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
865 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
866 if (indexMatch == -1) /* No match found */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
867 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
868 TRACE_EVENT("No match found in findIndexMatchPB !"); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
869 return (0); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
870 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
871 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
872 #ifdef TRACE_PB_DEBUG |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
873 TRACE_EVENT_P1("Match found in findIndexMatchPB. Pb entry %d", indexMatch); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
874 #endif /* TRACE_PB_DEBUG */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
875 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
876 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
877 /* Copy matched phonebook entry details */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
878 #ifndef FF_MMI_PB_OPTIM |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
879 memcpy( p_pEntry, &temp_pEntry[indexMatch] , sizeof(T_MFW_PHB_ENTRY) ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
880 #endif |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
881 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
882 if (p_pEntry == NULL) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
883 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
884 return (0); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
885 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
886 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
887 /* Convert name into appropriate format */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
888 #ifdef NO_ASCIIZ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
889 /*MC SPR 1319*/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
890 #ifdef EASY_TEXT_ENABLED |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
891 #ifndef FF_MMI_PB_OPTIM |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
892 for (k=0;k<p_pEntry->name.len; k++) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
893 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
894 if (p_pEntry->name.data[k]==0 ) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
895 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
896 debug[k] = '0'; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
897 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
898 else |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
899 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
900 debug[k] = p_pEntry->name.data[k]; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
901 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
902 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
903 TRACE_EVENT_P1("BFNIP: %s ", debug); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
904 #endif |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
905 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
906 /*MC SPR 1257, replacing PHB_MAX_LEN with MAX_ALPHA_LEN for name strings*/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
907 if (p_pEntry->name.data[0] == 0x80) /* Unicode 0x80 style */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
908 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
909 /*MC, removed var "actual_length*/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
910 int i; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
911 for (i=1; i<MAX_ALPHA_LEN; i+=1) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
912 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
913 l_name[i+1] = p_pEntry->name.data[i]; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
914 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
915 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
916 l_name[0] = p_pEntry->name.data[0]; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
917 l_name[1] = MAX_ALPHA_LEN; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
918 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
919 memcpy( p_pEntry->name.data, (char*)l_name, MAX_ALPHA_LEN ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
920 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
921 if (p_pEntry->name.len%2 == 1)/*if length of string odd*/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
922 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
923 p_pEntry->name.len++; /*MC we have to increase the length by one as we've shifted the string up*/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
924 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
925 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
926 /*MC, ensure all the chars in the string after string length are 0*/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
927 for (i=p_pEntry->name.len; i<MAX_ALPHA_LEN; i++) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
928 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
929 p_pEntry->name.data[i]= 0; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
930 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
931 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
932 #ifndef FF_MMI_PB_OPTIM |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
933 for (k=0;k<p_pEntry->name.len; k++) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
934 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
935 if (p_pEntry->name.data[k]==0 ) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
936 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
937 debug[k] = '0'; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
938 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
939 else |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
940 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
941 debug[k] = p_pEntry->name.data[k]; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
942 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
943 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
944 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
945 TRACE_EVENT_P1("BNFIP conv: %s", debug); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
946 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
947 sprintf(debug, "Length of phonebook entry:%d", p_pEntry->name.len); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
948 #endif |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
949 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
950 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
951 else |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
952 #endif /* EASY_TEXT_ENABLED */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
953 /* Marcus: Issue 963: 11/09/2002: Start */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
954 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
955 /* |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
956 * bookGsm2Alpha requires ASCIIZ string - make sure it is. |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
957 * This also will help calling functions that may assume ASCIIZ. |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
958 */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
959 if (sizeof(p_pEntry->name.data) > p_pEntry->name.len) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
960 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
961 p_pEntry->name.data[p_pEntry->name.len] = '\0'; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
962 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
963 /*SPR2175, use new function to convert from GSM to ASCII*/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
964 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
965 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
966 TRACE_EVENT_P1("Converting name from 8-bit to ASCII, dcs: %d", p_pEntry->name.dcs); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
967 ATB_convert_String((char*)p_pEntry->name.data, MFW_DCS_8bits, p_pEntry->name.len, (char*)l_name, MFW_ASCII, MAX_ALPHA_LEN, FALSE); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
968 p_pEntry->name.dcs = MFW_ASCII; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
969 memcpy(p_pEntry->name.data, l_name, MAX_ALPHA_LEN); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
970 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
971 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
972 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
973 /* Marcus: Issue 963: 11/09/2002: End */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
974 /*MC end*/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
975 #else |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
976 bookGsm2Alpha( (UBYTE *) p_pEntry->name ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
977 #endif /* NO_ASCIIZ */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
978 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
979 return (1); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
980 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
981 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
982 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
983 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
984 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
985 /******************************************************************************* |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
986 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
987 $Function: bookFindNumberByPosition |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
988 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
989 $Description: locate a number given the index |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
990 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
991 $Returns: 0 if failure, 1 otherwise |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
992 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
993 $Arguments: index of the number to find, p_pentry, return structure |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
994 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
995 *******************************************************************************/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
996 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
997 UBYTE bookFindNumberByPosition (UBYTE index,T_MFW_PHB_ENTRY* p_pEntry) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
998 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
999 T_MFW_PHB_LIST phb_list; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1000 /*MC SPR 1257, replacing PHB_MAX_LEN with MAX_ALPHA_LEN for name strings*/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1001 UBYTE l_name[MAX_ALPHA_LEN]; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1002 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1003 TRACE_FUNCTION( "bookFindNumberByPosition()" ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1004 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1005 /* only search if we have valid input information |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1006 */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1007 if( index == 0 || p_pEntry == 0 ) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1008 return 0; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1009 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1010 /* Clear the output buffers |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1011 */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1012 memset( p_pEntry, 0, sizeof( T_MFW_PHB_ENTRY ) ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1013 memset( &phb_list, 0, sizeof( phb_list ) ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1014 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1015 /* searc for the selected entry |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1016 */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1017 phb_list.entry = p_pEntry; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1018 phb_list.num_entries = 1; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1019 phb_read_entries( bookActiveBook(READ), index, MFW_PHB_INDEX, 1, &phb_list ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1020 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1021 /* if we haven't found the entry return 0 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1022 */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1023 if ( phb_list.result == MFW_ENTRY_EXIST ) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1024 return 0; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1025 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1026 /* otherwise copy the located information to the output structure |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1027 */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1028 #ifdef NO_ASCIIZ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1029 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1030 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1031 #ifdef EASY_TEXT_ENABLED |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1032 /*MC SPR 1257, name strings should use MAX_ALPHA_LEN*/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1033 int i; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1034 if (p_pEntry->name.data[0] == 0x80 ||p_pEntry->name.data[0]== 0x00) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1035 { for (i=1; i<MAX_ALPHA_LEN; i+=1) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1036 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1037 l_name[i+1] = p_pEntry->name.data[i]; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1038 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1039 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1040 l_name[0] = p_pEntry->name.data[0]; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1041 l_name[1] = MAX_ALPHA_LEN; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1042 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1043 memcpy( p_pEntry->name.data, (char*)l_name, MAX_ALPHA_LEN ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1044 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1045 p_pEntry->name.len++;/* = actual_length;*/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1046 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1047 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1048 else |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1049 #endif |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1050 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1051 /*SPR2175, use new function to convert from GSM to ASCII*/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1052 if (p_pEntry->name.dcs == MFW_DCS_8bits && p_pEntry->name.data[0] != 0x80) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1053 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1054 ATB_convert_String((char*)p_pEntry->name.data, MFW_DCS_8bits, p_pEntry->name.len, (char*)l_name, MFW_ASCII, MAX_ALPHA_LEN, FALSE); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1055 p_pEntry->name.dcs = MFW_ASCII; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1056 memcpy(p_pEntry->name.data, l_name, MAX_ALPHA_LEN); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1057 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1058 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1059 #else |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1060 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1061 bookGsm2Alpha( (UBYTE *) p_pEntry->name ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1062 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1063 #endif |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1064 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1065 /* successful return status |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1066 */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1067 return 1; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1068 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1069 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1070 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1071 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1072 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1073 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1074 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1075 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1076 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1077 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1078 /******************************************************************************* |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1079 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1080 $Function: bookCallIndex |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1081 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1082 $Description: Calls the number in the physical index |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1083 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1084 $Returns: status from the phb_read_entries routine |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1085 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1086 $Arguments: index, of the number to call |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1087 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1088 *******************************************************************************/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1089 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1090 int bookCallIndex( UBYTE index ) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1091 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1092 T_MFW_PHB_LIST phb_list; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1093 T_MFW_PHB_ENTRY entry; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1094 UBYTE status; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1095 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1096 TRACE_FUNCTION( "bookCallIndex()" ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1097 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1098 memset( &entry, 0, sizeof( T_MFW_PHB_ENTRY ) ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1099 memset( &phb_list, 0, sizeof( phb_list ) ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1100 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1101 phb_list.entry = &entry; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1102 phb_list.num_entries = 1; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1103 if ( ( status = phb_read_entries( bookActiveBook(READ), index, MFW_PHB_PHYSICAL, 1, &phb_list ) ) == MFW_PHB_OK ) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1104 callNumber( entry.number ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1105 return status; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1106 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1107 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1108 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1109 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1110 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1111 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1112 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1113 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1114 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1115 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1116 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1117 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1118 /******************************************************************************* |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1119 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1120 $Function: bookGsm2Alpha |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1121 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1122 $Description: Convert a string from it's GSM to alpha characters |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1123 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1124 $Returns: none |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1125 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1126 $Arguments: alpha, pointer to string to be converted (Must be null |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1127 terminated string) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1128 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1129 *******************************************************************************/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1130 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1131 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1132 void bookGsm2Alpha( UBYTE *alpha ) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1133 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1134 int index; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1135 int length=0; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1136 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1137 if (alpha != NULL) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1138 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1139 length = strlen( (char *) alpha ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1140 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1141 else |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1142 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1143 return; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1144 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1145 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1146 for ( index = 0; index < length; index++ ) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1147 alpha[index] = alpha[index] & 0x7F; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1148 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1149 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1150 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1151 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1152 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1153 /******************************************************************************* |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1154 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1155 $Function: bookActiveBook |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1156 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1157 $Description: Determine if the current active book is restricted or not |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1158 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1159 $Returns: PHB_FDN if restricted, PHB_ADN otherwise |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1160 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1161 $Arguments: None |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1162 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1163 *******************************************************************************/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1164 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1165 UBYTE bookActiveBook( int process ) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1166 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1167 TRACE_FUNCTION( "bookActiveBook()" ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1168 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1169 /* SPR#1112 - SH - Return internal phonebook ID when appropriate */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1170 // May 3, 2004 REF: CRR MMI-SPR-18555 Rashmi C N(Sasken) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1171 // To get FDN book, when FDN is disabled, but only when accessing from FDM menu and not while we are in active call |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1172 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1173 if(menuFDN && (call_data.calls.numCalls==0)) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1174 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1175 return PHB_FDN; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1176 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1177 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1178 #ifdef INT_PHONEBOOK |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1179 if (bookGetBookAvailable() && bookGetBookSelected()) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1180 return PHB_IPB; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1181 #endif |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1182 // May 3, 2004 REF: CRR MMI-SPR-18555 Rashmi C N(Sasken) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1183 // When FDN is disabled we need to display only ADN entries in the phonebook menu. |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1184 // We now return PHB_ADN instead of PHB_ADN_FDN. |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1185 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1186 if(process == READ) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1187 return ( phb_get_mode() == PHB_RESTRICTED ) ? PHB_FDN : PHB_ADN; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1188 else if(process == WRITE) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1189 return ( phb_get_mode() == PHB_RESTRICTED ) ? PHB_FDN : PHB_ADN; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1190 return PHB_NONE; /*a0393213 warnings removal-added return statement*/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1191 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1192 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1193 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1194 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1195 /******************************************************************************* |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1196 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1197 $Function: bookMemoryView |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1198 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1199 $Description: Display the memory status |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1200 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1201 $Returns: None |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1202 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1203 $Arguments: None |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1204 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1205 *******************************************************************************/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1206 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1207 void bookMemoryView( void ) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1208 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1209 T_MFW_HND win = mfwParent( mfw_header() ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1210 T_MFW_WIN *win_data = ( (T_MFW_HDR *) win )->data; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1211 tBookStandard *data = (tBookStandard *) win_data->user; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1212 char Buffer[16]; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1213 int TxtToShow; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1214 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1215 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1216 /* Determine which book we are currently using |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1217 */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1218 data->phbk->current.status.book = bookActiveBook(READ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1219 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1220 /* retrieve he status of the book, and create a string for output |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1221 based on the status |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1222 */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1223 #if(BOARD!=61) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1224 Buffer[0] = '\0'; // OMAPS00042166 - RAVI /*a0393213 warnings removal-== changed to =*/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1225 #endif |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1226 if ( bookGetCurrentStatus( &data->phbk->current.status ) == MFW_PHB_OK ) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1227 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1228 /* SPR#1112 - Internal phonebook - show the current selected phonebook*/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1229 #ifdef INT_PHONEBOOK |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1230 if (bookGetBookAvailable() && bookGetBookSelected()) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1231 TxtToShow = TxtPhone; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1232 else |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1233 TxtToShow = TxtSIM; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1234 #else |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1235 TxtToShow = TxtUsed; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1236 #endif |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1237 sprintf( Buffer, "%d/%d", |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1238 data->phbk->current.status.used_entries, |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1239 data->phbk->current.status.max_entries ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1240 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1241 else |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1242 TxtToShow = TxtReadError; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1243 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1244 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1245 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1246 T_DISPLAY_DATA display_info; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1247 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1248 dlg_initDisplayData_TextId( &display_info, TxtNull, TxtNull, TxtToShow, TxtNull , COLOUR_STATUS); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1249 dlg_initDisplayData_events( &display_info, (T_VOID_FUNC)NULL, THREE_SECS, KEY_CLEAR ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1250 display_info.TextString2 = Buffer; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1251 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1252 /* Call Info Screen |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1253 */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1254 info_dialog( win, &display_info ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1255 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1256 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1257 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1258 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1259 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1260 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1261 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1262 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1263 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1264 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1265 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1266 /******************************************************************************* |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1267 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1268 $Function: bookDeleteEntry |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1269 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1270 $Description: Delete the current entry from the phone book. |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1271 This routine doesn't actually perform the deletion, it |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1272 sets up a confirmation dialog, where the call back function |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1273 is used to perform the deletion (Refer above) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1274 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1275 $Returns: None |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1276 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1277 $Arguments: None |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1278 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1279 *******************************************************************************/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1280 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1281 void bookDeleteEntry( T_MFW_HND Window) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1282 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1283 tBookDialogData Dialog; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1284 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1285 /* Initialise the dialog control block with default information |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1286 */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1287 dlg_initDisplayData_TextId( &Dialog, TxtSoftOK, TxtCancel, TxtPressOk, TxtDelete, COLOUR_STATUS); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1288 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1289 // Jun 23, 2004 REF: CRR MMI-SPR-21636 Rashmi C N(Sasken) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1290 // Description: The confirmation for deleting entry from address book was a timed confirmation |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1291 // screen. |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1292 // Solution: Now the time is set to 'FOREVER' from 'TEN_SECS' |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1293 dlg_initDisplayData_events( &Dialog, (T_VOID_FUNC)bookDeleteEntryCB, FOREVER, KEY_CLEAR | KEY_LEFT | KEY_RIGHT ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1294 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1295 /* Show the dialog |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1296 */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1297 info_dialog( Window, &Dialog ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1298 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1299 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1300 /******************************************************************************* |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1301 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1302 $Function: bookActivateFDN |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1303 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1304 $Description: information screen to tell user to activate FDN |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1305 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1306 $Returns: None |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1307 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1308 $Arguments: None |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1309 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1310 *******************************************************************************/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1311 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1312 void bookActivateFDN( T_MFW_HND window ) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1313 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1314 tBookDialogData Dialog; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1315 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1316 /* Initialise the dialog control block with default information |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1317 */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1318 dlg_initDisplayData_TextId( &Dialog, TxtNull, TxtNull, TxtPlease, TxtActivateFDN, COLOUR_STATUS); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1319 dlg_initDisplayData_events( &Dialog, (T_VOID_FUNC)NULL, FOUR_SECS, KEY_CLEAR | KEY_LEFT | KEY_RIGHT ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1320 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1321 /* Show the dialog |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1322 */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1323 info_dialog( window, &Dialog ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1324 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1325 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1326 /* SPR#1428 - SH - New Editor: moved the following two functions |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1327 * from MmiBookInputWindow.c, which is now a redundant file */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1328 #ifdef NEW_EDITOR |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1329 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1330 /******************************************************************************* |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1331 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1332 $Function: bookInputStartNumberEditor |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1333 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1334 $Description: Start the input handler using default properties |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1335 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1336 $Returns: Handle of newly created window, or NULL if failure |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1337 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1338 $Arguments: parent, parent window handle, buffer, input buffer |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1339 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1340 *******************************************************************************/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1341 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1342 MfwHnd bookInputStartNumberEditor( MfwHnd parent, void *buffer ) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1343 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1344 T_AUI_EDITOR_DATA editor_data; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1345 U16 editor_num_length = NUMBER_LENGTH;; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1346 TRACE_FUNCTION ("bookInputStartNumberEditor()"); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1347 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1348 // June 22, 2006 REF: DRT OMAPS00081761 x0012849 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1349 // Number length can be upto 41 when EXT1 is allocated and activated in SIM service table |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1350 // 40 characters + 1 Null character |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1351 switch(bookActiveBook(WRITE)) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1352 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1353 case PHB_ADN: |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1354 TRACE_EVENT("ADN book is selcted"); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1355 if (sim_serv_table_check(SRV_EXT1) == ALLOCATED_AND_ACTIVATED) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1356 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1357 editor_num_length = NUMBER_LENGTH; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1358 TRACE_EVENT("SIM is EXT1 supported"); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1359 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1360 else |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1361 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1362 // June 22, 2006 REF: DRT OMAPS00081761 x0012849 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1363 // When EXT1 is not supported Number can be upto 20 characters. |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1364 editor_num_length = OLD_NUM_LENGTH; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1365 TRACE_EVENT("EXT1 is not supported for this SIM"); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1366 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1367 break; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1368 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1369 case PHB_FDN: |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1370 TRACE_EVENT("FDN book is selcted"); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1371 // June 22, 2006 REF: DRT OMAPS00081761 x0012849 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1372 //If EXT2 is present in service table then the FDN phone number can go upto 40 digits. |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1373 if (sim_serv_table_check(SRV_EXT2) == ALLOCATED_AND_ACTIVATED) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1374 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1375 editor_num_length = NUMBER_LENGTH; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1376 TRACE_EVENT("SIM is EXT2 supported"); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1377 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1378 else |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1379 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1380 // June 22, 2006 REF: DRT OMAPS00081761 x0012849 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1381 // When EXT1 is not supported Number can be upto 20 characters. |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1382 editor_num_length = OLD_NUM_LENGTH; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1383 TRACE_EVENT("EXT2 is not supported for this SIM"); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1384 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1385 break; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1386 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1387 case PHB_IPB: // Internal phone book |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1388 TRACE_EVENT("IPB - Internal phone book selected"); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1389 editor_num_length = NUMBER_LENGTH; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1390 break; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1391 default: |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1392 TRACE_EVENT("Selected phone book is other than ADN,FDN,IPB"); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1393 editor_num_length = NUMBER_LENGTH; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1394 break; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1395 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1396 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1397 TRACE_EVENT_P1 ("Number length = %d ",editor_num_length); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1398 AUI_edit_SetDefault(&editor_data); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1399 AUI_edit_SetDisplay(&editor_data, NUMBER_EDITOR, COLOUR_EDITOR_XX, EDITOR_FONT); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1400 AUI_edit_SetEvents(&editor_data, 0, FALSE, FOREVER, (T_AUI_EDIT_CB)bookAddNumberCB); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1401 // Change by Sasken ( Deepa M.d) on March 29th 2004 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1402 // Issue Number : MMI-SPR-12722 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1403 // Subject: Right softkey should be "Back" when the editor is empty |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1404 // Bug : Right softkey should be "Back" when the editor is empty |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1405 // Solution : Added alternative string for the right softkey tobe displayed when the editor is empty |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1406 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1407 AUI_edit_SetTextStr(&editor_data, TxtSoftOK, TxtDelete, TxtEnterNumber, NULL); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1408 AUI_edit_SetAltTextStr(&editor_data, 0, NULL, TRUE, TxtSoftBack); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1409 // June 22, 2006 REF: DRT OMAPS00081761 x0012849 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1410 // Changed the limit frommm NUMBER_LENGTH to editor_num_length. |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1411 AUI_edit_SetBuffer(&editor_data, ATB_DCS_ASCII, (UBYTE *)buffer, editor_num_length); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1412 AUI_edit_SetMode(&editor_data, 0, ED_CURSOR_UNDERLINE); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1413 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1414 return AUI_edit_Start(parent, &editor_data); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1415 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1416 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1417 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1418 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1419 /******************************************************************************* |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1420 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1421 $Function: bookInputStartNameEditor |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1422 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1423 $Description: Start the input handler using default properties |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1424 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1425 $Returns: Handle of newly created window, or NULL if failure |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1426 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1427 $Arguments: parent, parent window handle, buffer, input buffer |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1428 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1429 *******************************************************************************/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1430 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1431 MfwHnd bookInputStartNameEditor( MfwHnd parent, void *buffer ) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1432 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1433 T_MFW_WIN *win_data = ( (T_MFW_HDR *) parent )->data; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1434 tBookStandard *data = (tBookStandard *) win_data->user; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1435 T_phbk *Phbk = data->phbk; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1436 T_AUI_EDITOR_DATA editor_data; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1437 U16 editor_length; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1438 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1439 TRACE_FUNCTION ("bookInputStartNameEditor()"); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1440 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1441 /* xreddymn OMAPS00079431 May-29-2006 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1442 * Restrict the number of characters that the user can input for name |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1443 * based on which phonebook is selected. |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1444 */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1445 if(bookGetBookSelected() == TRUE) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1446 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1447 /* For ME phonebook use MAX_ALPHA_LEN */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1448 editor_length = MAX_ALPHA_LEN; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1449 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1450 else |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1451 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1452 /* For SIM phonebook, restrict length to 14 */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1453 editor_length = 15; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1454 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1455 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1456 /* Set up the default parameters for the input window */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1457 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1458 #if defined(CHINESE_MMI) && defined(EASY_TEXT_ENABLED) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1459 /*MC, the chinese editor MUST have a unicode string as input*/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1460 /*MC , SPR 1242 merged in from b-sample build*/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1461 if (Mmi_getCurrentLanguage() == CHINESE_LANGUAGE) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1462 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1463 T_CHINESE_DATA chinese_data; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1464 chinese_data.TextString = (char*) Phbk->edt_buf_name; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1465 if (chinese_data.TextString[0]== 0)//if, empty string |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1466 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1467 chinese_data.TextString[0] = (char)0x80;//give string Unicode tag /*a0393213 lint warnings removal-typecast done*/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1468 chinese_data.TextString[1] = 0x7F; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1469 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1470 else |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1471 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1472 if (chinese_data.TextString[0]!= (char)0x80)/*If ASCII string*//*a0393213 lint warnings removal-typecast done*/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1473 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1474 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1475 /*SPR 1752, if ASCII string, use a latin editor*/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1476 AUI_edit_SetDefault(&editor_data); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1477 AUI_edit_SetDisplay(&editor_data, NUMBER_EDITOR, COLOUR_EDITOR_XX, EDITOR_FONT); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1478 AUI_edit_SetEvents(&editor_data, 0, FALSE, FOREVER, (T_AUI_EDIT_CB)bookAddNameCB); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1479 AUI_edit_SetTextStr(&editor_data, TxtSoftOK, TxtDelete, TxtEnterName, NULL); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1480 /* xreddymn OMAPS00079431 May-29-2006: Length changes based on selected phonebook */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1481 AUI_edit_SetBuffer(&editor_data, ATB_DCS_ASCII, (UBYTE *)buffer, editor_length); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1482 AUI_edit_SetMode(&editor_data, ED_MODE_ALPHA, ED_CURSOR_BAR); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1483 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1484 return AUI_edit_Start(parent, &editor_data); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1485 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1486 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1487 /*MC end*/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1488 chinese_data.Callback = (T_AUI_EDIT_CB)bookAddNameCB; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1489 chinese_data.Identifier = INPUT_LEFT ; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1490 chinese_data.LeftSoftKey = TxtSave; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1491 chinese_data.DestroyEditor = TRUE; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1492 /* xreddymn OMAPS00079431 May-29-2006: Length changes based on selected phonebook */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1493 chinese_data.EditorSize = (USHORT)((editor_length-4)/2);//i.e.8 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1494 return chinese_input(parent, &chinese_data); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1495 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1496 else |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1497 #endif /* CHINESE_MMI && EASY_TEXT_ENABLED */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1498 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1499 AUI_edit_SetDefault(&editor_data); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1500 AUI_edit_SetDisplay(&editor_data, NUMBER_EDITOR, COLOUR_EDITOR_XX, EDITOR_FONT); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1501 AUI_edit_SetEvents(&editor_data, 0, FALSE, FOREVER, (T_AUI_EDIT_CB)bookAddNameCB); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1502 AUI_edit_SetTextStr(&editor_data, TxtSoftOK, TxtDelete, TxtEnterName, NULL); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1503 /*SPR 1752*/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1504 #ifdef NO_ASCIIZ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1505 if (Phbk->edt_buf_name[0] ==0x80) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1506 /* xreddymn OMAPS00079431 May-29-2006: Length changes based on selected phonebook */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1507 AUI_edit_SetBuffer(&editor_data, ATB_DCS_UNICODE, &Phbk->edt_buf_name[2], editor_length/2 -2); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1508 else |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1509 #endif |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1510 /* xreddymn OMAPS00079431 May-29-2006: Length changes based on selected phonebook */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1511 AUI_edit_SetBuffer(&editor_data, ATB_DCS_ASCII, (UBYTE *)buffer, editor_length); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1512 AUI_edit_SetMode(&editor_data, ED_MODE_ALPHA, ED_CURSOR_BAR); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1513 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1514 return AUI_edit_Start(parent, &editor_data); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1515 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1516 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1517 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1518 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1519 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1520 /******************************************************************************* |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1521 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1522 $Function: bookInputDestroy |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1523 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1524 $Description: Destroy Input Window |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1525 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1526 $Returns: None |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1527 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1528 $Arguments: Handle of window to be destroyed |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1529 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1530 *******************************************************************************/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1531 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1532 void bookInputDestroy( MfwHnd window ) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1533 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1534 TRACE_FUNCTION ("bookInputDestroy()"); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1535 /*MC SPR 1752, send destroy event to window*/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1536 SEND_EVENT( window, E_ED_DESTROY, 0, 0 ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1537 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1538 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1539 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1540 extern T_MFW_HND PhbSearchTim; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1541 /******************************************************************************* |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1542 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1543 $Function: bookAddNameCB |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1544 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1545 $Description: default call back for name entry |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1546 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1547 $Returns: None |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1548 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1549 $Arguments: win, handle of parent window, reason, for invocation |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1550 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1551 *******************************************************************************/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1552 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1553 void bookAddNameCB( T_MFW_HND win, USHORT Identifier, SHORT reason ) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1554 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1555 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1556 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1557 T_MFW_WIN *win_data = ( (T_MFW_HDR *) win )->data; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1558 tBookStandard *data = (tBookStandard *) win_data->user; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1559 T_phbk *Phbk = data->phbk; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1560 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1561 TRACE_FUNCTION("bookAddNameCB"); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1562 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1563 switch (reason) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1564 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1565 case INFO_KCD_LEFT: |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1566 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1567 /* Construct a new entry to be written to the phone book |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1568 */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1569 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1570 /*MC SPR 1257, replacing PHB_MAX_LEN with MAX_ALPHA_LEN for name strings*/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1571 if (Phbk->edt_buf_name[0] == 0x80 )//MC, if unicode |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1572 { //MC, if empty string, remove 0x80 at beginning |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1573 if (Phbk->edt_buf_name[2]==0x00 && Phbk->edt_buf_name[3] == 0x00) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1574 memset(Phbk->edt_buf_name, 0, MAX_ALPHA_LEN); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1575 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1576 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1577 // xvilliva SPR21547 We check for presence of either phone number or name. |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1578 // We add or modify the entry and flash an alert correspondingly. |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1579 if(strlen((char *) Phbk->edt_buf_number)>0 || strlen((char *)Phbk->edt_buf_name)>0) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1580 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1581 /* Store in the current phone book |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1582 */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1583 if ( Phbk->UpdateAction == CREATE_ENTRY ) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1584 storeInFile( Phbk ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1585 else if ( Phbk->UpdateAction == MODIFY_EXISTING ) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1586 changeInFile( Phbk ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1587 bookShowInformation( win, MmiBookCurrentText(), NULL,NULL ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1588 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1589 /* Sep 20, 2006 REF: OMAPS00145786 x0080701 (Bharat) -- Start */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1590 mmi_int_phb_store_change_completion(); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1591 /* Sep 20, 2006 REF: OMAPS00145786 x0080701 (Bharat) -- End */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1592 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1593 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1594 else |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1595 bookShowInformation( win, TxtInvalidInput, NULL,NULL ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1596 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1597 /* And shut down, clearing the number and name windows as we go |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1598 */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1599 if ( Phbk->input_number_win ) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1600 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1601 AUI_edit_Destroy(Phbk->input_number_win); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1602 Phbk->input_number_win = 0; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1603 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1604 /*SPR 1752, send destroy event rather than calling destroy function*/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1605 SEND_EVENT( Phbk->input_name_win, E_ED_DESTROY, 0, 0 ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1606 Phbk->input_name_win = 0; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1607 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1608 // Jan 22, 2006 REF: OMAPS00061930 x0039928 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1609 // Fix : Start the phonebook timer in case of trying to modify the existing entry |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1610 if ( Phbk->UpdateAction == MODIFY_EXISTING ) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1611 timStart(PhbSearchTim); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1612 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1613 /*MC-- get rid of search window(and options menu), if just changed a chinese entry |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1614 (prevent showing scrambled entry)*/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1615 if ( Phbk->UpdateAction == MODIFY_EXISTING && Mmi_getCurrentLanguage()==CHINESE_LANGUAGE) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1616 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1617 bookMenuDestroy(Phbk->menu_options_win); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1618 Phbk->menu_options_win=0; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1619 bookSearchDestroy( Phbk->search_win); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1620 Phbk->search_win=0; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1621 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1622 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1623 break; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1624 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1625 case INFO_KCD_RIGHT: |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1626 case INFO_KCD_HUP: |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1627 /* Both right and HUP can do the same task here |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1628 */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1629 /*SPR 1752, send destroy event rather than calling destroy function*/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1630 SEND_EVENT( Phbk->input_name_win, E_ED_DESTROY, 0, 0 ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1631 Phbk->input_name_win = 0; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1632 break; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1633 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1634 default: |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1635 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1636 /* otherwise no action to be performed |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1637 */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1638 break; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1639 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1640 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1641 if (Phbk->root_win==Phbk->win) /*To destroy the phonebook when entering from idle*/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1642 bookPhonebookDestroy(Phbk->win); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1643 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1644 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1645 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1646 /******************************************************************************* |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1647 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1648 $Function: bookAddNumberCB |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1649 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1650 $Description: Default call back for number entry |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1651 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1652 $Returns: None |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1653 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1654 $Arguments: win, parent window, reason, for call back |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1655 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1656 *******************************************************************************/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1657 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1658 void bookAddNumberCB( T_MFW_HND win, USHORT Identifier, SHORT reason ) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1659 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1660 T_MFW_WIN *win_data = ( (T_MFW_HDR *) win )->data; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1661 tBookStandard *data = (tBookStandard *) win_data->user; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1662 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1663 switch ( reason ) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1664 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1665 case INFO_KCD_LEFT: |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1666 data->phbk->input_name_win = bookInputStartNameEditor( data->win, data->phbk->edt_buf_name ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1667 break; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1668 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1669 case INFO_KCD_RIGHT: |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1670 case INFO_KCD_HUP: |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1671 /* Both right and HUP can do the same task here |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1672 */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1673 AUI_edit_Destroy( data->phbk->input_number_win ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1674 data->phbk->input_number_win = 0; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1675 break; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1676 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1677 default: |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1678 /* otherwise no action to be performed |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1679 */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1680 break; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1681 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1682 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1683 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1684 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1685 #else /* NEW EDITOR */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1686 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1687 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1688 /******************************************************************************* |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1689 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1690 $Function: bookAddNameCB |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1691 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1692 $Description: default call back for name entry |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1693 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1694 $Returns: None |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1695 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1696 $Arguments: win, handle of parent window, reason, for invocation |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1697 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1698 *******************************************************************************/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1699 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1700 void bookAddNameCB( T_MFW_HND win, UBYTE reason ) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1701 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1702 T_MFW_WIN *win_data = ( (T_MFW_HDR *) win )->data; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1703 tBookStandard *data = (tBookStandard *) win_data->user; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1704 T_phbk *Phbk = data->phbk; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1705 TRACE_FUNCTION("bookAddNameCB"); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1706 switch (reason) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1707 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1708 case INPUT_LEFT: |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1709 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1710 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1711 /* Construct a new entry to be written to the phone book |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1712 */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1713 #ifdef NO_ASCIIZ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1714 /*MC SPR 1257, replacing PHB_MAX_LEN with MAX_ALPHA_LEN for name strings*/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1715 if (Phbk->edt_buf_name[0] == 0x80 )//MC, if unicode |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1716 { //MC, if empty string, remove 0x80 at beginning |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1717 if (Phbk->edt_buf_name[2]==0x00 && Phbk->edt_buf_name[3] == 0x00) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1718 memset(Phbk->edt_buf_name, 0, MAX_ALPHA_LEN); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1719 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1720 #endif |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1721 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1722 /* Store in the current phone book |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1723 */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1724 if ( Phbk->UpdateAction == CREATE_ENTRY ) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1725 storeInFile( Phbk ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1726 else if ( Phbk->UpdateAction == MODIFY_EXISTING ) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1727 changeInFile( Phbk ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1728 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1729 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1730 bookShowInformation( win, MmiBookCurrentText(), NULL,NULL ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1731 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1732 /* Sep 20, 2006 REF: OMAPS00145786 x0080701 (Bharat) -- Start */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1733 mmi_int_phb_store_change_completion(); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1734 /* Sep 20, 2006 REF: OMAPS00145786 x0080701 (Bharat) -- End */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1735 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1736 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1737 /* And shut down, clearing the number and name windows as we go |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1738 */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1739 if ( Phbk->input_number_win ) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1740 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1741 SEND_EVENT( Phbk->input_number_win, INPUT_DESTROY, 0, 0 ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1742 Phbk->input_number_win = 0; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1743 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1744 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1745 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1746 SEND_EVENT( Phbk->input_name_win, INPUT_DESTROY, 0, 0 ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1747 Phbk->input_name_win = 0; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1748 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1749 #ifdef NO_ASCIIZ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1750 /*MC-- get rid of search window(and options menu), if just changed a chinese entry |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1751 (prevent showing scrambled entry)*/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1752 if ( Phbk->UpdateAction == MODIFY_EXISTING &&Mmi_getCurrentLanguage()==CHINESE_LANGUAGE) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1753 { bookMenuDestroy(Phbk->menu_options_win); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1754 Phbk->menu_options_win=0; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1755 bookSearchDestroy( Phbk->search_win); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1756 Phbk->search_win=0; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1757 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1758 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1759 #endif |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1760 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1761 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1762 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1763 break; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1764 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1765 case INPUT_RIGHT: |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1766 case INPUT_CLEAR: |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1767 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1768 /* Both right and clear can do the same task here |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1769 */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1770 SEND_EVENT( Phbk->input_name_win, INPUT_DESTROY, 0, 0 ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1771 Phbk->input_name_win = 0; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1772 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1773 break; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1774 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1775 default: |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1776 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1777 /* otherwise no action to be performed |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1778 */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1779 break; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1780 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1781 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1782 if (Phbk->root_win==Phbk->win) /*To destroy the phonebook when entering from idle*/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1783 bookPhonebookDestroy(Phbk->win); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1784 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1785 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1786 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1787 /******************************************************************************* |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1788 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1789 $Function: bookAddNumberCB |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1790 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1791 $Description: Default call back for number entry |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1792 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1793 $Returns: None |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1794 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1795 $Arguments: win, parent window, reason, for call back |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1796 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1797 *******************************************************************************/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1798 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1799 void bookAddNumberCB( T_MFW_HND win, UBYTE reason ) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1800 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1801 T_MFW_WIN *win_data = ( (T_MFW_HDR *) win )->data; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1802 tBookStandard *data = (tBookStandard *) win_data->user; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1803 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1804 switch ( reason ) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1805 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1806 case INPUT_LEFT: |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1807 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1808 data->phbk->input_name_win = |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1809 bookInputStartNameEditor( data->win, data->phbk->edt_buf_name ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1810 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1811 break; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1812 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1813 case INPUT_RIGHT: |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1814 case INPUT_CLEAR: |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1815 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1816 /* Both right and clear can do the same task here |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1817 */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1818 SEND_EVENT( data->phbk->input_number_win, INPUT_DESTROY, 0, 0 ); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1819 data->phbk->input_number_win = 0; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1820 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1821 break; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1822 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1823 default: |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1824 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1825 /* otherwise no action to be performed |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1826 */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1827 break; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1828 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1829 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1830 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1831 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1832 #endif /* NEW_EDITOR */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1833 // May 3, 2004 REF: CRR MMI-SPR-18555 Rashmi C N(Sasken) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1834 // This is called when we exit the FDN Numbers menu. So unsetting the menuFDN flag here |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1835 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1836 void fdn_menu_cb(T_MFW_HND parent_win, UBYTE identifier, UBYTE reason) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1837 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1838 TRACE_EVENT("fdn_menu_cb"); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1839 menuFDN=0; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1840 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1841 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1842 // May 3, 2004 REF: CRR MMI-SPR-18555 Rashmi C N(Sasken) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1843 // This is called to display the FDN Numbers menu. The menuFDN flag is set here |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1844 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1845 int bookFDNMenu(MfwMnu* menu, MfwMnuItem* item) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1846 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1847 T_MFW_HND win = mfw_parent(mfw_header()); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1848 T_MFW_WIN *win_data = ((T_MFW_HDR *) win)->data; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1849 tBookStandard *data = (tBookStandard *) win_data->user; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1850 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1851 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1852 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1853 menuFDN=1; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1854 // Sep 29, 2004 REF: CRR 25041 xvilliva |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1855 // The bookMenuStart() is called with the window data->phbk->win, |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1856 // similar to the function bookFDNMenu() to avoid crash. The menu window |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1857 // thus created is stored, which will be deleted while phonebook menu is |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1858 // destroyed. |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1859 data->phbk->menu_call_options_win_2 = bookMenuStart( data->phbk->win, bookNameMenuFDNAttributes(),0); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1860 SEND_EVENT(data->phbk->menu_call_options_win_2, ADD_CALLBACK, NULL, (void *)fdn_menu_cb); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1861 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1862 return 0; /* to remove warning Aug - 11 */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1863 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1864 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1865 // Jul 28, 2004 REF: CRR:20887 xrashmic - SASKEN |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1866 // Description: Current state of FDN not highlighted |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1867 // Fix: Instead of showing the submenu directly we call this function |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1868 // where we set the menu and also higlight the previously selected menu item |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1869 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1870 extern MfwMnuAttr *FDNMenu(void); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1871 void settingsFocusFDNCurSel(void) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1872 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1873 UBYTE CurSel; //, state; // RAVI |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1874 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1875 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1876 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1877 T_MFW_HND win = mfw_parent(mfw_header()); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1878 T_MFW_WIN *win_data = ((T_MFW_HDR *) win)->data; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1879 tBookStandard *data = (tBookStandard *) win_data->user; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1880 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1881 // Sep 29, 2004 REF: CRR 25041 xvilliva |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1882 // The bookMenuStart() is called with the window data->phbk->win, |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1883 // similar to the function bookFDNMenu() to avoid crash. The menu window |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1884 // thus created is stored, which will be deleted while phonebook menu is |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1885 // destroyed. |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1886 data->phbk->menu_options_win_2= bookMenuStart(data->phbk->win, FDNMenu(), 0); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1887 CurSel = (phb_get_mode() == PHB_RESTRICTED)?FIRSTMENUITEM:SECONDMENUITEM; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1888 SEND_EVENT(data->phbk->menu_options_win_2, DEFAULT_OPTION, NULL, &CurSel); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1889 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1890 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1891 // June 07, 2005 REF: CRR MMI-FIX-31545 x0021334 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1892 // Issue description: SIM: wrong behavior when FDN is not allocated in SST |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1893 // Added this function to check if FDN is allocated |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1894 void checkFDNSupport(void) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1895 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1896 T_MFW_HND win = mfw_parent(mfw_header()); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1897 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1898 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1899 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1900 UBYTE serv_stat; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1901 T_DISPLAY_DATA display_info; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1902 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1903 // Check in SIM service table if FDN is allocated. If not allocated, display this info dialog |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1904 /* x0045876, 14-Aug-2006 (WR - "serv_stat" was set but never used) */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1905 serv_stat = sim_serv_table_check(SRV_FDN); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1906 /*if ((serv_stat = sim_serv_table_check(SRV_FDN)) EQ NO_ALLOCATED)*/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1907 if (serv_stat EQ NO_ALLOCATED) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1908 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1909 dlg_initDisplayData_TextId(&display_info, TxtSoftOK, NULL, TxtNotSupported, TxtNull, COLOUR_STATUS); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1910 dlg_initDisplayData_events(&display_info, (T_VOID_FUNC)NULL, THREE_SECS, KEY_LEFT | KEY_RIGHT); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1911 info_dialog (win, &display_info); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1912 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1913 else // Else show the FDN menu and set focus on current selection |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1914 settingsFocusFDNCurSel(); |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1915 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1916 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1917 /* Sep 20, 2006 REF: OMAPS00145786 x0080701 (Bharat) -- Start */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1918 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1919 /******************************************************************************* |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1920 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1921 $Function: mmi_int_phb_store_change_completion |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1922 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1923 $Description: Reset all flags on adding / editing an Internal PHB Entry |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1924 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1925 $Returns: None |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1926 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1927 $Arguments: None |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1928 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1929 *******************************************************************************/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1930 static void mmi_int_phb_store_change_completion() |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1931 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1932 /* Reset the "add" and "change" flags only incase of Internal PHB */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1933 if ( bookGetBookSelected() == TRUE ) |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1934 { |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1935 addname_flag = FALSE; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1936 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1937 changename_flag = FALSE; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1938 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1939 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1940 return; |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1941 } |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1942 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1943 /* Sep 20, 2006 REF: OMAPS00145786 x0080701 (Bharat) -- End */ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1944 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1945 /******************************************************************************* |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1946 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1947 End of File |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1948 |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1949 *******************************************************************************/ |
e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1950 |