-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FR: Setting for the new number format used in the size column of the archive tab #1713
Comments
@real-yfprojects I can work on implementing this setting |
@real-yfprojects Quick question about implementation: Do we want the setting, when toggled, to immediately update the archive tab to show the new units? Or should the archive tab only check the setting at launch (requiring a restart for a change in setting to show)? Thanks |
That would be good. |
I added the setting in get_misc_settings, and implementing the behavior in ArchiveTab.populate_from_profile. The setting works as intended, but changes only take effect after Vorta restarts. However, I'm having trouble connecting a change in setting to an immediate refresh of the archive tab. Can you offer any insight on how to connect these actions? One option I was considering would be to place the option in the Archive tab instead of Misc. Something like a dropdown box for "fixed number format" or "dynamic number format" |
That shouldn't be needed. Iirc we used peewee hooks/signals in other places to update the GUI whenever a specific setting changed. |
Hmm, I'm having trouble finding an example of updating the GUI with a peewee hook/signal to go off of. I found this post_save signal in connection.py, but when I try to use this post_save signal in the ArchiveTab class to update update the archive table when the setting gets changed, it does not work. I believe post_save signals are typically used outside of class methods, and I am a bit stumped on how to update the GUI outside of the ArchiveTab class. |
Ignore previous post, I got it working using pyqt signals and will submit a work in progress PR shortly :) |
|
Thanks for linking me to that example. Are there benefits to using peewee hooks/signals over pyqt signals in this situation? |
Qt signals are easier to use and more powerful. However directly connecting to the database provides the benefit, that you can change the setting anywhere in the program and the GUI will update itself without requiring that the developer adds extra code to emit the qt signal. |
Ah, that makes a lot of sense. I see that PR you linked has not been merged yet - would you prefer I use PtQt signals for now or go ahead and implement the peewee hook in a similar fashion to what daffy did in that PR? |
The Qt signal is fine. When needed one can change it at anytime. |
The problem
#1595 complained about the sizes being hard to compare because they have different units. So we changed that in #1598.
Now people complained in #1692 (comment) that the size figures get too big because it selects a too small unit.
Requested Solution
It seems like there are people preferring the old way of displaying the size while there are also people liking the new way. So I suggest keeping both ways and adding a setting that allows toggling between them. The setting should be disabled by default. When it's enabled vorta should use the new mode.
Implementation Recipe
The text was updated successfully, but these errors were encountered: