gssettingsuis/Gs/GSFramework/src/GSBaseView.cpp
branchRCL_3
changeset 14 9941bcf99348
parent 0 8c5d936e5675
equal deleted inserted replaced
13:f392bfb21e08 14:9941bcf99348
   268 //
   268 //
   269 EXPORT_C void CGSBaseView::OpenLocalizedResourceFileL(
   269 EXPORT_C void CGSBaseView::OpenLocalizedResourceFileL(
   270     const TDesC& aResourceFileName,
   270     const TDesC& aResourceFileName,
   271     RConeResourceLoader& aResourceLoader )
   271     RConeResourceLoader& aResourceLoader )
   272     {
   272     {
   273     RFs fsSession;
   273     RFs &fsSession = CCoeEnv::Static()->FsSession();
   274     User::LeaveIfError( fsSession.Connect() );
       
   275 
   274 
   276     // Find the resource file:
   275     // Find the resource file:
   277     TParse parse;
   276     TParse parse;
   278     parse.Set( aResourceFileName, &KDC_RESOURCE_FILES_DIR, NULL );
   277     parse.Set( aResourceFileName, &KDC_RESOURCE_FILES_DIR, NULL );
   279     TFileName fileName( parse.FullName() );
   278     TFileName fileName( parse.FullName() );
   281     // Get language of resource file:
   280     // Get language of resource file:
   282     BaflUtils::NearestLanguageFile( fsSession, fileName );
   281     BaflUtils::NearestLanguageFile( fsSession, fileName );
   283 
   282 
   284     // Open resource file:
   283     // Open resource file:
   285     aResourceLoader.OpenL( fileName );
   284     aResourceLoader.OpenL( fileName );
   286 
       
   287     // If leave occurs before this, close is called automatically when the
       
   288     // thread exits.
       
   289     fsSession.Close();
       
   290     }
   285     }
   291 
   286 
   292 
   287 
   293 // -----------------------------------------------------------------------------
   288 // -----------------------------------------------------------------------------
   294 // CGSBaseView::ResetSelectedItemIndex()
   289 // CGSBaseView::ResetSelectedItemIndex()