Re: [gtk2] window closing
- From: Michael Hill <mjh rdasys com>
- To: Andreas Volz <andreas brachttal net>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: [gtk2] window closing
- Date: 10 Dec 2002 13:08:06 -0500
You can connect the "delete_event" from a gtk_window to your own callback that returns a TRUE value. Here is an example:
GtkWidget *window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
g_signal_connect( G_OBJECT(window), "delete_event",
G_CALLBACK(some_func), NULL);
gint some_func(GtkWidget *widget, GdkEvent *event,
gpointer data)
{
/* Someone tried to close the window with 'X' button in top right corner.
* Tell them to go away...
* Returning TRUE will not allow this, returning FALSE will...
*/
g_print("GO AWAY, I'M NOT CLOSING!!!");
return(TRUE);
}
You get the idea....
Cheers,
Michael H.
On Tue, 2002-12-10 at 13:50, Andreas Volz wrote:
Hello,
how could I forbid that someone could close a window? Is it possible to
remove the "close-button" from the window? Or is this windowmanager
specific?
Andreas
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]