示例#1
0
 def accountsAddClicked(self, button):
     from scal3.ui_gtk.event.account_op import AccountEditorDialog
     account = AccountEditorDialog(parent=self).run()
     if account is None:
         return
     account.save()
     ui.eventAccounts.append(account)
     ui.eventAccounts.save()
     self.accountsTreestore.append(
         [account.id, account.enable, account.title])
示例#2
0
 def editAccount(self, index):
     from scal3.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"), self)
         return
     account = AccountEditorDialog(account, parent=self).run()
     if account is None:
         return
     account.save()
     ui.eventAccounts.save()
     self.accountsTreestore[index][2] = account.title
示例#3
0
 def accountsAddClicked(self, button):
     from scal3.ui_gtk.event.account_op import AccountEditorDialog
     account = AccountEditorDialog(parent=self).run()
     if account is None:
         return
     account.save()
     ui.eventAccounts.append(account)
     ui.eventAccounts.save()
     self.accountsTreestore.append([
         account.id,
         account.enable,
         account.title,
     ])
     ###
     while gtk.events_pending():
         gtk.main_iteration_do(False)
     error = account.fetchGroups()
     if error:
         print(error)
         return
     account.save()