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
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_())