public static Gtk.ResponseType RunHigConfirmation(Gtk.Window parent, Gtk.DialogFlags flags, Gtk.MessageType type, string header, string msg, string ok_caption) { HigMessageDialog hmd = new HigMessageDialog(parent, flags, type, header, msg, ok_caption); try { return (Gtk.ResponseType)hmd.Run(); } finally { hmd.Destroy(); } }
private void OnCleanHistory(object sender, EventArgs args) { if (ResponseType.Ok == HigMessageDialog.RunHigConfirmation( this, Gtk.DialogFlags.DestroyWithParent, Gtk.MessageType.Warning, Catalog.GetString("You are about to delete the player's game session history."), Catalog.GetString("If you proceed, you will lose the history of the previous game sessions. Do you want to continue?"), Catalog.GetString("_Delete"))) { history.Clean(); } }