multi-tasking




  Hello,

  I'm new to GTK+ so I apologize if this is covered somewhere. I've
written a cd player control panel and it works, mostly. The problem I'm
having is that when the play, FF and REW buttons are pressed I set the
button's pixmap to its down image and then call the appropriate cdrom
routine.

  The problem is that the new pixmap doesn't get drawn until after the
cdrom routine is done and the button press event for the button is exited.
Most of the time the down image doesn't show up at all because you've
already released the mouse button by the time it is done switching to the
next track.

  Does anyone have a good solution for this? Someone should, since its
important to have a good user interface and still be able to interact with
real-world devices.

  One though I had was maybe starting a timer when the key is pressed and
doing the actual cdrom command when the timer goes off (after, say 100mS).

  Any better ideas?

  Brian

  (BTW, you can see a sample screenshot in the linux software section of
my webpage).

======================================================================
Nexus Computing                           http://www.eskimo.com/~nexus
Electronics, Embedded Software and Linux             nexus@tatoosh.com



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]