Example #1
0
 def accountsAddClicked(self, button):
     account = AccountEditorDialog().run()
     if account is None:
         return
     account.save()
     ui.eventAccounts.append(account)
     ui.eventAccounts.save()
     self.accountsTreestore.append([account.id, account.enable, account.title])
Example #2
0
	def accountsAddClicked(self, button):
		from scal2.ui_gtk.event.account_op import AccountEditorDialog
		account = AccountEditorDialog().run()
		if account is None:
			return
		account.save()
		ui.eventAccounts.append(account)
		ui.eventAccounts.save()
		self.accountsTreestore.append([account.id, account.enable, account.title])
Example #3
0
 def editAccount(self, index):
     accountId = self.accountsTreestore[index][0]
     account = ui.eventAccounts[accountId]
     account = AccountEditorDialog(account).run()
     if account is None:
         return
     account.save()
     ui.eventAccounts.save()
     self.accountsTreestore[index][2] = account.title
Example #4
0
	def editAccount(self, index):
		from scal2.ui_gtk.event.account_op import AccountEditorDialog
		accountId = self.accountsTreestore[index][0]
		account = ui.eventAccounts[accountId]
		if not account.loaded:
			showError(_('Account must be enabled before editing'))
			return
		account = AccountEditorDialog(account).run()
		if account is None:
			return
		account.save()
		ui.eventAccounts.save()
		self.accountsTreestore[index][2] = account.title