[Glade-users] Close Window commands




Hi, 

I am making a C / GTK application using Glade. I now can control an
electromotor using my parport. The GUI works well, but I only have one
problem. when I start the app I let the app open the parport. when i quit
the program I need to close it again. If I do not I can' t start the program
again because it then will try to open the port again, but because that one
is still open it can't start and ends with an error. Currently the only
solution I found for this is restarting the computer to make the port close
and the app work again.

For closing the port I made a button which needs te be clicked before
closing he program. This solution works, but isn' t very handsome and isn' t
bulletproof. Because when I close the window before clicking the close port
button I still need to reboot the computer. So I would like the possibility
to use the standard right upper 'x' button for closing a window also for
closing the port. Does anybody know if this is possible. So by clicking that
button I would like to also execute a C command ( close(fd); ).

Another possibility is to make a splashscreen version so that this close
button cannot be clicked. Then i could make a button which closes the window
and the port. But what is the GTK command to close a window/application?

i hope you can help me with this. I would really appreciate that!

Koen

P.S. I prefer the non-splashscreen variant
-- 
View this message in context: http://www.nabble.com/Close-Window-commands-tf2549195.html#a7105023
Sent from the Gnome - Glade - User mailing list archive at Nabble.com.




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