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])
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])
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
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