Permalink
Browse files

changes to registerApplication function to support additional options

  • Loading branch information...
1 parent 0de0620 commit 8d940aee499c8ddbf31fb179a53728c27c3671b0 Brandon Satrom committed Aug 22, 2011
Showing with 16 additions and 6 deletions.
  1. +6 −1 History.md
  2. +9 −4 lib/wingrr.js
  3. +1 −1 package.json
View
@@ -1,6 +1,11 @@
### wingrr Revisions
-0.0.9 / 2011-08-22
+0.9.1 / 2011-08-22
+==================
+
+ * Fixes to registerApplication function
+
+0.9.0 / 2011-08-22
==================
* Renamed growl.js to winggr.js
View
@@ -12,7 +12,7 @@ var exec = require('child_process').exec
* version, default title, debug, app name and type properties.
*/
-exports.version = '0.9'
+exports.version = '0.9.1'
exports.title = "wingrr notify";
exports.name = null;
exports.type = "Default";
@@ -34,9 +34,14 @@ exports.binVersion = function(fn) {
/**
* Register a new application with growlnotify, with optional icon image
+ * Options:
*
+ * - message Notification to show on successful registration
+ * - image Url or path to an image file (relative to growlnotify if path)
+ * - type Default notification type to register
+ * - debug Emit the growlnotify message to the console (default is false)
* @param {string} name - Appliation Name
- * @param {string} img - Url/Path to Image (relative to location of growlnotify, if path)
+ * @param {object} options
* @api public
*/
exports.registerApplication = function(name, options) {
@@ -91,9 +96,9 @@ exports.registerApplication = function(name, options) {
if (err) return fn(err);
if (options.image) args.push('/i:', '"' + options.image + '"');
if (options.sticky) args.push('/s:', options.sticky);
- if (exports.name || options.name) args.push('/a:', '"' + (exports.name || options.name) + '"');
+ if (options.name) args.push('/a:', '"' + (options.name) + '"');
if (options.title) args.push('/t:', '"' + options.title + '"');
- args.push('/r:', '"' + (options.type || exports.type) + '"');
+ if (options.type) args.push('/r:', '"' + (options.type) + '"');
if (options.callback) args.push('/cu:', '"' + options.callback + '"');
var notify = args.join(' ').replace(/: /g, ':');
View
@@ -1,5 +1,5 @@
{ "name": "wingrr",
- "version": "0.9.0",
+ "version": "0.9.1",
"description": "Node Growl notifications for windows",
"author": "Brandon Satrom <bsatrom@gmail.com>",
"main": "./lib/wingrr.js"

0 comments on commit 8d940ae

Please sign in to comment.