예제 #1
0
 def __init__(self, mainwindow):
     BaseView.__init__(self, mainwindow)
     plugin_names = [
         p.NAME for p in self.mainwindow.app.get_enabled_plugins()
         if p.IS_VIEW
     ]
     self.plugin_list = GUISelectableList(plugin_names)
예제 #2
0
 def __init__(self, app):
     GUIObject.__init__(self)
     self.app = app
     self.categories = [cat(app.results) for cat in app._prioritization_categories()]
     self.category_list = CriterionCategoryList(self)
     self.criteria = []
     self.criteria_list = GUISelectableList()
     self.prioritizations = []
     self.prioritization_list = PrioritizationList(self)
예제 #3
0
class AccountReassignPanel(MainWindowPanel):
    def __init__(self, mainwindow):
        MainWindowPanel.__init__(self, mainwindow)
        self.account_list = GUISelectableList()
    
    def _load(self, accounts):
        self.deleted_accounts = set(accounts)
        all_accounts = self.document.accounts[:]
        target_accounts = [a for a in all_accounts if a not in self.deleted_accounts]
        sort_accounts(target_accounts)
        target_account_names = [a.name for a in target_accounts]
        target_account_names.insert(0, tr('No Account'))
        self._target_accounts = target_accounts
        self._target_accounts.insert(0, None)
        self.account_list[:] = target_account_names
        self.account_list.select(0)
    
    def _save(self):
        reassign_to = self._target_accounts[self.account_list.selected_index]
        self.document.delete_accounts(self.deleted_accounts, reassign_to=reassign_to)
예제 #4
0
class AccountReassignPanel(MainWindowPanel):
    def __init__(self, mainwindow):
        MainWindowPanel.__init__(self, mainwindow)
        self.account_list = GUISelectableList()

    def _load(self, accounts):
        self.deleted_accounts = set(accounts)
        all_accounts = self.document.accounts[:]
        target_accounts = [
            a for a in all_accounts if a not in self.deleted_accounts
        ]
        sort_accounts(target_accounts)
        target_account_names = [a.name for a in target_accounts]
        target_account_names.insert(0, tr('No Account'))
        self._target_accounts = target_accounts
        self._target_accounts.insert(0, None)
        self.account_list[:] = target_account_names
        self.account_list.select(0)

    def _save(self):
        reassign_to = self._target_accounts[self.account_list.selected_index]
        self.document.delete_accounts(self.deleted_accounts,
                                      reassign_to=reassign_to)
예제 #5
0
 def _update_selection(self):
     self.dialog.select_category(
         self.dialog.categories[self.selected_index])
     GUISelectableList._update_selection(self)
예제 #6
0
파일: base.py 프로젝트: tautonic/moneyguru
 def _update_selection(self):
     GUISelectableList._update_selection(self)
     if self.setfunc is not None:
         self.setfunc(self.selected_index)
예제 #7
0
 def _update_selection(self):
     GUISelectableList._update_selection(self)
     selected_type = AccountType.InOrder[self.selected_index]
     self.panel.type = selected_type
예제 #8
0
 def _update_selection(self):
     GUISelectableList._update_selection(self)
     repeat_type = REPEAT_OPTIONS_ORDER[self.selected_index]
     self.panel.repeat_type = repeat_type
예제 #9
0
 def _update_selection(self):
     GUISelectableList._update_selection(self)
     if self.setfunc is not None:
         self.setfunc(self.selected_index)
예제 #10
0
 def _update_selection(self):
     GUISelectableList._update_selection(self)
     selected_type = AccountType.InOrder[self.selected_index]
     self.panel.type = selected_type
예제 #11
0
 def _update_selection(self):
     GUISelectableList._update_selection(self)
     repeat_type = REPEAT_OPTIONS_ORDER[self.selected_index]
     self.panel.repeat_type = repeat_type
예제 #12
0
 def __init__(self, mainwindow):
     MainWindowPanel.__init__(self, mainwindow)
     self.account_list = GUISelectableList()
예제 #13
0
 def _update_selection(self):
     GUISelectableList._update_selection(self)
     target = self.panel._targets[self.selected_index]
     self.panel.budget.target = target
예제 #14
0
 def _update_selection(self):
     GUISelectableList._update_selection(self)
     account = self.panel._accounts[self.selected_index]
     self.panel.budget.account = account
예제 #15
0
 def __init__(self, mainwindow):
     MainWindowPanel.__init__(self, mainwindow)
     self.account_list = GUISelectableList()
예제 #16
0
 def __init__(self, dialog):
     self.dialog = dialog
     GUISelectableList.__init__(self)
예제 #17
0
 def __init__(self, panel):
     self.panel = panel
     GUISelectableList.__init__(self)
예제 #18
0
 def __init__(self, dialog):
     self.dialog = dialog
     GUISelectableList.__init__(self, [c.NAME for c in dialog.categories])
예제 #19
0
 def __init__(self, panel):
     self.panel = panel
     account_types_desc = [
         ACCOUNT_TYPE_DESC[at] for at in AccountType.InOrder
     ]
     GUISelectableList.__init__(self, account_types_desc)
예제 #20
0
 def _update_selection(self):
     self.dialog.select_category(self.dialog.categories[self.selected_index])
     GUISelectableList._update_selection(self)
예제 #21
0
 def __init__(self, items=None, setfunc=None):
     # setfunc(newindex)
     GUISelectableList.__init__(self, items=items)
     self.setfunc = setfunc
예제 #22
0
 def __init__(self, dialog):
     self.dialog = dialog
     GUISelectableList.__init__(self)
예제 #23
0
 def __init__(self, panel):
     self.panel = panel
     GUISelectableList.__init__(self)
예제 #24
0
 def _update_selection(self):
     GUISelectableList._update_selection(self)
     account = self.panel._accounts[self.selected_index]
     self.panel.budget.account = account
예제 #25
0
 def __init__(self, panel):
     self.panel = panel
     account_types_desc = [ACCOUNT_TYPE_DESC[at] for at in AccountType.InOrder]
     GUISelectableList.__init__(self, account_types_desc)
예제 #26
0
 def _update_selection(self):
     GUISelectableList._update_selection(self)
     target = self.panel._targets[self.selected_index]
     self.panel.budget.target = target
예제 #27
0
 def __init__(self, dialog):
     self.dialog = dialog
     GUISelectableList.__init__(self, [c.NAME for c in dialog.categories])
예제 #28
0
파일: base.py 프로젝트: tautonic/moneyguru
 def __init__(self, items=None, setfunc=None):
     # setfunc(newindex)
     GUISelectableList.__init__(self, items=items)
     self.setfunc = setfunc