event log: unknown cache size = ???, loading size = ...
This commit is contained in:
parent
1bf440872e
commit
618dea6d45
|
@ -84,7 +84,7 @@ namespace SparkleShare {
|
||||||
Bordered = false,
|
Bordered = false,
|
||||||
Editable = false,
|
Editable = false,
|
||||||
Frame = new RectangleF (60, 588, 75, 20),
|
Frame = new RectangleF (60, 588, 75, 20),
|
||||||
StringValue = Controller.Size,
|
StringValue = "…",
|
||||||
Font = SparkleUI.Font
|
Font = SparkleUI.Font
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -105,7 +105,7 @@ namespace SparkleShare {
|
||||||
Bordered = false,
|
Bordered = false,
|
||||||
Editable = false,
|
Editable = false,
|
||||||
Frame = new RectangleF (190, 588, 75, 20),
|
Frame = new RectangleF (190, 588, 75, 20),
|
||||||
StringValue = Controller.HistorySize,
|
StringValue = "…",
|
||||||
Font = SparkleUI.Font
|
Font = SparkleUI.Font
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -60,8 +60,7 @@ namespace SparkleShare {
|
||||||
DeleteEvent += Close;
|
DeleteEvent += Close;
|
||||||
|
|
||||||
this.size_label = new Label () {
|
this.size_label = new Label () {
|
||||||
Markup = "<b>Size:</b> " + Controller.Size + " " +
|
Markup = "<b>Size:</b> … <b>History:</b> …"
|
||||||
"<b>History:</b> " + Controller.HistorySize
|
|
||||||
};
|
};
|
||||||
|
|
||||||
VBox layout_vertical = new VBox (false, 0);
|
VBox layout_vertical = new VBox (false, 0);
|
||||||
|
|
|
@ -54,6 +54,9 @@ namespace SparkleShare {
|
||||||
if (ContentLoadingEvent != null)
|
if (ContentLoadingEvent != null)
|
||||||
ContentLoadingEvent ();
|
ContentLoadingEvent ();
|
||||||
|
|
||||||
|
if (UpdateSizeInfoEvent != null)
|
||||||
|
UpdateSizeInfoEvent ("…", "…");
|
||||||
|
|
||||||
Stopwatch watch = new Stopwatch ();
|
Stopwatch watch = new Stopwatch ();
|
||||||
watch.Start ();
|
watch.Start ();
|
||||||
|
|
||||||
|
@ -80,6 +83,10 @@ namespace SparkleShare {
|
||||||
public string HTML {
|
public string HTML {
|
||||||
get {
|
get {
|
||||||
List<SparkleChangeSet> change_sets = Program.Controller.GetLog (this.selected_folder);
|
List<SparkleChangeSet> change_sets = Program.Controller.GetLog (this.selected_folder);
|
||||||
|
|
||||||
|
if (UpdateSizeInfoEvent != null)
|
||||||
|
UpdateSizeInfoEvent (Size, HistorySize);
|
||||||
|
|
||||||
return Program.Controller.GetHTMLLog (change_sets);
|
return Program.Controller.GetHTMLLog (change_sets);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -97,10 +104,17 @@ namespace SparkleShare {
|
||||||
foreach (SparkleRepoBase repo in Program.Controller.Repositories) {
|
foreach (SparkleRepoBase repo in Program.Controller.Repositories) {
|
||||||
if (this.selected_folder == null)
|
if (this.selected_folder == null)
|
||||||
size += repo.Size;
|
size += repo.Size;
|
||||||
else if (this.selected_folder.Equals (repo.Name))
|
else if (this.selected_folder.Equals (repo.Name)) {
|
||||||
|
if (repo.Size == 0)
|
||||||
|
return "???";
|
||||||
|
else
|
||||||
return Program.Controller.FormatSize (repo.Size);
|
return Program.Controller.FormatSize (repo.Size);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (size == 0)
|
||||||
|
return "???";
|
||||||
|
else
|
||||||
return Program.Controller.FormatSize (size);
|
return Program.Controller.FormatSize (size);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -112,10 +126,17 @@ namespace SparkleShare {
|
||||||
foreach (SparkleRepoBase repo in Program.Controller.Repositories) {
|
foreach (SparkleRepoBase repo in Program.Controller.Repositories) {
|
||||||
if (this.selected_folder == null)
|
if (this.selected_folder == null)
|
||||||
size += repo.HistorySize;
|
size += repo.HistorySize;
|
||||||
else if (this.selected_folder.Equals (repo.Name))
|
else if (this.selected_folder.Equals (repo.Name)) {
|
||||||
|
if (repo.HistorySize == 0)
|
||||||
|
return "???";
|
||||||
|
else
|
||||||
return Program.Controller.FormatSize (repo.HistorySize);
|
return Program.Controller.FormatSize (repo.HistorySize);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (size == 0)
|
||||||
|
return "???";
|
||||||
|
else
|
||||||
return Program.Controller.FormatSize (size);
|
return Program.Controller.FormatSize (size);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue