I attempted to hack growlnotify adding a display (
{ "display", no_argument, NULL, 'D' } ) command line argument and changing a couple of lines to add GROWL_DISPLAY_PLUGIN as an entry to the NSDictionary being sent to the main Growl application. The applicationDisplayPlugin item would be parsed from the command line and set the particular display plugin. I tried using "com.Growl.Bezel" and "com.growl.Smoke" and various other identifiers taken from the particular styles header files and using these as the value for the GROWL_DISPLAY_PLUGIN entry in the dictionary but it does not seem to work. I'm not sure having looked at the source why this isn't working but I'm not really familiar with Growl's architecture so I was wondering if any one could give me a few pointers on what I'm doing wrong ?
Thanks a million, braz
Code: Select all
// Register with Growl
NSArray *defaultAndAllNotifications = [[NSArray alloc] initWithObjects:NOTIFICATION_NAME, nil];
NSDictionary *registerInfo = [[NSDictionary alloc] initWithObjectsAndKeys:
applicationName, GROWL_APP_NAME,
defaultAndAllNotifications, GROWL_NOTIFICATIONS_ALL,
defaultAndAllNotifications, GROWL_NOTIFICATIONS_DEFAULT,
icon, GROWL_APP_ICON,
applicationDisplayPlugin, GROWL_DISPLAY_PLUGIN,
nil];
[defaultAndAllNotifications release];
// Notify
NSString *clickContext = [[NSProcessInfo processInfo] globallyUniqueString];
NSNumber *priorityNumber = [[NSNumber alloc] initWithInt:priority];
NSNumber *stickyNumber = [[NSNumber alloc] initWithBool:isSticky];
NSDictionary *notificationInfo = [[NSDictionary alloc] initWithObjectsAndKeys:
NOTIFICATION_NAME, GROWL_NOTIFICATION_NAME,
applicationName, GROWL_APP_NAME,
title, GROWL_NOTIFICATION_TITLE,
desc, GROWL_NOTIFICATION_DESCRIPTION,
priorityNumber, GROWL_NOTIFICATION_PRIORITY,
stickyNumber, GROWL_NOTIFICATION_STICKY,
icon, GROWL_NOTIFICATION_ICON,
clickContext, GROWL_NOTIFICATION_CLICK_CONTEXT,
identifierString, GROWL_NOTIFICATION_IDENTIFIER,
applicationDisplayPlugin, GROWL_DISPLAY_PLUGIN,
nil];
[priorityNumber release];
[stickyNumber release];