[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Progress Bar Strangeness...
- From: Tony Preston <apreston k2nesoft com>
- To: GTK <gtk-app-devel-list redhat com>
- Subject: Progress Bar Strangeness...
- Date: Mon, 07 Jun 1999 07:03:12 -0500
In an application I am working on, I am making an interface and have two
data items that fit very well in to progress bars. The application is the
emulation of an old CPU. I have simulated disk and magnetic tape. The
progress bar will be the current disk sector and the position on the magnetic
tape.
Using the example in Eric's book (around pg 120), I implemented the progress
bar for the disk. It tracked the disk position just fine. Then I added a
second progress bar. The way I added it was to add a section of code in the
StartProgress() and UpdateProgress() equivalent functions. My functions were
a bit simpler than the book, I already had a window and table to use so I
passed them into StartProgress() which basically created the label,
adjustment, and progress bar. UpdateProgress() was also a bit simpler since
my divisors were constants so I just did the update calulations and called
gtk_progress_set_percentages().
The problem... When I had just the disk, it works fine... The display
updated with the 100 ms timer. When I added the second progress bar, it seems
that (with print statements) I am getting one call to my UpdateProgress()
function and that is it...
I am working on tracking this down, but is there a problem if you do?
compute disk percent
compute tape percent
gtk_progress_set_percentages(...); <-- for the disk bar
gtk_progress_set_percentages(...); <-- for the tape bar
while( gtk_events_pending() )
gtk_main_interations();
I put a print statement at the begining of the update function and it is
called once, it is never called again. Does updating two widgets, then
doing the while cause you to be stuck in the while loop forever (the only
logical explination at this point since all gadgets seem to work just fine
except the two progress bars do not move even while my data changes)?
What is the right way to do two progress bars? Update the window with the
while loop after each one?
--
-- Tony Preston, Team *AMIGA*, Linux developer since 1996
-- Custom Services, P. O. Box 254, Moorestown, NJ 08055
-- The Amiga Zone BBS (609) 953-8159
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]