Author: remi
Date: 2009-10-05 13:27:41 +0200 (Mon, 05 Oct 2009)
New Revision: 5590

Modified:
   
software_suite_v3/software/plugin/plugin-gmail/trunk/plugin-gmail/src/net/karmaLab/tuxDroid/plugins/MailPlugin.java
Log:
* Fixed detection of disabled pop3 service

Modified: 
software_suite_v3/software/plugin/plugin-gmail/trunk/plugin-gmail/src/net/karmaLab/tuxDroid/plugins/MailPlugin.java
===================================================================
--- 
software_suite_v3/software/plugin/plugin-gmail/trunk/plugin-gmail/src/net/karmaLab/tuxDroid/plugins/MailPlugin.java
 2009-10-05 11:25:04 UTC (rev 5589)
+++ 
software_suite_v3/software/plugin/plugin-gmail/trunk/plugin-gmail/src/net/karmaLab/tuxDroid/plugins/MailPlugin.java
 2009-10-05 11:27:41 UTC (rev 5590)
@@ -59,31 +59,19 @@
     {
                this.configuration().setHost("pop.gmail.com");
                this.configuration().setProtocol(ServerProtocol.pop3s);
-               
-               try
-               {
-                       if (getCommand().equals("run"))
-               {
-                               run();
-                       }
-                       else if (getCommand().equals("check"))
-               {
-                               check();
-                       }
-               else
-               {
-                   run();
-               }
-               }
-               catch (Exception e)
-               {
-                       if (e.toString().contains("[SYS/PERM]"))
-                       {
-                               
BareBonesBrowserLaunch.openURL("http://mail.google.com/mail/?#settings/fwdandpop";);
-                               System.out.println("GMAIL : Can't open the box 
!!");
-                               throwMessage("You must activate the pop3 
service in your Mail account");
-                       }
-               }
+
+        if (getCommand().equals("run"))
+        {
+            run();
+        }
+        else if (getCommand().equals("check"))
+        {
+            check();
+        }
+        else
+        {
+            run();
+        }
        }
     
        
@@ -321,7 +309,15 @@
                {
             if (!getCommand().equals("check"))
             {
-                throwMessage("Sorry, there was an error when connecting to the 
mail server. Please check your email configuration.");
+                if (e.toString().contains("[SYS/PERM]"))
+                {
+                    
BareBonesBrowserLaunch.openURL("http://mail.google.com/mail/?#settings/fwdandpop";);
+                    throwMessage("You must activate the pop3 service in your 
Mail account");
+                }
+                else
+                {
+                    throwMessage("Sorry, there was an error when connecting to 
the mail server. Please check your email configuration.");
+                }
             }
             return null;
                }


------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn

Reply via email to