sipplugins/sippsipsettingsui/src/SIPSettIntegerSetPage.cpp
branchRCL_3
changeset 43 b5e99d8877c7
parent 20 a7d1e54a7332
child 44 0dcb073356a5
--- a/sipplugins/sippsipsettingsui/src/SIPSettIntegerSetPage.cpp	Thu Aug 19 10:16:25 2010 +0300
+++ b/sipplugins/sippsipsettingsui/src/SIPSettIntegerSetPage.cpp	Tue Aug 31 15:32:57 2010 +0300
@@ -27,6 +27,7 @@
 #include    "gssippluginlogger.h"
 
 _LIT( NULLString,"" );
+_LIT16( ZeroString,"-1" );
 // ============================ MEMBER FUNCTIONS ===============================
 
 // -----------------------------------------------------------------------------
@@ -71,18 +72,23 @@
         }
        TextControl()->GetText( intText );
        lex.Assign( intText.Ptr() );
-       lex.Val( value );   	   
-       if( intText == NULLString )
-	       {
-           TextControl()->SetTextL(&NULLString);
-	       }
-       UpdateSettingL();  
+       lex.Val( value );
+       if( value >= 0 && value <= 65535 || intText == NULLString )
+    	   {
+           if( intText == NULLString )
+    	       {
+               TextControl()->SetTextL(&ZeroString);
+    	       }
+           UpdateSettingL();  
             
-       // Everything OK, save setting and exit page
-       AcceptSettingL();	   
-	   ret = ETrue;
-    	   
-      
+           // Everything OK, save setting and exit page
+           AcceptSettingL();	   
+    	   ret = ETrue;
+    	   }
+       else
+    	   {
+    	   ret = EFalse;
+    	   }
         
         return ret;    
     }