]> granicus.if.org Git - handbrake/commitdiff
WinGui: Remove support for Growl. This library has been causing numerous issues and...
authorsr55 <sr55.hb@outlook.com>
Sat, 7 Dec 2013 20:08:59 +0000 (20:08 +0000)
committersr55 <sr55.hb@outlook.com>
Sat, 7 Dec 2013 20:08:59 +0000 (20:08 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5923 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/CS/HandBrakeWPF/HandBrakeWPF.csproj
win/CS/HandBrakeWPF/Helpers/GrowlCommunicator.cs [deleted file]
win/CS/HandBrakeWPF/Services/NotificationService.cs
win/CS/HandBrakeWPF/Views/OptionsView.xaml
win/CS/libraries/Growl license.txt [deleted file]
win/CS/libraries/Growl.Connector.dll [deleted file]
win/CS/libraries/Growl.CoreLibrary.dll [deleted file]

index b3c73822bd2ea3fb09fc8b0a0fbc3ae99e1a65d2..6fd1bf6f913de2cbb7e1502398ed0c272f4ceccf 100644 (file)
     <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
diff --git a/win/CS/HandBrakeWPF/Helpers/GrowlCommunicator.cs b/win/CS/HandBrakeWPF/Helpers/GrowlCommunicator.cs
deleted file mode 100644 (file)
index cd711b5..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-// --------------------------------------------------------------------------------------------------------------------\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
index 234130b7292da343050437b0258dfb8a9e61651b..306a2f5d23afdb4f73e93f48906e54d9bbeab892 100644 (file)
@@ -11,7 +11,6 @@ namespace HandBrakeWPF.Services
 {\r
     using HandBrake.ApplicationServices.Services.Interfaces;\r
 \r
-    using HandBrakeWPF.Helpers;\r
     using HandBrakeWPF.Services.Interfaces;\r
 \r
     /// <summary>\r
@@ -39,9 +38,8 @@ namespace HandBrakeWPF.Services
         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
@@ -55,10 +53,9 @@ namespace HandBrakeWPF.Services
         /// </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
@@ -73,11 +70,9 @@ namespace HandBrakeWPF.Services
         /// </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
index 420615b46687bf41eb0ffc4fdfebb76ef950f9af..87bdf42c4cad9b5193dd18826d051a3b9dfa82db 100644 (file)
                                 <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
diff --git a/win/CS/libraries/Growl license.txt b/win/CS/libraries/Growl license.txt
deleted file mode 100644 (file)
index 3978164..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-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
diff --git a/win/CS/libraries/Growl.Connector.dll b/win/CS/libraries/Growl.Connector.dll
deleted file mode 100644 (file)
index 01c0c59..0000000
Binary files a/win/CS/libraries/Growl.Connector.dll and /dev/null differ
diff --git a/win/CS/libraries/Growl.CoreLibrary.dll b/win/CS/libraries/Growl.CoreLibrary.dll
deleted file mode 100644 (file)
index ca1545c..0000000
Binary files a/win/CS/libraries/Growl.CoreLibrary.dll and /dev/null differ