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

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

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.

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.  The first method has no
effect whatsoever; the window is destroyed after the handler returns
(though you could try adding the handler after).  The second method
causes a segfault with

(a.out:11014): GLib-GObject-CRITICAL **: g_object_ref: assertion
`G_IS_OBJECT (object)' failed

(a.out:11014): Gtk-CRITICAL **: gtk_widget_queue_resize: assertion
`GTK_IS_WIDGET (widget)' failed
Segmentation fault

So I'd say the window is pretty well gone.  I expect adding the
handler after as I suggested would produce this result as well.

Windows are supposed to be destroyable.


gtk-app-devel-list mailing list
gtk-app-devel-list gnome org

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