[log] update when avatars are fetched

This commit is contained in:
Hylke Bons 2011-02-07 17:09:31 +00:00
parent db91cd73c1
commit d70544131a
4 changed files with 28 additions and 2 deletions

View file

@ -110,6 +110,8 @@ namespace SparkleShare {
html = html.Replace ("<!-- $a-color -->", "#0085cf");
WebView.MainFrame.LoadHtmlString (html, new NSUrl (""));
Update ();
}

View file

@ -63,9 +63,24 @@ namespace SparkleShare {
NewEvents++;
NSApplication.SharedApplication.DockTile.BadgeLabel = NewEvents.ToString ();
foreach (SparkleLog log in SparkleUI.OpenLogs)
log.UpdateEventLog ();
});
};
SparkleShare.Controller.AvatarFetched += delegate {
InvokeOnMainThread (delegate {
foreach (SparkleLog log in SparkleUI.OpenLogs)
log.UpdateEventLog ();
});
};
}

View file

@ -52,6 +52,9 @@ namespace SparkleShare {
public event FolderSizeChangedEventHandler FolderSizeChanged;
public delegate void FolderSizeChangedEventHandler (string folder_size);
public event AvatarFetchedEventHandler AvatarFetched;
public delegate void AvatarFetchedEventHandler ();
public event OnIdleEventHandler OnIdle;
public delegate void OnIdleEventHandler ();
@ -1029,7 +1032,7 @@ namespace SparkleShare {
// Gets the avatar for a specific email address and size
public static string GetAvatar (string email, int size)
public string GetAvatar (string email, int size)
{
string avatar_path = SparkleHelpers.CombineMore (SparklePaths.SparkleLocalIconPath,
@ -1070,6 +1073,9 @@ namespace SparkleShare {
if (tmp_file_info.Length > 255)
File.Move (tmp_file_path, avatar_file_path);
if (AvatarFetched != null)
AvatarFetched ();
};

View file

@ -66,7 +66,10 @@
}
img {
margin-right: 12px;
margin-right: 12px;
width: 36px;
height: 36px;
background-color: <!-- $small-color -->;
}
</style>