// Handlers :: OnSaveYourselfEvent // TODO: Actually set the restart command to something useful. /// <summary> /// Handler called on <see cref="Gnome.Client.SaveYourself" /> event. /// </summary> /// <param name="o"> /// The calling object. /// </param> /// <param name="args"> /// The <see cref="Gnome.SaveYourselfArgs" />. /// </param> /// <remarks> /// This doesn't do anything useful yet. /// </remarks> private static void OnSaveYourselfEvent (object o, Gnome.SaveYourselfArgs args) { string [] argv = { "muine" }; session_client.SetRestartCommand(1, argv); }
/// <summary> /// Saves history before application quits. /// </summary> /// <param name="sender">Sender.</param> /// <param name="args">Event arguments.</param> private void OnSaveYourself(object sender, Gnome.SaveYourselfArgs args) { if (Settings.Instance[Settings.Keys.Core.SaveHistoryOnExit].AsBoolean()) { History.Save(Clipboard.Instance.Items); } }