+/* GrowlCommunicator.cs $\r
+ \r
+ This file is part of the HandBrake source code.\r
+ Homepage: <http://handbrake.fr>.\r
+ It may be used under the terms of the GNU General Public License. */\r
+\r
using System;\r
using System.Collections.Generic;\r
using System.Text;\r
/// <summary>\r
/// Notification shown upon completion of encoding\r
/// </summary>\r
- public static NotificationType EncodingComplete;\r
-\r
+ public 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
public static void Register()\r
{\r
Initialize();\r
-\r
- growl.Register(application, new NotificationType[] { EncodingComplete });\r
+ growl.Register(application, new NotificationType[] { 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
- public static void Notify()\r
+ public static void Notify(string title, string text)\r
{\r
- string title = "Encoding Complete";\r
- string text = "Put down that cocktail...\nyour Handbrake encode is done.";\r
- Notification notification = new Notification(application.Name, EncodingComplete.Name, String.Empty, title, text);\r
-\r
+ Notification notification = new Notification(application.Name, EncodeOrQueueCompleted.Name, String.Empty, title, text);\r
growl.Notify(notification);\r
}\r
\r
\r
application = new Application("Handbrake");\r
application.Icon = global::Handbrake.Properties.Resources.logo64;\r
-\r
- EncodingComplete = new NotificationType("Encoding Complete");\r
}\r
}\r
}\r