<Reference Include="GongSolutions.Wpf.DragDrop">\r
<HintPath>..\libraries\WPFDragDrop\GongSolutions.Wpf.DragDrop.dll</HintPath>\r
</Reference>\r
- <Reference Include="Growl.Connector, Version=2.0.0.0, Culture=neutral, PublicKeyToken=980c2339411be384, processorArchitecture=MSIL">\r
- <SpecificVersion>False</SpecificVersion>\r
- <HintPath>..\libraries\Growl.Connector.dll</HintPath>\r
- </Reference>\r
- <Reference Include="Growl.CoreLibrary, Version=2.0.0.0, Culture=neutral, PublicKeyToken=13e59d82e007b064, processorArchitecture=MSIL">\r
- <SpecificVersion>False</SpecificVersion>\r
- <HintPath>..\libraries\Growl.CoreLibrary.dll</HintPath>\r
- </Reference>\r
<Reference Include="LumenWorks.Framework.IO">\r
<HintPath>..\libraries\CsvReader\LumenWorks.Framework.IO.dll</HintPath>\r
</Reference>\r
<Compile Include="Converters\Video\VideoEncoderConverter.cs" />\r
<Compile Include="Converters\Video\EncoderOptionsTooltipConverter.cs" />\r
<Compile Include="Helpers\GrayscaleImage.cs" />\r
- <Compile Include="Helpers\GrowlCommunicator.cs" />\r
<Compile Include="Helpers\AppStyleHelper.cs" />\r
<Compile Include="Helpers\PictureSize.cs" />\r
<Compile Include="Model\OptionsTab.cs" />\r
+++ /dev/null
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="GrowlCommunicator.cs" company="HandBrake Project (http://handbrake.fr)">\r
-// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-// Provides all functionality for communicating with Growl for Windows.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrakeWPF.Helpers\r
-{\r
- using System;\r
-\r
- using Growl.Connector;\r
-\r
- /// <summary>\r
- /// Provides all functionality for communicating with Growl for Windows.\r
- /// </summary>\r
- /// <remarks>\r
- /// This class is implemented as a static class because:\r
- /// 1. It allows nearly all of the Growl-related code to be in one place\r
- /// 2. It prevents the main form, queue handler, and any other part of Handbrake from having to declare\r
- /// or track any new instance variables\r
- /// </remarks>\r
- public static class GrowlCommunicator\r
- {\r
- /// <summary>\r
- /// The <see cref="GrowlConnector"/> that actually talks to Growl\r
- /// </summary>\r
- private static GrowlConnector growl;\r
-\r
- /// <summary>\r
- /// The Handbrake application instance that is registered with Growl\r
- /// </summary>\r
- private static Application application;\r
-\r
- /// <summary>\r
- /// Notification shown upon completion of encoding\r
- /// </summary>\r
- private static NotificationType encodeOrQueueCompleted = new NotificationType("EncodeOrQueue", "HandBrake Status");\r
-\r
- /// <summary>\r
- /// Checks to see if Growl is currently running on the local machine.\r
- /// </summary>\r
- /// <returns>\r
- /// <c>true</c> if Growl is running;\r
- /// <c>false</c> otherwise\r
- /// </returns>\r
- public static bool IsRunning()\r
- {\r
- Initialize();\r
-\r
- return GrowlConnector.IsGrowlRunningLocally();\r
- }\r
-\r
- /// <summary>\r
- /// Registers Handbrake with the local Growl instance\r
- /// </summary>\r
- /// <remarks>\r
- /// This should usually be called at application start-up\r
- /// </remarks>\r
- public static void Register()\r
- {\r
- Initialize();\r
- growl.Register(application, new[] {encodeOrQueueCompleted});\r
- }\r
-\r
- /// <summary>\r
- /// Sends a notification to Growl. (Since Handbrake currently only supports one type of notification with\r
- /// static text, this is a shortcut method).\r
- /// </summary>\r
- /// <param name="title">\r
- /// The title.\r
- /// </param>\r
- /// <param name="text">\r
- /// The text to display.\r
- /// </param>\r
- public static void Notify(string title, string text)\r
- {\r
- Notification notification = new Notification(application.Name, encodeOrQueueCompleted.Name, String.Empty, \r
- title, text);\r
- growl.Notify(notification);\r
- }\r
-\r
- /// <summary>\r
- /// Sends a notification to Growl. (This is the more generic version that could be used in the future if \r
- /// more notification types are implemented)\r
- /// </summary>\r
- /// <param name="notificationType">The <see cref="NotificationType">type</see> of notification to send</param>\r
- /// <param name="title">The notification title</param>\r
- /// <param name="text">The notification text</param>\r
- /// <param name="imageUrl">The notification image as a url</param>\r
- public static void Notify(NotificationType notificationType, string title, string text, string imageUrl)\r
- {\r
- Notification notification = new Notification(application.Name, notificationType.Name, String.Empty, title, \r
- text)\r
- {\r
- Icon = imageUrl\r
- };\r
-\r
- growl.Notify(notification);\r
- }\r
-\r
- /// <summary>\r
- /// Initializes the GrowlCommunicator\r
- /// </summary>\r
- private static void Initialize()\r
- {\r
- if (growl == null)\r
- {\r
- growl = new GrowlConnector\r
- {\r
- EncryptionAlgorithm = Cryptography.SymmetricAlgorithmType.PlainText,\r
- KeyHashAlgorithm = Cryptography.HashAlgorithmType.SHA1\r
- };\r
-\r
- application = new Application("Handbrake")\r
- {\r
- Icon = Properties.Resources.logo64\r
- };\r
- }\r
- }\r
- }\r
-}
\ No newline at end of file
{\r
using HandBrake.ApplicationServices.Services.Interfaces;\r
\r
- using HandBrakeWPF.Helpers;\r
using HandBrakeWPF.Services.Interfaces;\r
\r
/// <summary>\r
public NotificationService(IEncodeServiceWrapper encodeService, IQueueProcessor queueProcessor, IUserSettingService userSettingService)\r
{\r
this.userSettingService = userSettingService;\r
- encodeService.EncodeCompleted += this.EncodeServiceEncodeCompleted;\r
- queueProcessor.QueueCompleted += this.QueueProcessorQueueCompleted;\r
- GrowlCommunicator.Register();\r
+ // encodeService.EncodeCompleted += this.EncodeServiceEncodeCompleted;\r
+ // queueProcessor.QueueCompleted += this.QueueProcessorQueueCompleted;\r
}\r
\r
/// <summary>\r
/// </param>\r
private void QueueProcessorQueueCompleted(object sender, System.EventArgs e)\r
{\r
- // Growl\r
if (userSettingService.GetUserSetting<bool>(UserSettingConstants.GrowlQueue))\r
{\r
- GrowlCommunicator.Notify("Queue Completed", "Put down that cocktail...\nyour Handbrake queue is done.");\r
+ // GrowlCommunicator.Notify("Queue Completed", "Put down that cocktail...\nyour Handbrake queue is done.");\r
}\r
}\r
\r
/// </param>\r
private void EncodeServiceEncodeCompleted(object sender, HandBrake.ApplicationServices.EventArgs.EncodeCompletedEventArgs e)\r
{\r
- // Growl\r
if (userSettingService.GetUserSetting<bool>(UserSettingConstants.GrowlEncode))\r
{\r
- GrowlCommunicator.Notify(\r
- "Encode Completed", "Put down that cocktail...\nyour Handbrake encode is done.");\r
+ // GrowlCommunicator.Notify("Encode Completed", "Put down that cocktail...\nyour Handbrake encode is done.");\r
}\r
}\r
}\r
<CheckBox Content="Reset to 'Do nothing' when the app is re-launched." VerticalAlignment="Center" IsChecked="{Binding ResetWhenDoneAction}" />\r
</StackPanel>\r
\r
- <StackPanel Orientation="Horizontal" Margin="0,5,0,0">\r
+ <StackPanel Orientation="Horizontal" Margin="0,5,0,0" Visibility="Collapsed">\r
<CheckBox Content="Growl after Queue Completes" IsChecked="{Binding GrowlAfterEncode}" Margin="0,0,5,0"/>\r
<CheckBox Content="Growl after Encode Completes" IsChecked="{Binding GrowlAfterQueue}" />\r
</StackPanel>\r
+++ /dev/null
-Growl.NET GNTP Connector Library\r
------------------------------------------------\r
-Copyright (c) 2008 - Growl for Windows\r
-All rights reserved\r
-\r
-Redistribution and use in source and binary forms, with or without modification,\r
-are permitted provided that the following conditions are met:\r
-\r
-1. Redistributions of source code must retain the above copyright\r
- notice, this list of conditions and the following disclaimer.\r
-2. Redistributions in binary form must reproduce the above copyright\r
- notice, this list of conditions and the following disclaimer in the\r
- documentation and/or other materials provided with the distribution.\r
-\r
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY \r
-EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES \r
-OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT \r
-SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, \r
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED\r
-TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR \r
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN \r
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN \r
-ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH \r
-DAMAGE.\r
-\r