emailuis/emailui/src/ncscomposeview.cpp
branchRCL_3
changeset 23 dcf0eedfc1a3
parent 22 d620048b4810
equal deleted inserted replaced
22:d620048b4810 23:dcf0eedfc1a3
    35 #include <AknUtils.h>
    35 #include <AknUtils.h>
    36 #include <FreestyleEmailUi.rsg>
    36 #include <FreestyleEmailUi.rsg>
    37 #include <freestyleemailui.mbg>
    37 #include <freestyleemailui.mbg>
    38 #include <aknstyluspopupmenu.h>
    38 #include <aknstyluspopupmenu.h>
    39 
    39 
       
    40 #include <wlaninternalpskeys.h>
    40 #include "ncscomposeview.h"
    41 #include "ncscomposeview.h"
    41 #include "ncscomposeviewcontainer.h"
    42 #include "ncscomposeviewcontainer.h"
    42 #include "ncsconstants.h"
    43 #include "ncsconstants.h"
    43 #include "ncsutility.h"
    44 #include "ncsutility.h"
    44 #include "ncsemailaddressobject.h"
    45 #include "ncsemailaddressobject.h"
   957                 TRAPD( error, DoSendL() );
   958                 TRAPD( error, DoSendL() );
   958                 if ( !error )
   959                 if ( !error )
   959                     {
   960                     {
   960                     // Sending successful
   961                     // Sending successful
   961                     HBufC* confMessage = NULL;
   962                     HBufC* confMessage = NULL;
   962                     if ( !TFsEmailUiUtility::IsOfflineModeL() )
   963                     if ( !TFsEmailUiUtility::IsOfflineModeL() || WLANConnectionActive() )
   963                         {
   964                         {
   964                         // when sync status is currently ONLINE
   965                         // when sync status is currently ONLINE
   965                         confMessage = StringLoader::LoadLC( 
   966                         confMessage = StringLoader::LoadLC( 
   966                                 R_FREESTYLE_EMAIL_CONFIRM_NOTE_SENDING_QUEUED );
   967                                 R_FREESTYLE_EMAIL_CONFIRM_NOTE_SENDING_QUEUED );
   967                         }
   968                         }
  1794             }
  1795             }
  1795         }
  1796         }
  1796 
  1797 
  1797 	}
  1798 	}
  1798 
  1799 
       
  1800 // ---------------------------------------------------------------------------
       
  1801 // CNcsComposeView::FadeOut()
       
  1802 // enables hiding toolbar on different view -> DoActivate()  
       
  1803 // which is earlier than -> CFsEmailUiViewBase::DoDeactivate() 
       
  1804 // -----------------------------------------------------------------------------
       
  1805 //
       
  1806 void CNcsComposeView::FadeOut( TBool aDirectionOut )
       
  1807     {
       
  1808     if ( aDirectionOut && Toolbar()->IsShown() )
       
  1809         {
       
  1810         HideToolbar();
       
  1811         }
       
  1812     else if ( ! ( aDirectionOut || Toolbar()->IsShown() ) )
       
  1813         {
       
  1814         ShowToolbar();
       
  1815         }
       
  1816     }
  1799 // -----------------------------------------------------------------------------
  1817 // -----------------------------------------------------------------------------
  1800 // CNcsComposeView::InitReplyFieldsL()
  1818 // CNcsComposeView::InitReplyFieldsL()
  1801 // Initialises the reply fields from the reply message created by the plug-in.
  1819 // Initialises the reply fields from the reply message created by the plug-in.
  1802 // -----------------------------------------------------------------------------
  1820 // -----------------------------------------------------------------------------
  1803 //
  1821 //
  3400 
  3418 
  3401     return button;
  3419     return button;
  3402     }
  3420     }
  3403 
  3421 
  3404 // ---------------------------------------------------------------------------
  3422 // ---------------------------------------------------------------------------
       
  3423 // Returns ETrue if WLAN connection is active.
       
  3424 // ---------------------------------------------------------------------------
       
  3425 //
       
  3426 TBool CNcsComposeView::WLANConnectionActive()    
       
  3427     {
       
  3428     TBool ret = EFalse;
       
  3429     
       
  3430     TInt wlanState;
       
  3431     TInt err = RProperty::Get( KPSUidWlan, KPSWlanIndicator, wlanState );
       
  3432 
       
  3433     if ( err == KErrNone )
       
  3434         {
       
  3435         if ( wlanState == EPSWlanIndicatorActive ||
       
  3436              wlanState == EPSWlanIndicatorActiveSecure )
       
  3437             {
       
  3438             ret = ETrue;
       
  3439             }
       
  3440         }
       
  3441     
       
  3442     return ret;    
       
  3443     }
       
  3444 
       
  3445 
       
  3446 // ---------------------------------------------------------------------------
  3405 // CActiveHelper::NewL()
  3447 // CActiveHelper::NewL()
  3406 // ---------------------------------------------------------------------------
  3448 // ---------------------------------------------------------------------------
  3407 //
  3449 //
  3408 CActiveHelper* CActiveHelper::NewL( CNcsComposeView* aSession )
  3450 CActiveHelper* CActiveHelper::NewL( CNcsComposeView* aSession )
  3409     {
  3451     {