Re: Wierd problem with hildon gtk window progress indicator

2009-07-21 Thread Kimmo Hämäläinen
On Tue, 2009-07-21 at 21:03 +0200, ext Amit Sethi wrote:
> I am writing code in which I have to fetch some data during this time
> I want to show some kind of progress indicator . So i tried using
> hildon progress indicators like this:
> 
> def price_button_pressed(widget,window):
>   print time.time()   
>   hildon.hildon_gtk_window_set_progress_indicator(window, 1)  
>   time.sleep(4)   
>   print "it should have been now "
>   sw=SmPriceWindow().new_()
>   sw.show_all_()  
>   print time.time()   
>   hildon.hildon_gtk_window_set_progress_indicator(window, 0)
> 
> window and SmPriceWindow are both stackable windows ... I tried to add
> some time between progress indicator being added to window and
> creation of the SmPriceWindow (during which fetching  takes place) and
> yet when I run the program the progress indicator appears only just
> before the SmPriceWindow is shown ... Why is that ?

Because you don't go to the main loop after setting the progress
indicator?  Use a g_timeout instead of sleep...

> 
> 

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Wierd problem with hildon gtk window progress indicator

2009-07-21 Thread Amit Sethi
I am writing code in which I have to fetch some data during this time
I want to show some kind of progress indicator . So i tried using
hildon progress indicators like this:

def price_button_pressed(widget,window):
print time.time()   
hildon.hildon_gtk_window_set_progress_indicator(window, 1)  
time.sleep(4)   
print "it should have been now "
sw=SmPriceWindow().new_()
sw.show_all_()  
print time.time()   
hildon.hildon_gtk_window_set_progress_indicator(window, 0)

window and SmPriceWindow are both stackable windows ... I tried to add
some time between progress indicator being added to window and
creation of the SmPriceWindow (during which fetching  takes place) and
yet when I run the program the progress indicator appears only just
before the SmPriceWindow is shown ... Why is that ?


-- 
A-M-I-T S|S
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers