synchronise linux and mac event hookups

This commit is contained in:
Hylke Bons 2011-03-14 00:13:20 +00:00
parent dc775487f0
commit 60b0ab3741
3 changed files with 38 additions and 4 deletions

View file

@ -122,6 +122,7 @@ namespace SparkleShare {
};
SparkleShare.Controller.OnIdle += delegate {
InvokeOnMainThread (delegate {

View file

@ -54,7 +54,12 @@ namespace SparkleShare {
SparkleShare.Controller.FolderSizeChanged += delegate {
Application.Invoke (delegate {
if (!Animation.Enabled)
SetNormalState ();
UpdateMenu ();
});
};

View file

@ -80,6 +80,13 @@ namespace SparkleShare {
// Show a bubble when there are new changes
SparkleShare.Controller.NotificationRaised += delegate (SparkleCommit commit, string repository_path) {
foreach (SparkleLog log in OpenLogs)
if (log.LocalPath.Equals (repository_path))
log.UpdateEventLog ();
if (!SparkleShare.Controller.NotificationsEnabled)
return;
string file_name = "";
string message = null;
@ -134,10 +141,6 @@ namespace SparkleShare {
bubble.Icon = new Gdk.Pixbuf (avatar_file_path);
else
bubble.Icon = SparkleUIHelpers.GetIcon ("avatar-default", 32);
foreach (SparkleLog log in OpenLogs)
if (log.LocalPath.Equals (repository_path))
log.UpdateEventLog ();
bubble.AddAction ("", "Show Events", delegate {
@ -152,6 +155,7 @@ namespace SparkleShare {
};
// Show a bubble when there was a conflict
SparkleShare.Controller.ConflictNotificationRaised += delegate {
Application.Invoke (delegate {
@ -164,6 +168,30 @@ namespace SparkleShare {
});
};
SparkleShare.Controller.AvatarFetched += delegate {
Application.Invoke (delegate {
foreach (SparkleLog log in OpenLogs)
log.UpdateEventLog ();
});
};
SparkleShare.Controller.OnIdle += delegate {
Application.Invoke (delegate {
foreach (SparkleLog log in OpenLogs)
log.UpdateEventLog ();
});
};
}