Bug 975236 - Progress bar is not working in the 0.52.15
Summary: Progress bar is not working in the 0.52.15
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: newt
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Lichvar
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-17 20:59 UTC by Maksym Sobolyev
Modified: 2013-06-25 20:06 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-06-25 20:06:32 UTC
Type: Bug
Embargoed:


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

Description Maksym Sobolyev 2013-06-17 20:59:12 UTC
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 07:52:24 UTC
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 14:45:49 UTC
Created attachment 762525 [details]
Test case result with 0.52.14

Comment 3 Maksym Sobolyev 2013-06-18 14:46:19 UTC
Created attachment 762526 [details]
Test case result with 0.52.15

Comment 4 Maksym Sobolyev 2013-06-18 14:47:37 UTC
(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 16:32:04 UTC
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 16:50:24 UTC
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 20:06:32 UTC
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.