[log] Add a default buddy icon and prettify the event log
This commit is contained in:
parent
7ed60cc0a7
commit
b51681c662
|
@ -130,7 +130,8 @@ namespace SparkleLib {
|
|||
private void InstallExcludeRules ()
|
||||
{
|
||||
|
||||
string exlude_rules_file_path = SparkleHelpers.CombineMore (TargetFolder, ".git", "info", "exclude");
|
||||
string exlude_rules_file_path = SparkleHelpers.CombineMore
|
||||
(TargetFolder, ".git", "info", "exclude");
|
||||
|
||||
TextWriter writer = new StreamWriter (exlude_rules_file_path);
|
||||
|
||||
|
@ -158,7 +159,7 @@ namespace SparkleLib {
|
|||
writer.WriteLine ("Desktop.ini");
|
||||
|
||||
// CVS
|
||||
writer.WriteLine ("*/CVS/*")
|
||||
writer.WriteLine ("*/CVS/*");
|
||||
writer.WriteLine (".cvsignore");
|
||||
writer.WriteLine ("*/.cvsignore");
|
||||
|
||||
|
|
|
@ -652,7 +652,7 @@ namespace SparkleLib {
|
|||
Commited (this, args);
|
||||
|
||||
// Collect garbage pseudo-randomly
|
||||
if (DateTime.Now.Second == 0)
|
||||
if (DateTime.Now.Second % 10 == 0)
|
||||
CollectGarbage ();
|
||||
|
||||
}
|
||||
|
|
|
@ -394,7 +394,9 @@ namespace SparkleShare {
|
|||
};
|
||||
|
||||
CancelButton.Activated += delegate {
|
||||
Close ();
|
||||
InvokeOnMainThread (delegate {
|
||||
Close ();
|
||||
});
|
||||
};
|
||||
|
||||
Buttons.Add (CancelButton);
|
||||
|
@ -406,7 +408,9 @@ namespace SparkleShare {
|
|||
};
|
||||
|
||||
SkipButton.Activated += delegate {
|
||||
ShowCompletedPage ();
|
||||
InvokeOnMainThread (delegate {
|
||||
ShowCompletedPage ();
|
||||
});
|
||||
};
|
||||
|
||||
Buttons.Add (SkipButton);
|
||||
|
@ -432,7 +436,9 @@ namespace SparkleShare {
|
|||
};
|
||||
|
||||
TryAgainButton.Activated += delegate {
|
||||
ShowServerForm ();
|
||||
InvokeOnMainThread (delegate {
|
||||
ShowServerForm ();
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
|
@ -490,8 +496,10 @@ namespace SparkleShare {
|
|||
};
|
||||
|
||||
FinishButton.Activated += delegate {
|
||||
SparkleUI.StatusIcon.CreateMenu ();
|
||||
Close ();
|
||||
InvokeOnMainThread (delegate {
|
||||
SparkleUI.StatusIcon.CreateMenu ();
|
||||
Close ();
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
|
@ -531,8 +539,11 @@ namespace SparkleShare {
|
|||
};
|
||||
|
||||
FinishButton.Activated += delegate {
|
||||
SparkleUI.StatusIcon.CreateMenu ();
|
||||
Close ();
|
||||
InvokeOnMainThread (delegate {
|
||||
SparkleUI.StatusIcon.CreateMenu ();
|
||||
Close ();
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
Buttons.Add (FinishButton);
|
||||
|
|
|
@ -121,11 +121,15 @@ namespace SparkleShare {
|
|||
string html = SparkleShare.Controller.GetHTMLLog (folder_name);
|
||||
|
||||
html = html.Replace ("<!-- $body-font-family -->", "Lucida Grande");
|
||||
html = html.Replace ("<!-- $body-font-size -->", "10.1pt");
|
||||
html = html.Replace ("<!-- $body-font-size -->", "13.4px");
|
||||
html = html.Replace ("<!-- $secondary-font-color -->", "#bbb");
|
||||
html = html.Replace ("<!-- $small-color -->", "#ddd");
|
||||
html = html.Replace ("<!-- $day-entry-header-background-color -->", "#f5f5f5");
|
||||
html = html.Replace ("<!-- $a-color -->", "#0085cf");
|
||||
html = html.Replace ("<!-- $no-buddy-icon-background-image -->",
|
||||
"file://" + Path.Combine (NSBundle.MainBundle.ResourcePath, "Pixmaps", "avatar-default.png"));
|
||||
|
||||
Console.WriteLine (html);
|
||||
WebView.MainFrame.LoadHtmlString (html, new NSUrl (""));
|
||||
|
||||
Update ();
|
||||
|
|
|
@ -919,7 +919,7 @@ namespace SparkleShare {
|
|||
|
||||
} else {
|
||||
|
||||
TextWriter writer = new StreamWriter (ssh_config_file_path);
|
||||
TextWriter writer = new StreamWriter (ssh_config_file_path);
|
||||
writer.WriteLine (ssh_config);
|
||||
writer.Close ();
|
||||
|
||||
|
@ -963,8 +963,11 @@ namespace SparkleShare {
|
|||
private void DisableHostKeyCheckingForHost (string host)
|
||||
{
|
||||
|
||||
string ssh_config_file_path = Path.Combine (SparklePaths.HomePath, ".ssh", "config");
|
||||
string ssh_config = "Host " + host + "\n\tStrictHostKeyChecking no";
|
||||
string ssh_config_file_path = Path.Combine
|
||||
(SparklePaths.HomePath, ".ssh", "config");
|
||||
|
||||
string ssh_config = "Host " + host + "\n" +
|
||||
"\tStrictHostKeyChecking no";
|
||||
|
||||
if (File.Exists (ssh_config_file_path)) {
|
||||
|
||||
|
@ -986,8 +989,11 @@ namespace SparkleShare {
|
|||
private void EnableHostKeyCheckingForHost (string host)
|
||||
{
|
||||
|
||||
string ssh_config_file_path = Path.Combine (SparklePaths.HomePath, ".ssh", "config");
|
||||
string ssh_config = "Host " + host + "\n\tStrictHostKeyChecking no";
|
||||
string ssh_config_file_path = Path.Combine
|
||||
(SparklePaths.HomePath, ".ssh", "config");
|
||||
|
||||
string ssh_config = "Host " + host + "\n" +
|
||||
"\tStrictHostKeyChecking no";
|
||||
|
||||
if (File.Exists (ssh_config_file_path)) {
|
||||
|
||||
|
@ -995,15 +1001,15 @@ namespace SparkleShare {
|
|||
string current_ssh_config = reader.ReadToEnd ();
|
||||
reader.Close ();
|
||||
|
||||
if (current_ssh_config.Equals (ssh_config)) {
|
||||
current_ssh_config = current_ssh_config.Remove (current_ssh_config.IndexOf (ssh_config),
|
||||
ssh_config.Length);
|
||||
|
||||
File.Delete (ssh_config_file_path);
|
||||
if (current_ssh_config.Trim ().Equals ("")) {
|
||||
|
||||
File.Delete (ssh_config_file_path);
|
||||
|
||||
} else {
|
||||
|
||||
current_ssh_config = current_ssh_config.Remove (current_ssh_config.IndexOf (ssh_config),
|
||||
ssh_config.Length);
|
||||
|
||||
TextWriter writer = new StreamWriter (ssh_config_file_path);
|
||||
writer.WriteLine (current_ssh_config);
|
||||
writer.Close ();
|
||||
|
@ -1097,7 +1103,8 @@ namespace SparkleShare {
|
|||
SparkleHelpers.ClearAttributes (tmp_folder);
|
||||
Directory.Delete (tmp_folder, true);
|
||||
|
||||
SparkleHelpers.DebugInfo ("Config", "Deleted temporary directory: " + tmp_folder);
|
||||
SparkleHelpers.DebugInfo ("Config",
|
||||
"Deleted temporary directory: " + tmp_folder);
|
||||
|
||||
}
|
||||
|
||||
|
|
BIN
data/avatar-default.png
Normal file
BIN
data/avatar-default.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
|
@ -4,7 +4,11 @@
|
|||
|
||||
<table>
|
||||
<tr>
|
||||
<td><img src='<!-- $event-avatar-url -->'></td>
|
||||
<td>
|
||||
<div class='no-buddy-icon'>
|
||||
<div class='buddy-icon' style='background-image: url("<!-- $event-avatar-url -->")'></div>
|
||||
</div>
|
||||
</td>
|
||||
<td width='100%'>
|
||||
<b><!-- $event-user-name --></b><br>
|
||||
<!-- $event-entry-content -->
|
||||
|
|
|
@ -8,12 +8,13 @@
|
|||
<style>
|
||||
|
||||
body {
|
||||
background-color: <!-- $body-background-color -->;
|
||||
background-color: #f1f1f1;
|
||||
color: <!-- $body-color -->;
|
||||
font-size: <!-- $body-font-size -->;
|
||||
font-family: <!-- $body-font-family -->;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
small {
|
||||
|
@ -22,8 +23,15 @@
|
|||
}
|
||||
|
||||
.day-entry-header {
|
||||
background-color: <!-- $day-entry-header-background-color -->;
|
||||
padding: 9px;
|
||||
background-color: #ccc;
|
||||
color: #f7f7f7;
|
||||
padding: 3px;
|
||||
text-align: center;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
-webkit-border-radius: 20px;
|
||||
width: 128px;
|
||||
font-weight: lighter;
|
||||
}
|
||||
|
||||
.day-entry-content {
|
||||
|
@ -43,7 +51,7 @@
|
|||
|
||||
dd {
|
||||
padding-left: 0;
|
||||
margin-left: 9px;
|
||||
margin-left: 12px;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
|
@ -65,11 +73,26 @@
|
|||
color: <!-- $secondary-font-color -->;
|
||||
}
|
||||
|
||||
img {
|
||||
margin-right: 12px;
|
||||
.no-buddy-icon {
|
||||
margin-right: 12px;
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
background-image: url('<!-- $no-buddy-icon-background-image -->');
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
.buddy-icon {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
background-color: <!-- $small-color -->;
|
||||
}
|
||||
|
||||
.event-entry-content {
|
||||
background-color: #fff;
|
||||
margin: 12px;
|
||||
padding: 12px;
|
||||
-webkit-border-radius: 6px;
|
||||
border: <!-- $small-color --> 1px solid;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 69 KiB After Width: | Height: | Size: 79 KiB |
Loading…
Reference in a new issue