Re: remove some of the buttons in the decoration of the window

On 6/17/05, Alem Dain <alem dain gmail com> wrote:
On 6/17/05, y g <odysseus lost gmail com> wrote:
Btw is it possible to "redirect" the destroy event to a hide event
when the X button in the decoration frame is clicked? I tried doing so
by using a signal handler to the object destroy signal but no luck.
Even setting the property of auto-destroy to false does not make a
difference, although I do not understand what is this property exactly

If by "destroy" you mean "delete", then yes, just handle the
delete-event signal, and have the handler hide the window and return

No, I think the destroy event signal emitted when you click the X
button on the decoration of the window.

If by "destroy" you really mean "destroy", then I would say that it
may be possible by writing your own GDK event handler, but it seems
doubtful.  The destroy/annihilate functionality is there precisely so
that the window can still be made to go away, even if the program that
controls it is not responding.

I guess you are right as it makes sense.

That being said, I have just tried to work around this in two ways:
one, by having a destroy handler show the window, and two, by having a
timeout re-show the window every second.  
I think in my case it would be reorganisation of my code as it is kind
of messy. Catching the destroy event and preventing from actually
destroying the window was the easy way.

Thanks for the help.

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