g4ixt / QtTinySA

A Python 'TinySA' GUI programme using Qt5 and PyQt5
GNU General Public License v3.0
107 stars 26 forks source link

Add the option of personalized preferences #33

Closed winnieXY closed 9 months ago

winnieXY commented 9 months ago

Small patch to extent the functionality of the database class.

this will close #32 .

g4ixt commented 9 months ago

I have read through the code and I note your comment "#Python 3.10++!" since you have used the match-case features, which I haven't seen before. I can see how the code works, but I use the Spyder Python IDE 5.4.3 from Anaconda 2.3.2 which has Python 3.9.18. I will have to see if I can update Anaconda to v3 to get a later version of Python, but it is not presenting me with any update options.

I see that you are in Germany so I will forgive your use of American but I will be changing 'Personalized' to English, 'Personalised' :-))

Thanks for commenting your code. I am a Python beginner and code for fun so the comments were important for me to understand what it does (I won't merge any code that I don't understand or that is very arcane). If you have read through my code you may have realised that I intend to eventually add a feature to save and load preferences in the database so having a personalised one will be a big help for that, thank you.

g4ixt commented 9 months ago

I found a python module called "appdirs" that's in the standard repository. It determines the config file location, so I will incorporate that and parts of your code.

winnieXY commented 9 months ago

That sounds as far as I can see on my mobile really as a good solution for all platforms. Do you want me to rewrite my merge request? I would be happy to help here

g4ixt commented 9 months ago

I am making quite a few changes in my development branch at the moment which are mostly done, so I will copy your code, directly into there and add in the Appdirs code as well. Then when I make the next release it will all be included.