Author: jerome
Date: 2009-06-19 11:54:32 +0200 (Fri, 19 Jun 2009)
New Revision: 4832

Modified:
   
software_suite_v2/software/gadgets/tuxdroid-gadget-facebook/trunk/tuxdroid-gadget-facebook/resources/gadget.pot
   
software_suite_v2/software/gadgets/tuxdroid-gadget-facebook/trunk/tuxdroid-gadget-facebook/src/FacebookGadget.java
Log:
* Updated strings.
* Added a protection to do not log in when no parameter are selected.

Modified: 
software_suite_v2/software/gadgets/tuxdroid-gadget-facebook/trunk/tuxdroid-gadget-facebook/resources/gadget.pot
===================================================================
--- 
software_suite_v2/software/gadgets/tuxdroid-gadget-facebook/trunk/tuxdroid-gadget-facebook/resources/gadget.pot
     2009-06-19 08:48:41 UTC (rev 4831)
+++ 
software_suite_v2/software/gadgets/tuxdroid-gadget-facebook/trunk/tuxdroid-gadget-facebook/resources/gadget.pot
     2009-06-19 09:54:32 UTC (rev 4832)
@@ -25,27 +25,39 @@
 msgid "You have {0} new messages"
 msgstr ""
 
-msgid "You have {0} new message"
+msgid "You have one new message"
 msgstr ""
 
 msgid "You have {0} friend requests"
 msgstr ""
 
+msgid "You have one friend request"
+msgstr ""
+
 msgid "From {0}"
 msgstr ""
 
 msgid "You have {0} group invites"
 msgstr ""
 
+msgid "You have one group invite"
+msgstr ""
+
 msgid "to {0}"
 msgstr ""
 
 msgid "You have {0} event invites"
 msgstr ""
 
+msgid "You have one event invite"
+msgstr ""
+
 msgid "You have {0} pokes"
 msgstr ""
 
+msgid "You have one poke"
+msgstr ""
+
 msgid "I must be connected to access your facebook account."
 msgstr ""
 

Modified: 
software_suite_v2/software/gadgets/tuxdroid-gadget-facebook/trunk/tuxdroid-gadget-facebook/src/FacebookGadget.java
===================================================================
--- 
software_suite_v2/software/gadgets/tuxdroid-gadget-facebook/trunk/tuxdroid-gadget-facebook/src/FacebookGadget.java
  2009-06-19 08:48:41 UTC (rev 4831)
+++ 
software_suite_v2/software/gadgets/tuxdroid-gadget-facebook/trunk/tuxdroid-gadget-facebook/src/FacebookGadget.java
  2009-06-19 09:54:32 UTC (rev 4832)
@@ -191,9 +191,15 @@
        @Override
        protected void start() throws Throwable
        {
+               if ( !(this.configuration().notifyEmail && 
this.configuration().showEventsInvites && 
this.configuration().showFriendRequests
+                               && this.configuration().showGroupsInvites && 
this.configuration().showPokes))
+               {
+                       System.exit(0);
+               }
+               
                this.connectTuxApi();
                
-               if(true)//tux.radio.getConnected())
+               if(true)
                {
                        FacebookConnection facebook = new 
FacebookConnection(this, tux, this.configuration().getLogin(), 
this.configuration().getPassword());
                        FacebookFunctions functions = new 
FacebookFunctions(facebook);
@@ -203,7 +209,14 @@
                        {
                                if(functions.getEmailNotifications().intValue() 
> 0)
                                {
-                                       throwMessage("You have {0} new 
messages", functions.getEmailNotifications().intValue());
+                                       
if(functions.getEmailNotifications().intValue() == 1)
+                                       {
+                                               throwMessage("You have one new 
message");
+                                       }
+                                       else
+                                       {
+                                               throwMessage("You have {0} new 
messages", functions.getEmailNotifications().intValue());
+                                       }
                                }
                        }
                        
@@ -212,7 +225,14 @@
                        {
                                
if(functions.getFriendRequestsCount().intValue() > 0)
                                {
-                                       throwMessage("You have {0} friend 
requests", functions.getFriendRequestsCount());
+                                       
if(functions.getFriendRequestsCount().intValue() == 1)
+                                       {
+                                               throwMessage("You have one 
friend request");
+                                       }
+                                       else
+                                       {
+                                               throwMessage("You have {0} 
friend requests", functions.getFriendRequestsCount());
+                                       }
                                        
                                        for(String friendName : 
functions.getFriendRequestNames())
                                        {
@@ -226,7 +246,14 @@
                        {
                                if(functions.getGroupsInvitesCount().intValue() 
> 0)
                                {
-                                       throwMessage("You have {0} group 
invites", functions.getGroupsInvitesCount().intValue());
+                                       
if(functions.getGroupsInvitesCount().intValue() == 1)
+                                       {
+                                               throwMessage("You have one 
group invite");
+                                       }
+                                       else
+                                       {
+                                               throwMessage("You have {0} 
group invites", functions.getGroupsInvitesCount().intValue());
+                                       }
                                        
                                        for(String group : 
functions.getGroupInvitesNames())
                                        {
@@ -240,7 +267,14 @@
                        {
                                if(functions.getEventsInvitesCount().intValue() 
> 0)
                                {
-                                       throwMessage("You have {0} event 
invites", functions.getEventsInvitesCount().intValue());
+                                       
if(functions.getEventsInvitesCount().intValue() == 1)
+                                       {
+                                               throwMessage("You have one 
event invite");
+                                       }
+                                       else
+                                       {
+                                               throwMessage("You have {0} 
event invites", functions.getEventsInvitesCount().intValue());
+                                       }
                                        
                                        for(String event : 
functions.getEventInvitesNames())
                                        {
@@ -253,7 +287,14 @@
                        {
                                if(functions.getPokesCount().intValue() > 0)
                                {
-                                       throwMessage("You have {0} pokes", 
functions.getPokesCount().intValue());
+                                       if(functions.getPokesCount().intValue() 
== 1)
+                                       {
+                                               throwMessage("You have one 
poke");
+                                       }
+                                       else
+                                       {
+                                               throwMessage("You have {0} 
pokes", functions.getPokesCount().intValue());
+                                       }
                                }
                        }
                }


------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn

Reply via email to