widgets: set a unique object name for all dock widgets
commite41facbe3ca0989a4b679c36dd9a9d415777fda2
authorDavid Aguilar <davvid@gmail.com>
Sat, 11 Sep 2021 08:48:06 +0000 (11 01:48 -0700)
committerDavid Aguilar <davvid@gmail.com>
Sat, 11 Sep 2021 08:51:15 +0000 (11 01:51 -0700)
tree74f541303c13563dbd6e7231fa529274a3d379df
parentcae9b6ed75f72f4b461e4940a635cf66b20d7b06
widgets: set a unique object name for all dock widgets

Qt requires that all dockwidgets must have unique object names in
order for serialization and restoration of Window settings to function.

We were incorrectly using a translated string as the object name,
which prevented the saved window settings from applying when the
language gets changed across cola invocations.

Fix this issue by passing a plain string to the create_dockwidget
creator function that will be used as the dockwidget object name.
Existing settings for English users will continue working as-is.
Settings for users in other languages may run into a one-time
bump when taking this update, but it should be an improvement
overall because the window settings are now properly saved
and restored across all sessions.

Closes #1071 #1161 #382
Helped-by: Bernd K <prof7bit@gmail.com>
Reported-by: V字龍(Vdragon) <Vdragon.Taiwan@gmail.com>
Signed-off-by: David Aguilar <davvid@gmail.com>
CHANGES.rst
cola/qtutils.py
cola/widgets/dag.py
cola/widgets/main.py