Let [ui] update [log]
This commit is contained in:
parent
df5b63582f
commit
cf18c7b0c4
|
@ -31,6 +31,7 @@ namespace SparkleShare {
|
||||||
private ScrolledWindow ScrolledWindow;
|
private ScrolledWindow ScrolledWindow;
|
||||||
private MenuBar MenuBar;
|
private MenuBar MenuBar;
|
||||||
|
|
||||||
|
|
||||||
// Short alias for the translations
|
// Short alias for the translations
|
||||||
public static string _ (string s)
|
public static string _ (string s)
|
||||||
{
|
{
|
||||||
|
@ -142,27 +143,12 @@ namespace SparkleShare {
|
||||||
public void Close ()
|
public void Close ()
|
||||||
{
|
{
|
||||||
|
|
||||||
foreach (SparkleRepo repo in SparkleShare.Controller.Repositories) {
|
Destroy ();
|
||||||
|
|
||||||
if (repo.LocalPath.Equals (LocalPath)) {
|
|
||||||
|
|
||||||
/* // Remove the eventhooks
|
|
||||||
repo.NewCommit -= UpdateEventLog;
|
|
||||||
repo.PushingFinished -= UpdateEventLog;
|
|
||||||
repo.PushingFailed -= UpdateEventLog; TODO: Move to controller
|
|
||||||
repo.FetchingFinished -= UpdateEventLog;
|
|
||||||
repo.FetchingFailed -= UpdateEventLog;*/
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
HideAll ();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void UpdateEventLog (SparkleCommit commit, string repository_path)
|
public void Update ()
|
||||||
{
|
{
|
||||||
|
|
||||||
Application.Invoke (delegate {
|
Application.Invoke (delegate {
|
||||||
|
@ -189,17 +175,6 @@ namespace SparkleShare {
|
||||||
if (repo.LocalPath.Equals (LocalPath)) {
|
if (repo.LocalPath.Equals (LocalPath)) {
|
||||||
|
|
||||||
commits = repo.GetCommits (25);
|
commits = repo.GetCommits (25);
|
||||||
|
|
||||||
/* // Update the log when there are new remote changes
|
|
||||||
repo.NewCommit += UpdateEventLog;
|
|
||||||
|
|
||||||
// Update the log when changes are being sent
|
|
||||||
repo.PushingFinished += UpdateEventLog;
|
|
||||||
repo.PushingFailed += UpdateEventLog;
|
|
||||||
|
|
||||||
repo.FetchingFinished += UpdateEventLog; TODO: Move to controller
|
|
||||||
repo.FetchingFailed += UpdateEventLog;
|
|
||||||
*/
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -132,6 +132,10 @@ 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.Update ();
|
||||||
|
|
||||||
// bubble.AddAction ("", "Show Events", delegate {
|
// bubble.AddAction ("", "Show Events", delegate {
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue