From 76ee5407f2c97c593e39d4595bf313dcf13f0c6b Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Sun, 11 Mar 2012 21:35:18 +0000 Subject: [PATCH] event log: remove webbrowser and reset combobox selection after closing window --- SparkleShare/Linux/SparkleEventLog.cs | 3 +++ SparkleShare/Mac/SparkleEventLog.cs | 3 +++ SparkleShare/SparkleEventLogController.cs | 5 ++++- SparkleShare/Windows/SparkleEventLog.cs | 3 +++ 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/SparkleShare/Linux/SparkleEventLog.cs b/SparkleShare/Linux/SparkleEventLog.cs index 8887b07a..c3a1f42a 100755 --- a/SparkleShare/Linux/SparkleEventLog.cs +++ b/SparkleShare/Linux/SparkleEventLog.cs @@ -118,6 +118,9 @@ namespace SparkleShare { Controller.HideWindowEvent += delegate { Application.Invoke (delegate { HideAll (); + + if (this.content_wrapper.Child != null) + this.content_wrapper.Remove (this.content_wrapper.Child); }); }; diff --git a/SparkleShare/Mac/SparkleEventLog.cs b/SparkleShare/Mac/SparkleEventLog.cs index 02e5ec0b..37f59328 100755 --- a/SparkleShare/Mac/SparkleEventLog.cs +++ b/SparkleShare/Mac/SparkleEventLog.cs @@ -163,6 +163,9 @@ namespace SparkleShare { { InvokeOnMainThread (delegate { PerformClose (this); + + if (this.web_view.Superview == ContentView) + this.web_view.RemoveFromSuperview (); }); } }; diff --git a/SparkleShare/SparkleEventLogController.cs b/SparkleShare/SparkleEventLogController.cs index 7c4ed5b3..12c111cb 100755 --- a/SparkleShare/SparkleEventLogController.cs +++ b/SparkleShare/SparkleEventLogController.cs @@ -167,7 +167,8 @@ namespace SparkleShare { Program.Controller.OnIdle += delegate { if (UpdateContentEvent != null) UpdateContentEvent (HTML); - + + // TODO: Check selected folder if (UpdateSizeInfoEvent != null) UpdateSizeInfoEvent (Size, HistorySize); }; @@ -192,6 +193,8 @@ namespace SparkleShare { { if (HideWindowEvent != null) HideWindowEvent (); + + this.selected_folder = null; } diff --git a/SparkleShare/Windows/SparkleEventLog.cs b/SparkleShare/Windows/SparkleEventLog.cs index fa0e166c..32f2ca40 100644 --- a/SparkleShare/Windows/SparkleEventLog.cs +++ b/SparkleShare/Windows/SparkleEventLog.cs @@ -152,6 +152,9 @@ namespace SparkleShare { Controller.HideWindowEvent += delegate { Dispatcher.Invoke ((Action) delegate { Hide (); + + if (this.canvas.Children.Contains (this.web_browser)) + this.canvas.Children.Remove (this.web_browser); }); };