Description of problem: Progress bar is not working in the 0.52.15. The last version that has been OK was 0.52.14. Version-Release number of selected component (if applicable): 0.52.15 How reproducible: Steps to Reproduce: 1. Create progress bar 2. Update progress bar Actual results: Progress indicator is not displayed. Expected results: Additional info: I believe this has something to do with the isMapped addition into the scale.c.
Is the progressbar in a form? The isMapped addition is needed to not show the progressbar when it's hidden, e.g. is in a nonvisible part of a scrollable form A short reproducer showing the problem would be helpful.
Created attachment 762525 [details] Test case result with 0.52.14
Created attachment 762526 [details] Test case result with 0.52.15
(In reply to Miroslav Lichvar from comment #1) > Is the progressbar in a form? The isMapped addition is needed to not show > the progressbar when it's hidden, e.g. is in a nonvisible part of a > scrollable form > A short reproducer showing the problem would be helpful. OK, here is short test case in python: from snack import * from time import sleep screen = SnackScreen() g = Grid(1,1) progress = Scale(70, 100) g.setField(progress, 0, 0) g.place(1, 1) screen.gridWrappedWindow(g, "title") progress.set(50) screen.refresh() sleep(10) Two screenshots for the version 0.52.14 and 0.52.15 are attached.
The scale (or any other component) needs to be in a form to be visible. If you try it with a different component, you'll see the problem with older newt versions too. The code should be something like this: from snack import * from time import sleep screen = SnackScreen() g = GridForm(screen, "title", 1,1) progress = Scale(70, 100) g.add(progress, 0, 0) progress.set(50) g.draw() screen.refresh() sleep(10) screen.finish()
Hi Miroslav, I've tried the code you suggested but it does not work: Traceback (most recent call last): File "/tmp/a.py", line 13, in <module> g.draw() AttributeError: Grid instance has no attribute 'draw' This is newt-0.52.15. Please advise. Thanks! -Maxim
Hi, sorry, I've not noticed the change from "Grid" to "GridForm". It seems to be working fine after that change, thanks! It would be nice if you would include some examples that involve "Scale" object into the python example. I've got it working pretty much via trial-and-error process. -Maxim