|
1 /* |
|
2 * Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Phonebook 2 Hitchcock Names List UI Extension. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDES |
|
20 #include <avkon.loc> |
|
21 #include <uikon.rh> |
|
22 #include <eikon.rh> |
|
23 #include <avkon.rh> |
|
24 #include <avkon.rsg> |
|
25 #include <avkon.mbg> |
|
26 #include <AvkonIcons.hrh> |
|
27 #include <phonebook2ece.loc> |
|
28 #include <phonebook2ece.mbg> |
|
29 |
|
30 //pbk2 |
|
31 #include <Pbk2UIExtension.rh> |
|
32 #include <Pbk2ViewInfo.hrh>//event |
|
33 #include <Pbk2ViewGraph.rh> |
|
34 #include <Pbk2UIControls.rh> |
|
35 #include <Pbk2UIControls.hrh> |
|
36 #include <Pbk2UIControls.rsg> |
|
37 #include <Pbk2Commands.rsg> |
|
38 #include <Pbk2IconId.rh> |
|
39 #include <Pbk2ViewId.hrh> |
|
40 #include <Pbk2Commands.hrh> |
|
41 #include <Phonebook2.rsg> |
|
42 #include <Pbk2UID.h> |
|
43 #include <Pbk2IconInfo.rh> |
|
44 #include <Pbk2IconArrayId.hrh> |
|
45 |
|
46 //own |
|
47 #include "Pbk2NamesListExUID.h" |
|
48 #include "Pbk2NamesListEx.hrh" |
|
49 #include "Pbk2NlxUIControls.hrh" |
|
50 #include "pbk2nameslistexiconid.hrh" |
|
51 |
|
52 #define KPbk2EceMifFile "z:\\resource\\apps\\phonebook2ece.mif" |
|
53 |
|
54 // -------------------------------------------------------------------------- |
|
55 // Resource identifier |
|
56 // -------------------------------------------------------------------------- |
|
57 // |
|
58 NAME P2NL |
|
59 |
|
60 // -------------------------------------------------------------------------- |
|
61 // Standard resource signature |
|
62 // -------------------------------------------------------------------------- |
|
63 // |
|
64 RESOURCE RSS_SIGNATURE { } |
|
65 |
|
66 // -------------------------------------------------------------------------- |
|
67 // Extension information |
|
68 // -------------------------------------------------------------------------- |
|
69 // |
|
70 RESOURCE PHONEBOOK2_EXTENSION_INFORMATION |
|
71 r_phonebook2_nameslist_ui_extension_information |
|
72 { |
|
73 version = 0; |
|
74 |
|
75 implementationUid = KPbk2NamesListExtPluginUID2; |
|
76 |
|
77 loadingPolicy = KPbk2LoadInStartup; |
|
78 |
|
79 menuCommandRange = PHONEBOOK2_EXTENSION_RANGE |
|
80 { |
|
81 firstId = ENamesListExtentionFirstCommand; |
|
82 lastId = ENamesListExtentionLastCommand; |
|
83 }; |
|
84 |
|
85 // No overwritten commands, we forward all the |
|
86 // commands to commandHandler |
|
87 overwrittenCommands = {}; |
|
88 |
|
89 // we'll use nameslist's menu, no extentions |
|
90 extensionMenus = |
|
91 { |
|
92 PHONEBOOK2_EXTENSION_MENU_RESOURCE |
|
93 { |
|
94 // Name list view: mycard commands |
|
95 viewId = EPbk2NamesListViewId; |
|
96 menuFilteringFlags = 0; |
|
97 parentMenu = R_PHONEBOOK2_NAMESLIST_DELETE_MENU; |
|
98 prevCommand = EPbk2CmdDeleteMe; |
|
99 menuPane = r_pbk2_names_list_mycard_menu; |
|
100 } |
|
101 }; |
|
102 |
|
103 viewIds = |
|
104 { |
|
105 PHONEBOOK2_EXTENSION_VIEW_ID |
|
106 { |
|
107 version = 0; |
|
108 viewId = EPbk2NamesListViewId; |
|
109 viewResource = R_PHONEBOOK2_NAMESLIST_APPVIEW; |
|
110 } |
|
111 }; |
|
112 |
|
113 // Pb uses r_pbk2_viewnodes in Pbk2ViewGraph.rss |
|
114 // We do not modify the existing view graph here. |
|
115 viewGraphModification = 0; |
|
116 |
|
117 iconInformation = r_name_list_icon_information; |
|
118 } |
|
119 |
|
120 // -------------------------------------------------------------------------- |
|
121 // Icon information |
|
122 // -------------------------------------------------------------------------- |
|
123 // |
|
124 RESOURCE PHONEBOOK2_EXTENSION_ICON_INFORMATION r_name_list_icon_information |
|
125 { |
|
126 // A link to the array that contains PBK2_ICON_INFOs |
|
127 iconInfoArray = r_name_list_icon_info_array; |
|
128 |
|
129 // A link to the array that contains PHONEBOOK2_EXTENSION_ICON_ARRAYs |
|
130 iconArrays = |
|
131 { |
|
132 PHONEBOOK2_EXTENSION_ICON_ARRAY |
|
133 { |
|
134 // Extension icons for contact list |
|
135 parentIconArrayId = EPbk2ContactListIconArrayId; |
|
136 iconArray = r_name_list_icon_array; |
|
137 } |
|
138 }; |
|
139 } |
|
140 |
|
141 // -------------------------------------------------------------------------- |
|
142 // Extension icons for contact list |
|
143 // -------------------------------------------------------------------------- |
|
144 // |
|
145 RESOURCE PBK2_ICON_ARRAY r_name_list_icon_array |
|
146 { |
|
147 // Array of PBK2_ICON_ID structures. |
|
148 arrayId = EPbk2NullIconArrayId; |
|
149 icons = |
|
150 { |
|
151 PHONEBOOK2_ICON_ID |
|
152 { |
|
153 ownerUid = KPbk2NamesListExtPluginUID2; |
|
154 id = EPbk2EceNoThumbnailIconId; |
|
155 }, |
|
156 PHONEBOOK2_ICON_ID |
|
157 { |
|
158 ownerUid = KPbk2NamesListExtPluginUID2; |
|
159 id = EPbk2EceNoMyCardThumbnailIconId; |
|
160 }, |
|
161 PHONEBOOK2_ICON_ID |
|
162 { |
|
163 ownerUid = KPbk2NamesListExtPluginUID2; |
|
164 id = EPbk2EceAddToFovoritesThumbnailIconId; |
|
165 } |
|
166 }; |
|
167 } |
|
168 |
|
169 // -------------------------------------------------------------------------- |
|
170 // Icon info array |
|
171 // -------------------------------------------------------------------------- |
|
172 // |
|
173 RESOURCE ARRAY r_name_list_icon_info_array |
|
174 { |
|
175 items = |
|
176 { |
|
177 PBK2_ICON_INFO |
|
178 { |
|
179 version = 0; |
|
180 pbk2IconInfoId = PHONEBOOK2_ICON_ID |
|
181 { |
|
182 ownerUid = KPbk2NamesListExtPluginUID2; |
|
183 id = EPbk2EceNoThumbnailIconId; |
|
184 }; |
|
185 mbmFileName = KPbk2EceMifFile; |
|
186 iconId = EMbmPhonebook2eceQgn_prop_pb_thumb_unknown; |
|
187 maskId = EMbmPhonebook2eceQgn_prop_pb_thumb_unknown_mask; |
|
188 }, |
|
189 PBK2_ICON_INFO |
|
190 { |
|
191 version = 0; |
|
192 pbk2IconInfoId = PHONEBOOK2_ICON_ID |
|
193 { |
|
194 ownerUid = KPbk2NamesListExtPluginUID2; |
|
195 id = EPbk2EceNoMyCardThumbnailIconId; |
|
196 }; |
|
197 mbmFileName = KPbk2EceMifFile; |
|
198 iconId = EMbmPhonebook2eceQgn_prop_pb_thump_mycard; |
|
199 maskId = EMbmPhonebook2eceQgn_prop_pb_thump_mycard_mask; |
|
200 }, |
|
201 PBK2_ICON_INFO |
|
202 { |
|
203 version = 0; |
|
204 pbk2IconInfoId = PHONEBOOK2_ICON_ID |
|
205 { |
|
206 ownerUid = KPbk2NamesListExtPluginUID2; |
|
207 id = EPbk2EceAddToFovoritesThumbnailIconId; |
|
208 }; |
|
209 mbmFileName = KPbk2EceMifFile; |
|
210 iconId = EMbmPhonebook2eceQgn_prop_pb_add_top; |
|
211 maskId = EMbmPhonebook2eceQgn_prop_pb_add_top_mask; |
|
212 } |
|
213 }; |
|
214 } |
|
215 |
|
216 // -------------------------------------------------------------------------- |
|
217 // CBA Options - Open CCA - Exit |
|
218 // -------------------------------------------------------------------------- |
|
219 // |
|
220 RESOURCE CBA r_pbk2_softkeys_options_exit_connect |
|
221 { |
|
222 flags = 0; |
|
223 buttons = |
|
224 { |
|
225 CBA_BUTTON |
|
226 { |
|
227 id = EAknSoftkeyOptions; |
|
228 txt = text_softkey_option; |
|
229 }, |
|
230 CBA_BUTTON |
|
231 { |
|
232 id = EAknSoftkeyExit; |
|
233 txt= text_softkey_exit; |
|
234 }, |
|
235 CBA_BUTTON |
|
236 { |
|
237 id = EPbk2CmdOpenCca; |
|
238 txt = text_softkey_open; |
|
239 } |
|
240 }; |
|
241 } |
|
242 |
|
243 // -------------------------------------------------------------------------- |
|
244 // Move top contacts dialog |
|
245 // -------------------------------------------------------------------------- |
|
246 // |
|
247 RESOURCE DIALOG r_pbk2_move_top_contacts_dlg |
|
248 { |
|
249 flags=EEikDialogFlagWait| EEikDialogFlagNoDrag | EEikDialogFlagNoTitleBar | EEikDialogFlagFillAppClientRect |
|
250 |EEikDialogFlagCbaButtons|EEikDialogFlagNotifyEsc; |
|
251 //buttons = R_AVKON_SOFTKEYS_SELECT_DONE; |
|
252 buttons = R_AVKON_SOFTKEYS_OK_CANCEL; |
|
253 items = |
|
254 { |
|
255 DLG_LINE |
|
256 { |
|
257 type = EAknCtSingleGraphicListBox; |
|
258 itemflags=EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys; |
|
259 id = ECtrlTopContactList; |
|
260 control = LISTBOX |
|
261 { |
|
262 flags=EAknListBoxSelectionList|EAknListBoxLoopScrolling; |
|
263 }; |
|
264 } |
|
265 }; |
|
266 } |
|
267 |
|
268 // -------------------------------------------------------------------------- |
|
269 // Move top contacts dialog title |
|
270 // -------------------------------------------------------------------------- |
|
271 // |
|
272 RESOURCE TBUF r_pbk2_move_top_contacts_dlg_title |
|
273 { |
|
274 buf = qtn_phob_title_move; |
|
275 } |
|
276 |
|
277 // -------------------------------------------------------------------------- |
|
278 // TBUF |
|
279 // Text for nameslist command "Add to Favorities" promotion |
|
280 // -------------------------------------------------------------------------- |
|
281 // |
|
282 RESOURCE TBUF r_qtn_phob_add_top_contacts |
|
283 { |
|
284 buf = qtn_phob_add_top_contacts; |
|
285 } |
|
286 |
|
287 // -------------------------------------------------------------------------- |
|
288 // TBUF |
|
289 // Text for "Create MyCard" |
|
290 // -------------------------------------------------------------------------- |
|
291 // |
|
292 RESOURCE TBUF r_qtn_phob_create_mycard |
|
293 { |
|
294 //buf = qtn_phob_create_mycard; |
|
295 // TODO: replace with correct strings once available |
|
296 buf = "Create MyCard"; |
|
297 } |
|
298 |
|
299 // -------------------------------------------------------------------------- |
|
300 // TBUF |
|
301 // Text for "MyCard" |
|
302 // -------------------------------------------------------------------------- |
|
303 // |
|
304 RESOURCE TBUF r_qtn_phob_open_mycard |
|
305 { |
|
306 //buf = qtn_phob_open_mycard; |
|
307 // TODO: replace with correct strings once available |
|
308 buf = "MyCard"; |
|
309 } |
|
310 |
|
311 // -------------------------------------------------------------------------- |
|
312 // PBK2_CONTACT_CONTROL |
|
313 // Names list control |
|
314 // -------------------------------------------------------------------------- |
|
315 // |
|
316 RESOURCE PBK2_CONTACT_CONTROL r_pbk2_names_list_extension_control |
|
317 { |
|
318 flags = KPbk2ContactViewListControlUpdateContextPane | |
|
319 KPbk2ContactViewListControlFindBox; |
|
320 listbox = LISTBOX |
|
321 { |
|
322 flags = EAknListBoxMarkableList | EAknListBoxLoopScrolling | |
|
323 EAknListBoxShiftEnterMarks; |
|
324 }; |
|
325 iconArray = R_PBK2_CONTACT_LIST_ICONS; |
|
326 emptyIconId = PHONEBOOK2_ICON_ID |
|
327 { |
|
328 ownerUid = KPbk2UID3; |
|
329 id = EPbk2qgn_prop_nrtyp_empty; |
|
330 }; |
|
331 defaultIconId = PHONEBOOK2_ICON_ID {}; |
|
332 } |
|
333 |
|
334 // -------------------------------------------------------------------------- |
|
335 // PBK2_CONTACT_CONTROL |
|
336 // Names list control |
|
337 // -------------------------------------------------------------------------- |
|
338 // |
|
339 RESOURCE PBK2_CONTACT_CONTROL r_pbk2_spb_names_list_extension_control |
|
340 { |
|
341 flags = KPbk2ContactViewListControlUpdateContextPane | |
|
342 KPbk2ContactViewListControlFindBox | |
|
343 KPbk2ContactViewListControlDoubleRow; |
|
344 listbox = LISTBOX |
|
345 { |
|
346 flags = EAknListBoxMarkableList | EAknListBoxLoopScrolling | |
|
347 EAknListBoxShiftEnterMarks; |
|
348 }; |
|
349 iconArray = R_PBK2_CONTACT_LIST_ICONS; |
|
350 emptyIconId = PHONEBOOK2_ICON_ID |
|
351 { |
|
352 ownerUid = KPbk2UID3; |
|
353 id = EPbk2qgn_prop_nrtyp_empty; |
|
354 }; |
|
355 defaultIconId = PHONEBOOK2_ICON_ID |
|
356 { |
|
357 ownerUid = KPbk2NamesListExtPluginUID2; |
|
358 id = EPbk2EceNoThumbnailIconId; |
|
359 }; |
|
360 } |
|
361 |
|
362 |
|
363 // -------------------------------------------------------------------------- |
|
364 // TBUF |
|
365 // Text for nameslist command "Search from remote" |
|
366 // -------------------------------------------------------------------------- |
|
367 // |
|
368 RESOURCE TBUF r_qtn_phob_search_from_remote |
|
369 { |
|
370 buf = qtn_phob_search_from_remote; |
|
371 } |
|
372 |
|
373 // --------------------------------------------------------- |
|
374 // Names List View's mycard menu pane |
|
375 // --------------------------------------------------------- |
|
376 // |
|
377 RESOURCE MENU_PANE r_pbk2_names_list_mycard_menu |
|
378 { |
|
379 items= |
|
380 { |
|
381 MENU_ITEM |
|
382 { |
|
383 command = EPbk2CmdDeleteMyCard; |
|
384 // TODO: replace with real localized text once available |
|
385 txt = "Delete MyCard"; |
|
386 flags = EEikMenuItemSpecific; |
|
387 } |
|
388 }; |
|
389 } |
|
390 |
|
391 // EOF |