Skip to content

Commit

Permalink
RC4 release; Feed Monitor date parsing fix
Browse files Browse the repository at this point in the history
  • Loading branch information
briandunnington committed Nov 2, 2009
1 parent 4a49dd3 commit 8c600ca
Show file tree
Hide file tree
Showing 109 changed files with 1,106 additions and 428 deletions.
Binary file modified Growl Connectors/NET/libraries/Growl.Connector.dll
Binary file not shown.
Binary file modified Growl Connectors/NET/libraries/Growl.CoreLibrary.dll
Binary file not shown.
2 changes: 1 addition & 1 deletion Growl Extras/Bubbles/Bubbles/BubblesWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ protected override void OnShown(EventArgs e)
void BubblesWindow_AutoClosing(object sender, FormClosingEventArgs e)
{
this.fadeOutTimer = new Timer();
this.fadeOutTimer.Interval = 50;
this.fadeOutTimer.Interval = 10;
this.fadeOutTimer.Tick += new EventHandler(fadeOutTimer_Tick);
this.fadeOutTimer.Start();
e.Cancel = true; // IMPORTANT!
Expand Down
2 changes: 1 addition & 1 deletion Growl Extras/Degree Display/Degree Display/DegreeWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ protected override void OnShown(EventArgs e)
void DegreeWindow_AutoClosing(object sender, FormClosingEventArgs e)
{
this.fadeOutTimer = new Timer();
this.fadeOutTimer.Interval = 50;
this.fadeOutTimer.Interval = 10;
this.fadeOutTimer.Tick += new EventHandler(fadeOutTimer_Tick);
this.fadeOutTimer.Start();
e.Cancel = true; // IMPORTANT!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,14 +278,14 @@
{
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:Feed Monitor"
"ProductCode" = "8:{BD7EE876-9F0E-4C2D-8B25-BDA55F54A594}"
"PackageCode" = "8:{FA534258-825F-4AA3-843E-7B3521B408C5}"
"ProductCode" = "8:{E5CA6A2A-3D51-4E09-AAD9-D47870DB4452}"
"PackageCode" = "8:{8FAFB384-4FC1-4A8D-8319-A0B07EE31F42}"
"UpgradeCode" = "8:{E8D784D8-949E-4CC9-BA80-A316D25574D7}"
"RestartWWWService" = "11:FALSE"
"RemovePreviousVersions" = "11:TRUE"
"DetectNewerInstalledVersion" = "11:TRUE"
"InstallAllUsers" = "11:FALSE"
"ProductVersion" = "8:1.0.4"
"ProductVersion" = "8:1.0.5"
"Manufacturer" = "8:element code project"
"ARPHELPTELEPHONE" = "8:"
"ARPHELPLINK" = "8:"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@
<Compile Include="_source\FeedInfo.cs" />
<Compile Include="_source\FeedItem.cs" />
<Compile Include="_source\GenericFeedParser.cs" />
<Compile Include="_source\Rfc822DateTime.cs" />
<Compile Include="_source\Rss10FeedFormatter.cs" />
<Compile Include="_source\SettingsPersister.cs" />
<Compile Include="_source\User32DLL.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.4.0")]
[assembly: AssemblyFileVersion("1.0.5.0")]
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ public FeedInfo Parse(XmlReader reader)
case "pubDate":
case "issued":
DateTime dt;
DateTime.TryParse(d[k], out dt);
itm.PubDate = dt != DateTime.MinValue ? dt : DateTime.Now;
bool ok = Rfc822DateTime.TryParse(d[k], out dt);
itm.PubDate = ok ? dt : DateTime.Now;
break;
case "content":
case "description":
Expand Down

Large diffs are not rendered by default.

Binary file modified Growl Extras/Growl Display SDK/libraries/Growl.CoreLibrary.dll
Binary file not shown.
Binary file modified Growl Extras/Growl Display SDK/libraries/Growl.DisplayStyle.dll
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,7 @@ void Notify(object iTrack)
int databaseID;
song.GetITObjectIDs(out sourceID, out playlistID, out trackID, out databaseID);

Growl.Connector.CallbackContext callback = new Growl.Connector.CallbackContext();
callback.Type = "song";
callback.Data = String.Format("{0}|{1}|{2}|{3}", sourceID, playlistID, trackID, databaseID);
Growl.Connector.CallbackContext callback = new Growl.Connector.CallbackContext("song", String.Format("{0}|{1}|{2}|{3}", sourceID, playlistID, trackID, databaseID));

//Growl.CoreLibrary.Resource albumIcon = artworkFilePath;
Growl.CoreLibrary.Resource albumIcon = (artworkData != null ? new Growl.CoreLibrary.BinaryData(artworkData) : null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ void ThisApplication_NewMailEx(string EntryIDCollection)
string body = message.Body.Replace("\r\n", "\n");
body = (body.Length > 50 ? body.Substring(0, 50) + "..." : body);

// just saving this for future reference
//Outlook.MAPIFolder folder = message.Parent as Outlook.MAPIFolder;
//Outlook.NameSpace outlookNameSpace = this.GetNamespace("MAPI");
//Outlook.MAPIFolder junkFolder = outlookNameSpace.GetDefaultFolder(Microsoft.Office.Interop.Outlook.OlDefaultFolders..olFolderJunk);

title = message.Subject;
if (!String.IsNullOrEmpty(title)) title = title.Trim();
title = (String.IsNullOrEmpty(title) ? "[No Subject]" : message.Subject);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -588,14 +588,14 @@
{
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:Growl Outlook Add-In"
"ProductCode" = "8:{B983A19F-DA56-40CE-86CE-047D599821D1}"
"PackageCode" = "8:{0E11437B-3562-4892-8C8A-DA963ECAD02E}"
"ProductCode" = "8:{0A05FD1F-F708-427B-AEB5-12E4FBD11F53}"
"PackageCode" = "8:{1E02761D-BF46-4F66-A266-658AAFED77C0}"
"UpgradeCode" = "8:{49A7FB61-9235-4718-B57C-A8C2DB8C84C8}"
"RestartWWWService" = "11:FALSE"
"RemovePreviousVersions" = "11:FALSE"
"DetectNewerInstalledVersion" = "11:TRUE"
"InstallAllUsers" = "11:FALSE"
"ProductVersion" = "8:1.0.4"
"ProductVersion" = "8:1.0.5"
"Manufacturer" = "8:Growl Extras"
"ARPHELPTELEPHONE" = "8:"
"ARPHELPLINK" = "8:"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@
{
"AssemblyRegister" = "3:1"
"AssemblyIsInGAC" = "11:FALSE"
"AssemblyAsmDisplayName" = "8:Growl.CoreLibrary, Version=2.0.0.0, Culture=neutral, PublicKeyToken=13e59d82e007b064, processorArchitecture=x86"
"AssemblyAsmDisplayName" = "8:Growl.CoreLibrary, Version=2.0.0.0, Culture=neutral, PublicKeyToken=13e59d82e007b064, processorArchitecture=MSIL"
"ScatterAssemblies"
{
"_2A3D301AE43B4562686ECF2B7D48C150"
Expand Down Expand Up @@ -420,7 +420,7 @@
{
"AssemblyRegister" = "3:1"
"AssemblyIsInGAC" = "11:FALSE"
"AssemblyAsmDisplayName" = "8:Growl.Connector, Version=2.0.0.0, Culture=neutral, PublicKeyToken=980c2339411be384, processorArchitecture=x86"
"AssemblyAsmDisplayName" = "8:Growl.Connector, Version=2.0.0.0, Culture=neutral, PublicKeyToken=980c2339411be384, processorArchitecture=MSIL"
"ScatterAssemblies"
{
"_E6C013D54794CC24E6A5582343AF2461"
Expand Down Expand Up @@ -577,14 +577,14 @@
{
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:Growl Add-In for Visual Studio"
"ProductCode" = "8:{21327019-EE79-4052-9F4D-AE24F6E68BAF}"
"PackageCode" = "8:{85D78094-C9EA-4EF0-81DB-0713A0AD5ED3}"
"ProductCode" = "8:{BB29F808-40C0-4886-9AB9-393D73628676}"
"PackageCode" = "8:{C5E155D7-72FB-4A43-9C77-7470469897C3}"
"UpgradeCode" = "8:{F831506E-1E2C-4B2E-B02A-EAB81096EF29}"
"RestartWWWService" = "11:FALSE"
"RemovePreviousVersions" = "11:TRUE"
"DetectNewerInstalledVersion" = "11:TRUE"
"InstallAllUsers" = "11:TRUE"
"ProductVersion" = "8:1.0.2"
"ProductVersion" = "8:1.0.3"
"Manufacturer" = "8:Growl Extras"
"ARPHELPTELEPHONE" = "8:"
"ARPHELPLINK" = "8:"
Expand Down
2 changes: 1 addition & 1 deletion Growl Extras/IPhone Style Display/IphoneWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ protected override void OnShown(EventArgs e)
void IphoneWindow_AutoClosing(object sender, FormClosingEventArgs e)
{
this.fadeOutTimer = new Timer();
this.fadeOutTimer.Interval = 50;
this.fadeOutTimer.Interval = 10;
this.fadeOutTimer.Tick += new EventHandler(fadeOutTimer_Tick);
this.fadeOutTimer.Start();
e.Cancel = true; // IMPORTANT!
Expand Down
11 changes: 7 additions & 4 deletions Growl Extras/NotifyDisplay/NotifyDisplay/NotifyWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ private System.Drawing.Bitmap SizeImage(System.Drawing.Bitmap originalImage, int
{
int minHeight = 80;
int topHeight = 30;
int bottomHeight = 20;
int bottomHeight = 19;

if (newHeight < minHeight) newHeight = minHeight;

Expand Down Expand Up @@ -172,7 +172,7 @@ protected override void OnShown(EventArgs e)
void NotifyWindow_AutoClosing(object sender, FormClosingEventArgs e)
{
this.fadeOutTimer = new Timer();
this.fadeOutTimer.Interval = 50;
this.fadeOutTimer.Interval = 10;
this.fadeOutTimer.Tick += new EventHandler(fadeOutTimer_Tick);
this.fadeOutTimer.Start();
e.Cancel = true; // IMPORTANT!
Expand Down Expand Up @@ -206,7 +206,8 @@ private void titleLabel_LabelHeightChanged(ExpandingLabel.LabelHeightChangedEven
{
if (args.HeightChange != 0)
{
this.textLabel.Top += args.HeightChange;
int fudge = 2;
this.textLabel.Top += (args.HeightChange + fudge);
textLabel_LabelHeightChanged(args);
}
}
Expand All @@ -215,7 +216,9 @@ private void textLabel_LabelHeightChanged(ExpandingLabel.LabelHeightChangedEvent
{
if (args.HeightChange != 0)
{
this.Height += args.HeightChange;
int fudge = 2;
this.textLabel.Height += fudge;
this.Height += (args.HeightChange + fudge);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Growl Extras/Sticky Note/Sticky Note/StickyNoteWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ protected override void OnShown(EventArgs e)
void StickyNoteWindow_AutoClosing(object sender, FormClosingEventArgs e)
{
this.fadeOutTimer = new Timer();
this.fadeOutTimer.Interval = 50;
this.fadeOutTimer.Interval = 10;
this.fadeOutTimer.Tick += new EventHandler(fadeOutTimer_Tick);
this.fadeOutTimer.Start();
e.Cancel = true; // IMPORTANT!
Expand Down
20 changes: 20 additions & 0 deletions Growl/Growl.Connector/CallbackContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,41 @@ namespace Growl.Connector
/// </summary>
public class CallbackContext : CallbackDataBase
{
/// <summary>
/// The callback url
/// </summary>
private string url;

/// <summary>
/// Initializes a new instance of the <see cref="CallbackContext"/> class.
/// </summary>
/// <param name="data">The data.</param>
/// <param name="type">The type.</param>
public CallbackContext(string data, string type) : base(data, type)
{
}

/// <summary>
/// Initializes a new instance of the <see cref="CallbackContext"/> class,
/// specifying a callback url.
/// </summary>
/// <param name="url">The URL.</param>
public CallbackContext(string url)
{
this.url = url;
}

/// <summary>
/// Initializes a new instance of the <see cref="CallbackContext"/> class.
/// </summary>
private CallbackContext()
{
}

/// <summary>
/// Gets the callback URL.
/// </summary>
/// <value>The callback URL.</value>
public string CallbackUrl
{
get
Expand Down
7 changes: 7 additions & 0 deletions Growl/Growl.Connector/CallbackData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ public class CallbackData : CallbackDataBase
/// </summary>
private string notificationID;

/// <summary>
/// Initializes a new instance of the <see cref="CallbackData"/> class.
/// </summary>
/// <param name="data">The data.</param>
/// <param name="type">The type.</param>
/// <param name="result">The result.</param>
/// <param name="notificationID">The notification ID.</param>
public CallbackData(string data, string type, CallbackResult result, string notificationID)
: base(data, type)
{
Expand Down
3 changes: 2 additions & 1 deletion Growl/Growl.Connector/ConnectorBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ protected void Send(MessageBuilder mb, ResponseReceivedEventHandler del, bool wa
{
TcpClient client = new TcpClient();
byte[] bytes = mb.GetBytes();

mb = null;
AsyncCallback callback = new AsyncCallback(ConnectCallback);
state = new ConnectState(client, bytes, del, waitForCallback);
Expand Down Expand Up @@ -326,7 +327,7 @@ private void ReadCallback(IAsyncResult iar)
state.Response += response;

// keep waiting for more data if this wasnt the end of the message
if (!state.Response.EndsWith(EOM))
if (!state.Response.EndsWith(EOM, StringComparison.InvariantCulture))
{
moreData = true;
AsyncCallback callback = new AsyncCallback(ReadCallback);
Expand Down
59 changes: 58 additions & 1 deletion Growl/Growl.Connector/Cryptography.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using System.Security.Cryptography;
using System.Text;

Expand All @@ -22,6 +23,16 @@ public sealed class Cryptography
/// </summary>
private static RandomNumberGenerator rng = RNGCryptoServiceProvider.Create();

/// <summary>
/// A list of all of the supported hash types
/// </summary>
private static Dictionary<string, Cryptography.HashAlgorithmType> hashTypes;

/// <summary>
/// A list of all of the supported encryption algorithms
/// </summary>
private static Dictionary<string, Cryptography.SymmetricAlgorithmType> encryptionTypes;

# endregion member variables & constants

# region constructors
Expand All @@ -32,6 +43,25 @@ public sealed class Cryptography
/// </summary>
private Cryptography() { }


/// <summary>
/// Initializes the <see cref="Cryptography"/> class.
/// </summary>
static Cryptography()
{
hashTypes = new Dictionary<string, Cryptography.HashAlgorithmType>();
foreach (Cryptography.HashAlgorithmType type in Enum.GetValues(typeof(Cryptography.HashAlgorithmType)))
{
hashTypes.Add(DisplayName.Fetch(type), type);
}

encryptionTypes = new Dictionary<string, Cryptography.SymmetricAlgorithmType>();
foreach (Cryptography.SymmetricAlgorithmType type in Enum.GetValues(typeof(Cryptography.SymmetricAlgorithmType)))
{
encryptionTypes.Add(DisplayName.Fetch(type), type);
}
}

# endregion constructors

# region Public Methods
Expand Down Expand Up @@ -351,6 +381,7 @@ public static byte[] Decrypt(byte[] key, byte[] iv, byte[] encryptedBytes, Symme

// decrypt
ICryptoTransform decryptor = algorithm.CreateDecryptor();

byte[] decryptedBytes = decryptor.TransformFinalBlock(encryptedBytes, 0, encryptedBytes.Length);
return decryptedBytes;
}
Expand Down Expand Up @@ -432,6 +463,32 @@ public static byte[] HexUnencode(string hexString)
return bytes;
}

/// <summary>
/// Looks up the hash algorithm by name
/// </summary>
/// <param name="name">The name of the hash type</param>
/// <returns><see cref="Cryptography.HashAlgorithmType"/></returns>
public static Cryptography.HashAlgorithmType GetKeyHashType(string name)
{
if (!String.IsNullOrEmpty(name) && hashTypes.ContainsKey(name))
return hashTypes[name];
else
throw new CryptographicException(String.Format("No matching hash type found for name '{0}'.", name));
}

/// <summary>
/// Looks up the encryption algorithm by name
/// </summary>
/// <param name="name">The name of the encryption algorithm</param>
/// <returns><see cref="Cryptography.SymmetricAlgorithmType"/></returns>
public static Cryptography.SymmetricAlgorithmType GetEncryptionType(string name)
{
if (encryptionTypes.ContainsKey(name))
return encryptionTypes[name];
else
throw new CryptographicException(String.Format("No matching encryption algorithm found for name '{0}'.", name));
}

# endregion Public Methods

# region Private Methods
Expand Down Expand Up @@ -520,7 +577,7 @@ public enum SymmetricAlgorithmType
[DisplayName("DES")]
DES,
/// <summary>
/// TripleDES Encryption (128-bit key, 64-bit IV)
/// TripleDES Encryption (192-bit key, 64-bit IV)
/// </summary>
[DisplayName("3DES")]
TripleDES,
Expand Down
2 changes: 0 additions & 2 deletions Growl/Growl.Connector/Growl.Connector.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,8 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.Security" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Application.cs" />
Expand Down
2 changes: 1 addition & 1 deletion Growl/Growl.Connector/GrowlException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Growl.Connector
/// The base exception type for any exceptions thrown from Growl code.
/// </summary>
[Serializable]
public class GrowlException : ApplicationException
public class GrowlException : Exception
{
/// <summary>
/// The <see cref="ErrorCode"/> of the exception
Expand Down
2 changes: 1 addition & 1 deletion Growl/Growl.Connector/Header.cs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ private void Initialize(string name, string val)
if (name == null && val == null) this.isBlankLine = true;
if (!this.isBlankLine)
{
if (val != null && val.StartsWith(GROWL_RESOURCE_POINTER_PREFIX))
if (val != null && val.StartsWith(GROWL_RESOURCE_POINTER_PREFIX, StringComparison.InvariantCultureIgnoreCase))
{
this.isGrowlResourcePointer = true;
this.growlResourcePointerID = val.Replace(GROWL_RESOURCE_POINTER_PREFIX, "");
Expand Down
Loading

0 comments on commit 8c600ca

Please sign in to comment.