eventlog: take user to gravatar.com when clicking on avatars
This commit is contained in:
parent
a02bd278b0
commit
713950c37e
|
@ -134,7 +134,7 @@ namespace SparkleLib {
|
|||
|
||||
bool warn = true;
|
||||
if (RequiredFingerprint != null) {
|
||||
string host_fingerprint = GetFingerprint (host_key);
|
||||
string host_fingerprint = DeriveFingerprint (host_key);
|
||||
|
||||
if (host_fingerprint == null || !RequiredFingerprint.Equals (host_fingerprint)) {
|
||||
SparkleLogger.LogInfo ("Auth", "Fingerprint doesn't match");
|
||||
|
@ -292,7 +292,7 @@ namespace SparkleLib {
|
|||
}
|
||||
|
||||
|
||||
private string GetFingerprint (string public_key)
|
||||
private string DeriveFingerprint (string public_key)
|
||||
{
|
||||
try {
|
||||
MD5 md5 = new MD5CryptoServiceProvider ();
|
||||
|
@ -339,7 +339,7 @@ namespace SparkleLib {
|
|||
SparkleLogger.LogInfo ("Auth", "Accepted host key for " + host);
|
||||
|
||||
if (warn)
|
||||
this.warnings.Add ("The following host key has been accepted:\n" + GetFingerprint (host_key));
|
||||
this.warnings.Add ("The following host key has been accepted:\n" + DeriveFingerprint (host_key));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class='event-entry'>
|
||||
<div class='event-avatar' style='background-image: url("<!-- $event-avatar-url -->");'></div>
|
||||
<a href="http://gravatar.com/"><div class='event-avatar' style='background-image: url("<!-- $event-avatar-url -->");'></div></a>
|
||||
<div class='event-user-name'><!-- $event-user-name --><span class='event-folder'><!-- $event-folder --></span></div>
|
||||
<!-- $event-entry-content -->
|
||||
<a class="show">Show all</a>
|
||||
|
|
|
@ -116,13 +116,6 @@
|
|||
min-height: 100px;
|
||||
}
|
||||
|
||||
.no-buddy-icon {
|
||||
width: 48px;
|
||||
background-image: url('<!-- $no-buddy-icon-background-image -->');
|
||||
background-repeat: no-repeat;
|
||||
background-position: top center;
|
||||
}
|
||||
|
||||
.event-user-name {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
|
|
@ -167,7 +167,7 @@ namespace SparkleShare {
|
|||
|
||||
public class SparkleLink : EventBox {
|
||||
|
||||
public SparkleLink (string text, string address)
|
||||
public SparkleLink (string text, string url)
|
||||
{
|
||||
VisibleWindow = false;
|
||||
|
||||
|
@ -184,10 +184,7 @@ namespace SparkleShare {
|
|||
};
|
||||
|
||||
ButtonPressEvent += delegate {
|
||||
Process process = new Process ();
|
||||
process.StartInfo.FileName = "xdg-open";
|
||||
process.StartInfo.Arguments = address;
|
||||
process.Start ();
|
||||
Program.Controller.OpenWebsite (url);
|
||||
};
|
||||
|
||||
Add (label);
|
||||
|
|
|
@ -194,5 +194,11 @@ namespace SparkleShare {
|
|||
process.StartInfo.Arguments = "\"" + path + "\"";
|
||||
process.Start ();
|
||||
}
|
||||
|
||||
|
||||
public override void OpenWebsite (string url)
|
||||
{
|
||||
OpenFile (url);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -261,7 +261,7 @@ namespace SparkleShare {
|
|||
Editable = false;
|
||||
Selectable = false;
|
||||
|
||||
NSData name_data = NSData.FromString ("<a href='" + url +
|
||||
NSData name_data = NSData.FromString ("<a href='" + this.url +
|
||||
"' style='font-size: 8pt; font-family: \"Lucida Grande\"; color: #739ECF'>" + text + "</a></font>");
|
||||
|
||||
NSDictionary name_dictionary = new NSDictionary();
|
||||
|
@ -278,7 +278,7 @@ namespace SparkleShare {
|
|||
|
||||
public override void MouseUp (NSEvent e)
|
||||
{
|
||||
NSWorkspace.SharedWorkspace.OpenUrl (url);
|
||||
Program.Controller.OpenWebsite (this.url.ToString ());
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -202,6 +202,12 @@ namespace SparkleShare {
|
|||
}
|
||||
|
||||
|
||||
public override void OpenWebsite (string url)
|
||||
{
|
||||
NSWorkspace.SharedWorkspace.OpenUrl (new NSUrl (url));
|
||||
}
|
||||
|
||||
|
||||
private string event_log_html;
|
||||
public override string EventLogHTML
|
||||
{
|
||||
|
|
|
@ -151,6 +151,9 @@ namespace SparkleShare {
|
|||
// Opens a file with the appropriate application
|
||||
public abstract void OpenFile (string path);
|
||||
|
||||
// Opens a file with the appropriate application
|
||||
public abstract void OpenWebsite (string url);
|
||||
|
||||
|
||||
private SparkleConfig config;
|
||||
private SparkleFetcherBase fetcher;
|
||||
|
|
|
@ -217,6 +217,9 @@ namespace SparkleShare {
|
|||
url.Substring (1, 1).Equals (":")) {
|
||||
|
||||
Program.Controller.OpenFile (url);
|
||||
|
||||
} else if (url.StartsWith ("http")) {
|
||||
Program.Controller.OpenWebsite (url);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -171,7 +171,7 @@ namespace SparkleShare {
|
|||
|
||||
public class SparkleLink : Label {
|
||||
|
||||
public SparkleLink (string title, string address)
|
||||
public SparkleLink (string title, string url)
|
||||
{
|
||||
FontSize = 11;
|
||||
Cursor = Cursors.Hand;
|
||||
|
@ -193,7 +193,7 @@ namespace SparkleShare {
|
|||
Content = text_block;
|
||||
|
||||
MouseUp += delegate {
|
||||
Process.Start (new ProcessStartInfo (address));
|
||||
Program.Controller.OpenWebsite (url);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -182,6 +182,12 @@ namespace SparkleShare {
|
|||
}
|
||||
|
||||
|
||||
public override void OpenWebsite (string url)
|
||||
{
|
||||
Process.Start (new ProcessStartInfo (url));
|
||||
}
|
||||
|
||||
|
||||
public override void Quit ()
|
||||
{
|
||||
StopSSH ();
|
||||
|
|
Loading…
Reference in a new issue