sipplugins/sippsipsettingsui/src/SIPSettIntegerSetPage.cpp
branchRCL_3
changeset 19 b5e99d8877c7
parent 12 a7d1e54a7332
child 20 0dcb073356a5
equal deleted inserted replaced
18:f54bfd820e04 19:b5e99d8877c7
    25 #include    "SIPSettIntegerSetPage.h"
    25 #include    "SIPSettIntegerSetPage.h"
    26 #include    "tsipsettingsdata.h"
    26 #include    "tsipsettingsdata.h"
    27 #include    "gssippluginlogger.h"
    27 #include    "gssippluginlogger.h"
    28 
    28 
    29 _LIT( NULLString,"" );
    29 _LIT( NULLString,"" );
       
    30 _LIT16( ZeroString,"-1" );
    30 // ============================ MEMBER FUNCTIONS ===============================
    31 // ============================ MEMBER FUNCTIONS ===============================
    31 
    32 
    32 // -----------------------------------------------------------------------------
    33 // -----------------------------------------------------------------------------
    33 // CSIPSettIntegerSetPage::CSIPSettIntegerSetPage
    34 // CSIPSettIntegerSetPage::CSIPSettIntegerSetPage
    34 // C++ default constructor can NOT contain any code, that
    35 // C++ default constructor can NOT contain any code, that
    69         RestoreOriginalSettingL();
    70         RestoreOriginalSettingL();
    70         return ETrue;
    71         return ETrue;
    71         }
    72         }
    72        TextControl()->GetText( intText );
    73        TextControl()->GetText( intText );
    73        lex.Assign( intText.Ptr() );
    74        lex.Assign( intText.Ptr() );
    74        lex.Val( value );   	   
    75        lex.Val( value );
    75        if( intText == NULLString )
    76        if( value >= 0 && value <= 65535 || intText == NULLString )
    76 	       {
    77     	   {
    77            TextControl()->SetTextL(&NULLString);
    78            if( intText == NULLString )
    78 	       }
    79     	       {
    79        UpdateSettingL();  
    80                TextControl()->SetTextL(&ZeroString);
       
    81     	       }
       
    82            UpdateSettingL();  
    80             
    83             
    81        // Everything OK, save setting and exit page
    84            // Everything OK, save setting and exit page
    82        AcceptSettingL();	   
    85            AcceptSettingL();	   
    83 	   ret = ETrue;
    86     	   ret = ETrue;
    84     	   
    87     	   }
    85       
    88        else
       
    89     	   {
       
    90     	   ret = EFalse;
       
    91     	   }
    86         
    92         
    87         return ret;    
    93         return ret;    
    88     }
    94     }
    89 // -----------------------------------------------------------------------------
    95 // -----------------------------------------------------------------------------
    90 // CSIPSettIntegerSetPage::DynamicInitL
    96 // CSIPSettIntegerSetPage::DynamicInitL