[Gtk-sharp-list] [Patch] gnome/Program.custom

Mike Kestner mkestner@speakeasy.net
14 Mar 2003 20:19:59 -0600

On Fri, 2003-03-14 at 14:54, Charles Iliya Krempeaux wrote:
> > Basically, it makes it so, if you want to write a simple Gnome
> > application, you don't have to do through all the complexities of
> > connecting Gnome.App's DeleteEvent event to a method or procedure that
> > quits the program.  And don't have to do a ShowAll().  (This is a
> > WinForms style thing.)

I like the idea of a Run(App) overload, but I think you throw away some
utility by also hooking up to DeleteEvent.  Most real apps are going to
want to react to DeleteEvent with something other than a simple Quit().
Any document-based app will want to warn for dirty docs, and any
multi-window app will not want to quit the app if another window is

I also am not charged about the naming choice for the
DeleteEventHandler.  Naming it Quit makes it look like an overload for
the public function, which it is not. It's an event handler.  Besides,
this helper method is in the wrong place.  It should be on Gnome.App if
anywhere.  I suppose you could add a DefaultDeleteEventHandler() method 
to Gnome.App if you really want to provide a shorthand for this, but I
doubt it is going to be used enough to warrant adding it.

Feel free to commit the Run(App) overload, without the event handler

Mike Kestner <mkestner@speakeasy.net>