예제 #1
0
    def __init__(self, parent):
        CurrenciesCheckboxDialog.__init__(self, parent)
        self.setWindowTitle(_('Favorite Coins'))
        self.favorites = copy.deepcopy(
            self.parent.config.get_above_chain('favorite_chains', []))
        # sanity check, just in case. Main window should have already done this
        if len(self.favorites) > 3: self.favorites = self.favorites[:3]

        self.main_layout = vbox = QVBoxLayout()
        limit_label = QLabel(
            _('\n'.join([
                'Up to three coins may be selected as "favorites."',
                '\nHolding down the coin icon in the wallet status bar will show you your favorite coins and allow you to quickly switch between them.',
                'They will also be listed before other coins in the currency selection dialog.'
            ])))
        limit_label.setWordWrap(True)
        vbox.addWidget(limit_label)

        for cbox in self.coin_checkboxes:
            cbox.setChecked(str(cbox.text()).split()[0] in self.favorites)
        vbox.addLayout(self.scroll_layout)

        vbox.addLayout(ok_cancel_buttons(self, ok_label=_('Save')))
        self.accepted.connect(self.save_favorites)
        self.setLayout(vbox)
        self.enforce_limit()
예제 #2
0
    def __init__(self, parent, verbose_view=False):
        QDialog.__init__(self, parent)
        self.parent = parent
        self.verbose_view = verbose_view
        self.setWindowTitle(_('Change Currency'))

        self.main_layout = main_layout = QVBoxLayout()

        self.create_chains_info()
        self.create_chains_view()
        self.refresh_chains()

        main_layout.addWidget(self.chains_view)

        main_layout.addLayout(ok_cancel_buttons(self))

        self.setLayout(main_layout)
예제 #3
0
    def __init__(self, parent, verbose_view=False):
        QDialog.__init__(self, parent)
        self.parent = parent
        self.verbose_view = verbose_view
        self.setWindowTitle(_('Change Currency'))

        self.main_layout = main_layout = QVBoxLayout()

        self.create_chains_info()
        self.create_chains_view()
        self.refresh_chains()

        main_layout.addWidget(self.chains_view)

        main_layout.addLayout(ok_cancel_buttons(self))

        self.setLayout(main_layout)
예제 #4
0
    def __init__(self, parent):
        CurrenciesCheckboxDialog.__init__(self, parent)
        self.setWindowTitle(_('Favorite Coins'))
        self.favorites = copy.deepcopy(self.parent.config.get_above_chain('favorite_chains', []))
        # sanity check, just in case. Main window should have already done this
        if len(self.favorites) > 3: self.favorites = self.favorites[:3]

        self.main_layout = vbox = QVBoxLayout()
        limit_label = QLabel(_('\n'.join([
            'Up to three coins may be selected as "favorites."',
            '\nHolding down the coin icon in the wallet status bar will show you your favorite coins and allow you to quickly switch between them.',
            'They will also be listed before other coins in the currency selection dialog.'])))
        limit_label.setWordWrap(True)
        vbox.addWidget(limit_label)

        for cbox in self.coin_checkboxes:
            cbox.setChecked(str(cbox.text()).split()[0] in self.favorites)
        vbox.addLayout(self.scroll_layout)

        vbox.addLayout(ok_cancel_buttons(self, ok_label=_('Save')))
        self.accepted.connect(self.save_favorites)
        self.setLayout(vbox)
        self.enforce_limit()