fix email_requests plugin
This commit is contained in:
@@ -738,6 +738,19 @@ def export_meta_gui(electrum_window, title, exporter):
|
||||
.format(title, str(filename)))
|
||||
|
||||
|
||||
def get_parent_main_window(widget):
|
||||
"""Returns a reference to the ElectrumWindow this widget belongs to."""
|
||||
from .main_window import ElectrumWindow
|
||||
for _ in range(100):
|
||||
if widget is None:
|
||||
return None
|
||||
if not isinstance(widget, ElectrumWindow):
|
||||
widget = widget.parentWidget()
|
||||
else:
|
||||
return widget
|
||||
return None
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
app = QApplication([])
|
||||
t = WaitingDialog(None, 'testing ...', lambda: [time.sleep(1)], lambda x: QMessageBox.information(None, 'done', "done"))
|
||||
|
||||
Reference in New Issue
Block a user