|
1 /* |
|
2 * Copyright (c) 2005 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: Text setting item with a validation of the entered text |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 #include <gssipsettingspluginrsc.rsg> |
|
22 #include "sipsettlistsipsrvtextsetitem.h" |
|
23 #include "sipsettlistsipsrvtextsetpage.h" |
|
24 #include "tgssipvalidatorwrapper.h" |
|
25 #include "gssippluginlogger.h" |
|
26 |
|
27 // ============================ MEMBER FUNCTIONS =============================== |
|
28 |
|
29 // ----------------------------------------------------------------------------- |
|
30 // CSIPSettListSIPSrvTextSetItem::CSIPSettListSIPSrvTextSetItem |
|
31 // C++ default constructor can NOT contain any code, that |
|
32 // might leave. |
|
33 // ----------------------------------------------------------------------------- |
|
34 // |
|
35 CSIPSettListSIPSrvTextSetItem::CSIPSettListSIPSrvTextSetItem( |
|
36 TInt aIdentifier, TDes& aText, |
|
37 TInt (*aFunctionL)(TAny *aAny ) ): |
|
38 CAknTextSettingItem( aIdentifier, aText ) |
|
39 { |
|
40 __GSLOGSTRING("CSIPSettListSIPSrvTextSetItem::CSIPSettListSIPSrvTextSetItem" ) |
|
41 iFunctionL = aFunctionL; |
|
42 } |
|
43 |
|
44 // Destructor |
|
45 CSIPSettListSIPSrvTextSetItem::~CSIPSettListSIPSrvTextSetItem() |
|
46 { |
|
47 __GSLOGSTRING("CSIPSettListSIPSrvTextSetItem::~CSIPSettListSIPSrvTextSetItem" ) |
|
48 } |
|
49 |
|
50 // ----------------------------------------------------------------------------- |
|
51 // CSIPSettListSIPSrvTextSetItem::EditItemL |
|
52 // (other items were commented in a header). |
|
53 // ----------------------------------------------------------------------------- |
|
54 // |
|
55 void CSIPSettListSIPSrvTextSetItem::EditItemL( TBool /*aCalledFromMenu*/ ) |
|
56 { |
|
57 __GSLOGSTRING("CSIPSettListSIPSrvTextSetItem::EditItemL Start" ) |
|
58 TInt id = SettingPageResourceId(); |
|
59 TGSSIPValidatorWrapper cBack( iFunctionL, &(InternalTextPtr()) ); |
|
60 |
|
61 CSIPSettListSIPSrvTextSetPage* page = |
|
62 new( ELeave )CSIPSettListSIPSrvTextSetPage( |
|
63 id, |
|
64 cBack, |
|
65 InternalTextPtr(), |
|
66 CAknTextSettingPage::EZeroLengthAllowed ); |
|
67 CleanupStack::PushL( page ); |
|
68 page->ConstructL(); |
|
69 CleanupStack::Pop( page ); |
|
70 |
|
71 // Execute the setting page |
|
72 SetSettingPage( page ); |
|
73 page->ExecuteLD(); |
|
74 SetSettingPage( NULL ); |
|
75 |
|
76 // Update text on this side as well |
|
77 UpdateListBoxTextL(); |
|
78 __GSLOGSTRING("CSIPSettListSIPSrvTextSetItem::EditItemL End" ) |
|
79 } |
|
80 |
|
81 // End of File |