From c1c63a9c7dcb1b3c2578c2692171f64a0a70c6c0 Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Thu, 24 Mar 2011 00:16:51 +0000 Subject: [PATCH] [controller] remove FIXME and redundant event --- SparkleShare/Mac/SparkleUI.cs | 12 +++++++++--- SparkleShare/SparkleController.cs | 6 +----- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/SparkleShare/Mac/SparkleUI.cs b/SparkleShare/Mac/SparkleUI.cs index ed374b65..dbb859e3 100644 --- a/SparkleShare/Mac/SparkleUI.cs +++ b/SparkleShare/Mac/SparkleUI.cs @@ -93,12 +93,18 @@ namespace SparkleShare { StatusIcon = new SparkleStatusIcon (); - SparkleShare.Controller.NotificationRaised += delegate { + SparkleShare.Controller.NotificationRaised += delegate (string user_name, string user_email, + string message, string repository_path) { InvokeOnMainThread (delegate { - foreach (SparkleLog log in SparkleUI.OpenLogs) - log.UpdateEventLog (); + foreach (SparkleLog log in OpenLogs) { + Console.WriteLine (log.LocalPath + " " +repository_path); + if (log.LocalPath.Equals (repository_path)) { + Console.WriteLine ("UPDATING " + repository_path); + log.UpdateEventLog (); + } + } if (SparkleShare.Controller.NotificationsEnabled) { diff --git a/SparkleShare/SparkleController.cs b/SparkleShare/SparkleController.cs index 1f7563bf..8cdcf15f 100644 --- a/SparkleShare/SparkleController.cs +++ b/SparkleShare/SparkleController.cs @@ -635,16 +635,12 @@ namespace SparkleShare { // folders in the SparkleShare folder private void PopulateRepositories () { - - // FIXME: Opening a log from the menu whilst populating crashes SparkleShare + Repositories = new List (); foreach (string folder_path in Directory.GetDirectories (SparklePaths.SparklePath)) AddRepository (folder_path); - if (FolderListChanged != null) - FolderListChanged (); - }