Closed heldersepu closed 1 month ago
Hi @heldersepu, thank you for contributing to Tribler! 🚀
This PR was created by an outside collaborator, so some checks were not run for security reasons.
To trigger the full set of checks, any member of the Tribler team can add the label PR: safe to check
to the current PR.
Thanks for your PR!
Saving the column settings seems like a nice feature to have. However, I don't think these settinge belongs in the core. We normally store GUI settings in self.window().gui_settings
. Could you try storing it there?
@egbertbouman correction applied... thanks for the tip, code looks simpler that way! I also rebased and squashed my commits.
Thanks, looks good! I'm fine with merging this PR as-is, but I just noticed that the header also has saveState
/restoreState
functionality.
If you're up for it, you could save/restore the entire state of the downloads list in TriblerWindow.onClose
/TriblerWindow.restore_window_geometry
. We're already doing this for the position and size of the window. For instance, saving would be:
self.gui_settings.setValue("download_columns", self.downloads_list.header().saveState())
Let me experiment with that self.downloads_list.header().saveState()
will let you know more tomorrow
@egbertbouman I made the following changes:
saveState/restoreState
functionality as suggested, (nice bonus it also saves the sort)on_header_change
to save the state if use has it setonly disagreement with your suggestion I'm not saving onclose or restore_window_geometry instead doing it on:
sectionResized
sortIndicatorChanged
just in case if we get a crash, the state is not affected because it saved immediately after change
Nice, it's running smoothly and there's even a checkbox for it now 👍 Thanks again!
it was fun! ... thanks @egbertbouman for pushing me in the right direction ... if you can, take a look at an issue I opened a few days ago: https://github.com/Tribler/tribler/issues/8007 would love more eyes on that
Are you tired of having to resize the columns in the download page all the time? me too...
This PR adds a couple of setting to set column width, for now i prefer to just have it as a "hidden" config option and in future versions we can add it in the UI, and more fancy stuff
This is how it looks like with my favorite options, I like the name to be the widest and the progress a bit wider than the default
Here is the new setting:
My goal is to make small changes as I get myself familiar with the code base, then I would be able to take on some more challenging issues