Re: [gtk-list] problem with threads and toggle button





	Can you use the mouse release to start the thread ? 
	if you have pause pressed down already seem like the
	thread should stop and perhaps wait for a mouse leave pause
	button event ? after all it cant start until the start button
	is pressed right ? so you would have to leave the pause!

	may life would be simplier with one button named
	Start and renamed to pause by the running thread.
	can you rename on the fly w/o problems ??
	start on the button rlease, rename the button and wait for
	another press and release, same buttons toggles start/pause

	just some ideas
	ed


	

On Thu, 3 Jun 1999, Ionutz Borcoman wrote:

> Hi,
> 
> My program have some toggle buttons that can set other buttons depending
> on which button is toggled. Some of them can be also disabled. Checking
> the run button, a thread is started and soem of the buttons are
> disabled, including the run button. The pause button is enabled.
> 
> When I click the pause, I can suspend the thread. When the thread stops,
> depending of several conditions, it can disable the pause.
> 
> Now the problem:
> 
> When the threaded function ends, I enter the main gtk loop to set some
> of the buttons. i use:
>   gdk_threads_enter();
>   ....
>   gdk_threads_leave();
> 
> This work almost always, unless I hapen to do this: keep mouse button
> press down in the pause button when the threads ends and the thread
> tries to disabled it. If I comment the line (from the threaded function)
> that disables the button, then everything works fine, excepting I don't
> get the effect I want. 
> 
> Any suggestions ? 
> 
> TIA,
> 
> Ionutz
> -- 
> Mental backup in progress - Do Not Disturb!
> --
> http://borco-ei.eng.hokudai.ac.jp/~borco/
> 
> -- 
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null
> 
> 



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