Skip to content

Commit da18e4b

Browse files
committed
Move saving UI state
quit is more appropriate than close event, but it my resurrect the issue with linux saving config data.
1 parent 51232d3 commit da18e4b

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/bitmessageqt/__init__.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2862,6 +2862,14 @@ def quit(self):
28622862
if reply is QtGui.QMessageBox.No:
28632863
return
28642864
'''
2865+
# save state and geometry self and all widgets
2866+
self.saveSettings()
2867+
for attr, obj in self.ui.__dict__.iteritems():
2868+
if hasattr(obj, "__class__") and isinstance(obj, settingsmixin.SettingsMixin):
2869+
saveMethod = getattr(obj, "saveSettings", None)
2870+
if callable (saveMethod):
2871+
obj.saveSettings()
2872+
28652873
shared.doCleanShutdown()
28662874
self.tray.hide()
28672875
# unregister the messaging system
@@ -2891,13 +2899,6 @@ def closeEvent(self, event):
28912899
# minimize the application
28922900
event.ignore()
28932901
else:
2894-
# save state and geometry self and all widgets
2895-
self.saveSettings()
2896-
for attr, obj in self.ui.__dict__.iteritems():
2897-
if hasattr(obj, "__class__") and isinstance(obj, settingsmixin.SettingsMixin):
2898-
saveMethod = getattr(obj, "saveSettings", None)
2899-
if callable (saveMethod):
2900-
obj.saveSettings()
29012902
# quit the application
29022903
event.accept()
29032904
self.quit()

0 commit comments

Comments
 (0)