diff options
author | sr55 <[email protected]> | 2013-12-07 20:08:59 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2013-12-07 20:08:59 +0000 |
commit | c687245b277c727ca486f20bdf804479c4f85b81 (patch) | |
tree | e9e4b92662bed0f3e1dbc6b01d10751aa76d04e5 /win | |
parent | 87737b6fe394bfb86bd277ccbe314bf11cf14374 (diff) |
WinGui: Remove support for Growl. This library has been causing numerous issues and appears to no longer be in development. Will look into a replacement at a later date.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5923 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win')
-rw-r--r-- | win/CS/HandBrakeWPF/HandBrakeWPF.csproj | 9 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Helpers/GrowlCommunicator.cs | 124 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Services/NotificationService.cs | 13 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/OptionsView.xaml | 2 | ||||
-rw-r--r-- | win/CS/libraries/Growl license.txt | 25 | ||||
-rw-r--r-- | win/CS/libraries/Growl.Connector.dll | bin | 61440 -> 0 bytes | |||
-rw-r--r-- | win/CS/libraries/Growl.CoreLibrary.dll | bin | 28672 -> 0 bytes |
7 files changed, 5 insertions, 168 deletions
diff --git a/win/CS/HandBrakeWPF/HandBrakeWPF.csproj b/win/CS/HandBrakeWPF/HandBrakeWPF.csproj index b3c73822b..6fd1bf6f9 100644 --- a/win/CS/HandBrakeWPF/HandBrakeWPF.csproj +++ b/win/CS/HandBrakeWPF/HandBrakeWPF.csproj @@ -88,14 +88,6 @@ <Reference Include="GongSolutions.Wpf.DragDrop">
<HintPath>..\libraries\WPFDragDrop\GongSolutions.Wpf.DragDrop.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="LumenWorks.Framework.IO">
<HintPath>..\libraries\CsvReader\LumenWorks.Framework.IO.dll</HintPath>
</Reference>
@@ -180,7 +172,6 @@ <Compile Include="Converters\Video\VideoEncoderConverter.cs" />
<Compile Include="Converters\Video\EncoderOptionsTooltipConverter.cs" />
<Compile Include="Helpers\GrayscaleImage.cs" />
- <Compile Include="Helpers\GrowlCommunicator.cs" />
<Compile Include="Helpers\AppStyleHelper.cs" />
<Compile Include="Helpers\PictureSize.cs" />
<Compile Include="Model\OptionsTab.cs" />
diff --git a/win/CS/HandBrakeWPF/Helpers/GrowlCommunicator.cs b/win/CS/HandBrakeWPF/Helpers/GrowlCommunicator.cs deleted file mode 100644 index cd711b583..000000000 --- a/win/CS/HandBrakeWPF/Helpers/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 HandBrakeWPF.Helpers
-{
- 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 diff --git a/win/CS/HandBrakeWPF/Services/NotificationService.cs b/win/CS/HandBrakeWPF/Services/NotificationService.cs index 234130b72..306a2f5d2 100644 --- a/win/CS/HandBrakeWPF/Services/NotificationService.cs +++ b/win/CS/HandBrakeWPF/Services/NotificationService.cs @@ -11,7 +11,6 @@ namespace HandBrakeWPF.Services {
using HandBrake.ApplicationServices.Services.Interfaces;
- using HandBrakeWPF.Helpers;
using HandBrakeWPF.Services.Interfaces;
/// <summary>
@@ -39,9 +38,8 @@ namespace HandBrakeWPF.Services public NotificationService(IEncodeServiceWrapper encodeService, IQueueProcessor queueProcessor, IUserSettingService userSettingService)
{
this.userSettingService = userSettingService;
- encodeService.EncodeCompleted += this.EncodeServiceEncodeCompleted;
- queueProcessor.QueueCompleted += this.QueueProcessorQueueCompleted;
- GrowlCommunicator.Register();
+ // encodeService.EncodeCompleted += this.EncodeServiceEncodeCompleted;
+ // queueProcessor.QueueCompleted += this.QueueProcessorQueueCompleted;
}
/// <summary>
@@ -55,10 +53,9 @@ namespace HandBrakeWPF.Services /// </param>
private void QueueProcessorQueueCompleted(object sender, System.EventArgs e)
{
- // Growl
if (userSettingService.GetUserSetting<bool>(UserSettingConstants.GrowlQueue))
{
- GrowlCommunicator.Notify("Queue Completed", "Put down that cocktail...\nyour Handbrake queue is done.");
+ // GrowlCommunicator.Notify("Queue Completed", "Put down that cocktail...\nyour Handbrake queue is done.");
}
}
@@ -73,11 +70,9 @@ namespace HandBrakeWPF.Services /// </param>
private void EncodeServiceEncodeCompleted(object sender, HandBrake.ApplicationServices.EventArgs.EncodeCompletedEventArgs e)
{
- // Growl
if (userSettingService.GetUserSetting<bool>(UserSettingConstants.GrowlEncode))
{
- GrowlCommunicator.Notify(
- "Encode Completed", "Put down that cocktail...\nyour Handbrake encode is done.");
+ // GrowlCommunicator.Notify("Encode Completed", "Put down that cocktail...\nyour Handbrake encode is done.");
}
}
}
diff --git a/win/CS/HandBrakeWPF/Views/OptionsView.xaml b/win/CS/HandBrakeWPF/Views/OptionsView.xaml index 420615b46..87bdf42c4 100644 --- a/win/CS/HandBrakeWPF/Views/OptionsView.xaml +++ b/win/CS/HandBrakeWPF/Views/OptionsView.xaml @@ -109,7 +109,7 @@ <CheckBox Content="Reset to 'Do nothing' when the app is re-launched." VerticalAlignment="Center" IsChecked="{Binding ResetWhenDoneAction}" />
</StackPanel>
- <StackPanel Orientation="Horizontal" Margin="0,5,0,0">
+ <StackPanel Orientation="Horizontal" Margin="0,5,0,0" Visibility="Collapsed">
<CheckBox Content="Growl after Queue Completes" IsChecked="{Binding GrowlAfterEncode}" Margin="0,0,5,0"/>
<CheckBox Content="Growl after Encode Completes" IsChecked="{Binding GrowlAfterQueue}" />
</StackPanel>
diff --git a/win/CS/libraries/Growl license.txt b/win/CS/libraries/Growl license.txt deleted file mode 100644 index 397816435..000000000 --- a/win/CS/libraries/Growl license.txt +++ /dev/null @@ -1,25 +0,0 @@ -Growl.NET GNTP Connector Library
------------------------------------------------
-Copyright (c) 2008 - Growl for Windows
-All rights reserved
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
-EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
-SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
-TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGE.
-
diff --git a/win/CS/libraries/Growl.Connector.dll b/win/CS/libraries/Growl.Connector.dll Binary files differdeleted file mode 100644 index 01c0c59f6..000000000 --- a/win/CS/libraries/Growl.Connector.dll +++ /dev/null diff --git a/win/CS/libraries/Growl.CoreLibrary.dll b/win/CS/libraries/Growl.CoreLibrary.dll Binary files differdeleted file mode 100644 index ca1545cff..000000000 --- a/win/CS/libraries/Growl.CoreLibrary.dll +++ /dev/null |