bigboard r7424 - in trunk/bigboard: . stocks/twitter



Author: marinaz
Date: Mon Aug 25 17:58:23 2008
New Revision: 7424
URL: http://svn.gnome.org/viewvc/bigboard?rev=7424&view=rev

Log:
Update Online Accounts usage to use "type" instead of "kind".


Modified:
   trunk/bigboard/google.py
   trunk/bigboard/google_stock.py
   trunk/bigboard/stocks/twitter/TwitterStock.py

Modified: trunk/bigboard/google.py
==============================================================================
--- trunk/bigboard/google.py	(original)
+++ trunk/bigboard/google.py	Mon Aug 25 17:58:23 2008
@@ -578,7 +578,7 @@
     except dbus.DBusException, e:
         _logger.error("onlineaccounts DBus service not available, can't refresh googles")   
         return
-    gaccount_paths = __onlineaccounts_proxy.GetEnabledAccountsWithKinds(['google'])
+    gaccount_paths = __onlineaccounts_proxy.GetEnabledAccountsWithTypes(['google'])
     new_googles = {}
     for g_path in gaccount_paths:
         if g_path in __googles_by_account:
@@ -599,7 +599,7 @@
 def __on_account_added(account_path):
     try:
         a = dbus.SessionBus().get_object('org.gnome.OnlineAccounts', account_path)
-        if a.GetKind() == "google":
+        if a.GetType() == "google":
             __refresh_googles()      
     except dbus.DBusException, e:
         _logger.error("onlineaccount for path %s was not found" % account_path)
@@ -607,7 +607,7 @@
 def __on_account_removed(account_path):
     try:
         a = dbus.SessionBus().get_object('org.gnome.OnlineAccounts', account_path)
-        if a.GetKind() == "google":
+        if a.GetType() == "google":
             __refresh_googles()      
     except dbus.DBusException, e:
         _logger.error("onlineaccount for path %s was not found" % account_path)

Modified: trunk/bigboard/google_stock.py
==============================================================================
--- trunk/bigboard/google_stock.py	(original)
+++ trunk/bigboard/google_stock.py	Mon Aug 25 17:58:23 2008
@@ -43,7 +43,7 @@
             _logger.error("onlineaccounts DBus service not available, can't get google accounts")
             return
 
-        all_google_account_paths = self.__onlineaccounts_proxy.GetEnabledAccountsWithKinds(["google"])
+        all_google_account_paths = self.__onlineaccounts_proxy.GetEnabledAccountsWithTypes(["google"])
         for a_path in all_google_account_paths:
             self.__on_account_added(a_path)
 
@@ -71,7 +71,7 @@
             _logger.error("onlineaccount for path %s was not found" % acct_path)
             return
 
-        if acct.GetKind() != "google":
+        if acct.GetType() != "google":
             return
        
         _logger.debug("in __on_account_added for %s", str(acct))         
@@ -89,7 +89,7 @@
             _logger.error("onlineaccount for path %s was not found" % acct_path)
             return
 
-        if acct.GetKind() != "google":
+        if acct.GetType() != "google":
             return
 
         _logger.debug("in __on_account_removed for %s", str(acct))  
@@ -112,7 +112,7 @@
 
     def __open_login_dialog(self):
         if self.__onlineaccounts_proxy:
-            self.__onlineaccounts_proxy.OpenAccountsDialogWithKinds(["google"])
+            self.__onlineaccounts_proxy.OpenAccountsDialogWithTypes(["google"])
         else: 
             _logger.error("onlineaccounts proxy is not initialized, can't open the dialog for google accounts")    
 

Modified: trunk/bigboard/stocks/twitter/TwitterStock.py
==============================================================================
--- trunk/bigboard/stocks/twitter/TwitterStock.py	(original)
+++ trunk/bigboard/stocks/twitter/TwitterStock.py	Mon Aug 25 17:58:23 2008
@@ -16,7 +16,7 @@
 LOGIN_TO_TWITTER_STRING = "Login to Twitter"
 FAILED_TO_LOGIN_STRING = "Failed to login."
 
-TWITTER_KIND = "twitter"
+TYPE_TWITTER = "twitter"
 
 TWITTER_STATUS_MAX_LENGTH = 140
 
@@ -113,7 +113,7 @@
             _logger.error("onlineaccounts DBus service not available, can't get twitter accounts")
             return
 
-        all_twitter_account_paths = self.__onlineaccounts_proxy.GetEnabledAccountsWithKinds([TWITTER_KIND])
+        all_twitter_account_paths = self.__onlineaccounts_proxy.GetEnabledAccountsWithTypes([TYPE_TWITTER])
         for a_path in all_twitter_account_paths:
             self.__on_account_added(a_path)
 
@@ -141,7 +141,7 @@
             _logger.error("onlineaccount for path %s was not found" % acct_path)
             return
 
-        if acct.GetKind() != TWITTER_KIND:
+        if acct.GetType() != TYPE_TWITTER:
             return
        
         _logger.debug("in __on_account_added for %s %s" % (str(acct), acct.GetUsername()))    
@@ -289,7 +289,7 @@
  
     def __open_login_dialog(self):
         if self.__onlineaccounts_proxy:
-            self.__onlineaccounts_proxy.OpenAccountsDialogWithKinds(["twitter"])
+            self.__onlineaccounts_proxy.OpenAccountsDialogWithTypes([TYPE_TWITTER])
         else: 
             _logger.error("onlineaccounts proxy is not initialized, can't open the dialog for twitter accounts")    
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]