online-desktop r7277 - in trunk/weblogindriver: . weblogindriver
- From: marinaz svn gnome org
- To: svn-commits-list gnome org
- Subject: online-desktop r7277 - in trunk/weblogindriver: . weblogindriver
- Date: Sat, 25 Oct 2008 22:51:11 +0000 (UTC)
Author: marinaz
Date: Sat Oct 25 22:51:11 2008
New Revision: 7277
URL: http://svn.gnome.org/viewvc/online-desktop?rev=7277&view=rev
Log:
Fix up removing accounts that are no longer returned by the server.
Change the text of the "sign in" link.
Modified:
trunk/weblogindriver/web-login-driver
trunk/weblogindriver/weblogindriver/accounts_dialog.py
Modified: trunk/weblogindriver/web-login-driver
==============================================================================
--- trunk/weblogindriver/web-login-driver (original)
+++ trunk/weblogindriver/web-login-driver Sat Oct 25 22:51:11 2008
@@ -790,18 +790,20 @@
for (key, value) in new_accounts_by_type.items():
self.update_accounts_from_server(key, value)
+ # remove accounts for all other types that are no longer returned by the server
+ for key in ONLINE_ACCOUNT_TYPES.keys():
+ if key != TYPE_GOOGLE and key not in new_accounts_by_type.keys():
+ self.update_accounts_from_server(key, set())
+
gconf_accounts = copy.copy(self.__gconf_accounts)
_logger.debug("will go through existing accounts")
- for gconf_account in gconf_accounts:
- if gconf_account.GetType() != TYPE_GOOGLE and gconf_account not in self.__server_accounts:
- if self.__merge_mode:
+ if self.__merge_mode:
+ for gconf_account in gconf_accounts:
+ if gconf_account.GetType() != TYPE_GOOGLE and gconf_account not in self.__server_accounts:
# add the account on the server
query = self.__model.update(("http://mugshot.org/p/accounts", "addOnlineAccount"), accountType=gconf_account.GetType(), username=gconf_account.GetUsername())
query.add_error_handler(self.__on_server_account_add_failed)
query.execute()
- else:
- # remove the account locally
- self.__update_account(gconf_account)
for account in self.__loved_data_model_accounts:
if account not in new_loved_data_model_accounts:
Modified: trunk/weblogindriver/weblogindriver/accounts_dialog.py
==============================================================================
--- trunk/weblogindriver/weblogindriver/accounts_dialog.py (original)
+++ trunk/weblogindriver/weblogindriver/accounts_dialog.py Sat Oct 25 22:51:11 2008
@@ -264,9 +264,9 @@
self.__account_page_link_2_connect_id = self.__account_page_link_2.connect("clicked", self.__open_server_page, "/account")
elif save_online_flag and not have_online_user_flag:
# tell the user that they need to sign in
- self.__account_page_link.set_text("You Need to Sign in", "red")
+ self.__account_page_link.set_text("Click Here to Sign in", "red")
self.__account_page_link_connect_id = self.__account_page_link.connect("clicked", self.__open_server_page, "/who-are-you")
- self.__account_page_link_2.set_text("You Need to Sign in", "red")
+ self.__account_page_link_2.set_text("Click Here to Sign in", "red")
self.__account_page_link_2_connect_id = self.__account_page_link_2.connect("clicked", self.__open_server_page, "/who-are-you")
else:
# display a Learn More link
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]