MediaArea / MediaInfo

Convenient unified display of the most relevant technical and tag data for video and audio files.
https://MediaArea.net/MediaInfo
BSD 2-Clause "Simplified" License
1.26k stars 149 forks source link

Windows GUI: Prevent repeated execution of certain code #853

Closed cjee21 closed 4 weeks ago

cjee21 commented 4 weeks ago

Ensure code that is only necessary to execute once on application start-up is not repeated every time FormShow is called such as when switching dark mode.

Resolves bugs mentioned in https://github.com/MediaArea/MediaInfo/pull/836#issuecomment-2126335967

Also makes dark mode switching faster.

PR #851 and #852 no longer needed. Now the view will not change when switching dark mode.

JeromeMartinez commented 4 weeks ago

PR https://github.com/MediaArea/MediaInfo/pull/851 and https://github.com/MediaArea/MediaInfo/pull/852 no longer needed.

They are already merged, please rebase and remove them in your PR.

cjee21 commented 4 weeks ago

Okay, dark mode switching should work well now and without resetting to basic view.

cjee21 commented 4 weeks ago

Removed commented-out testing code that I accidentally left there.

cjee21 commented 4 weeks ago

Oh no, HTML view is a little buggy now. Maybe need to put a refresh somewhere.

cjee21 commented 4 weeks ago

I can't figure out what is going on with HTML view now. It's a minor issue where HTML has to be clicked 2 times after switching dark mode else it is blank.

JeromeMartinez commented 4 weeks ago

It's a minor issue where HTML has to be clicked 2 times after switching dark mode else it is blank.

I can reproduce this issue but I'll survive with it for the moment :).

cjee21 commented 4 weeks ago

An unrelated issue I found while testing is that if debug mode is toggled, the text view will be blank no matter what is toggled until application restart. I am not sure how debug mode is supposed to be used though.

JeromeMartinez commented 4 weeks ago

General information: the code is very old (really... ~20 years) and messy, lot of unnecessary UI updates, we don't have much time on our side for it but if you are motivated we would be happy that you make it simpler.

Thank you again for your work.

JeromeMartinez commented 4 weeks ago

if debug mode is toggled, the text view will be blank no matter what is toggled until application restart. I am not sure how debug mode is supposed to be used though.

Drag and drop again a file :). It should analyse automatically the file with the new option but it was not implemented due to lack of time, not a big deal but it would be great it you update that.

cjee21 commented 4 weeks ago

Thank you again for your work.

Glad to help.

Drag and drop again a file :). It should analyse automatically the file with the new option but it was not implemented due to lack of time, not a big deal but it would be great it you update that.

Don't think I will do anything about that since I don't need that and no idea how to do. 😄

Noticed the contents of View -> Your system doesn't seem to correlate with the 3 radio button selections too but I don't use this page also.