Пример #1
0
def update_remote_data_source(sync_type, google_acct_id):
	global dialog
	remote_sources.clear()

	if sync_type == consts.SYNC_TYPE_CAL:
		hildon.hildon_gtk_window_set_progress_indicator(dialog, 1)
		try:
			if not google_api.switch_account(\
					google_accounts.get_account_by_id(\
					google_acct_id)):
				display_google_auth_error(dialog)
				google_new_btn.set_sensitive(False)
				google_item_picker.set_sensitive(False)
				hildon.hildon_gtk_window_set_progress_indicator(dialog, 0)
				return
		except ErminigError, e:
			error_win.display(e.title(), e.description())
			return

		google_new_btn.set_sensitive(True)
		google_item_picker.set_sensitive(True)
		for id, title in google_api.get_all_calendars():
			logger.append("ID->")
			logger.append(id)
			logger.append("title->")
			logger.append(title)
			remote_sources.append([id, title])
		hildon.hildon_gtk_window_set_progress_indicator(dialog, 0)
Пример #2
0
def del_google_acct(widget, data):
    id = get_google_acct_id()
    account = google_accounts.get_account_by_id(id)
    text = "Are you sure that you want to delete account \"%s\"?\n" \
      "Deleting it will remove all links between the data "\
      "stored on your device and data stored in Google.\n"\
      "Please note that no actual data will be deleted, "\
      "only their relationships." % (account[0])
    dialog = hildon.Note("confirmation", data, text)
    dialog.set_button_texts("Yes", "No")
    ans = dialog.run()
    dialog.destroy()

    if ans == gtk.RESPONSE_OK:
        google_accounts.delete_account_by_id(id)
        read_accounts_list()
        update_gaccts_button()
Пример #3
0
def del_google_acct(widget, data):
	id = get_google_acct_id()
	account = google_accounts.get_account_by_id(id)
	text = "Are you sure that you want to delete account \"%s\"?\n" \
			"Deleting it will remove all links between the data "\
			"stored on your device and data stored in Google.\n"\
			"Please note that no actual data will be deleted, "\
			"only their relationships." % (account[0])
	dialog = hildon.Note("confirmation", data, text)
	dialog.set_button_texts("Yes", "No")
	ans = dialog.run()
	dialog.destroy()

	if ans == gtk.RESPONSE_OK:
		google_accounts.delete_account_by_id(id)
		read_accounts_list()
		update_gaccts_button()
Пример #4
0
def edit_google_acct(widget, data):
    id = get_google_acct_id()
    account = google_accounts.get_account_by_id(id)
    add_google_acct_dialog(widget, data, account)
Пример #5
0
def edit_google_acct(widget, data):
	id = get_google_acct_id()
	account = google_accounts.get_account_by_id(id)
	add_google_acct_dialog(widget, data, account)