synchronise linux and mac event hookups

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

View file

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

View file

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

View file

@ -80,6 +80,13 @@ namespace SparkleShare {
// Show a bubble when there are new changes // Show a bubble when there are new changes
SparkleShare.Controller.NotificationRaised += delegate (SparkleCommit commit, string repository_path) { 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 file_name = "";
string message = null; string message = null;
@ -134,10 +141,6 @@ namespace SparkleShare {
bubble.Icon = new Gdk.Pixbuf (avatar_file_path); bubble.Icon = new Gdk.Pixbuf (avatar_file_path);
else else
bubble.Icon = SparkleUIHelpers.GetIcon ("avatar-default", 32); 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 { bubble.AddAction ("", "Show Events", delegate {
@ -152,6 +155,7 @@ namespace SparkleShare {
}; };
// Show a bubble when there was a conflict // Show a bubble when there was a conflict
SparkleShare.Controller.ConflictNotificationRaised += delegate { SparkleShare.Controller.ConflictNotificationRaised += delegate {
Application.Invoke (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 ();
});
};
} }