コード例 #1
0
ファイル: labels.py プロジェクト: shivaenigma/electrum
    def settings_dialog(self, window):
        print "window:", window
        d = QDialog(window)
        vbox = QVBoxLayout(d)
        layout = QGridLayout()
        vbox.addLayout(layout)

        layout.addWidget(QLabel("Label sync options: "), 2, 0)

        self.upload = ThreadedButton("Force upload",
                                     partial(self.push_thread, window),
                                     self.done_processing)
        layout.addWidget(self.upload, 2, 1)

        self.download = ThreadedButton("Force download",
                                       partial(self.pull_thread, window, True),
                                       self.done_processing)
        layout.addWidget(self.download, 2, 2)

        self.accept = OkButton(d, _("Done"))
        vbox.addLayout(Buttons(CancelButton(d), self.accept))

        if d.exec_():
            return True
        else:
            return False
コード例 #2
0
 def settings_dialog(self, window):
     wallet = window.parent().wallet
     d = WindowModalDialog(window, _("Label Settings"))
     vbox = QVBoxLayout(d)
     layout = QGridLayout()
     vbox.addLayout(layout)
     layout.addWidget(QLabel("Label sync options: "), 2, 0)
     self.upload = ThreadedButton("Force upload",
                                  partial(self.push_thread, wallet),
                                  self.done_processing)
     layout.addWidget(self.upload, 2, 1)
     self.download = ThreadedButton("Force download",
                                    partial(self.pull_thread, wallet, True),
                                    self.done_processing)
     layout.addWidget(self.download, 2, 2)
     self.accept = OkButton(d, _("Done"))
     vbox.addLayout(Buttons(CancelButton(d), self.accept))
     return bool(d.exec_())