1 /* |
|
2 * Copyright (c) 2007-2008 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: Holds plugins shared resources |
|
13 * |
|
14 * Description: |
|
15 * Version : %version: 3 % << Don't touch! Updated by Synergy at check-out. |
|
16 * |
|
17 */ |
|
18 #include <StringLoader.h> |
|
19 #include "mmpluginsharedresources.h" |
|
20 #include "hnutils.h" |
|
21 |
|
22 #include <mmfolderuiextplugin.rsg> |
|
23 |
|
24 _LIT( KResourceFile, "mmfolderuiextplugin.rsc" ); |
|
25 |
|
26 // ============================ MEMBER FUNCTIONS ============================= |
|
27 // --------------------------------------------------------------------------- |
|
28 // Symbian factory function. |
|
29 // --------------------------------------------------------------------------- |
|
30 // |
|
31 CMmPluginSharedResources* CMmPluginSharedResources::NewL() |
|
32 { |
|
33 CMmPluginSharedResources* self = new( ELeave ) CMmPluginSharedResources(); |
|
34 CleanupStack::PushL( self ); |
|
35 self->ConstructL(); |
|
36 CleanupStack::Pop( self ); |
|
37 return self; |
|
38 } |
|
39 |
|
40 // --------------------------------------------------------------------------- |
|
41 // Symbian second phase constructor. |
|
42 // --------------------------------------------------------------------------- |
|
43 // |
|
44 void CMmPluginSharedResources::ConstructL() |
|
45 { |
|
46 // Init resources |
|
47 iLanguageFilePath = HnUtils::LocateNearestLanguageFileLC( KResourceFile ); |
|
48 CleanupStack::Pop(iLanguageFilePath); |
|
49 iResourceOffset = CCoeEnv::Static()->AddResourceFileL( |
|
50 iLanguageFilePath->Des() ); |
|
51 |
|
52 iDefFolderName = StringLoader::LoadLC( R_MENU_EDIT_DEFAULT_FOLDER_NAME ); |
|
53 CleanupStack::Pop(iDefFolderName); |
|
54 iEditFolderName = StringLoader::LoadLC( R_MENU_EDIT_FOLDER_NAME ); |
|
55 CleanupStack::Pop(iEditFolderName); |
|
56 iMsgBadFileName = StringLoader::LoadLC( R_MENU_EDIT_FLDR_BAD_FILE_NAME ); |
|
57 CleanupStack::Pop(iMsgBadFileName); |
|
58 iMsgBadChar = StringLoader::LoadLC(R_MENU_EDIT_FLDR_ILLEGAL_CHARACTERS); |
|
59 CleanupStack::Pop(iMsgBadChar); |
|
60 iRootFolder = StringLoader::LoadLC( R_MENU_EDIT_ROOT_FOLDER ); |
|
61 CleanupStack::Pop(iRootFolder); |
|
62 iDelWaitNote = StringLoader::LoadLC(R_MENU_EDIT_FLDR_DELETING_WAIT_NOTE); |
|
63 CleanupStack::Pop(iDelWaitNote); |
|
64 } |
|
65 |
|
66 // --------------------------------------------------------------------------- |
|
67 // Destructor. |
|
68 // --------------------------------------------------------------------------- |
|
69 // |
|
70 CMmPluginSharedResources::~CMmPluginSharedResources() |
|
71 { |
|
72 delete iDelWaitNote; |
|
73 delete iRootFolder; |
|
74 delete iMsgBadChar; |
|
75 delete iMsgBadFileName; |
|
76 delete iEditFolderName; |
|
77 delete iDefFolderName; |
|
78 delete iLanguageFilePath; |
|
79 CCoeEnv::Static()->DeleteResourceFile( iResourceOffset ); |
|
80 } |
|