Smuxi.Frontend.Gnome.MainWindow.OnDeleteEvent C# (CSharp) Method

OnDeleteEvent() protected method

protected OnDeleteEvent ( object sender, Gtk e ) : void
sender object
e Gtk
return void
        protected virtual void OnDeleteEvent(object sender, Gtk.DeleteEventArgs e)
        {
            Trace.Call(sender, e);

            try {
                if (NotificationAreaIconMode == NotificationAreaIconMode.Closed) {
                    // showing the tray icon is handled in OnWindowStateEvent
                    Hide();

                    // don't destroy the window nor quit smuxi!
                    e.RetVal = true;
                    return;
                }

                Frontend.Quit();
            } catch (Exception ex) {
                Frontend.ShowException(this, ex);
            }
        }