From 28d06b4eeb2ce533bd659bba2c36b6b112636d8c Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Sun, 27 Feb 2011 00:53:14 +0000 Subject: [PATCH] Tweak irc notifications --- SparkleLib/SparkleListener.cs | 2 +- SparkleLib/SparkleRepo.cs | 16 +++++++++++----- SparkleShare/Mac/Info.plist | 4 ++-- SparkleShare/Mac/SparkleShare.csproj | 1 + SparkleShare/Mac/SparkleShare.sln | 1 + 5 files changed, 16 insertions(+), 8 deletions(-) diff --git a/SparkleLib/SparkleListener.cs b/SparkleLib/SparkleListener.cs index e35ed74c..14c06d1c 100644 --- a/SparkleLib/SparkleListener.cs +++ b/SparkleLib/SparkleListener.cs @@ -41,7 +41,7 @@ namespace SparkleLib { { Server = server; - //Channel = GetSHA1 (folder_name); + //Channel = GetSHA1 (server + folder_name); Channel = folder_name; if (!user_email.Equals ("") && user_email != null) diff --git a/SparkleLib/SparkleRepo.cs b/SparkleLib/SparkleRepo.cs index 80ca88a9..fdacb120 100644 --- a/SparkleLib/SparkleRepo.cs +++ b/SparkleLib/SparkleRepo.cs @@ -380,7 +380,8 @@ namespace SparkleLib { } } else { - + + // Not really needed as we won't be notified about our own messages SparkleHelpers.DebugInfo ("Irc", "[" + Name + "] False alarm, already up to date. (" + _CurrentHash + ")"); @@ -541,7 +542,6 @@ namespace SparkleLib { string message = FormatCommitMessage (); Commit (message); - CheckForRemoteChanges (); Push (); } else { @@ -611,8 +611,9 @@ namespace SparkleLib { return; base.Commit (message); - - SparkleHelpers.DebugInfo ("Commit", "[" + Name + "] " + message); + _CurrentHash = Head.CurrentCommit.Hash; + + SparkleHelpers.DebugInfo ("Commit", "[" + Name + "] " + message + " (" + _CurrentHash); SparkleEventArgs args = new SparkleEventArgs ("Commited") { Message = message @@ -807,7 +808,9 @@ namespace SparkleLib { args = new SparkleEventArgs ("PushingFailed"); if (PushingFailed != null) - PushingFailed (this, args); + PushingFailed (this, args); + + CheckForChanges (); } else { @@ -825,6 +828,9 @@ namespace SparkleLib { if (PushingFinished != null) PushingFinished (this, args); + + if (!_IsPolling) + Listener.Client.SendMessage (SendType.Message, Listener.Channel, _CurrentHash); } diff --git a/SparkleShare/Mac/Info.plist b/SparkleShare/Mac/Info.plist index dfe7c843..8117ef38 100644 --- a/SparkleShare/Mac/Info.plist +++ b/SparkleShare/Mac/Info.plist @@ -2,14 +2,14 @@ + CFBundleExecutable + CFBundleIconFile sparkleshare CFBundleIdentifier org.sparkleshare.sparkleshare CFBundleName SparkleShare - CFBundleVersion - 1 LSMinimumSystemVersion 10.6 NSMainNibFile diff --git a/SparkleShare/Mac/SparkleShare.csproj b/SparkleShare/Mac/SparkleShare.csproj index 0e736b32..dcb392ce 100644 --- a/SparkleShare/Mac/SparkleShare.csproj +++ b/SparkleShare/Mac/SparkleShare.csproj @@ -11,6 +11,7 @@ SparkleShare SparkleShare v4.0 + 0.2 true diff --git a/SparkleShare/Mac/SparkleShare.sln b/SparkleShare/Mac/SparkleShare.sln index 3f1a6c09..a3404e29 100644 --- a/SparkleShare/Mac/SparkleShare.sln +++ b/SparkleShare/Mac/SparkleShare.sln @@ -16,5 +16,6 @@ Global EndGlobalSection GlobalSection(MonoDevelopProperties) = preSolution StartupItem = SparkleShare.csproj + version = 0.2 EndGlobalSection EndGlobal