1 /* |
1 /* |
2 * Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
40 #include "XDMPluginSLContainer.h" |
40 #include "XDMPluginSLContainer.h" |
41 #include "XDMPlugin.hrh" |
41 #include "XDMPlugin.hrh" |
42 |
42 |
43 |
43 |
44 // Constants |
44 // Constants |
|
45 |
|
46 const TInt KMaxNameLength = 255; |
|
47 |
45 _LIT( KGSXDMPluginResourceFileName, "z:\\resource\\XDMPluginRsc.rsc" ); |
48 _LIT( KGSXDMPluginResourceFileName, "z:\\resource\\XDMPluginRsc.rsc" ); |
46 |
49 |
47 #ifdef __SCALABLE_ICONS |
50 #ifdef __SCALABLE_ICONS |
48 // bitmap |
51 // bitmap |
49 _LIT( KGSXDMPluginIconFileName, "\\resource\\apps\\GSXDMplugin.mif"); |
52 _LIT( KGSXDMPluginIconFileName, "\\resource\\apps\\GSXDMplugin.mif"); |
402 if (iMainListContainer->IsListEmpty()) |
405 if (iMainListContainer->IsListEmpty()) |
403 { |
406 { |
404 aMenuPane->SetItemDimmed(EGSXDMPluginCmdNewExisting, ETrue); |
407 aMenuPane->SetItemDimmed(EGSXDMPluginCmdNewExisting, ETrue); |
405 } |
408 } |
406 } |
409 } |
|
410 |
|
411 if ( iSettingListContainer ) |
|
412 { |
|
413 TBool inUse( EFalse ); |
|
414 HBufC* currentSetName = iMainListContainer->GetCurrentSetNameLC(); |
|
415 TBuf<KMaxNameLength> setName; |
|
416 setName.Copy( currentSetName->Des() ); |
|
417 TRAP_IGNORE( inUse = iSettingListContainer->SettingsApInUseL( setName ) ); |
|
418 CleanupStack::PopAndDestroy( currentSetName ); |
|
419 |
|
420 if ( inUse ) |
|
421 { |
|
422 TInt pos( KErrNotFound ); |
|
423 if ( aMenuPane->MenuItemExists( EGSXDMPluginCmdDelete, pos ) ) |
|
424 { |
|
425 aMenuPane->SetItemSpecific( EGSXDMPluginCmdDelete, EFalse ); |
|
426 aMenuPane->SetItemDimmed(EGSXDMPluginCmdDelete, ETrue); |
|
427 } |
|
428 } |
|
429 else |
|
430 { |
|
431 TInt pos( KErrNotFound ); |
|
432 if ( aMenuPane->MenuItemExists( EGSXDMPluginCmdDelete, pos ) ) |
|
433 { |
|
434 aMenuPane->SetItemSpecific( EGSXDMPluginCmdDelete, ETrue ); |
|
435 aMenuPane->SetItemDimmed(EGSXDMPluginCmdDelete, EFalse); |
|
436 } |
|
437 } |
|
438 } |
407 } |
439 } |
408 |
440 |
409 // --------------------------------------------------------- |
441 // --------------------------------------------------------- |
410 // CXDMPlugin::HandleResourceChangeManual() |
442 // CXDMPlugin::HandleResourceChangeManual() |
411 // --------------------------------------------------------- |
443 // --------------------------------------------------------- |