[Gtk-sharp-list] Problem with DeleteEvent

Mikkel Kruse Johnsen mikkel@linet.dk
Thu, 19 Aug 2004 09:09:22 +0200


--Boundary_(ID_pbXdjRh1oR1kVdPlTH3Kaw)
Content-type: text/plain; charset=UTF-8
Content-transfer-encoding: 8BIT

Hi

I don't think you can do that in delete-event, since the window is
already deleted, but I think you can hook into destroy-event and test it
there, return TRUE to not futher call delete-event or FALSE to continue
with delete-event.

/Mikkel

On Wed, 2004-08-18 at 19:12, miguel díaz wrote:

> hi all,
> in my window delete event i want to test if a text
> view has changed before exiting the application but
> when i run the programm, it ignores it, my warning
> dialog does not appear and mono throw this message:
> 
> ...gdk warning: gdk_property_delete:general case not
> implemented
> ...gdk warning: window unexpectedly destroyed
> 
> can anyone tell me what is wrong? here my code
> 
> public void WindowDelete (object obj, DeleteEventArgs
> args) 
>         {
>             if(contentsModified == true){
> 				new WarningDialog();
> 				Application.Quit();
> 			}
> 			else{
> 								Application.Quit();
> 			}
>             
>         }
> 
> 
> 	
> 	
> 		
> ___________________________________________________________ALL-NEW Yahoo! Messenger - all new features - even more fun!  http://uk.messenger.yahoo.com
> _______________________________________________
> Gtk-sharp-list maillist  -  Gtk-sharp-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/gtk-sharp-list

--Boundary_(ID_pbXdjRh1oR1kVdPlTH3Kaw)
Content-type: text/html; charset=utf-8
Content-transfer-encoding: 7BIT

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.0.10">
</HEAD>
<BODY>
Hi<BR>
<BR>
I don't think you can do that in delete-event, since the window is already deleted, but I think you can hook into destroy-event and test it there, return TRUE to not futher call delete-event or FALSE to continue with delete-event.<BR>
<BR>
/Mikkel<BR>
<BR>
On Wed, 2004-08-18 at 19:12, miguel d&#237;az wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE><FONT COLOR="#737373"><I>hi all,
in my window delete event i want to test if a text
view has changed before exiting the application but
when i run the programm, it ignores it, my warning
dialog does not appear and mono throw this message:

...gdk warning: gdk_property_delete:general case not
implemented
...gdk warning: window unexpectedly destroyed

can anyone tell me what is wrong? here my code

public void WindowDelete (object obj, DeleteEventArgs
args) 
        {
            if(contentsModified == true){
				new WarningDialog();
				Application.Quit();
			}
			else{
								Application.Quit();
			}
            
        }


	
	
		
___________________________________________________________ALL-NEW Yahoo! Messenger - all new features - even more fun!  </FONT><A HREF="http://uk.messenger.yahoo.com"><U>http://uk.messenger.yahoo.com</U></A>
<FONT COLOR="#737373">_______________________________________________
Gtk-sharp-list maillist  -  Gtk-sharp-list@lists.ximian.com</FONT>
<A HREF="http://lists.ximian.com/mailman/listinfo/gtk-sharp-list"><U>http://lists.ximian.com/mailman/listinfo/gtk-sharp-list</U></I></A></PRE>
</BLOCKQUOTE>
</BODY>
</HTML>

--Boundary_(ID_pbXdjRh1oR1kVdPlTH3Kaw)--