Bug 975236 - Progress bar is not working in the 0.52.15
Progress bar is not working in the 0.52.15
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: newt (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Lichvar
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-17 16:59 EDT by Maksym Sobolyev
Modified: 2013-06-25 16:06 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-06-25 16:06:32 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Test case result with 0.52.14 (8.10 KB, image/png)
2013-06-18 10:45 EDT, Maksym Sobolyev
no flags Details
Test case result with 0.52.15 (7.40 KB, image/png)
2013-06-18 10:46 EDT, Maksym Sobolyev
no flags Details

  None (edit)
Description Maksym Sobolyev 2013-06-17 16:59:12 EDT
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.
Comment 1 Miroslav Lichvar 2013-06-18 03:52:24 EDT
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.
Comment 2 Maksym Sobolyev 2013-06-18 10:45:49 EDT
Created attachment 762525 [details]
Test case result with 0.52.14
Comment 3 Maksym Sobolyev 2013-06-18 10:46:19 EDT
Created attachment 762526 [details]
Test case result with 0.52.15
Comment 4 Maksym Sobolyev 2013-06-18 10:47:37 EDT
(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.
Comment 5 Miroslav Lichvar 2013-06-25 12:32:04 EDT
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()
Comment 6 Maksym Sobolyev 2013-06-25 12:50:24 EDT
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
Comment 7 Maksym Sobolyev 2013-06-25 16:06:32 EDT
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

Note You need to log in before you can comment on or make changes to this bug.