private void _OnQuitButtonClicked(object obj, EventArgs args) { Trace.Call(obj, args); try { Frontend.Quit(); } catch (Exception ex) { Frontend.ShowException(this, ex); } }
protected void OnQuitActionActivated(object sender, EventArgs e) { Trace.Call(sender, e); try { Frontend.Quit(); } catch (Exception ex) { Frontend.ShowException(Parent, ex); } }
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); } }
private static bool CheckFrontendManagerStatus() { Trace.Call(); if (_FrontendManager == null) { // we lost the frontend manager, nothing to check return(false); } if (_FrontendManager.IsAlive) { // everything is fine return(true); } #if LOG4NET _Logger.Error("CheckFrontendManagerStatus(): frontend manager is not alive anymore!"); #endif Gtk.Application.Invoke(delegate { Gtk.MessageDialog md = new Gtk.MessageDialog(_MainWindow, Gtk.DialogFlags.Modal, Gtk.MessageType.Error, Gtk.ButtonsType.OkCancel, _("The server has lost the connection to the frontend.\nDo you want to reconnect now?")); Gtk.ResponseType res = (Gtk.ResponseType)md.Run(); md.Destroy(); if (res != Gtk.ResponseType.Ok) { // the frontend is unusable in this state -> say good bye Frontend.Quit(); return; } Frontend.ReconnectEngineToGUI(); }); return(false); }
private void OnStatusIconPopupMenu(object sender, EventArgs e) { Trace.Call(sender, e); Gtk.Menu menu = new Gtk.Menu(); Gtk.ImageMenuItem preferencesItem = new Gtk.ImageMenuItem( Gtk.Stock.Preferences, null ); preferencesItem.Activated += delegate { try { var builder = new Gtk.Builder(null, "PreferencesDialog2.ui", null); var widget = (Gtk.Widget)builder.GetObject("PreferencesDialog"); var dialog = new PreferencesDialog(f_MainWindow, builder, widget.Handle); dialog.Show(); } catch (Exception ex) { Frontend.ShowException(ex); } }; menu.Add(preferencesItem); menu.Add(new Gtk.SeparatorMenuItem()); Gtk.ImageMenuItem quitItem = new Gtk.ImageMenuItem( Gtk.Stock.Quit, null ); quitItem.Activated += delegate { try { Frontend.Quit(); } catch (Exception ex) { Frontend.ShowException(ex); } }; menu.Add(quitItem); menu.ShowAll(); menu.Popup(); }
private void OnStatusIconPopupMenu(object sender, EventArgs e) { Trace.Call(sender, e); Gtk.Menu menu = new Gtk.Menu(); Gtk.ImageMenuItem preferencesItem = new Gtk.ImageMenuItem( Gtk.Stock.Preferences, null ); preferencesItem.Activated += delegate { try { PreferencesDialog dialog = new PreferencesDialog(f_MainWindow); dialog.CurrentPage = PreferencesDialog.Page.Interface; dialog.CurrentInterfacePage = PreferencesDialog.InterfacePage.Notification; } catch (Exception ex) { Frontend.ShowException(ex); } }; menu.Add(preferencesItem); menu.Add(new Gtk.SeparatorMenuItem()); Gtk.ImageMenuItem quitItem = new Gtk.ImageMenuItem( Gtk.Stock.Quit, null ); quitItem.Activated += delegate { try { Frontend.Quit(); } catch (Exception ex) { Frontend.ShowException(ex); } }; menu.Add(quitItem); menu.ShowAll(); menu.Popup(); }
private void _CommandDetach(CommandModel cd) { Frontend.Quit(); }
private void _OnDeleteEvent() { Frontend.Quit(); }
private void _OnQuitButtonPressed() { Frontend.Quit(); }