Bug 518615 - Upgrade Growl.framework to v1.2+fix for Growl issue 26 to work around Growl registration stealing focus from Camino on 10.6. r/sr=smorgan

git-svn-id: svn://10.0.0.236/trunk@258620 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
alqahira%ardisson.org 2009-10-07 02:13:23 +00:00
parent 7163dbc64c
commit c854e91446
29 changed files with 1825 additions and 1630 deletions

View File

@ -2951,7 +2951,7 @@
DEE9EBA30AF5C379002BC511 /* SessionManager.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = SessionManager.h; path = src/application/SessionManager.h; sourceTree = "<group>"; };
DEE9EBA60AF5C390002BC511 /* SessionManager.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; name = SessionManager.mm; path = src/application/SessionManager.mm; sourceTree = SOURCE_ROOT; };
DEFAA2850F24192200BD51C1 /* Growl.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Growl.xcodeproj; path = growl/Growl.xcodeproj; sourceTree = SOURCE_ROOT; };
DEFAA3430F241C1600BD51C1 /* Growl.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; name = Growl.framework; path = "growl/build/$(CONFIGURATION)/Growl.framework"; sourceTree = "<group>"; };
DEFAA3430F241C1600BD51C1 /* Growl.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; name = Growl.framework; path = "growl/build/Release/Growl.framework"; sourceTree = "<group>"; };
DEFD234F0D021C3A006899B9 /* dom_loadsave.xpt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = file; name = dom_loadsave.xpt; path = ../dist/bin/components/dom_loadsave.xpt; sourceTree = SOURCE_ROOT; };
DEFD23520D021C48006899B9 /* dom_storage.xpt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = file; name = dom_storage.xpt; path = ../dist/bin/components/dom_storage.xpt; sourceTree = SOURCE_ROOT; };
DEFD23550D021C63006899B9 /* content_xmldoc.xpt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = file; name = content_xmldoc.xpt; path = ../dist/bin/components/content_xmldoc.xpt; sourceTree = SOURCE_ROOT; };

View File

@ -176,7 +176,7 @@ CAMINO_SYMBOL_SOURCE_FILES = \
$(XCODE_PRODUCT_DIR)/*.dSYM/Contents/Resources/DWARF/* \
google-breakpad/src/client/mac/build/Release/Breakpad.framework.dSYM/Contents/Resources/DWARF/Breakpad \
google-breakpad/src/client/mac/build/Release/breakpadUtilities.dylib.dSYM/Contents/Resources/DWARF/breakpadUtilities.dylib \
growl/build/Deployment/Growl.framework.dSYM/Contents/Resources/DWARF/Growl \
growl/build/Release/Growl.framework.dSYM/Contents/Resources/DWARF/Growl \
sparkle/build/Release/Sparkle.framework.dSYM/Contents/Resources/DWARF/Sparkle \
$(NULL)

View File

@ -15,7 +15,7 @@ GCC_PREPROCESSOR_DEFINITIONS = OSTYPE=Darwin1.4 OSARCH=Darwin MOZILLA_INTERNAL_A
OTHER_LDFLAGS = -lpthread -lm -Wl,-executable_path,build/$(CONFIGURATION)/$(WRAPPER_NAME)/Contents/MacOS
LIBRARY_SEARCH_PATHS = ../dist/bin ../dist/lib
HEADER_SEARCH_PATHS = ../dist/include ../dist/include/appcomps ../dist/include/camino ../dist/include/caps ../dist/include/chardet ../dist/include/chrome ../dist/include/commandhandler ../dist/include/composer ../dist/include/content ../dist/include/cookie ../dist/include/docshell ../dist/include/dom ../dist/include/downloads ../dist/include/editor ../dist/include/embed_base ../dist/include/exthandler ../dist/include/find ../dist/include/gfx ../dist/include/helperAppDlg ../dist/include/history ../dist/include/htmlparser ../dist/include/intl ../dist/include/js ../dist/include/layout ../dist/include/locale ../dist/include/mimetype ../dist/include/mork ../dist/include/necko ../dist/include/nkcache ../dist/include/nspr ../dist/include/pipboot ../dist/include/pipnss ../dist/include/pref ../dist/include/profdirserviceprovider ../dist/include/shistory ../dist/include/spellchecker ../dist/include/string ../dist/include/thebes ../dist/include/txtsvc ../dist/include/uconv ../dist/include/unicharutil ../dist/include/uriloader ../dist/include/url-classifier ../dist/include/view ../dist/include/webbrowserpersist ../dist/include/webbrwsr ../dist/include/webshell ../dist/include/widget ../dist/include/windowwatcher ../dist/include/xmlextras ../dist/include/xpcom ../dist/include/xpconnect ../dist/include/xultmpl ../dist/public/nss $(SYSTEM_DEVELOPER_DIR)/Headers/FlatCarbon
FRAMEWORK_SEARCH_PATHS = sparkle/build/Release growl/build/$(CONFIGURATION) google-breakpad/src/client/mac/build/Release
FRAMEWORK_SEARCH_PATHS = sparkle/build/Release growl/build/Release google-breakpad/src/client/mac/build/Release
// Warning settings
GCC_TREAT_WARNINGS_AS_ERRORS = YES

View File

@ -85,10 +85,10 @@ STRING_TYPE createStringWithStringAndCharacterAndString(STRING_TYPE str0, UniCha
CFStringRef cfstr1 = (CFStringRef)str1;
CFIndex len0 = (cfstr0 ? CFStringGetLength(cfstr0) : 0);
CFIndex len1 = (cfstr1 ? CFStringGetLength(cfstr1) : 0);
unsigned length = (len0 + (ch != 0xffff) + len1);
size_t length = (len0 + (ch != 0xffff) + len1);
UniChar *buf = malloc(sizeof(UniChar) * length);
unsigned i = 0U;
size_t i = 0U;
if (cfstr0) {
CFStringGetCharacters(cfstr0, CFRangeMake(0, len0), buf);
@ -222,8 +222,8 @@ STRING_TYPE createStringWithAddressData(DATA_TYPE aAddressData) {
STRING_TYPE createHostNameForAddressData(DATA_TYPE aAddressData) {
char hostname[NI_MAXHOST];
struct sockaddr *socketAddress = (struct sockaddr *)CFDataGetBytePtr(aAddressData);
if (getnameinfo(socketAddress, CFDataGetLength(aAddressData),
hostname, sizeof(hostname),
if (getnameinfo(socketAddress, (socklen_t)CFDataGetLength(aAddressData),
hostname, (socklen_t)sizeof(hostname),
/*serv*/ NULL, /*servlen*/ 0,
NI_NAMEREQD))
return NULL;
@ -345,9 +345,11 @@ URL_TYPE createURLByMakingDirectoryAtURLWithName(URL_TYPE parent, STRING_TYPE na
NSLog(CFSTR("in createURLByMakingDirectoryAtURLWithName in CFGrowlAdditions: could not create directory '%@' in parent directory at %@: FSCreateDirectoryUnicode returned %li (please tell the Growl developers)"), name, parent, (long)err);
}
CFRelease(parent);
} //if (name)
CFRelease(name);
if(parent)
CFRelease(parent);
if(name)
CFRelease(name);
} //if (parent)
end:
@ -524,7 +526,7 @@ static OSStatus GrowlCopyObjectSync(const FSRef *fileRef, const FSRef *destRef,
struct FSForkIOParam forkPB = {
.ref = fileRef,
.forkIterator = {
.initialize = 0L
.initialize = 0
},
.outForkName = &forkName,
};

View File

@ -102,11 +102,10 @@ URL_TYPE createFileURLWithDockDescription(DICTIONARY_TYPE dict) {
if (!url) {
if (path) {
CFNumberRef pathStyleNum = CFDictionaryGetValue(dict, _CFURLStringTypeKey);
CFURLPathStyle pathStyle;
CFURLPathStyle pathStyle = kCFURLPOSIXPathStyle;
if (pathStyleNum)
CFNumberGetValue(pathStyleNum, kCFNumberIntType, &pathStyle);
else
pathStyleNum = kCFURLPOSIXPathStyle;
char *filename = createFileSystemRepresentationOfString(path);
int fd = open(filename, O_RDONLY, 0);

View File

@ -29,6 +29,48 @@
* GrowlDefines.h.
*/
/*!
* @defined NSInteger
* @abstract Typedef to int so Growl will compile on pre-10.5 SDKs.
*/
#ifndef NSINTEGER_DEFINED
typedef int NSInteger;
typedef unsigned int NSUInteger;
#define NSINTEGER_DEFINED
#endif
/*!
* @defined CGFloat
* @abstract Typedef to float so Growl will compile on pre-10.5 SDKs.
*/
#ifndef CGFLOAT_DEFINED
typedef float CGFloat;
#define CGFLOAT_IS_DOUBLE 0
#define CGFLOAT_DEFINED
#endif
/*!
* @defined GrowlCGFloatCeiling()
* @abstract Macro for the ceil() function that uses a different precision depending on the CPU architecture.
*/
/*!
* @defined GrowlCGFloatAbsoluteValue()
* @abstract Macro for the fabs() function that uses a different precision depending on the CPU architecture.
*/
/*!
* @defined GrowlCGFloatFloor()
* @abstract Macro for the floor() function that uses a different precision depending on the CPU architecture.
*/
#if CGFLOAT_IS_DOUBLE
#define GrowlCGFloatCeiling(x) ceil(x)
#define GrowlCGFloatAbsoluteValue(x) fabs(x)
#define GrowlCGFloatFloor(x) floor(x)
#else
#define GrowlCGFloatCeiling(x) ceilf(x)
#define GrowlCGFloatAbsoluteValue(x) fabsf(x)
#define GrowlCGFloatFloor(x) floorf(x)
#endif
/*! @defined GROWL_TCP_PORT
* @abstract The TCP listen port for Growl notification servers.
*/
@ -251,6 +293,7 @@ struct GrowlNetworkNotification {
#define GROWL_PATHWAY_EXTENSION XSTR("growlPathway")
#define GROWL_VIEW_EXTENSION XSTR("growlView")
#define GROWL_STYLE_EXTENSION XSTR("growlStyle")
#define GROWL_PATHEXTENSION_TICKET XSTR("growlTicket")
/* --- These following macros are intended for plug-ins --- */
@ -390,6 +433,15 @@ struct GrowlNetworkNotification {
* @param domain The bundle ID of the plug-in.
* @param result A pointer to a float. Leaves unchanged if the value doesn't exist.
*/
#ifdef __LP64__
#define READ_GROWL_PREF_FLOAT(key, domain, result) do {\
CFNumberRef floatValue = NULL; \
READ_GROWL_PREF_VALUE(key, domain, CFNumberRef, &floatValue); \
if (floatValue) {\
CFNumberGetValue(floatValue, kCFNumberCGFloatType, result); \
CFRelease(floatValue); \
} } while(0)
#else
#define READ_GROWL_PREF_FLOAT(key, domain, result) do {\
CFNumberRef floatValue = NULL; \
READ_GROWL_PREF_VALUE(key, domain, CFNumberRef, &floatValue); \
@ -397,6 +449,7 @@ struct GrowlNetworkNotification {
CFNumberGetValue(floatValue, kCFNumberFloatType, result); \
CFRelease(floatValue); \
} } while(0)
#endif
/*! @function WRITE_GROWL_PREF_FLOAT
* @abstract Writes the given float to the plug-in's preferences.
@ -406,10 +459,17 @@ struct GrowlNetworkNotification {
* @param value The float value to write to the preferences.
* @param domain The bundle ID of the plug-in.
*/
#ifdef __LP64__
#define WRITE_GROWL_PREF_FLOAT(key, value, domain) do {\
CFNumberRef floatValue = CFNumberCreate(NULL, kCFNumberCGFloatType, &value); \
WRITE_GROWL_PREF_VALUE(key, floatValue, domain); \
CFRelease(floatValue); } while(0)
#else
#define WRITE_GROWL_PREF_FLOAT(key, value, domain) do {\
CFNumberRef floatValue = CFNumberCreate(NULL, kCFNumberFloatType, &value); \
WRITE_GROWL_PREF_VALUE(key, floatValue, domain); \
CFRelease(floatValue); } while(0)
#endif
/*! @defined GROWL_CLOSE_ALL_NOTIFICATIONS

View File

@ -1,21 +0,0 @@
//
// GrowlNonCopyingMutableDictionary.h
// Growl
//
// Created by Mac-arena the Bored Zo on 2005-08-21.
// Copyright 2005-2006 The Growl Project. All rights reserved.
//
// This file is under the BSD License, refer to License.txt for details
#import <Foundation/Foundation.h>
@interface GrowlNonCopyingMutableDictionary: NSMutableDictionary
{
NSMapTable *backing;
}
+ (id) dictionaryWithMapTable:(NSMapTable *)otherBacking;
- (id) initWithMapTable:(NSMapTable *)otherBacking;
@end

View File

@ -1,226 +0,0 @@
//
// GrowlNonCopyingMutableDictionary.m
// Growl
//
// Created by Mac-arena the Bored Zo on 2005-08-21.
// Copyright 2005-2006 The Growl Project. All rights reserved.
//
// This file is under the BSD License, refer to License.txt for details
#import "GrowlNonCopyingMutableDictionary.h"
//the enumerator class can be moved to its own pair of files if an immutable non-copying dictionary class is created.
@interface GrowlNonCopyingDictionaryEnumerator: NSEnumerator
{
NSMapEnumerator mapEnum;
unsigned reserved: 30;
unsigned yieldKeys: 1;
unsigned hasFreed: 1;
}
//if flag is NO, objects (values) will be yielded by -nextObject.
//otherwise, keys will be yielded.
- (id) initWithMapEnumerator:(NSMapEnumerator)newMapEnum enumerateKeys:(BOOL)flag;
@end
@implementation GrowlNonCopyingMutableDictionary
- (id) superInit {
SEL init = @selector(init);
//jump over superclasses (NSMutableDictionary and NSDictionary)
return [[[super superclass] superclass] instanceMethodForSelector:init](self, init);
}
#pragma mark -
- (id) init {
if ((self = [self superInit])) {
backing = NSCreateMapTableWithZone(NSObjectMapKeyCallBacks, NSObjectMapValueCallBacks, 0U, [self zone]);
}
return self;
}
#pragma mark -
- (id) initWithCapacity:(unsigned)capacity {
if ((self = [self superInit])) {
backing = NSCreateMapTableWithZone(NSObjectMapKeyCallBacks, NSObjectMapValueCallBacks, capacity, [self zone]);
}
return self;
}
#pragma mark -
- (id) initWithDictionary:(NSDictionary *)other {
NSParameterAssert(other != nil);
if ((self = [self initWithCapacity:[other count]]))
[self setDictionary:other];
return self;
}
#pragma mark -
//more -init.. methods can go here.
//#pragma mark -
+ (id) dictionaryWithMapTable:(NSMapTable *)otherBacking {
return [[[self alloc] initWithMapTable:otherBacking] autorelease];
}
- (id) initWithMapTable:(NSMapTable *)otherBacking {
if ((self = [self superInit])) {
backing = NSCopyMapTableWithZone(otherBacking, [self zone]);
}
return self;
}
#pragma mark -
- (void) dealloc {
NSFreeMapTable(backing);
[super dealloc];
}
#pragma mark -
#pragma mark Adding and changing values
- (id) objectForKey:(id)key {
return NSMapGet(backing, key);
}
- (id) valueForKey:(NSString *)key {
return [self objectForKey:key];
}
#pragma mark -
- (void) setObject:(id)obj forKey:(id)key {
NSMapInsert(backing, key, obj);
}
- (void) setValue:(id)obj forKey:(NSString *)key {
if (obj)
NSMapInsert(backing, key, obj);
else
NSMapRemove(backing, key);
}
#pragma mark -
- (void) addEntriesFromDictionary:(NSDictionary *)other {
NSParameterAssert(other);
NSEnumerator *keyEnum = [other keyEnumerator];
id key;
while ((key = [keyEnum nextObject]))
NSMapInsert(backing, key, [other objectForKey:key]);
}
- (void) setDictionary:(NSDictionary *)other {
NSParameterAssert(other);
[self removeAllObjects];
[self addEntriesFromDictionary:other];
}
#pragma mark -
#pragma mark Removing values
- (void) removeObjectForKey:(id)key {
NSMapRemove(backing, key);
}
- (void) removeObjectsForKeys:(NSArray *)keys {
NSEnumerator *keyEnum = [keys objectEnumerator];
id key;
while((key = [keyEnum nextObject]))
[self removeObjectForKey:key];
}
- (void) removeAllObjects {
NSResetMapTable(backing);
}
#pragma mark -
#pragma mark Examination
- (NSArray *) allKeys {
return NSAllMapTableKeys(backing);
}
- (NSArray *) allValues {
return NSAllMapTableValues(backing);
}
- (NSEnumerator *) keyEnumerator {
//enumerateKeys: YES
return [[[GrowlNonCopyingDictionaryEnumerator allocWithZone:[self zone]] initWithMapEnumerator:NSEnumerateMapTable(backing) enumerateKeys:YES] autorelease];
}
- (NSEnumerator *) objectEnumerator {
//enumerateKeys: NO
return [[[GrowlNonCopyingDictionaryEnumerator allocWithZone:[self zone]] initWithMapEnumerator:NSEnumerateMapTable(backing) enumerateKeys:NO] autorelease];
}
#pragma mark -
- (unsigned) count {
return NSCountMapTable(backing);
}
- (NSString *) description {
NSMutableArray *elements = [[NSMutableArray alloc] initWithCapacity:[self count]];
NSMapEnumerator backingEnum = NSEnumerateMapTable(backing);
NSObject *key, *value;
while(NSNextMapEnumeratorPair(&backingEnum, (void **)&key, (void **)&value)) {
NSString *pairDesc = [[NSString alloc] initWithFormat:@"\t%@ = %@", [key description], [value description]];
[elements addObject:pairDesc];
[pairDesc release];
}
NSEndMapTableEnumeration(&backingEnum);
NSString *desc = [[[NSString allocWithZone:[self zone]] initWithFormat:@"{\n%@}", [elements componentsJoinedByString:@";\n"]] autorelease];
[elements release];
return desc;
}
@end
#pragma mark -
@implementation GrowlNonCopyingDictionaryEnumerator
- (id) initWithMapEnumerator:(NSMapEnumerator)newMapEnum enumerateKeys:(BOOL)flag {
if ((self = [self init])) {
mapEnum = newMapEnum;
yieldKeys = (flag != NO);
}
return self;
}
- (void) dealloc {
if (!hasFreed)
NSEndMapTableEnumeration(&mapEnum);
[super dealloc];
}
#pragma mark -
- (id) nextObject {
void *key, *value;
if (!NSNextMapEnumeratorPair(&mapEnum, &key, &value)) {
if (!hasFreed) {
NSEndMapTableEnumeration(&mapEnum);
hasFreed = YES;
}
return nil;
} else if (yieldKeys)
return key;
else
return value;
}
@end

View File

@ -8,8 +8,6 @@
// This file is under the BSD License, refer to License.txt for details
#import "GrowlPathUtilities.h"
#import "GrowlPreferencesController.h"
#import "GrowlTicketController.h"
#import "GrowlDefinesInternal.h"
static NSBundle *helperAppBundle;
@ -35,7 +33,7 @@ restart:;
UInt32 oldestProcessLaunchDate = UINT_MAX;
while ((err = GetNextProcess(&psn)) == noErr) {
struct ProcessInfoRec info = { .processInfoLength = sizeof(struct ProcessInfoRec) };
struct ProcessInfoRec info = { .processInfoLength = (UInt32)sizeof(struct ProcessInfoRec) };
err = GetProcessInformation(&psn, &info);
if (err == noErr) {
//Compare the launch dates first, since it's cheaper than comparing bundle IDs.
@ -44,6 +42,7 @@ restart:;
NSDictionary *dict = (NSDictionary *)ProcessInformationCopyDictionary(&psn, kProcessDictionaryIncludeAllInformationMask);
if (dict) {
CFMakeCollectable(dict);
pid_t pid = 0;
GetProcessPID(&psn, &pid);
if ([[dict objectForKey:(NSString *)kCFBundleIdentifierKey] isEqualToString:identifier]) {

View File

@ -60,7 +60,7 @@ CFComparisonResult compareVersions(const struct Version a, const struct Version
CFComparisonResult compareVersionStrings(STRING_TYPE a, STRING_TYPE b);
/*this version contains brain damage that translates "1.0" to "0.5" (handling
* the Growl 0.5 prefpane bundle, whose version was mistakenly set to "1.0").
*the real Growl 1.0 prefpane bundle will have a version of "1.00".
*Because of that mistake, the version that we had intended to be 1.0 became 1.1 instead.
*/
CFComparisonResult compareVersionStringsTranslating1_0To0_5(STRING_TYPE a, STRING_TYPE b);

View File

@ -1,71 +0,0 @@
//
// GrowlAbstractSingletonObject.h
// GBUtilities
//
// Renamed from GBAbstractSingletonObject to GrowlAbstractSingletonObject.
// Created by Ofri Wolfus on 15/08/05.
// Copyright 2005-2006 The Growl Project. All rights reserved.
//
#import <Foundation/Foundation.h>
/*!
* @class GrowlAbstractSingletonObject
* @brief An Abstract Singleton Object
*
* This is an abstract object for object that should have only one instnace
* that is never released (singleton object).
* This class is thread safe.
*/
@interface GrowlAbstractSingletonObject : NSObject {
BOOL _isInitialized;
}
/*!
* @brief Returns the shared instance of this class.
*/
+ (id) sharedInstance;
/*!
* @brief Releases and deallocates all the singletons that are subclasses of this object.
*
* Once +destroyAllSingletons has been called, no more singletons can be created
* and every call to [SomeSingletonSubclass sharedInstance] will return nil.
* Also note that a call to this method will destroy GBAbstractSingletonObject and all it's subclasses.
* Even though that you generally can't release a singleton object, it's dealloc message WILL be called
* when it's beeing destroyed.
*
* USE THIS METHOD WITH GREAT CAUTION!!!
*/
+ (void) destroyAllSingletons;
@end
/*!
* @category GrowlSingletonObjectInit
* @brief A private category for subclasses only.
*
* Only subclasses should override/call methods in the category.
*/
@interface GrowlAbstractSingletonObject (GrowlAbstractSingletonObjectInit)
/*!
* @brief An init method for your singleton object.
*
* Implement this in your subclass to init your shared object.
* You should call [super initSingleton] and return your initialized object.
* Never call this method directly! It'll be automatically called when needed.
*/
- (id) initSingleton;
/*!
* @brief Finish and clean up whatever your singleton does.
*
* This will be called before the singleton will be destroyed.
* You should put whatever you would put in the -dealloc method here instead
* and then call [super destroy].
*/
- (void) destroy;
@end

View File

@ -8,10 +8,11 @@
// This file is under the BSD License, refer to License.txt for details
#import <Cocoa/Cocoa.h>
#import "GrowlDefinesInternal.h" // for CGFloat
@interface NSImage (GrowlImageAdditions)
- (void) drawScaledInRect:(NSRect)targetRect operation:(NSCompositingOperation)operation fraction:(float)f;
- (void) drawScaledInRect:(NSRect)targetRect operation:(NSCompositingOperation)operation fraction:(CGFloat)f;
- (NSSize) adjustSizeToDrawAtSize:(NSSize)theSize;
- (NSImageRep *) bestRepresentationForSize:(NSSize)theSize;
- (NSImageRep *) representationOfSize:(NSSize)theSize;

View File

@ -11,23 +11,23 @@
@implementation NSImage (GrowlImageAdditions)
- (void) drawScaledInRect:(NSRect)targetRect operation:(NSCompositingOperation)operation fraction:(float)f {
- (void) drawScaledInRect:(NSRect)targetRect operation:(NSCompositingOperation)operation fraction:(CGFloat)f {
if (!NSEqualSizes([self size], targetRect.size))
[self adjustSizeToDrawAtSize:targetRect.size];
NSRect imageRect;
imageRect.origin.x = 0.0f;
imageRect.origin.y = 0.0f;
imageRect.origin.x = 0.0;
imageRect.origin.y = 0.0;
imageRect.size = [self size];
if (imageRect.size.width > targetRect.size.width || imageRect.size.height > targetRect.size.height) {
// make sure the icon isn't too large. If it is, scale it down
if (imageRect.size.width > imageRect.size.height) {
float oldHeight = targetRect.size.height;
CGFloat oldHeight = targetRect.size.height;
targetRect.size.height = oldHeight / imageRect.size.width * imageRect.size.height;
targetRect.origin.y = floorf(targetRect.origin.y - (targetRect.size.height - oldHeight) * 0.5f);
targetRect.origin.y = GrowlCGFloatFloor(targetRect.origin.y - (targetRect.size.height - oldHeight) * 0.5);
} else if (imageRect.size.width < imageRect.size.height) {
float oldWidth = targetRect.size.width;
CGFloat oldWidth = targetRect.size.width;
targetRect.size.width = oldWidth / imageRect.size.height * imageRect.size.width;
targetRect.origin.x = floorf(targetRect.origin.x - (targetRect.size.width - oldWidth) * 0.5f);
targetRect.origin.x = GrowlCGFloatFloor(targetRect.origin.x - (targetRect.size.width - oldWidth) * 0.5);
}
[self setScalesWhenResized:YES];
@ -35,9 +35,9 @@
} else {
// center image if it is too small
if (imageRect.size.width < targetRect.size.width)
targetRect.origin.x += ceilf((targetRect.size.width - imageRect.size.width) * 0.5f);
targetRect.origin.x += GrowlCGFloatCeiling((targetRect.size.width - imageRect.size.width) * 0.5);
if (imageRect.size.height < targetRect.size.height)
targetRect.origin.y += ceilf((targetRect.size.height - imageRect.size.height) * 0.5f);
targetRect.origin.y += GrowlCGFloatCeiling((targetRect.size.height - imageRect.size.height) * 0.5);
targetRect.size = imageRect.size;
}
@ -55,14 +55,14 @@
NSImageRep *bestRep = [self representationOfSize:theSize];
if (!bestRep) {
BOOL isFirst = YES;
float repDistance = 0.0f;
CGFloat repDistance = 0.0;
NSImageRep *thisRep;
NSEnumerator *enumerator = [[self representations] objectEnumerator];
while ((thisRep = [enumerator nextObject])) {
float thisDistance = theSize.width - [thisRep size].width;
if (repDistance < 0.0f && thisDistance > 0.0f)
CGFloat thisDistance = theSize.width - [thisRep size].width;
if (repDistance < 0.0 && thisDistance > 0.0)
continue;
if (isFirst || fabsf(thisDistance) < fabsf(repDistance) || (thisDistance < 0.0f && repDistance > 0.0f)) {
if (isFirst || GrowlCGFloatAbsoluteValue(thisDistance) < GrowlCGFloatAbsoluteValue(repDistance) || (thisDistance < 0.0 && repDistance > 0.0)) {
isFirst = NO;
repDistance = thisDistance;
bestRep = thisRep;

View File

@ -1,60 +0,0 @@
//
// GrowlPathwayController.m
// Growl
//
// Created by Mac-arena the Bored Zo on 2005-08-08.
// Copyright 2005 The Growl Project. All rights reserved.
//
// This file is under the BSD License, refer to License.txt for details
@class GrowlPlugin;
@protocol GrowlPathwayPlugin <NSObject>
- (NSArray *) pathways;
@end
@class GrowlPathway, GrowlUDPPathway, GrowlTCPPathway;
extern NSString *GrowlPathwayControllerWillInstallPathwayNotification;
extern NSString *GrowlPathwayControllerDidInstallPathwayNotification;
extern NSString *GrowlPathwayControllerWillRemovePathwayNotification;
extern NSString *GrowlPathwayControllerDidRemovePathwayNotification;
//userInfo keys.
extern NSString *GrowlPathwayControllerNotificationKey;
extern NSString *GrowlPathwayNotificationKey;
@interface GrowlPathwayController : NSObject {
NSMutableSet *pathways;
NSMutableSet *remotePathways;
unsigned reserved: 31;
unsigned serverEnabled: 1;
}
+ (GrowlPathwayController *) sharedController;
#pragma mark Installing and removing pathways
- (void) installPathway:(GrowlPathway *)newPathway;
- (void) removePathway:(GrowlPathway *)newPathway;
#pragma mark Network control
- (BOOL) isServerEnabled;
- (void) setServerEnabled:(BOOL)enabled;
#pragma mark Eating plug-ins
//XXX make GrowlPathwayController a plug-in handler
- (BOOL) loadPathwaysFromPlugin:(GrowlPlugin <GrowlPathwayPlugin> *)plugin;
@end
@interface GrowlPathwayController (Private_ForApplicationControllerOnly)
- (void)setServerEnabledFromPreferences;
@end

View File

@ -1,126 +0,0 @@
//
// GrowlPreferencesController.h
// Growl
//
// Created by Nelson Elhage on 8/24/04.
// Renamed from GrowlPreferences.h by Mac-arena the Bored Zo on 2005-06-27.
// Copyright 2004-2006 The Growl Project. All rights reserved.
//
// This file is under the BSD License, refer to License.txt for details
#ifndef GROWL_PREFERENCES_CONTROLLER_H
#define GROWL_PREFERENCES_CONTROLLER_H
#ifdef __OBJC__
#define XSTR(x) (@x)
#else
#define XSTR CFSTR
#endif
#define GrowlPreferencesChanged XSTR("GrowlPreferencesChanged")
#define GrowlPreview XSTR("GrowlPreview")
#define GrowlDisplayPluginKey XSTR("GrowlDisplayPluginName")
#define GrowlUserDefaultsKey XSTR("GrowlUserDefaults")
#define GrowlStartServerKey XSTR("GrowlStartServer")
#define GrowlRemoteRegistrationKey XSTR("GrowlRemoteRegistration")
#define GrowlEnableForwardKey XSTR("GrowlEnableForward")
#define GrowlForwardDestinationsKey XSTR("GrowlForwardDestinations")
#define GrowlUDPPortKey XSTR("GrowlUDPPort")
#define GrowlTCPPortKey XSTR("GrowlTCPPort")
#define GrowlUpdateCheckKey XSTR("GrowlUpdateCheck")
#define LastUpdateCheckKey XSTR("LastUpdateCheck")
#define GrowlLoggingEnabledKey XSTR("GrowlLoggingEnabled")
#define GrowlLogTypeKey XSTR("GrowlLogType")
#define GrowlCustomHistKey1 XSTR("Custom log history 1")
#define GrowlCustomHistKey2 XSTR("Custom log history 2")
#define GrowlCustomHistKey3 XSTR("Custom log history 3")
#define GrowlMenuExtraKey XSTR("GrowlMenuExtra")
#define GrowlSquelchModeKey XSTR("GrowlSquelchMode")
#define LastKnownVersionKey XSTR("LastKnownVersion")
#define GrowlStickyWhenAwayKey XSTR("StickyWhenAway")
#define GrowlStickyIdleThresholdKey XSTR("IdleThreshold")
CFTypeRef GrowlPreferencesController_objectForKey(CFTypeRef key);
int GrowlPreferencesController_integerForKey(CFTypeRef key);
Boolean GrowlPreferencesController_boolForKey(CFTypeRef key);
#ifdef __OBJC__
#import "GrowlAbstractSingletonObject.h"
@interface GrowlPreferencesController : GrowlAbstractSingletonObject {
}
+ (GrowlPreferencesController *) sharedController;
- (void) registerDefaults:(NSDictionary *)inDefaults;
- (id) objectForKey:(NSString *)key;
- (void) setObject:(id)object forKey:(NSString *)key;
- (BOOL) boolForKey:(NSString*) key;
- (void) setBool:(BOOL)value forKey:(NSString *)key;
- (int) integerForKey:(NSString *)key;
- (void) setInteger:(int)value forKey:(NSString *)key;
- (void) synchronize;
- (BOOL) shouldStartGrowlAtLogin;
- (void) setShouldStartGrowlAtLogin:(BOOL)flag;
- (void) setStartAtLogin:(NSString *)path enabled:(BOOL)flag;
- (BOOL) isRunning:(NSString *)theBundleIdentifier;
- (BOOL) isGrowlRunning;
- (void) setGrowlRunning:(BOOL)flag noMatterWhat:(BOOL)nmw;
- (void) launchGrowl:(BOOL)noMatterWhat;
- (void) terminateGrowl;
#pragma mark GrowlMenu running state
- (void) enableGrowlMenu;
- (void) disableGrowlMenu;
#pragma mark -
//Simplified accessors
#pragma mark UI
- (BOOL) isBackgroundUpdateCheckEnabled;
- (void) setIsBackgroundUpdateCheckEnabled:(BOOL)flag;
- (NSString *) defaultDisplayPluginName;
- (void) setDefaultDisplayPluginName:(NSString *)name;
- (BOOL) squelchMode;
- (void) setSquelchMode:(BOOL)flag;
- (BOOL) stickyWhenAway;
- (void) setStickyWhenAway:(BOOL)flag;
- (NSNumber*) idleThreshold;
- (void) setIdleThreshold:(NSNumber*)value;
#pragma mark GrowlMenu methods
- (BOOL) isGrowlMenuEnabled;
- (void) setGrowlMenuEnabled:(BOOL)state;
#pragma mark "Network" tab pane
- (BOOL) isGrowlServerEnabled;
- (void) setGrowlServerEnabled:(BOOL)enabled;
- (BOOL) isRemoteRegistrationAllowed;
- (void) setRemoteRegistrationAllowed:(BOOL)flag;
- (BOOL) isForwardingEnabled;
- (void) setForwardingEnabled:(BOOL)enabled;
- (NSString *) remotePassword;
- (void) setRemotePassword:(NSString *)value;
- (int) UDPPort;
- (void) setUDPPort:(int)value;
@end
#endif
#endif

View File

@ -1,29 +0,0 @@
//
// GrowlTicketController.h
// Growl
//
// Created by Mac-arena the Bored Zo on 2005-06-08.
// Copyright 2005-2006 Mac-arena the Bored Zo. All rights reserved.
//
#import "GrowlAbstractSingletonObject.h"
#define GROWL_PATHEXTENSION_TICKET @"growlTicket"
@class GrowlApplicationTicket;
@interface GrowlTicketController: GrowlAbstractSingletonObject
{
NSMutableDictionary *ticketsByApplicationName;
}
+ (id) sharedController;
- (NSDictionary *) allSavedTickets;
- (GrowlApplicationTicket *) ticketForApplicationName:(NSString *) appName;
- (void) addTicket:(GrowlApplicationTicket *) newTicket;
- (void) removeTicketForApplicationName:(NSString *)appName;
- (void) loadAllSavedTickets;
@end

View File

@ -13,11 +13,11 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.1.4</string>
<string>GROWL_VERSION</string>
<key>CFBundleSignature</key>
<string>GRRR</string>
<key>CFBundleVersion</key>
<string>1.1.4</string>
<string>GROWL_VERSION</string>
<key>NSPrincipalClass</key>
<string>GrowlApplicationBridge</string>
</dict>

View File

@ -113,9 +113,13 @@ Boolean Growl_SetDelegate(struct Growl_Delegate *newDelegate) {
delegate = newDelegate;
}
CFStringRef appName = delegate->applicationName;
if ((!appName) && (delegate->registrationDictionary))
appName = CFDictionaryGetValue(delegate->registrationDictionary, GROWL_APP_NAME);
CFStringRef appName = nil;
if(delegate) {
appName = delegate->applicationName;
if ((!appName) && (delegate->registrationDictionary))
appName = CFDictionaryGetValue(delegate->registrationDictionary, GROWL_APP_NAME);
}
if (!appName) {
NSLog(CFSTR("%@"), CFSTR("GrowlApplicationBridge: Growl_SetDelegate called, but no application name was found in the delegate"));
return false;
@ -260,8 +264,8 @@ void Growl_PostNotificationWithDictionary(CFDictionaryRef userInfo) {
userInfo,
/*deliverImmediately*/ false);
#endif
#ifdef GROWL_WITH_INSTALLER
CFRelease(userInfo);
#ifdef GROWL_WITH_INSTALLER
} else {
/*if Growl launches, and the user hasn't already said NO to installing
* it, store this notification for posting
@ -276,9 +280,11 @@ void Growl_PostNotificationWithDictionary(CFDictionaryRef userInfo) {
//if we have not already asked the user to install Growl, do it now
if (!promptedToInstallGrowl) {
#ifndef __LP64__
OSStatus err = _Growl_ShowInstallationPrompt();
promptedToInstallGrowl = (err == noErr);
//_Growl_ShowInstallationPrompt prints its own errors.
#endif
}
CFRelease(userInfo);
@ -967,6 +973,11 @@ static CFBundleRef _copyGrowlPrefPaneBundle(void) {
if (bundleIdentifier && (CFStringCompare(bundleIdentifier, GROWL_PREFPANE_BUNDLE_IDENTIFIER, bundleIDComparisonFlags) == kCFCompareEqualTo)) {
growlPrefPaneBundle = prefPaneBundle;
}
else {
CFRelease(prefPaneBundle);
prefPaneBundle = nil;
}
}
if (!growlPrefPaneBundle) {
@ -978,6 +989,11 @@ static CFBundleRef _copyGrowlPrefPaneBundle(void) {
if (bundleIdentifier && (CFStringCompare(bundleIdentifier, GROWL_PREFPANE_BUNDLE_IDENTIFIER, bundleIDComparisonFlags) == kCFCompareEqualTo)) {
growlPrefPaneBundle = prefPaneBundle;
}
else {
CFRelease(prefPaneBundle);
prefPaneBundle = nil;
}
}
if (!growlPrefPaneBundle) {
@ -989,6 +1005,11 @@ static CFBundleRef _copyGrowlPrefPaneBundle(void) {
if (bundleIdentifier && (CFStringCompare(bundleIdentifier, GROWL_PREFPANE_BUNDLE_IDENTIFIER, bundleIDComparisonFlags) == kCFCompareEqualTo)) {
growlPrefPaneBundle = prefPaneBundle;
}
else {
CFRelease(prefPaneBundle);
prefPaneBundle = nil;
}
}
}
}
@ -1072,8 +1093,12 @@ static void _checkForPackagedUpdateForGrowlPrefPaneBundle(CFBundleRef growlPrefP
if (!installedVersion) {
NSLog(CFSTR("GrowlApplicationBridge: no installed version (description of installed prefpane's Info.plist follows)\n%@"), installedInfoDict);
#ifdef __LP64__
NSLog(CFSTR("GrowlApplicationBridge: Growl prompt suppressed because this is a 64-bit application using the Carbon application bridge instead of the Cocoa bridge. Since Carbon doesn't work in 64-bit applications, please contact the application developer and ask them to switch to the Cocoa-based Growl API."));
#else
_Growl_ShowInstallationPrompt();
//_Growl_ShowInstallationPrompt prints its own errors
#endif
} else {
Boolean upgradeIsAvailable = (compareVersionStringsTranslating1_0To0_5(ourVersion, installedVersion) == kCFCompareGreaterThan);
@ -1084,9 +1109,11 @@ static void _checkForPackagedUpdateForGrowlPrefPaneBundle(CFBundleRef growlPrefP
if (!lastDoNotPromptVersion ||
(compareVersionStringsTranslating1_0To0_5(ourVersion, lastDoNotPromptVersion) == kCFCompareGreaterThan))
{
#ifndef __LP64__
OSStatus err = _Growl_ShowUpdatePromptForVersion(ourVersion);
promptedToUpgradeGrowl = (err == noErr);
//_Growl_ShowUpdatePromptForVersion prints its own errors
#endif
}
if (lastDoNotPromptVersion)

View File

@ -15,7 +15,7 @@
#include <Carbon/Carbon.h>
#ifndef GROWL_EXPORT
#define GROWL_EXPORT __attribute__((visibility("default")))
#define GROWL_EXPORT __attribute__((visibility("default"))) DEPRECATED_ATTRIBUTE
#endif
/*! @header GrowlApplicationBridge-Carbon.h

View File

@ -165,40 +165,6 @@
clickContext:(id)clickContext
identifier:(NSString *)identifier;
/*!
* @method notifyWithTitle:description:notificationName:iconData:priority:isSticky:clickContext:identifier:
* @abstract Send a Growl notification.
* @discussion This is the preferred means for sending a Growl notification.
* The notification name and at least one of the title and description are
* required (all three are preferred). All other parameters may be
* <code>nil</code> (or 0 or NO as appropriate) to accept default values.
*
* If using the Growl-WithInstaller framework, if Growl is not installed the
* user will be prompted to install Growl. If the user cancels, this method
* will have no effect until the next application session, at which time when
* it is called the user will be prompted again. The user is also given the
* option to not be prompted again. If the user does choose to install Growl,
* the requested notification will be displayed once Growl is installed and
* running.
*
* @param title The title of the notification displayed to the user.
* @param description The full description of the notification displayed to the user.
* @param notifName The internal name of the notification. Should be human-readable, as it will be displayed in the Growl preference pane.
* @param iconData <code>NSData</code> object to show with the notification as its icon. If <code>nil</code>, the application's icon will be used instead.
* @param priority The priority of the notification. The default value is 0; positive values are higher priority and negative values are lower priority. Not all Growl displays support priority.
* @param isSticky If YES, the notification will remain on screen until clicked. Not all Growl displays support sticky notifications.
* @param clickContext A context passed back to the Growl delegate if it implements -(void)growlNotificationWasClicked: and the notification is clicked. Not all display plugins support clicking. The clickContext must be plist-encodable (completely of <code>NSString</code>, <code>NSArray</code>, <code>NSNumber</code>, <code>NSDictionary</code>, and <code>NSData</code> types).
* @param identifier An identifier for this notification. Notifications with equal identifiers are coalesced.
*/
+ (void) notifyWithTitle:(NSString *)title
description:(NSString *)description
notificationName:(NSString *)notifName
iconData:(NSData *)iconData
priority:(signed int)priority
isSticky:(BOOL)isSticky
clickContext:(id)clickContext
identifier:(NSString *)identifier;
/*! @method notifyWithDictionary:
* @abstract Notifies using a userInfo dictionary suitable for passing to
* <code>NSDistributedNotificationCenter</code>.

View File

@ -563,13 +563,13 @@ static BOOL registerWhenGrowlIsReady = NO;
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
[delegate growlNotificationWasClicked:
[[notification userInfo] objectForKey:GROWL_KEY_CLICKED_CONTEXT]];
[pool release];
[pool drain];
}
+ (void) growlNotificationTimedOut:(NSNotification *)notification {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
[delegate growlNotificationTimedOut:
[[notification userInfo] objectForKey:GROWL_KEY_CLICKED_CONTEXT]];
[pool release];
[pool drain];
}
#pragma mark -
@ -671,7 +671,7 @@ static BOOL registerWhenGrowlIsReady = NO;
[queuedGrowlNotifications release]; queuedGrowlNotifications = nil;
#endif
[pool release];
[pool drain];
}
#ifdef GROWL_WITH_INSTALLER
@ -725,31 +725,57 @@ static BOOL registerWhenGrowlIsReady = NO;
#pragma mark -
+ (BOOL) _launchGrowlIfInstalledWithRegistrationDictionary:(NSDictionary *)regDict {
NSBundle *growlPrefPaneBundle;
BOOL success = NO;
BOOL success = NO;
NSBundle *growlPrefPaneBundle;
NSString *growlHelperAppPath;
#ifdef DEBUG
//For a debug build, first look for a running GHA. It might not actually be within a Growl prefpane bundle.
growlHelperAppPath = [[GrowlPathUtilities runningHelperAppBundle] bundlePath];
if (!growlHelperAppPath) {
growlPrefPaneBundle = [GrowlPathUtilities growlPrefPaneBundle];
growlHelperAppPath = [growlPrefPaneBundle pathForResource:@"GrowlHelperApp"
ofType:@"app"];
}
NSLog(@"Will use GrowlHelperApp at %@", growlHelperAppPath);
#else
growlPrefPaneBundle = [GrowlPathUtilities growlPrefPaneBundle];
if (growlPrefPaneBundle) {
NSString *growlHelperAppPath = [growlPrefPaneBundle pathForResource:@"GrowlHelperApp"
ofType:@"app"];
growlHelperAppPath = [growlPrefPaneBundle pathForResource:@"GrowlHelperApp"
ofType:@"app"];
#endif
#ifdef GROWL_WITH_INSTALLER
if (growlPrefPaneBundle) {
/* Check against our current version number and ensure the installed Growl pane is the same or later */
[self _checkForPackagedUpdateForGrowlPrefPaneBundle:growlPrefPaneBundle];
}
#endif
//Houston, we are go for launch.
if (growlHelperAppPath) {
//Let's launch in the background (unfortunately, requires Carbon on Jaguar)
LSLaunchFSRefSpec spec;
FSRef appRef;
OSStatus status = FSPathMakeRef((UInt8 *)[growlHelperAppPath fileSystemRepresentation], &appRef, NULL);
if (status == noErr) {
FSRef regItemRef;
//Houston, we are go for launch.
if (growlHelperAppPath) {
//Let's launch in the background (requires sending the Apple Event ourselves, as LS may activate the application anyway if it's already running)
NSURL *appURL = [NSURL fileURLWithPath:growlHelperAppPath];
if (appURL) {
OSStatus err;
//Find the PSN for GrowlHelperApp. (We'll need this later.)
struct ProcessSerialNumber appPSN = {
0, kNoProcess
};
while ((err = GetNextProcess(&appPSN)) == noErr) {
NSDictionary *dict = [(id)ProcessInformationCopyDictionary(&appPSN, kProcessDictionaryIncludeAllInformationMask) autorelease];
NSString *bundlePath = [dict objectForKey:@"BundlePath"];
if ([bundlePath isEqualToString:growlHelperAppPath]) {
//Match!
break;
}
}
if (err == noErr) {
NSURL *regItemURL = nil;
BOOL passRegDict = NO;
if (regDict) {
OSStatus regStatus;
NSString *regDictFileName;
NSString *regDictPath;
@ -782,20 +808,41 @@ static BOOL registerWhenGrowlIsReady = NO;
[error release];
}
regStatus = FSPathMakeRef((UInt8 *)[regDictPath fileSystemRepresentation], &regItemRef, NULL);
if (regStatus == noErr)
if ([[NSFileManager defaultManager] fileExistsAtPath:regDictPath]) {
regItemURL = [NSURL fileURLWithPath:regDictPath];
passRegDict = YES;
}
}
spec.appRef = &appRef;
spec.numDocs = (passRegDict != NO);
spec.itemRefs = (passRegDict ? &regItemRef : NULL);
spec.passThruParams = NULL;
spec.launchFlags = kLSLaunchDontAddToRecents | kLSLaunchDontSwitch | kLSLaunchNoParams | kLSLaunchAsync;
spec.asyncRefCon = NULL;
status = LSOpenFromRefSpec(&spec, NULL);
AEStreamRef stream = AEStreamCreateEvent(kCoreEventClass, kAEOpenDocuments,
//Target application
typeProcessSerialNumber, &appPSN, sizeof(appPSN),
kAutoGenerateReturnID, kAnyTransactionID);
if (!stream) {
NSLog(@"%@: Could not create open-document event to register this application with Growl", [self class]);
} else {
if (passRegDict) {
NSString *regItemURLString = [regItemURL absoluteString];
NSData *regItemURLUTF8Data = [regItemURLString dataUsingEncoding:NSUTF8StringEncoding];
err = AEStreamWriteKeyDesc(stream, keyDirectObject, typeFileURL, [regItemURLUTF8Data bytes], [regItemURLUTF8Data length]);
if (err != noErr) {
NSLog(@"%@: Could not set direct object of open-document event to register this application with Growl because AEStreamWriteKeyDesc returned %li/%s", [self class], (long)err, GetMacOSStatusCommentString(err));
}
}
success = (status == noErr);
AppleEvent event;
err = AEStreamClose(stream, &event);
if (err != noErr) {
NSLog(@"%@: Could not finish open-document event to register this application with Growl because AEStreamClose returned %li/%s", [self class], (long)err, GetMacOSStatusCommentString(err));
} else {
err = AESendMessage(&event, /*reply*/ NULL, kAENoReply | kAEDontReconnect | kAENeverInteract | kAEDontRecord, kAEDefaultTimeout);
if (err != noErr) {
NSLog(@"%@: Could not send open-document event to register this application with Growl because AESend returned %li/%s", [self class], (long)err, GetMacOSStatusCommentString(err));
}
}
success = (err == noErr);
}
}
}
}

View File

@ -25,6 +25,7 @@
#ifndef HAVE_GROWLINSTALLATIONPROMPT_H
#define HAVE_GROWLINSTALLATIONPROMPT_H
#ifndef __LP64__
#include <Carbon/Carbon.h>
/*! @function _Growl_ShowInstallationPrompt
@ -39,4 +40,5 @@ OSStatus _Growl_ShowInstallationPrompt(void);
*/
OSStatus _Growl_ShowUpdatePromptForVersion(CFStringRef updateVersion);
#endif
#endif // __LP64__
#endif // HAVE_GROWLINSTALLATIONPROMPT_H

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,8 @@
#define COMMENT_1 DO NOT EDIT THE VERSION IN THIS FILE! Change the version in Release/Makefile instead, then run make version while in the Release directory.
#define COMMENT_2 In case you're wondering why we're using #define for comments: This header is #imported into both Objective-C code and XML Info.plist files.
#define GROWL_VERSION 1.2
#define GROWL_VERSION_STRING "1.2"
#undef COMMENT_1
#undef COMMENT_2

View File

@ -0,0 +1 @@
#import "GrowlVersion.h"

View File

@ -1,10 +1,8 @@
Copyright (c) The Growl Project, 2004-2008
Copyright (c) The Growl Project, 2004-2009
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
@ -14,5 +12,4 @@ Redistribution and use in source and binary forms, with or without modification,
may be used to endorse or promote products derived from this software
without specific prior written permission.
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.

View File

@ -3,8 +3,14 @@ notifications to users. See http://www.growl.info/ for more information about
Growl. The Growl framework is shipped inside Camino's bundle, and some glue
code is included in Camino itself.
This is Growl 1.1.4 (4886) from http://www.growl.info/files/source/Growl-1.1.4-src.tar.bz2
This is Growl 1.2+ (4461:fac59330ff0c) from http://growl.info/hg/growl-development/archive/fac59330ff0c.zip
with the following changes:
- Only the source files needed to build the "Growl.framework" target have been included.
- Commented out the SDK declarations in Growl.xcodeproj to support mozconfig-based configurations.
- Debug symbol format for Deployment was changed to DWARF+dSYM for better breakpad symbol generation, and the incompatible save-repository disabled.
- Made the following changes to Growl.xcodeproj:
- Converted to Xcode 3.0 format to make it more compatible with Xcode 2.5 toolchain on 10.4.
- Commented out the SDK declarations to support mozconfig-based configurations.
- Commented out any Xcode 3.1-style [arch=<foo>] notation and supplied non-arch-specific values where appropriate.
- Supplied valid archs for building with toolchains on Mac OS X 10.4 and 10.5.
- Set the MACOSX_DEPLOYMENT_TARGET to 10.4 in all configurations.
- Changed the default build configuration to Release.
- Disabled the incompatible save-repository setting to prevent bustage when building on 10.4.

View File

@ -0,0 +1,21 @@
#We do this so that people who launch Xcode from the UI will be able to run
#hg. If we come across any other paths here where people would install
#hg by default, we should add them here.
PATH="$PATH:/opt/local/bin:/usr/local/bin:/sw/bin"
#this is done because the mercurial source install seems to put it in this location
export PYTHONPATH="$PYTHONPATH:/usr/local/lib/python2.6/site-packages"
#this is done because Xcode won't actually run the script if the output file already exists, which is bad
HEADERPATH="$TARGET_BUILD_DIR/include/hgRevision.h"
#hg parent will present two revisions if the user has a pending merge.
#The user probably shouldn't be building in such a circumstance, but,
#nonetheless, we should handle it sanely. We do this by only showing the
#first parent.
REVISION=`hg parent --template="{rev}\n" | head -n1`
echo "*** Building Growl Revision: $REVISION"
mkdir -p "`dirname "$HEADERPATH"`"
echo "#define HG_REVISION $REVISION" > "$HEADERPATH"
echo "#define HG_REVISION_STRING \"$REVISION\"" >> "$HEADERPATH"

View File

@ -1,10 +0,0 @@
#We do this so that people who launch Xcode from the UI will be able to run
#svnversion. If we come across any other paths here where people would install
#svn by default, we should add them here.
PATH="$PATH:/opt/local/bin:/usr/local/bin:/usr/local/subversion/bin:/sw/bin"
REVISION=`svnversion .`
echo "*** Building Growl Revision: $REVISION"
mkdir -p `dirname $SCRIPT_OUTPUT_FILE_0`
#SVN_REVISION is a string because it may look like "4168M" or "4123:4168MS"
echo "#define SVN_REVISION \"$REVISION\"" > $SCRIPT_OUTPUT_FILE_0
echo "#define SVN_REVISION_STRING $REVISION" >> $SCRIPT_OUTPUT_FILE_0