summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorsr55 <[email protected]>2012-10-10 20:15:09 +0000
committersr55 <[email protected]>2012-10-10 20:15:09 +0000
commit3bf7a95521abb4d943c978c68f57b30ee197ff43 (patch)
tree7d32c5ffa469d198b2fcf52e3e1dd1395566d5b2 /win
parent1bbc7702f0d57f826ae359dfd519e2c1400f84da (diff)
WinGui: Missed files from previous checkin.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5012 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win')
-rw-r--r--win/CS/HandBrake.ApplicationServices/ASUserSettingConstants.cs10
-rw-r--r--win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj9
-rw-r--r--win/CS/HandBrake.ApplicationServices/Properties/Resources.Designer.cs9
-rw-r--r--win/CS/HandBrake.ApplicationServices/Properties/Resources.resx8
-rw-r--r--win/CS/HandBrake.ApplicationServices/Services/Encode.cs2
-rw-r--r--win/CS/HandBrake.ApplicationServices/Services/LibEncode.cs2
-rw-r--r--win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs11
-rw-r--r--win/CS/HandBrake.ApplicationServices/Utilities/GrowlCommunicator.cs124
8 files changed, 4 insertions, 171 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/ASUserSettingConstants.cs b/win/CS/HandBrake.ApplicationServices/ASUserSettingConstants.cs
index bd6a906ba..102e221b7 100644
--- a/win/CS/HandBrake.ApplicationServices/ASUserSettingConstants.cs
+++ b/win/CS/HandBrake.ApplicationServices/ASUserSettingConstants.cs
@@ -30,16 +30,6 @@ namespace HandBrake.ApplicationServices
public const string WhenCompleteAction = "WhenCompleteAction";
/// <summary>
- /// Growl Encodes
- /// </summary>
- public const string GrowlEncode = "GrowlEncode";
-
- /// <summary>
- /// Growl Queues
- /// </summary>
- public const string GrowlQueue = "GrowlQueue";
-
- /// <summary>
/// Process Priority
/// </summary>
public const string ProcessPriority = "ProcessPriority";
diff --git a/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj b/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj
index fa4fa9eab..7039a22e3 100644
--- a/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj
+++ b/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj
@@ -57,14 +57,6 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\libraries\caliburn\Castle.Windsor.dll</HintPath>
</Reference>
- <Reference Include="Growl.Connector, Version=2.0.0.0, Culture=neutral, PublicKeyToken=980c2339411be384, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\libraries\Growl.Connector.dll</HintPath>
- </Reference>
- <Reference Include="Growl.CoreLibrary, Version=2.0.0.0, Culture=neutral, PublicKeyToken=13e59d82e007b064, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\libraries\Growl.CoreLibrary.dll</HintPath>
- </Reference>
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="System" />
@@ -107,7 +99,6 @@
<Compile Include="Services\ServerService.cs" />
<Compile Include="Utilities\Converters.cs" />
<Compile Include="Utilities\EnumHelper.cs" />
- <Compile Include="Utilities\GrowlCommunicator.cs" />
<Compile Include="Utilities\InteropModelCreator.cs" />
<Compile Include="Utilities\SystemInfo.cs" />
<Compile Include="Utilities\Win32.cs" />
diff --git a/win/CS/HandBrake.ApplicationServices/Properties/Resources.Designer.cs b/win/CS/HandBrake.ApplicationServices/Properties/Resources.Designer.cs
index c1dd66e55..228d3e59a 100644
--- a/win/CS/HandBrake.ApplicationServices/Properties/Resources.Designer.cs
+++ b/win/CS/HandBrake.ApplicationServices/Properties/Resources.Designer.cs
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
-// Runtime Version:4.0.30319.1
+// Runtime Version:4.0.30319.269
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -59,12 +59,5 @@ namespace HandBrake.ApplicationServices.Properties {
resourceCulture = value;
}
}
-
- internal static System.Drawing.Bitmap logo64 {
- get {
- object obj = ResourceManager.GetObject("logo64", resourceCulture);
- return ((System.Drawing.Bitmap)(obj));
- }
- }
}
}
diff --git a/win/CS/HandBrake.ApplicationServices/Properties/Resources.resx b/win/CS/HandBrake.ApplicationServices/Properties/Resources.resx
index 2e1c2842b..29dcb1b3a 100644
--- a/win/CS/HandBrake.ApplicationServices/Properties/Resources.resx
+++ b/win/CS/HandBrake.ApplicationServices/Properties/Resources.resx
@@ -112,13 +112,9 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
- <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
- <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
- <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
- <data name="logo64" type="System.Resources.ResXFileRef, System.Windows.Forms">
- <value>..\Resources\logo64.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
- </data>
</root> \ No newline at end of file
diff --git a/win/CS/HandBrake.ApplicationServices/Services/Encode.cs b/win/CS/HandBrake.ApplicationServices/Services/Encode.cs
index 0b0c23dbf..0c35c8f41 100644
--- a/win/CS/HandBrake.ApplicationServices/Services/Encode.cs
+++ b/win/CS/HandBrake.ApplicationServices/Services/Encode.cs
@@ -68,7 +68,7 @@ namespace HandBrake.ApplicationServices.Services
{
this.userSettingService = userSettingService;
this.EncodeStarted += this.EncodeEncodeStarted;
- GrowlCommunicator.Register();
+
}
#region Properties
diff --git a/win/CS/HandBrake.ApplicationServices/Services/LibEncode.cs b/win/CS/HandBrake.ApplicationServices/Services/LibEncode.cs
index eb0657cba..64d604a34 100644
--- a/win/CS/HandBrake.ApplicationServices/Services/LibEncode.cs
+++ b/win/CS/HandBrake.ApplicationServices/Services/LibEncode.cs
@@ -79,8 +79,6 @@ namespace HandBrake.ApplicationServices.Services
HandBrakeUtils.MessageLogged += this.HandBrakeInstanceMessageLogged;
HandBrakeUtils.ErrorLogged += this.HandBrakeInstanceErrorLogged;
-
- GrowlCommunicator.Register();
}
/// <summary>
diff --git a/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs b/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs
index 29eba5172..39f31a44c 100644
--- a/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs
+++ b/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs
@@ -212,11 +212,6 @@ namespace HandBrake.ApplicationServices.Services
this.QueueManager.ClearCompleted();
}
- // Growl
- if (userSettingService.GetUserSetting<bool>(ASUserSettingConstants.GrowlEncode))
- GrowlCommunicator.Notify("Encode Completed",
- "Put down that cocktail...\nyour Handbrake encode is done.");
-
if (!e.Successful)
{
this.QueueManager.LastProcessedJob.Status = QueueItemStatus.Error;
@@ -295,12 +290,6 @@ namespace HandBrake.ApplicationServices.Services
/// </summary>
private void Finish()
{
- // Growl
- if (userSettingService.GetUserSetting<bool>(ASUserSettingConstants.GrowlQueue))
- {
- GrowlCommunicator.Notify("Queue Completed", "Put down that cocktail...\nyour Handbrake queue is done.");
- }
-
// Do something whent he encode ends.
switch (userSettingService.GetUserSetting<string>(ASUserSettingConstants.WhenCompleteAction))
{
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/GrowlCommunicator.cs b/win/CS/HandBrake.ApplicationServices/Utilities/GrowlCommunicator.cs
deleted file mode 100644
index d49924ed0..000000000
--- a/win/CS/HandBrake.ApplicationServices/Utilities/GrowlCommunicator.cs
+++ /dev/null
@@ -1,124 +0,0 @@
-// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="GrowlCommunicator.cs" company="HandBrake Project (http://handbrake.fr)">
-// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
-// </copyright>
-// <summary>
-// Provides all functionality for communicating with Growl for Windows.
-// </summary>
-// --------------------------------------------------------------------------------------------------------------------
-
-namespace HandBrake.ApplicationServices.Utilities
-{
- using System;
-
- using Growl.Connector;
-
- /// <summary>
- /// Provides all functionality for communicating with Growl for Windows.
- /// </summary>
- /// <remarks>
- /// This class is implemented as a static class because:
- /// 1. It allows nearly all of the Growl-related code to be in one place
- /// 2. It prevents the main form, queue handler, and any other part of Handbrake from having to declare
- /// or track any new instance variables
- /// </remarks>
- public static class GrowlCommunicator
- {
- /// <summary>
- /// The <see cref="GrowlConnector"/> that actually talks to Growl
- /// </summary>
- private static GrowlConnector growl;
-
- /// <summary>
- /// The Handbrake application instance that is registered with Growl
- /// </summary>
- private static Application application;
-
- /// <summary>
- /// Notification shown upon completion of encoding
- /// </summary>
- private static NotificationType encodeOrQueueCompleted = new NotificationType("EncodeOrQueue", "HandBrake Status");
-
- /// <summary>
- /// Checks to see if Growl is currently running on the local machine.
- /// </summary>
- /// <returns>
- /// <c>true</c> if Growl is running;
- /// <c>false</c> otherwise
- /// </returns>
- public static bool IsRunning()
- {
- Initialize();
-
- return GrowlConnector.IsGrowlRunningLocally();
- }
-
- /// <summary>
- /// Registers Handbrake with the local Growl instance
- /// </summary>
- /// <remarks>
- /// This should usually be called at application start-up
- /// </remarks>
- public static void Register()
- {
- Initialize();
- growl.Register(application, new[] {encodeOrQueueCompleted});
- }
-
- /// <summary>
- /// Sends a notification to Growl. (Since Handbrake currently only supports one type of notification with
- /// static text, this is a shortcut method).
- /// </summary>
- /// <param name="title">
- /// The title.
- /// </param>
- /// <param name="text">
- /// The text to display.
- /// </param>
- public static void Notify(string title, string text)
- {
- Notification notification = new Notification(application.Name, encodeOrQueueCompleted.Name, String.Empty,
- title, text);
- growl.Notify(notification);
- }
-
- /// <summary>
- /// Sends a notification to Growl. (This is the more generic version that could be used in the future if
- /// more notification types are implemented)
- /// </summary>
- /// <param name="notificationType">The <see cref="NotificationType">type</see> of notification to send</param>
- /// <param name="title">The notification title</param>
- /// <param name="text">The notification text</param>
- /// <param name="imageUrl">The notification image as a url</param>
- public static void Notify(NotificationType notificationType, string title, string text, string imageUrl)
- {
- Notification notification = new Notification(application.Name, notificationType.Name, String.Empty, title,
- text)
- {
- Icon = imageUrl
- };
-
- growl.Notify(notification);
- }
-
- /// <summary>
- /// Initializes the GrowlCommunicator
- /// </summary>
- private static void Initialize()
- {
- if (growl == null)
- {
- growl = new GrowlConnector
- {
- EncryptionAlgorithm = Cryptography.SymmetricAlgorithmType.PlainText,
- KeyHashAlgorithm = Cryptography.HashAlgorithmType.SHA1
- };
-
- application = new Application("Handbrake")
- {
- Icon = Properties.Resources.logo64
- };
- }
- }
- }
-} \ No newline at end of file