machawk1 / wail

:whale2: Web Archiving Integration Layer: One-Click User Instigated Preservation
https://matkelly.com/wail
MIT License
345 stars 32 forks source link

Move # of mementos message from a StaticText UI item to a status bar #459

Closed machawk1 closed 4 years ago

machawk1 commented 4 years ago

Akin to browsers' from days past (they mostly hide the status bar now), having this information within the UI as a faux label makes for an awkward display. Goes wxWidgets/Python have a status bar UI element?

machawk1 commented 4 years ago

wxPython has wx.Statusbar, which is associated with wx.Frame. This value can be initialized in the wx.Frame's __init__ but needs to be set from the wx.Panels, e.g., WAILGUIFrame_Basic. wx.Panels parents are the Notebook. The Notebook's parent should be the wx.Frame but manipulating the StatusBar from the wx.Panel causes UI layout issues.

machawk1 commented 4 years ago

676b2e1 adds one and cleans up the old text label within the Frame. This works when running from source but compiling to a macOS .app causes the status bar to disappear after each update. There might be a way to make it more persistent but I am unfamiliar with the API.

machawk1 commented 4 years ago

In the binary, static strings display and are persistent.

If the string built relies on a variable value, the status bar disappears. If done too quickly, WAIL crashes. This only occurs in the .app form and not when running through Python directly.

machawk1 commented 4 years ago

Updating PyInstaller from 3.5 to 3.6 fixes this, oddly. Rebuilt what would normally hide the status bar in fc4854d and now it remains and no longer crashes with large amounts of input (update thread is driven by input change).

machawk1 commented 4 years ago

Thought this might alternatively be a Python 3.7.7 vs. 3.8 issue but in a 3.7.7 virtualenv, the compiled .app does not exhibit the traits due to the Pyinstaller adjustment. Will set this as a requirement in the requirements.txt then send a PR.