|
1 /* |
|
2 * Copyright (c) 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: Dialog for IPv4 settings for plugin base. |
|
15 * |
|
16 */ |
|
17 |
|
18 #include <cmmanager.rsg> |
|
19 |
|
20 #include <mcmdexec.h> |
|
21 #include <cmpbasesettingsdlgip.h> |
|
22 #include <cmmanagerdef.h> |
|
23 #include "cmmanager.hrh" |
|
24 |
|
25 using namespace CMManager; |
|
26 |
|
27 // -------------------------------------------------------------------------- |
|
28 // CmPluginBaseSettingsDlgIp::CmPluginBaseSettingsDlgIp() |
|
29 // -------------------------------------------------------------------------- |
|
30 // |
|
31 EXPORT_C CmPluginBaseSettingsDlgIp::CmPluginBaseSettingsDlgIp( |
|
32 CCmPluginBaseEng& aCmPluginBase ) |
|
33 : CmPluginBaseSettingsDlg( aCmPluginBase ) |
|
34 { |
|
35 } |
|
36 |
|
37 // -------------------------------------------------------------------------- |
|
38 // CmPluginBaseSettingsDlgIp::~CmPluginBaseSettingsDlgIp |
|
39 // Destructor |
|
40 // -------------------------------------------------------------------------- |
|
41 // |
|
42 EXPORT_C CmPluginBaseSettingsDlgIp::~CmPluginBaseSettingsDlgIp() |
|
43 { |
|
44 } |
|
45 |
|
46 // -------------------------------------------------------------------------- |
|
47 // CmPluginBaseSettingsDlgIp::DynInitMenuPaneL |
|
48 // -------------------------------------------------------------------------- |
|
49 // |
|
50 EXPORT_C void CmPluginBaseSettingsDlgIp::DynInitMenuPaneL( |
|
51 TInt aResourceId, |
|
52 CEikMenuPane* aMenuPane ) |
|
53 { |
|
54 CmPluginBaseSettingsDlg::DynInitMenuPaneL( aResourceId, aMenuPane ); |
|
55 if ( aResourceId == R_PLUGIN_BASE_MENU ) |
|
56 { |
|
57 aMenuPane->SetItemDimmed( EPluginBaseCmdAdvanced, ETrue ); |
|
58 } |
|
59 } |
|
60 |
|
61 // -------------------------------------------------------------------------- |
|
62 // CmPluginBaseSettingsDlgIp::UpdateListBoxContentBearerSpecificL |
|
63 // -------------------------------------------------------------------------- |
|
64 // |
|
65 void CmPluginBaseSettingsDlgIp::UpdateListBoxContentBearerSpecificL( |
|
66 CDesCArray& /*aItemArray*/ ) |
|
67 { |
|
68 // Empty implementation - forced by inheritance |
|
69 } |
|
70 |
|
71 // -------------------------------------------------------------------------- |
|
72 // CmPluginBaseSettingsDlgIp::RunAdvancedSettingsL |
|
73 // -------------------------------------------------------------------------- |
|
74 // |
|
75 EXPORT_C void CmPluginBaseSettingsDlgIp::RunAdvancedSettingsL() |
|
76 { |
|
77 // Empty implementation. This function has no meaning here |
|
78 } |
|
79 |
|
80 // -------------------------------------------------------------------------- |
|
81 // CmPluginBaseSettingsDlgIp::UpdateListBoxContentL |
|
82 // -------------------------------------------------------------------------- |
|
83 // |
|
84 EXPORT_C void CmPluginBaseSettingsDlgIp::UpdateListBoxContentL() |
|
85 { |
|
86 // Must save listbox indexes because content will be deleted |
|
87 TInt lastListBoxPos = iListbox->CurrentItemIndex(); |
|
88 TInt lastListBoxTopPos = iListbox->TopItemIndex(); |
|
89 |
|
90 // deleting listbox content |
|
91 MDesCArray* itemList = iListbox->Model()->ItemTextArray(); |
|
92 CDesCArray* itemArray = (CDesCArray*)itemList; |
|
93 while ( itemArray->Count() ) |
|
94 { |
|
95 itemArray->Delete( 0 ); |
|
96 } |
|
97 while ( iSettingIndex->Count() ) |
|
98 { |
|
99 iSettingIndex->Delete( 0 ); |
|
100 } |
|
101 |
|
102 UpdateListBoxContentBearerSpecificL( *itemArray ); |
|
103 |
|
104 // Handle content changes |
|
105 iListbox->Reset(); |
|
106 // Listbox might not have index |
|
107 if ( lastListBoxPos != -1 ) |
|
108 { |
|
109 iListbox->SetCurrentItemIndex( lastListBoxPos ); |
|
110 iListbox->SetTopItemIndex( lastListBoxTopPos ); |
|
111 } |
|
112 // Draw it |
|
113 iListbox->DrawNow(); |
|
114 } |