63
|
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 |
#include <phonebook2.loc>
|
|
30 |
#include <VPbkFieldType.rh>
|
|
31 |
|
|
32 |
//pbk2
|
|
33 |
#include <Pbk2UIExtension.rh>
|
|
34 |
#include <Pbk2ViewInfo.hrh>//event
|
|
35 |
#include <Pbk2ViewGraph.rh>
|
|
36 |
#include <Pbk2UIControls.rh>
|
|
37 |
#include <Pbk2UIControls.hrh>
|
|
38 |
#include <Pbk2UIControls.rsg>
|
|
39 |
#include <Pbk2Commands.rsg>
|
|
40 |
#include <Pbk2IconId.rh>
|
|
41 |
#include <Pbk2ViewId.hrh>
|
|
42 |
#include <Pbk2Commands.hrh>
|
|
43 |
#include <Phonebook2.rsg>
|
|
44 |
#include <Pbk2UID.h>
|
|
45 |
#include <Pbk2IconInfo.rh>
|
|
46 |
#include <Pbk2IconArrayId.hrh>
|
|
47 |
|
|
48 |
//own
|
|
49 |
#include "Pbk2NamesListExUID.h"
|
|
50 |
#include "Pbk2NamesListEx.hrh"
|
|
51 |
#include "Pbk2NlxUIControls.hrh"
|
|
52 |
#include "pbk2nameslistexiconid.hrh"
|
|
53 |
|
|
54 |
#define KPbk2EceMifFile "z:\\resource\\apps\\phonebook2ece.mif"
|
|
55 |
|
|
56 |
// --------------------------------------------------------------------------
|
|
57 |
// Resource identifier
|
|
58 |
// --------------------------------------------------------------------------
|
|
59 |
//
|
|
60 |
NAME P2NL
|
|
61 |
|
|
62 |
// --------------------------------------------------------------------------
|
|
63 |
// Standard resource signature
|
|
64 |
// --------------------------------------------------------------------------
|
|
65 |
//
|
|
66 |
RESOURCE RSS_SIGNATURE { }
|
|
67 |
|
|
68 |
// --------------------------------------------------------------------------
|
|
69 |
// Extension information
|
|
70 |
// --------------------------------------------------------------------------
|
|
71 |
//
|
|
72 |
RESOURCE PHONEBOOK2_EXTENSION_INFORMATION
|
|
73 |
r_phonebook2_nameslist_ui_extension_information
|
|
74 |
{
|
|
75 |
version = 0;
|
|
76 |
|
|
77 |
implementationUid = KPbk2NamesListExtPluginUID2;
|
|
78 |
|
|
79 |
loadingPolicy = KPbk2LoadInStartup;
|
|
80 |
|
|
81 |
menuCommandRange = PHONEBOOK2_EXTENSION_RANGE
|
|
82 |
{
|
|
83 |
firstId = ENamesListExtentionFirstCommand;
|
|
84 |
lastId = ENamesListExtentionLastCommand;
|
|
85 |
};
|
|
86 |
|
|
87 |
// No overwritten commands, we forward all the
|
|
88 |
// commands to commandHandler
|
|
89 |
overwrittenCommands = {};
|
|
90 |
|
|
91 |
// we'll use nameslist's menu, no extentions
|
|
92 |
extensionMenus =
|
|
93 |
{
|
|
94 |
PHONEBOOK2_EXTENSION_MENU_RESOURCE
|
|
95 |
{
|
|
96 |
// Name list view: mycard commands
|
|
97 |
viewId = EPbk2NamesListViewId;
|
|
98 |
menuFilteringFlags = 0;
|
|
99 |
parentMenu = R_PHONEBOOK2_NAMESLIST_DELETE_MENU;
|
|
100 |
prevCommand = EPbk2CmdDeleteMe;
|
|
101 |
menuPane = r_pbk2_names_list_mycard_menu;
|
|
102 |
}
|
|
103 |
};
|
|
104 |
|
|
105 |
viewIds =
|
|
106 |
{
|
|
107 |
PHONEBOOK2_EXTENSION_VIEW_ID
|
|
108 |
{
|
|
109 |
version = 0;
|
|
110 |
viewId = EPbk2NamesListViewId;
|
|
111 |
viewResource = R_PHONEBOOK2_NAMESLIST_APPVIEW;
|
|
112 |
}
|
|
113 |
};
|
|
114 |
|
|
115 |
// Pb uses r_pbk2_viewnodes in Pbk2ViewGraph.rss
|
|
116 |
// We do not modify the existing view graph here.
|
|
117 |
viewGraphModification = 0;
|
|
118 |
|
|
119 |
iconInformation = r_name_list_icon_information;
|
|
120 |
}
|
|
121 |
|
|
122 |
// --------------------------------------------------------------------------
|
|
123 |
// Icon information
|
|
124 |
// --------------------------------------------------------------------------
|
|
125 |
//
|
|
126 |
RESOURCE PHONEBOOK2_EXTENSION_ICON_INFORMATION r_name_list_icon_information
|
|
127 |
{
|
|
128 |
// A link to the array that contains PBK2_ICON_INFOs
|
|
129 |
iconInfoArray = r_name_list_icon_info_array;
|
|
130 |
|
|
131 |
// A link to the array that contains PHONEBOOK2_EXTENSION_ICON_ARRAYs
|
|
132 |
iconArrays =
|
|
133 |
{
|
|
134 |
PHONEBOOK2_EXTENSION_ICON_ARRAY
|
|
135 |
{
|
|
136 |
// Extension icons for contact list
|
|
137 |
parentIconArrayId = EPbk2ContactListIconArrayId;
|
|
138 |
iconArray = r_name_list_icon_array;
|
|
139 |
}
|
|
140 |
};
|
|
141 |
}
|
|
142 |
|
|
143 |
// --------------------------------------------------------------------------
|
|
144 |
// Extension icons for contact list
|
|
145 |
// --------------------------------------------------------------------------
|
|
146 |
//
|
|
147 |
RESOURCE PBK2_ICON_ARRAY r_name_list_icon_array
|
|
148 |
{
|
|
149 |
// Array of PBK2_ICON_ID structures.
|
|
150 |
arrayId = EPbk2NullIconArrayId;
|
|
151 |
icons =
|
|
152 |
{
|
|
153 |
PHONEBOOK2_ICON_ID
|
|
154 |
{
|
|
155 |
ownerUid = KPbk2NamesListExtPluginUID2;
|
|
156 |
id = EPbk2EceNoThumbnailIconId;
|
|
157 |
},
|
|
158 |
PHONEBOOK2_ICON_ID
|
|
159 |
{
|
|
160 |
ownerUid = KPbk2NamesListExtPluginUID2;
|
|
161 |
id = EPbk2EceNoMyCardThumbnailIconId;
|
|
162 |
},
|
|
163 |
PHONEBOOK2_ICON_ID
|
|
164 |
{
|
|
165 |
ownerUid = KPbk2NamesListExtPluginUID2;
|
|
166 |
id = EPbk2EceAddToFovoritesThumbnailIconId;
|
|
167 |
}
|
|
168 |
};
|
|
169 |
}
|
|
170 |
|
|
171 |
// --------------------------------------------------------------------------
|
|
172 |
// Icon info array
|
|
173 |
// --------------------------------------------------------------------------
|
|
174 |
//
|
|
175 |
RESOURCE ARRAY r_name_list_icon_info_array
|
|
176 |
{
|
|
177 |
items =
|
|
178 |
{
|
|
179 |
PBK2_ICON_INFO
|
|
180 |
{
|
|
181 |
version = 0;
|
|
182 |
pbk2IconInfoId = PHONEBOOK2_ICON_ID
|
|
183 |
{
|
|
184 |
ownerUid = KPbk2NamesListExtPluginUID2;
|
|
185 |
id = EPbk2EceNoThumbnailIconId;
|
|
186 |
};
|
|
187 |
mbmFileName = KPbk2EceMifFile;
|
|
188 |
iconId = EMbmPhonebook2eceQgn_prop_pb_thumb_unknown;
|
|
189 |
maskId = EMbmPhonebook2eceQgn_prop_pb_thumb_unknown_mask;
|
|
190 |
skinIdMajor = EAknsMajorGeneric;
|
|
191 |
skinIdMinor = EAknsMinorGenericQgnPropPbThumbUnknown;
|
|
192 |
},
|
|
193 |
PBK2_ICON_INFO
|
|
194 |
{
|
|
195 |
version = 0;
|
|
196 |
pbk2IconInfoId = PHONEBOOK2_ICON_ID
|
|
197 |
{
|
|
198 |
ownerUid = KPbk2NamesListExtPluginUID2;
|
|
199 |
id = EPbk2EceNoMyCardThumbnailIconId;
|
|
200 |
};
|
|
201 |
mbmFileName = KPbk2EceMifFile;
|
|
202 |
iconId = EMbmPhonebook2eceQgn_prop_pb_thump_mycard;
|
|
203 |
maskId = EMbmPhonebook2eceQgn_prop_pb_thump_mycard_mask;
|
|
204 |
skinIdMajor = EAknsMajorGeneric;
|
|
205 |
skinIdMinor = EAknsMinorGenericQgnPropPbThumpMycard;
|
|
206 |
},
|
|
207 |
PBK2_ICON_INFO
|
|
208 |
{
|
|
209 |
version = 0;
|
|
210 |
pbk2IconInfoId = PHONEBOOK2_ICON_ID
|
|
211 |
{
|
|
212 |
ownerUid = KPbk2NamesListExtPluginUID2;
|
|
213 |
id = EPbk2EceAddToFovoritesThumbnailIconId;
|
|
214 |
};
|
|
215 |
mbmFileName = KPbk2EceMifFile;
|
|
216 |
iconId = EMbmPhonebook2eceQgn_prop_pb_add_top;
|
|
217 |
maskId = EMbmPhonebook2eceQgn_prop_pb_add_top_mask;
|
|
218 |
skinIdMajor = EAknsMajorGeneric;
|
|
219 |
skinIdMinor = EAknsMinorGenericQgnPropPbAddTop;
|
|
220 |
}
|
|
221 |
};
|
|
222 |
}
|
|
223 |
|
|
224 |
// --------------------------------------------------------------------------
|
|
225 |
// CBA Options - Open CCA - Exit
|
|
226 |
// --------------------------------------------------------------------------
|
|
227 |
//
|
|
228 |
RESOURCE CBA r_pbk2_softkeys_options_exit_connect
|
|
229 |
{
|
|
230 |
flags = 0;
|
|
231 |
buttons =
|
|
232 |
{
|
|
233 |
CBA_BUTTON
|
|
234 |
{
|
|
235 |
id = EAknSoftkeyOptions;
|
|
236 |
txt = text_softkey_option;
|
|
237 |
},
|
|
238 |
CBA_BUTTON
|
|
239 |
{
|
|
240 |
id = EAknSoftkeyExit;
|
|
241 |
txt= text_softkey_exit;
|
|
242 |
},
|
|
243 |
CBA_BUTTON
|
|
244 |
{
|
|
245 |
id = EPbk2CmdOpenCca;
|
|
246 |
txt = text_softkey_open;
|
|
247 |
}
|
|
248 |
};
|
|
249 |
}
|
|
250 |
|
|
251 |
// --------------------------------------------------------------------------
|
|
252 |
// Move top contacts dialog
|
|
253 |
// --------------------------------------------------------------------------
|
|
254 |
//
|
|
255 |
RESOURCE DIALOG r_pbk2_move_top_contacts_dlg
|
|
256 |
{
|
|
257 |
flags=EEikDialogFlagWait| EEikDialogFlagNoDrag | EEikDialogFlagNoTitleBar | EEikDialogFlagFillAppClientRect
|
|
258 |
|EEikDialogFlagCbaButtons|EEikDialogFlagNotifyEsc;
|
|
259 |
//buttons = R_AVKON_SOFTKEYS_SELECT_DONE;
|
|
260 |
buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
|
|
261 |
items =
|
|
262 |
{
|
|
263 |
DLG_LINE
|
|
264 |
{
|
|
265 |
type = EAknCtSingleGraphicListBox;
|
|
266 |
itemflags=EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
|
|
267 |
id = ECtrlTopContactList;
|
|
268 |
control = LISTBOX
|
|
269 |
{
|
|
270 |
flags=EAknListBoxSelectionList|EAknListBoxLoopScrolling;
|
|
271 |
};
|
|
272 |
}
|
|
273 |
};
|
|
274 |
}
|
|
275 |
|
|
276 |
// --------------------------------------------------------------------------
|
|
277 |
// Move top contacts dialog title
|
|
278 |
// --------------------------------------------------------------------------
|
|
279 |
//
|
|
280 |
RESOURCE TBUF r_pbk2_move_top_contacts_dlg_title
|
|
281 |
{
|
|
282 |
buf = qtn_phob_title_move;
|
|
283 |
}
|
|
284 |
|
|
285 |
// --------------------------------------------------------------------------
|
|
286 |
// TBUF
|
|
287 |
// Text for nameslist command "Add to Favorities" promotion
|
|
288 |
// --------------------------------------------------------------------------
|
|
289 |
//
|
|
290 |
RESOURCE TBUF r_qtn_phob_add_top_contacts
|
|
291 |
{
|
|
292 |
buf = qtn_phob_add_top_contacts;
|
|
293 |
}
|
|
294 |
|
|
295 |
// --------------------------------------------------------------------------
|
|
296 |
// TBUF
|
|
297 |
// Text for "Create MyCard"
|
|
298 |
// --------------------------------------------------------------------------
|
|
299 |
//
|
|
300 |
RESOURCE TBUF r_qtn_contacts_mc_set_up_my_card
|
|
301 |
{
|
|
302 |
buf = qtn_contacts_mc_set_up_my_card;
|
|
303 |
}
|
|
304 |
|
|
305 |
// --------------------------------------------------------------------------
|
|
306 |
// TBUF
|
|
307 |
// Text for "MyCard"
|
|
308 |
// --------------------------------------------------------------------------
|
|
309 |
//
|
|
310 |
RESOURCE TBUF r_qtn_contacts_mc_my_card
|
|
311 |
{
|
|
312 |
buf = qtn_contacts_mc_my_card;
|
|
313 |
}
|
|
314 |
|
|
315 |
// --------------------------------------------------------------------------
|
|
316 |
// TBUF
|
|
317 |
// Text for nameslist's secondary row "%N numbers"
|
|
318 |
// --------------------------------------------------------------------------
|
|
319 |
//
|
|
320 |
RESOURCE TBUF r_qtn_phob_n_numbers
|
|
321 |
{
|
|
322 |
buf = qtn_phob_n_numbers;
|
|
323 |
}
|
|
324 |
|
|
325 |
// --------------------------------------------------------------------------
|
|
326 |
// TBUF
|
|
327 |
// Text for delete mycard confirmation query
|
|
328 |
// --------------------------------------------------------------------------
|
|
329 |
//
|
|
330 |
RESOURCE TBUF r_qtn_phob_my_card_clear_confirm
|
|
331 |
{
|
|
332 |
buf = qtn_phob_my_card_clear_confirm;
|
|
333 |
}
|
|
334 |
|
|
335 |
// --------------------------------------------------------------------------
|
|
336 |
// PBK2_CONTACT_CONTROL
|
|
337 |
// Names list control
|
|
338 |
// --------------------------------------------------------------------------
|
|
339 |
//
|
|
340 |
RESOURCE PBK2_CONTACT_CONTROL r_pbk2_names_list_extension_control
|
|
341 |
{
|
|
342 |
flags = KPbk2ContactViewListControlUpdateContextPane |
|
|
343 |
KPbk2ContactViewListControlFindBox;
|
|
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 |
|
|
358 |
// --------------------------------------------------------------------------
|
|
359 |
// PBK2_CONTACT_CONTROL
|
|
360 |
// Names list control
|
|
361 |
// --------------------------------------------------------------------------
|
|
362 |
//
|
|
363 |
RESOURCE PBK2_CONTACT_CONTROL r_pbk2_spb_names_list_extension_control
|
|
364 |
{
|
|
365 |
flags = KPbk2ContactViewListControlUpdateContextPane |
|
|
366 |
KPbk2ContactViewListControlFindBox |
|
|
367 |
KPbk2ContactViewListControlDoubleRow;
|
|
368 |
listbox = LISTBOX
|
|
369 |
{
|
|
370 |
flags = EAknListBoxStylusMarkableList | EAknListBoxLoopScrolling |
|
|
371 |
EAknListBoxPointerMarkableList;
|
|
372 |
};
|
|
373 |
iconArray = R_PBK2_CONTACT_LIST_ICONS;
|
|
374 |
emptyIconId = PHONEBOOK2_ICON_ID
|
|
375 |
{
|
|
376 |
ownerUid = KPbk2UID3;
|
|
377 |
id = EPbk2qgn_prop_nrtyp_empty;
|
|
378 |
};
|
|
379 |
defaultIconId = PHONEBOOK2_ICON_ID
|
|
380 |
{
|
|
381 |
ownerUid = KPbk2NamesListExtPluginUID2;
|
|
382 |
id = EPbk2EceNoThumbnailIconId;
|
|
383 |
};
|
|
384 |
}
|
|
385 |
|
|
386 |
|
|
387 |
// --------------------------------------------------------------------------
|
|
388 |
// TBUF
|
|
389 |
// Text for nameslist command "Search from remote"
|
|
390 |
// --------------------------------------------------------------------------
|
|
391 |
//
|
|
392 |
RESOURCE TBUF r_qtn_phob_search_from_remote
|
|
393 |
{
|
|
394 |
buf = qtn_phob_search_from_remote;
|
|
395 |
}
|
|
396 |
|
|
397 |
// ---------------------------------------------------------
|
|
398 |
// Names List View's mycard menu pane
|
|
399 |
// ---------------------------------------------------------
|
|
400 |
//
|
|
401 |
RESOURCE MENU_PANE r_pbk2_names_list_mycard_menu
|
|
402 |
{
|
|
403 |
items=
|
|
404 |
{
|
|
405 |
MENU_ITEM
|
|
406 |
{
|
|
407 |
command = EPbk2CmdDeleteMyCard;
|
|
408 |
txt = qtn_phob_opt_entry_delete;
|
|
409 |
flags = EEikMenuItemSpecific;
|
|
410 |
}
|
|
411 |
};
|
|
412 |
}
|
|
413 |
|
|
414 |
// --------------------------------------------------------------------------
|
|
415 |
// r_pbk2_mycard_field_clip_selector
|
|
416 |
// --------------------------------------------------------------------------
|
|
417 |
//
|
|
418 |
RESOURCE VPBK_FIELD_TYPE_SELECTOR r_pbk2_mycard_field_clip_selector
|
|
419 |
{
|
|
420 |
versitProperties =
|
|
421 |
{
|
|
422 |
// email fields
|
|
423 |
VBK_FIELD_VERSIT_PROPERTY
|
|
424 |
{
|
|
425 |
name = EVPbkVersitNameEMAIL;
|
|
426 |
},
|
|
427 |
// SIP fields (POC, SWIS, VoIP, etc.)
|
|
428 |
VBK_FIELD_VERSIT_PROPERTY
|
|
429 |
{
|
|
430 |
name = EVPbkVersitNameX;
|
|
431 |
extensionName = "X-SIP";
|
|
432 |
},
|
|
433 |
// xSP fields
|
|
434 |
VBK_FIELD_VERSIT_PROPERTY
|
|
435 |
{
|
|
436 |
name = EVPbkVersitNameIMPP;
|
|
437 |
},
|
|
438 |
// telephone
|
|
439 |
VBK_FIELD_VERSIT_PROPERTY
|
|
440 |
{
|
|
441 |
name = EVPbkVersitNameTEL;
|
|
442 |
},
|
|
443 |
// telephone
|
|
444 |
VBK_FIELD_VERSIT_PROPERTY
|
|
445 |
{
|
|
446 |
name = EVPbkVersitNameX;
|
|
447 |
extensionName = "X-ASSISTANT-TEL";
|
|
448 |
}
|
|
449 |
};
|
|
450 |
}
|
|
451 |
|
|
452 |
|
|
453 |
// EOF
|