diff --git a/Changelog.rtf b/Changelog.rtf old mode 100644 new mode 100755 diff --git a/Diamond.tiff b/Diamond.tiff old mode 100644 new mode 100755 diff --git a/Download-icon.icns b/Download-icon.icns old mode 100644 new mode 100755 diff --git a/Growl Registration Ticket.growlRegDict b/Growl Registration Ticket.growlRegDict old mode 100644 new mode 100755 diff --git a/Growl.framework/Growl b/Growl.framework/Growl new file mode 120000 index 0000000..85956e2 --- /dev/null +++ b/Growl.framework/Growl @@ -0,0 +1 @@ +Versions/Current/Growl \ No newline at end of file diff --git a/Growl.framework/Headers b/Growl.framework/Headers new file mode 120000 index 0000000..a177d2a --- /dev/null +++ b/Growl.framework/Headers @@ -0,0 +1 @@ +Versions/Current/Headers \ No newline at end of file diff --git a/Growl.framework/Resources b/Growl.framework/Resources new file mode 120000 index 0000000..953ee36 --- /dev/null +++ b/Growl.framework/Resources @@ -0,0 +1 @@ +Versions/Current/Resources \ No newline at end of file diff --git a/Growl.framework/Versions/A/Growl b/Growl.framework/Versions/A/Growl new file mode 100755 index 0000000..db8d5b1 Binary files /dev/null and b/Growl.framework/Versions/A/Growl differ diff --git a/Growl.framework/Versions/A/Headers/Growl.h b/Growl.framework/Versions/A/Headers/Growl.h new file mode 100755 index 0000000..7b1a324 --- /dev/null +++ b/Growl.framework/Versions/A/Headers/Growl.h @@ -0,0 +1,5 @@ +#include + +#ifdef __OBJC__ +# include +#endif diff --git a/Growl.framework/Versions/A/Headers/GrowlApplicationBridge.h b/Growl.framework/Versions/A/Headers/GrowlApplicationBridge.h new file mode 100755 index 0000000..d74182d --- /dev/null +++ b/Growl.framework/Versions/A/Headers/GrowlApplicationBridge.h @@ -0,0 +1,551 @@ +// +// GrowlApplicationBridge.h +// Growl +// +// Created by Evan Schoenberg on Wed Jun 16 2004. +// Copyright 2004-2006 The Growl Project. All rights reserved. +// + +/*! + * @header GrowlApplicationBridge.h + * @abstract Defines the GrowlApplicationBridge class. + * @discussion This header defines the GrowlApplicationBridge class as well as + * the GROWL_PREFPANE_BUNDLE_IDENTIFIER constant. + */ + +#ifndef __GrowlApplicationBridge_h__ +#define __GrowlApplicationBridge_h__ + +#import +#import +#import + +//Forward declarations +@protocol GrowlApplicationBridgeDelegate; + +//------------------------------------------------------------------------------ +#pragma mark - + +/*! + * @class GrowlApplicationBridge + * @abstract A class used to interface with Growl. + * @discussion This class provides a means to interface with Growl. + * + * Currently it provides a way to detect if Growl is installed and launch the + * GrowlHelperApp if it's not already running. + */ +@interface GrowlApplicationBridge : NSObject { + +} + +/*! + * @method isGrowlInstalled + * @abstract Detects whether Growl is installed. + * @discussion Determines if the Growl prefpane and its helper app are installed. + * @result this method will forever return YES. + */ ++ (BOOL) isGrowlInstalled __attribute__((deprecated)); + +/*! + * @method isGrowlRunning + * @abstract Detects whether GrowlHelperApp is currently running. + * @discussion Cycles through the process list to find whether GrowlHelperApp is running and returns its findings. + * @result Returns YES if GrowlHelperApp is running, NO otherwise. + */ ++ (BOOL) isGrowlRunning; + + +/*! + * @method isMistEnabled + * @abstract Gives the caller a fairly good indication of whether or not built-in notifications(Mist) will be used. + * @discussion since this call makes use of isGrowlRunning it is entirely possible for this value to change between call and + * executing a notification dispatch + * @result Returns YES if Growl isn't reachable and the developer has not opted-out of + * Mist and the user hasn't set the global mist enable key to false. + */ ++ (BOOL)isMistEnabled; + +/*! + * @method setShouldUseBuiltInNotifications + * @abstract opt-out mechanism for the mist notification style in the event growl can't be reached. + * @discussion if growl is unavailable due to not being installed or as a result of being turned off then + * this option can enable/disable a built-in fire and forget display style + * @param should Specifies whether or not the developer wants to opt-in (default) or opt out + * of the built-in Mist style in the event Growl is unreachable. + */ ++ (void)setShouldUseBuiltInNotifications:(BOOL)should; + +/*! + * @method shouldUseBuiltInNotifications + * @abstract returns the current opt-in state of the framework's use of the Mist display style. + * @result Returns NO if the developer opt-ed out of Mist, the default value is YES. + */ ++ (BOOL)shouldUseBuiltInNotifications; + +#pragma mark - + +/*! + * @method setGrowlDelegate: + * @abstract Set the object which will be responsible for providing and receiving Growl information. + * @discussion This must be called before using GrowlApplicationBridge. + * + * The methods in the GrowlApplicationBridgeDelegate protocol are required + * and return the basic information needed to register with Growl. + * + * The methods in the GrowlApplicationBridgeDelegate_InformalProtocol + * informal protocol are individually optional. They provide a greater + * degree of interaction between the application and growl such as informing + * the application when one of its Growl notifications is clicked by the user. + * + * The methods in the GrowlApplicationBridgeDelegate_Installation_InformalProtocol + * informal protocol are individually optional and are only applicable when + * using the Growl-WithInstaller.framework which allows for automated Growl + * installation. + * + * When this method is called, data will be collected from inDelegate, Growl + * will be launched if it is not already running, and the application will be + * registered with Growl. + * + * If using the Growl-WithInstaller framework, if Growl is already installed + * but this copy of the framework has an updated version of Growl, the user + * will be prompted to update automatically. + * + * @param inDelegate The delegate for the GrowlApplicationBridge. It must conform to the GrowlApplicationBridgeDelegate protocol. + */ ++ (void) setGrowlDelegate:(NSObject *)inDelegate; + +/*! + * @method growlDelegate + * @abstract Return the object responsible for providing and receiving Growl information. + * @discussion See setGrowlDelegate: for details. + * @result The Growl delegate. + */ ++ (NSObject *) growlDelegate; + +#pragma mark - + +/*! + * @method notifyWithTitle:description:notificationName:iconData:priority:isSticky:clickContext: + * @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 + * nil (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 NSData object to show with the notification as its icon. If nil, 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 NSString, NSArray, NSNumber, NSDictionary, and NSData types). + */ ++ (void) notifyWithTitle:(NSString *)title + description:(NSString *)description + notificationName:(NSString *)notifName + iconData:(NSData *)iconData + priority:(signed int)priority + isSticky:(BOOL)isSticky + clickContext:(id)clickContext; + +/*! + * @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 + * nil (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 NSData object to show with the notification as its icon. If nil, 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 NSString, NSArray, NSNumber, NSDictionary, and NSData 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 + * NSDistributedNotificationCenter. + * @param userInfo The dictionary to notify with. + * @discussion Before Growl 0.6, your application would have posted + * notifications using NSDistributedNotificationCenter by + * creating a userInfo dictionary with the notification data. This had the + * advantage of allowing you to add other data to the dictionary for programs + * besides Growl that might be listening. + * + * This method allows you to use such dictionaries without being restricted + * to using NSDistributedNotificationCenter. The keys for this dictionary + * can be found in GrowlDefines.h. + */ ++ (void) notifyWithDictionary:(NSDictionary *)userInfo; + +#pragma mark - + +/*! @method registerWithDictionary: + * @abstract Register your application with Growl without setting a delegate. + * @discussion When you call this method with a dictionary, + * GrowlApplicationBridge registers your application using that dictionary. + * If you pass nil, GrowlApplicationBridge will ask the delegate + * (if there is one) for a dictionary, and if that doesn't work, it will look + * in your application's bundle for an auto-discoverable plist. + * (XXX refer to more information on that) + * + * If you pass a dictionary to this method, it must include the + * GROWL_APP_NAME key, unless a delegate is set. + * + * This method is mainly an alternative to the delegate system introduced + * with Growl 0.6. Without a delegate, you cannot receive callbacks such as + * -growlIsReady (since they are sent to the delegate). You can, + * however, set a delegate after registering without one. + * + * This method was introduced in Growl.framework 0.7. + */ ++ (BOOL) registerWithDictionary:(NSDictionary *)regDict; + +/*! @method reregisterGrowlNotifications + * @abstract Reregister the notifications for this application. + * @discussion This method does not normally need to be called. If your + * application changes what notifications it is registering with Growl, call + * this method to have the Growl delegate's + * -registrationDictionaryForGrowl method called again and the + * Growl registration information updated. + * + * This method is now implemented using -registerWithDictionary:. + */ ++ (void) reregisterGrowlNotifications; + +#pragma mark - + +/*! @method setWillRegisterWhenGrowlIsReady: + * @abstract Tells GrowlApplicationBridge to register with Growl when Growl + * launches (or not). + * @discussion When Growl has started listening for notifications, it posts a + * GROWL_IS_READY notification on the Distributed Notification + * Center. GrowlApplicationBridge listens for this notification, using it to + * perform various tasks (such as calling your delegate's + * -growlIsReady method, if it has one). If this method is + * called with YES, one of those tasks will be to reregister + * with Growl (in the manner of -reregisterGrowlNotifications). + * + * This attribute is automatically set back to NO (the default) + * after every GROWL_IS_READY notification. + * @param flag YES if you want GrowlApplicationBridge to register with + * Growl when next it is ready; NO if not. + */ ++ (void) setWillRegisterWhenGrowlIsReady:(BOOL)flag; +/*! @method willRegisterWhenGrowlIsReady + * @abstract Reports whether GrowlApplicationBridge will register with Growl + * when Growl next launches. + * @result YES if GrowlApplicationBridge will register with Growl + * when next it posts GROWL_IS_READY; NO if not. + */ ++ (BOOL) willRegisterWhenGrowlIsReady; + +#pragma mark - + +/*! @method registrationDictionaryFromDelegate + * @abstract Asks the delegate for a registration dictionary. + * @discussion If no delegate is set, or if the delegate's + * -registrationDictionaryForGrowl method returns + * nil, this method returns nil. + * + * This method does not attempt to clean up the dictionary in any way - for + * example, if it is missing the GROWL_APP_NAME key, the result + * will be missing it too. Use +[GrowlApplicationBridge + * registrationDictionaryByFillingInDictionary:] or + * +[GrowlApplicationBridge + * registrationDictionaryByFillingInDictionary:restrictToKeys:] to try + * to fill in missing keys. + * + * This method was introduced in Growl.framework 0.7. + * @result A registration dictionary. + */ ++ (NSDictionary *) registrationDictionaryFromDelegate; + +/*! @method registrationDictionaryFromBundle: + * @abstract Looks in a bundle for a registration dictionary. + * @discussion This method looks in a bundle for an auto-discoverable + * registration dictionary file using -[NSBundle + * pathForResource:ofType:]. If it finds one, it loads the file using + * +[NSDictionary dictionaryWithContentsOfFile:] and returns the + * result. + * + * If you pass nil as the bundle, the main bundle is examined. + * + * This method does not attempt to clean up the dictionary in any way - for + * example, if it is missing the GROWL_APP_NAME key, the result + * will be missing it too. Use +[GrowlApplicationBridge + * registrationDictionaryByFillingInDictionary:] or + * +[GrowlApplicationBridge + * registrationDictionaryByFillingInDictionary:restrictToKeys:] to try + * to fill in missing keys. + * + * This method was introduced in Growl.framework 0.7. + * @result A registration dictionary. + */ ++ (NSDictionary *) registrationDictionaryFromBundle:(NSBundle *)bundle; + +/*! @method bestRegistrationDictionary + * @abstract Obtains a registration dictionary, filled out to the best of + * GrowlApplicationBridge's knowledge. + * @discussion This method creates a registration dictionary as best + * GrowlApplicationBridge knows how. + * + * First, GrowlApplicationBridge contacts the Growl delegate (if there is + * one) and gets the registration dictionary from that. If no such dictionary + * was obtained, GrowlApplicationBridge looks in your application's main + * bundle for an auto-discoverable registration dictionary file. If that + * doesn't exist either, this method returns nil. + * + * Second, GrowlApplicationBridge calls + * +registrationDictionaryByFillingInDictionary: with whatever + * dictionary was obtained. The result of that method is the result of this + * method. + * + * GrowlApplicationBridge uses this method when you call + * +setGrowlDelegate:, or when you call + * +registerWithDictionary: with nil. + * + * This method was introduced in Growl.framework 0.7. + * @result A registration dictionary. + */ ++ (NSDictionary *) bestRegistrationDictionary; + +#pragma mark - + +/*! @method registrationDictionaryByFillingInDictionary: + * @abstract Tries to fill in missing keys in a registration dictionary. + * @discussion This method examines the passed-in dictionary for missing keys, + * and tries to work out correct values for them. As of 0.7, it uses: + * + * Key Value + * --- ----- + * GROWL_APP_NAME CFBundleExecutableName + * GROWL_APP_ICON_DATA The data of the icon of the application. + * GROWL_APP_LOCATION The location of the application. + * GROWL_NOTIFICATIONS_DEFAULT GROWL_NOTIFICATIONS_ALL + * + * Keys are only filled in if missing; if a key is present in the dictionary, + * its value will not be changed. + * + * This method was introduced in Growl.framework 0.7. + * @param regDict The dictionary to fill in. + * @result The dictionary with the keys filled in. This is an autoreleased + * copy of regDict. + */ ++ (NSDictionary *) registrationDictionaryByFillingInDictionary:(NSDictionary *)regDict; +/*! @method registrationDictionaryByFillingInDictionary:restrictToKeys: + * @abstract Tries to fill in missing keys in a registration dictionary. + * @discussion This method examines the passed-in dictionary for missing keys, + * and tries to work out correct values for them. As of 0.7, it uses: + * + * Key Value + * --- ----- + * GROWL_APP_NAME CFBundleExecutableName + * GROWL_APP_ICON_DATA The data of the icon of the application. + * GROWL_APP_LOCATION The location of the application. + * GROWL_NOTIFICATIONS_DEFAULT GROWL_NOTIFICATIONS_ALL + * + * Only those keys that are listed in keys will be filled in. + * Other missing keys are ignored. Also, keys are only filled in if missing; + * if a key is present in the dictionary, its value will not be changed. + * + * This method was introduced in Growl.framework 0.7. + * @param regDict The dictionary to fill in. + * @param keys The keys to fill in. If nil, any missing keys are filled in. + * @result The dictionary with the keys filled in. This is an autoreleased + * copy of regDict. + */ ++ (NSDictionary *) registrationDictionaryByFillingInDictionary:(NSDictionary *)regDict restrictToKeys:(NSSet *)keys; + +/*! @brief Tries to fill in missing keys in a notification dictionary. + * @param notifDict The dictionary to fill in. + * @return The dictionary with the keys filled in. This will be a separate instance from \a notifDict. + * @discussion This function examines the \a notifDict for missing keys, and + * tries to get them from the last known registration dictionary. As of 1.1, + * the keys that it will look for are: + * + * \li GROWL_APP_NAME + * \li GROWL_APP_ICON_DATA + * + * @since Growl.framework 1.1 + */ ++ (NSDictionary *) notificationDictionaryByFillingInDictionary:(NSDictionary *)regDict; + ++ (NSDictionary *) frameworkInfoDictionary; +@end + +//------------------------------------------------------------------------------ +#pragma mark - + +/*! + * @protocol GrowlApplicationBridgeDelegate + * @abstract Required protocol for the Growl delegate. + * @discussion The methods in this protocol are required and are called + * automatically as needed by GrowlApplicationBridge. See + * +[GrowlApplicationBridge setGrowlDelegate:]. + * See also GrowlApplicationBridgeDelegate_InformalProtocol. + */ + +@protocol GrowlApplicationBridgeDelegate + +// -registrationDictionaryForGrowl has moved to the informal protocol as of 0.7. + +@end + +//------------------------------------------------------------------------------ +#pragma mark - + +/*! + * @category NSObject(GrowlApplicationBridgeDelegate_InformalProtocol) + * @abstract Methods which may be optionally implemented by the GrowlDelegate. + * @discussion The methods in this informal protocol will only be called if implemented by the delegate. + */ +@interface NSObject (GrowlApplicationBridgeDelegate_InformalProtocol) + +/*! + * @method registrationDictionaryForGrowl + * @abstract Return the dictionary used to register this application with Growl. + * @discussion The returned dictionary gives Growl the complete list of + * notifications this application will ever send, and it also specifies which + * notifications should be enabled by default. Each is specified by an array + * of NSString objects. + * + * For most applications, these two arrays can be the same (if all sent + * notifications should be displayed by default). + * + * The NSString objects of these arrays will correspond to the + * notificationName: parameter passed in + * +[GrowlApplicationBridge + * notifyWithTitle:description:notificationName:iconData:priority:isSticky:clickContext:] calls. + * + * The dictionary should have the required key object pairs: + * key: GROWL_NOTIFICATIONS_ALL object: NSArray of NSString objects + * key: GROWL_NOTIFICATIONS_DEFAULT object: NSArray of NSString objects + * + * The dictionary may have the following key object pairs: + * key: GROWL_NOTIFICATIONS_HUMAN_READABLE_NAMES object: NSDictionary of key: notification name object: human-readable notification name + * + * You do not need to implement this method if you have an auto-discoverable + * plist file in your app bundle. (XXX refer to more information on that) + * + * @result The NSDictionary to use for registration. + */ +- (NSDictionary *) registrationDictionaryForGrowl; + +/*! + * @method applicationNameForGrowl + * @abstract Return the name of this application which will be used for Growl bookkeeping. + * @discussion This name is used both internally and in the Growl preferences. + * + * This should remain stable between different versions and incarnations of + * your application. + * For example, "SurfWriter" is a good app name, whereas "SurfWriter 2.0" and + * "SurfWriter Lite" are not. + * + * You do not need to implement this method if you are providing the + * application name elsewhere, meaning in an auto-discoverable plist file in + * your app bundle (XXX refer to more information on that) or in the result + * of -registrationDictionaryForGrowl. + * + * @result The name of the application using Growl. + */ +- (NSString *) applicationNameForGrowl; + +/*! + * @method applicationIconForGrowl + * @abstract Return the NSImage to treat as the application icon. + * @discussion The delegate may optionally return an NSImage + * object to use as the application icon. If this method is not implemented, + * {{{-applicationIconDataForGrowl}}} is tried. If that method is not + * implemented, the application's own icon is used. Neither method is + * generally needed. + * @result The NSImage to treat as the application icon. + */ +- (NSImage *) applicationIconForGrowl; + +/*! + * @method applicationIconDataForGrowl + * @abstract Return the NSData to treat as the application icon. + * @discussion The delegate may optionally return an NSData + * object to use as the application icon; if this is not implemented, the + * application's own icon is used. This is not generally needed. + * @result The NSData to treat as the application icon. + * @deprecated In version 1.1, in favor of {{{-applicationIconForGrowl}}}. + */ +- (NSData *) applicationIconDataForGrowl; + +/*! + * @method growlIsReady + * @abstract Informs the delegate that Growl has launched. + * @discussion Informs the delegate that Growl (specifically, the + * GrowlHelperApp) was launched successfully. The application can take actions + * with the knowledge that Growl is installed and functional. + */ +- (void) growlIsReady; + +/*! + * @method growlNotificationWasClicked: + * @abstract Informs the delegate that a Growl notification was clicked. + * @discussion Informs the delegate that a Growl notification was clicked. It + * is only sent for notifications sent with a non-nil + * clickContext, so if you want to receive a message when a notification is + * clicked, clickContext must not be nil when calling + * +[GrowlApplicationBridge notifyWithTitle: description:notificationName:iconData:priority:isSticky:clickContext:]. + * @param clickContext The clickContext passed when displaying the notification originally via +[GrowlApplicationBridge notifyWithTitle:description:notificationName:iconData:priority:isSticky:clickContext:]. + */ +- (void) growlNotificationWasClicked:(id)clickContext; + +/*! + * @method growlNotificationTimedOut: + * @abstract Informs the delegate that a Growl notification timed out. + * @discussion Informs the delegate that a Growl notification timed out. It + * is only sent for notifications sent with a non-nil + * clickContext, so if you want to receive a message when a notification is + * clicked, clickContext must not be nil when calling + * +[GrowlApplicationBridge notifyWithTitle: description:notificationName:iconData:priority:isSticky:clickContext:]. + * @param clickContext The clickContext passed when displaying the notification originally via +[GrowlApplicationBridge notifyWithTitle:description:notificationName:iconData:priority:isSticky:clickContext:]. + */ +- (void) growlNotificationTimedOut:(id)clickContext; + + +/*! + * @method hasNetworkClientEntitlement + * @abstract Used only in sandboxed situations since we don't know whether the app has com.apple.security.network.client entitlement + * @discussion GrowlDelegate calls to find out if we have the com.apple.security.network.client entitlement, + * since we can't find this out without hitting the sandbox. We only call it if we detect that the application is sandboxed. + */ +- (BOOL) hasNetworkClientEntitlement; + +@end + +#pragma mark - + +#endif /* __GrowlApplicationBridge_h__ */ diff --git a/Growl.framework/Versions/A/Headers/GrowlDefines.h b/Growl.framework/Versions/A/Headers/GrowlDefines.h new file mode 100755 index 0000000..51ef630 --- /dev/null +++ b/Growl.framework/Versions/A/Headers/GrowlDefines.h @@ -0,0 +1,341 @@ +// +// GrowlDefines.h +// + +#ifndef _GROWLDEFINES_H +#define _GROWLDEFINES_H + +#ifdef __OBJC__ +#define XSTR(x) (@x) +#else +#define XSTR CFSTR +#endif + +/*! @header GrowlDefines.h + * @abstract Defines all the notification keys. + * @discussion Defines all the keys used for registration with Growl and for + * Growl notifications. + * + * Most applications should use the functions or methods of Growl.framework + * instead of posting notifications such as those described here. + * @updated 2004-01-25 + */ + +// UserInfo Keys for Registration +#pragma mark UserInfo Keys for Registration + +/*! @group Registration userInfo keys */ +/* @abstract Keys for the userInfo dictionary of a GROWL_APP_REGISTRATION distributed notification. + * @discussion The values of these keys describe the application and the + * notifications it may post. + * + * Your application must register with Growl before it can post Growl + * notifications (and have them not be ignored). However, as of Growl 0.6, + * posting GROWL_APP_REGISTRATION notifications directly is no longer the + * preferred way to register your application. Your application should instead + * use Growl.framework's delegate system. + * See +[GrowlApplicationBridge setGrowlDelegate:] or Growl_SetDelegate for + * more information. + */ + +/*! @defined GROWL_APP_NAME + * @abstract The name of your application. + * @discussion The name of your application. This should remain stable between + * different versions and incarnations of your application. + * For example, "SurfWriter" is a good app name, whereas "SurfWriter 2.0" and + * "SurfWriter Lite" are not. + */ +#define GROWL_APP_NAME XSTR("ApplicationName") +/*! @defined GROWL_APP_ID + * @abstract The bundle identifier of your application. + * @discussion The bundle identifier of your application. This key should + * be unique for your application while there may be several applications + * with the same GROWL_APP_NAME. + * This key is optional. + */ +#define GROWL_APP_ID XSTR("ApplicationId") +/*! @defined GROWL_APP_ICON_DATA + * @abstract The image data for your application's icon. + * @discussion Image data representing your application's icon. This may be + * superimposed on a notification icon as a badge, used as the notification + * icon when a notification-specific icon is not supplied, or ignored + * altogether, depending on the display. Must be in a format supported by + * NSImage, such as TIFF, PNG, GIF, JPEG, BMP, PICT, or PDF. + * + * Optional. Not supported by all display plugins. + */ +#define GROWL_APP_ICON_DATA XSTR("ApplicationIcon") +/*! @defined GROWL_NOTIFICATIONS_DEFAULT + * @abstract The array of notifications to turn on by default. + * @discussion These are the names of the notifications that should be enabled + * by default when your application registers for the first time. If your + * application reregisters, Growl will look here for any new notification + * names found in GROWL_NOTIFICATIONS_ALL, but ignore any others. + */ +#define GROWL_NOTIFICATIONS_DEFAULT XSTR("DefaultNotifications") +/*! @defined GROWL_NOTIFICATIONS_ALL + * @abstract The array of all notifications your application can send. + * @discussion These are the names of all of the notifications that your + * application may post. See GROWL_NOTIFICATION_NAME for a discussion of good + * notification names. + */ +#define GROWL_NOTIFICATIONS_ALL XSTR("AllNotifications") +/*! @defined GROWL_NOTIFICATIONS_HUMAN_READABLE_DESCRIPTIONS + * @abstract A dictionary of human-readable names for your notifications. + * @discussion By default, the Growl UI will display notifications by the names given in GROWL_NOTIFICATIONS_ALL + * which correspond to the GROWL_NOTIFICATION_NAME. This dictionary specifies the human-readable name to display. + * The keys of the dictionary are GROWL_NOTIFICATION_NAME strings; the objects are the human-readable versions. + * For any GROWL_NOTIFICATION_NAME not specific in this dictionary, the GROWL_NOTIFICATION_NAME will be displayed. + * + * This key is optional. + */ +#define GROWL_NOTIFICATIONS_HUMAN_READABLE_NAMES XSTR("HumanReadableNames") +/*! @defined GROWL_NOTIFICATIONS_DESCRIPTIONS +* @abstract A dictionary of descriptions of _when_ each notification occurs +* @discussion This is an NSDictionary whose keys are GROWL_NOTIFICATION_NAME strings and whose objects are +* descriptions of _when_ each notification occurs, such as "You received a new mail message" or +* "A file finished downloading". +* +* This key is optional. +*/ +#define GROWL_NOTIFICATIONS_DESCRIPTIONS XSTR("NotificationDescriptions") + +/*! @defined GROWL_TICKET_VERSION + * @abstract The version of your registration ticket. + * @discussion Include this key in a ticket plist file that you put in your + * application bundle for auto-discovery. The current ticket version is 1. + */ +#define GROWL_TICKET_VERSION XSTR("TicketVersion") +// UserInfo Keys for Notifications +#pragma mark UserInfo Keys for Notifications + +/*! @group Notification userInfo keys */ +/* @abstract Keys for the userInfo dictionary of a GROWL_NOTIFICATION distributed notification. + * @discussion The values of these keys describe the content of a Growl + * notification. + * + * Not all of these keys are supported by all displays. Only the name, title, + * and description of a notification are universal. Most of the built-in + * displays do support all of these keys, and most other visual displays + * probably will also. But, as of 0.6, the Log, MailMe, and Speech displays + * support only textual data. + */ + +/*! @defined GROWL_NOTIFICATION_NAME + * @abstract The name of the notification. + * @discussion The name of the notification. Note that if you do not define + * GROWL_NOTIFICATIONS_HUMAN_READABLE_NAMES when registering your ticket originally this name + * will the one displayed within the Growl preference pane and should be human-readable. + */ +#define GROWL_NOTIFICATION_NAME XSTR("NotificationName") +/*! @defined GROWL_NOTIFICATION_TITLE + * @abstract The title to display in the notification. + * @discussion The title of the notification. Should be very brief. + * The title usually says what happened, e.g. "Download complete". + */ +#define GROWL_NOTIFICATION_TITLE XSTR("NotificationTitle") +/*! @defined GROWL_NOTIFICATION_DESCRIPTION + * @abstract The description to display in the notification. + * @discussion The description should be longer and more verbose than the title. + * The description usually tells the subject of the action, + * e.g. "Growl-0.6.dmg downloaded in 5.02 minutes". + */ +#define GROWL_NOTIFICATION_DESCRIPTION XSTR("NotificationDescription") +/*! @defined GROWL_NOTIFICATION_ICON + * @discussion Image data for the notification icon. Image data must be in a format + * supported by NSImage, such as TIFF, PNG, GIF, JPEG, BMP, PICT, or PDF. + * + * Optional. Not supported by all display plugins. + */ +#define GROWL_NOTIFICATION_ICON_DATA XSTR("NotificationIcon") +/*! @defined GROWL_NOTIFICATION_APP_ICON + * @discussion Image data for the application icon, in case GROWL_APP_ICON does + * not apply for some reason. Image data be in a format supported by NSImage, such + * as TIFF, PNG, GIF, JPEG, BMP, PICT, or PDF. + * + * Optional. Not supported by all display plugins. + */ +#define GROWL_NOTIFICATION_APP_ICON_DATA XSTR("NotificationAppIcon") +/*! @defined GROWL_NOTIFICATION_PRIORITY + * @discussion The priority of the notification as an integer number from + * -2 to +2 (+2 being highest). + * + * Optional. Not supported by all display plugins. + */ +#define GROWL_NOTIFICATION_PRIORITY XSTR("NotificationPriority") +/*! @defined GROWL_NOTIFICATION_STICKY + * @discussion A Boolean number controlling whether the notification is sticky. + * + * Optional. Not supported by all display plugins. + */ +#define GROWL_NOTIFICATION_STICKY XSTR("NotificationSticky") +/*! @defined GROWL_NOTIFICATION_CLICK_CONTEXT + * @abstract Identifies which notification was clicked. + * @discussion An identifier for the notification for clicking purposes. + * + * This will be passed back to the application when the notification is + * clicked. It must be plist-encodable (a data, dictionary, array, number, or + * string object), and it should be unique for each notification you post. + * A good click context would be a UUID string returned by NSProcessInfo or + * CFUUID. + * + * Optional. Not supported by all display plugins. + */ +#define GROWL_NOTIFICATION_CLICK_CONTEXT XSTR("NotificationClickContext") + +/*! @defined GROWL_NOTIFICATION_IDENTIFIER + * @abstract An identifier for the notification for coalescing purposes. + * Notifications with the same identifier fall into the same class; only + * the last notification of a class is displayed on the screen. If a + * notification of the same class is currently being displayed, it is + * replaced by this notification. + * + * Optional. Not supported by all display plugins. + */ +#define GROWL_NOTIFICATION_IDENTIFIER XSTR("GrowlNotificationIdentifier") + +/*! @defined GROWL_APP_PID + * @abstract The process identifier of the process which sends this + * notification. If this field is set, the application will only receive + * clicked and timed out notifications which originate from this process. + * + * Optional. + */ +#define GROWL_APP_PID XSTR("ApplicationPID") + +/*! @defined GROWL_NOTIFICATION_PROGRESS +* @abstract If this key is set, it should contain a double value wrapped +* in a NSNumber which describes some sort of progress (from 0.0 to 100.0). +* If this is key is not set, no progress bar is shown. +* +* Optional. Not supported by all display plugins. +*/ +#define GROWL_NOTIFICATION_PROGRESS XSTR("NotificationProgress") + +// Notifications +#pragma mark Notifications + +/*! @group Notification names */ +/* @abstract Names of distributed notifications used by Growl. + * @discussion These are notifications used by applications (directly or + * indirectly) to interact with Growl, and by Growl for interaction between + * its components. + * + * Most of these should no longer be used in Growl 0.6 and later, in favor of + * Growl.framework's GrowlApplicationBridge APIs. + */ + +/*! @defined GROWL_APP_REGISTRATION + * @abstract The distributed notification for registering your application. + * @discussion This is the name of the distributed notification that can be + * used to register applications with Growl. + * + * The userInfo dictionary for this notification can contain these keys: + *
    + *
  • GROWL_APP_NAME
  • + *
  • GROWL_APP_ICON_DATA
  • + *
  • GROWL_NOTIFICATIONS_ALL
  • + *
  • GROWL_NOTIFICATIONS_DEFAULT
  • + *
+ * + * No longer recommended as of Growl 0.6. An alternate method of registering + * is to use Growl.framework's delegate system. + * See +[GrowlApplicationBridge setGrowlDelegate:] or Growl_SetDelegate for + * more information. + */ +#define GROWL_APP_REGISTRATION XSTR("GrowlApplicationRegistrationNotification") +/*! @defined GROWL_APP_REGISTRATION_CONF + * @abstract The distributed notification for confirming registration. + * @discussion The name of the distributed notification sent to confirm the + * registration. Used by the Growl preference pane. Your application probably + * does not need to use this notification. + */ +#define GROWL_APP_REGISTRATION_CONF XSTR("GrowlApplicationRegistrationConfirmationNotification") +/*! @defined GROWL_NOTIFICATION + * @abstract The distributed notification for Growl notifications. + * @discussion This is what it all comes down to. This is the name of the + * distributed notification that your application posts to actually send a + * Growl notification. + * + * The userInfo dictionary for this notification can contain these keys: + *
    + *
  • GROWL_NOTIFICATION_NAME (required)
  • + *
  • GROWL_NOTIFICATION_TITLE (required)
  • + *
  • GROWL_NOTIFICATION_DESCRIPTION (required)
  • + *
  • GROWL_NOTIFICATION_ICON
  • + *
  • GROWL_NOTIFICATION_APP_ICON
  • + *
  • GROWL_NOTIFICATION_PRIORITY
  • + *
  • GROWL_NOTIFICATION_STICKY
  • + *
  • GROWL_NOTIFICATION_CLICK_CONTEXT
  • + *
  • GROWL_APP_NAME (required)
  • + *
+ * + * No longer recommended as of Growl 0.6. Three alternate methods of posting + * notifications are +[GrowlApplicationBridge notifyWithTitle:description:notificationName:iconData:priority:isSticky:clickContext:], + * Growl_NotifyWithTitleDescriptionNameIconPriorityStickyClickContext, and + * Growl_PostNotification. + */ +#define GROWL_NOTIFICATION XSTR("GrowlNotification") +/*! @defined GROWL_PING + * @abstract A distributed notification to check whether Growl is running. + * @discussion This is used by the Growl preference pane. If it receives a + * GROWL_PONG, the preference pane takes this to mean that Growl is running. + */ +#define GROWL_PING XSTR("Honey, Mind Taking Out The Trash") +/*! @defined GROWL_PONG + * @abstract The distributed notification sent in reply to GROWL_PING. + * @discussion GrowlHelperApp posts this in reply to GROWL_PING. + */ +#define GROWL_PONG XSTR("What Do You Want From Me, Woman") +/*! @defined GROWL_IS_READY + * @abstract The distributed notification sent when Growl starts up. + * @discussion GrowlHelperApp posts this when it has begin listening on all of + * its sources for new notifications. GrowlApplicationBridge (in + * Growl.framework), upon receiving this notification, reregisters using the + * registration dictionary supplied by its delegate. + */ +#define GROWL_IS_READY XSTR("Lend Me Some Sugar; I Am Your Neighbor!") + + +/*! @defined GROWL_DISTRIBUTED_NOTIFICATION_CLICKED_SUFFIX + * @abstract Part of the name of the distributed notification sent when a supported notification is clicked. + * @discussion When a Growl notification with a click context is clicked on by + * the user, Growl posts a distributed notification whose name is in the format: + * [NSString stringWithFormat:@"%@-%d-%@", appName, pid, GROWL_DISTRIBUTED_NOTIFICATION_CLICKED_SUFFIX] + * The GrowlApplicationBridge responds to this notification by calling a callback in its delegate. + */ +#define GROWL_DISTRIBUTED_NOTIFICATION_CLICKED_SUFFIX XSTR("GrowlClicked!") + +/*! @defined GROWL_DISTRIBUTED_NOTIFICATION_TIMED_OUT_SUFFIX + * @abstract Part of the name of the distributed notification sent when a supported notification times out without being clicked. + * @discussion When a Growl notification with a click context times out, Growl posts a distributed notification + * whose name is in the format: + * [NSString stringWithFormat:@"%@-%d-%@", appName, pid, GROWL_DISTRIBUTED_NOTIFICATION_TIMED_OUT_SUFFIX] + * The GrowlApplicationBridge responds to this notification by calling a callback in its delegate. + * NOTE: The user may have actually clicked the 'close' button; this triggers an *immediate* time-out of the notification. + */ +#define GROWL_DISTRIBUTED_NOTIFICATION_TIMED_OUT_SUFFIX XSTR("GrowlTimedOut!") + +/*! @group Other symbols */ +/* Symbols which don't fit into any of the other categories. */ + +/*! @defined GROWL_KEY_CLICKED_CONTEXT + * @abstract Used internally as the key for the clickedContext passed over DNC. + * @discussion This key is used in GROWL_NOTIFICATION_CLICKED, and contains the + * click context that was supplied in the original notification. + */ +#define GROWL_KEY_CLICKED_CONTEXT XSTR("ClickedContext") +/*! @defined GROWL_REG_DICT_EXTENSION + * @abstract The filename extension for registration dictionaries. + * @discussion The GrowlApplicationBridge in Growl.framework registers with + * Growl by creating a file with the extension of .(GROWL_REG_DICT_EXTENSION) + * and opening it in the GrowlHelperApp. This happens whether or not Growl is + * running; if it was stopped, it quits immediately without listening for + * notifications. + */ +#define GROWL_REG_DICT_EXTENSION XSTR("growlRegDict") + + +#define GROWL_POSITION_PREFERENCE_KEY @"GrowlSelectedPosition" + +#endif //ndef _GROWLDEFINES_H diff --git a/Growl.framework/Versions/A/Resources/Info.plist b/Growl.framework/Versions/A/Resources/Info.plist new file mode 100755 index 0000000..5f2a1f4 --- /dev/null +++ b/Growl.framework/Versions/A/Resources/Info.plist @@ -0,0 +1,40 @@ + + + + + BuildMachineOSBuild + 11C74 + CFBundleDevelopmentRegion + English + CFBundleExecutable + Growl + CFBundleIdentifier + com.growl.growlframework + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.3.1 + CFBundleSignature + GRRR + CFBundleVersion + 1.3.1 + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 4D199 + DTPlatformVersion + GM + DTSDKBuild + 11C63 + DTSDKName + macosx10.7 + DTXcode + 0420 + DTXcodeBuild + 4D199 + NSPrincipalClass + GrowlApplicationBridge + + diff --git a/Growl.framework/Versions/A/_CodeSignature/CodeResources b/Growl.framework/Versions/A/_CodeSignature/CodeResources new file mode 100755 index 0000000..d654425 --- /dev/null +++ b/Growl.framework/Versions/A/_CodeSignature/CodeResources @@ -0,0 +1,34 @@ + + + + + files + + Resources/Info.plist + + SwzGt9RQsuVafBBrfBalB75dCwU= + + + rules + + ^Resources/ + + ^Resources/.*\.lproj/ + + optional + + weight + 1000 + + ^Resources/.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^version.plist$ + + + + diff --git a/Growl.framework/Versions/Current b/Growl.framework/Versions/Current new file mode 120000 index 0000000..8c7e5a6 --- /dev/null +++ b/Growl.framework/Versions/Current @@ -0,0 +1 @@ +A \ No newline at end of file diff --git a/Spotify.icns b/Spotify.icns old mode 100644 new mode 100755 diff --git a/de.lproj/Localizable.strings b/de.lproj/Localizable.strings old mode 100644 new mode 100755 diff --git a/en.lproj/Localizable.strings b/en.lproj/Localizable.strings old mode 100644 new mode 100755 diff --git a/iLyrics.icns b/iLyrics.icns old mode 100644 new mode 100755 diff --git a/iLyrics.xcodeproj/project.pbxproj b/iLyrics.xcodeproj/project.pbxproj old mode 100644 new mode 100755 diff --git a/iLyrics.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/iLyrics.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100755 index 0000000..1c2601f --- /dev/null +++ b/iLyrics.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/iLyrics.xcodeproj/project.xcworkspace/xcuserdata/kim.xcuserdatad/UserInterfaceState.xcuserstate b/iLyrics.xcodeproj/project.xcworkspace/xcuserdata/kim.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100755 index 0000000..18f1a29 Binary files /dev/null and b/iLyrics.xcodeproj/project.xcworkspace/xcuserdata/kim.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/iLyrics.xcodeproj/project.xcworkspace/xcuserdata/kim.xcuserdatad/WorkspaceSettings.xcsettings b/iLyrics.xcodeproj/project.xcworkspace/xcuserdata/kim.xcuserdatad/WorkspaceSettings.xcsettings new file mode 100755 index 0000000..659c876 --- /dev/null +++ b/iLyrics.xcodeproj/project.xcworkspace/xcuserdata/kim.xcuserdatad/WorkspaceSettings.xcsettings @@ -0,0 +1,10 @@ + + + + + HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges + + SnapshotAutomaticallyBeforeSignificantChanges + + + diff --git a/iLyrics.xcodeproj/xcuserdata/kim.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist b/iLyrics.xcodeproj/xcuserdata/kim.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist new file mode 100755 index 0000000..05301bc --- /dev/null +++ b/iLyrics.xcodeproj/xcuserdata/kim.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist @@ -0,0 +1,5 @@ + + + diff --git a/iLyrics.xcodeproj/xcuserdata/kim.xcuserdatad/xcschemes/Default Lyrics Hosters.xcscheme b/iLyrics.xcodeproj/xcuserdata/kim.xcuserdatad/xcschemes/Default Lyrics Hosters.xcscheme new file mode 100755 index 0000000..18a1ca0 --- /dev/null +++ b/iLyrics.xcodeproj/xcuserdata/kim.xcuserdatad/xcschemes/Default Lyrics Hosters.xcscheme @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iLyrics.xcodeproj/xcuserdata/kim.xcuserdatad/xcschemes/iLyrics.xcscheme b/iLyrics.xcodeproj/xcuserdata/kim.xcuserdatad/xcschemes/iLyrics.xcscheme new file mode 100755 index 0000000..6362c64 --- /dev/null +++ b/iLyrics.xcodeproj/xcuserdata/kim.xcuserdatad/xcschemes/iLyrics.xcscheme @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iLyrics.xcodeproj/xcuserdata/kim.xcuserdatad/xcschemes/xcschememanagement.plist b/iLyrics.xcodeproj/xcuserdata/kim.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100755 index 0000000..f8261d4 --- /dev/null +++ b/iLyrics.xcodeproj/xcuserdata/kim.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,32 @@ + + + + + SchemeUserState + + Default Lyrics Hosters.xcscheme + + orderHint + 1 + + iLyrics.xcscheme + + orderHint + 0 + + + SuppressBuildableAutocreation + + 3B181920159707AE0012094E + + primary + + + 3B20EF261584EA9A006C0CDF + + primary + + + + + diff --git a/iLyrics/AppDelegate.h b/iLyrics/AppDelegate.h old mode 100644 new mode 100755 diff --git a/iLyrics/AppDelegate.m b/iLyrics/AppDelegate.m old mode 100644 new mode 100755 diff --git a/iLyrics/AutoLyrics.h b/iLyrics/AutoLyrics.h old mode 100644 new mode 100755 diff --git a/iLyrics/AutoLyrics.m b/iLyrics/AutoLyrics.m old mode 100644 new mode 100755 diff --git a/iLyrics/Lyrics.h b/iLyrics/Lyrics.h old mode 100644 new mode 100755 diff --git a/iLyrics/Lyrics.m b/iLyrics/Lyrics.m old mode 100644 new mode 100755 diff --git a/iLyrics/LyricsHoster.h b/iLyrics/LyricsHoster.h old mode 100644 new mode 100755 diff --git a/iLyrics/LyricsHosterUtil.h b/iLyrics/LyricsHosterUtil.h old mode 100644 new mode 100755 diff --git a/iLyrics/LyricsHosterUtil.m b/iLyrics/LyricsHosterUtil.m old mode 100644 new mode 100755 diff --git a/iLyrics/MP3Lyrics.h b/iLyrics/MP3Lyrics.h old mode 100644 new mode 100755 diff --git a/iLyrics/MP3Lyrics.m b/iLyrics/MP3Lyrics.m old mode 100644 new mode 100755 diff --git a/iLyrics/Magistrix.h b/iLyrics/Magistrix.h old mode 100644 new mode 100755 diff --git a/iLyrics/Magistrix.m b/iLyrics/Magistrix.m old mode 100644 new mode 100755 index d4c8a19..560ed99 --- a/iLyrics/Magistrix.m +++ b/iLyrics/Magistrix.m @@ -19,8 +19,8 @@ typedef enum { @implementation Magistrix { NSString *query; - int loadedResults; - int resultCount; + NSInteger loadedResults; + NSInteger resultCount; NSString *firstPage; } @@ -37,7 +37,7 @@ typedef enum { -(void) startNewSearchForQuery: (NSString*) q { [self resetLoadedResults]; query = q; - int site = (loadedResults/10) + 1; + NSInteger site = (loadedResults/10) + 1; NSString *searchPath = [NSString stringWithFormat:@"http://www.magistrix.de/lyrics/search?q=%@&page=%i", [query stringByFormattingForURL], site]; NSURL *searchURL = [NSURL URLWithString:searchPath]; NSError *error; @@ -61,7 +61,7 @@ typedef enum { } -(NSArray*) nextResults { - int site = (loadedResults/10) + 1; + NSInteger site = (loadedResults/10) + 1; NSString *searchPath = [NSString stringWithFormat:@"http://www.magistrix.de/lyrics/search?q=%@&page=%i", [query stringByFormattingForURL] , site]; NSURL *searchURL = [NSURL URLWithString:searchPath]; NSString *page; @@ -104,13 +104,13 @@ typedef enum { } -(SearchResult*) searchResultFromLyricsPage: (NSString *) page atURL: (NSURL *) url{ - int headingStart = NSMaxRange([page rangeOfString:@"

"]); - int headingEnd = [page rangeOfString:@"

"].location; - int artistStart = NSMaxRange([page rangeOfString:@">" options:NSCaseInsensitiveSearch range:NSMakeRange(headingStart, headingEnd-headingStart)]); + NSInteger headingStart = NSMaxRange([page rangeOfString:@"

"]); + NSInteger headingEnd = [page rangeOfString:@"

"].location; + NSInteger artistStart = NSMaxRange([page rangeOfString:@">" options:NSCaseInsensitiveSearch range:NSMakeRange(headingStart, headingEnd-headingStart)]); NSRange artistEndTag = [page rangeOfString:@"" options:NSCaseInsensitiveSearch range:NSMakeRange(artistStart, headingEnd-artistStart)]; - int artistEnd = artistEndTag.location; - int songNameStart = NSMaxRange(artistEndTag); - int songNameEnd = headingEnd; + NSInteger artistEnd = artistEndTag.location; + NSInteger songNameStart = NSMaxRange(artistEndTag); + NSInteger songNameEnd = headingEnd; NSString *artist = [[page substringWithRange:NSMakeRange(artistStart, artistEnd-artistStart)] stringByRemovingHTMLTags]; NSString *songName = [page substringWithRange:NSMakeRange(songNameStart, songNameEnd-songNameStart)]; //Remove the " Lyric" and the " – " from the Song name @@ -120,8 +120,8 @@ typedef enum { } -(NSArray*) searchResultsFromPage: (NSString *) page { - int resultsTableStart = NSMaxRange([page rangeOfString:@""]); - int resultsTableEnd = [page rangeOfString:@"
"].location; + NSInteger resultsTableStart = NSMaxRange([page rangeOfString:@""]); + NSInteger resultsTableEnd = [page rangeOfString:@"
"].location; NSArray *resultTags = [self resultTagsFromTable:[page substringWithRange:NSMakeRange(resultsTableStart, resultsTableEnd-resultsTableStart)]]; NSMutableArray *searchResults = [[NSMutableArray alloc] init]; for (NSString *tag in resultTags) { @@ -138,8 +138,8 @@ typedef enum { NSMutableArray *tags = [[NSMutableArray alloc] init]; NSUInteger currentIndex = [table rangeOfString:@""].location; while (currentIndex != NSNotFound) { - int startIndex = currentIndex + [@"" length]; - int endIndex = [table rangeOfString:@"" options:NSCaseInsensitiveSearch range:restRange].location; + NSInteger startIndex = currentIndex + [@"" length]; + NSInteger endIndex = [table rangeOfString:@"" options:NSCaseInsensitiveSearch range:restRange].location; NSRange tagRange = NSMakeRange(startIndex, endIndex-startIndex); [tags addObject:[table substringWithRange:tagRange]]; restRange = [self restRangeFromString:table subtractingRange:tagRange]; @@ -152,20 +152,20 @@ typedef enum { -(SearchResult*) searchResultFromResultTag: (NSString *) tag { NSRange artistStartRange = [tag rangeOfString:@">"]; - int artistEndIndex = [tag rangeOfString:@"<" options:NSCaseInsensitiveSearch range:[self restRangeFromString:tag subtractingRange:artistStartRange]].location; - int artistStartIndex = NSMaxRange(artistStartRange); + NSInteger artistEndIndex = [tag rangeOfString:@"<" options:NSCaseInsensitiveSearch range:[self restRangeFromString:tag subtractingRange:artistStartRange]].location; + NSInteger artistStartIndex = NSMaxRange(artistStartRange); NSString *artist = [[tag substringWithRange:NSMakeRange(artistStartIndex, artistEndIndex-artistStartIndex)] stringByRemovingHTMLTags]; NSRange restRange = [self restRangeFromString:tag subtractingRange:NSMakeRange(artistEndIndex, [@"" length])]; NSRange songNameTagStartRange = [tag rangeOfString:@"" options:NSCaseInsensitiveSearch range:[self restRangeFromString:tag subtractingRange:songNameTagStartRange]]); - int songNameEnd = [tag rangeOfString:@"" options:NSCaseInsensitiveSearch range:[self restRangeFromString:tag subtractingRange:songNameTagStartRange]].location; + NSInteger songNameStart = NSMaxRange([tag rangeOfString:@">" options:NSCaseInsensitiveSearch range:[self restRangeFromString:tag subtractingRange:songNameTagStartRange]]); + NSInteger songNameEnd = [tag rangeOfString:@"" options:NSCaseInsensitiveSearch range:[self restRangeFromString:tag subtractingRange:songNameTagStartRange]].location; NSString *songName = [[tag substringWithRange:NSMakeRange(songNameStart, songNameEnd-songNameStart)] stringByRemovingHTMLTags]; - int previewStart = songNameEnd + [@"" length] + [@"\n

" length]; + NSInteger previewStart = songNameEnd + [@"" length] + [@"\n

" length]; NSRange previewRestRange = NSMakeRange(previewStart, [tag length]-previewStart); - int previewEnd = [tag rangeOfString:@"

" options:NSCaseInsensitiveSearch range:previewRestRange].location; + NSInteger previewEnd = [tag rangeOfString:@"

" options:NSCaseInsensitiveSearch range:previewRestRange].location; NSString *preview = [[tag substringWithRange:NSMakeRange(previewStart, previewEnd-previewStart)] stringByRemovingHTMLTags]; return [[SearchResult alloc] initWithName:songName fromArtist:artist preview:preview link:link loadedByHoster:self]; } @@ -180,7 +180,7 @@ typedef enum { -(NSRange) restRangeFromString: (NSString *) page subtractingRange: (NSRange) aRange { - int loc = NSMaxRange(aRange); + NSInteger loc = NSMaxRange(aRange); return NSMakeRange(loc, [page length]-loc); } @@ -188,14 +188,14 @@ typedef enum { if (resultCount <= 0) { //Nothing loaded before NSRange resultsLabelStartRange = [page rangeOfString:@"

Ergebnisse 1 bis "]; - int resultsLabelEnd = [page rangeOfString:@"

" options:NSCaseInsensitiveSearch range:[self restRangeFromString:page subtractingRange:resultsLabelStartRange]].location; + NSInteger resultsLabelEnd = [page rangeOfString:@"

" options:NSCaseInsensitiveSearch range:[self restRangeFromString:page subtractingRange:resultsLabelStartRange]].location; NSString *resultsLabel = [page substringWithRange:NSMakeRange(NSMaxRange(resultsLabelStartRange), resultsLabelEnd-resultsLabelStartRange.location)]; if ([resultsLabel rangeOfString:@"ungefähr"].location != NSNotFound){ //Needs not more than 100 which means 10 sites (which is the maximum) resultCount = 100; } else { - int resultsStart = NSMaxRange([resultsLabel rangeOfString:@"von "]); - int resultsEnd = [resultsLabel rangeOfString:@"<"].location; + NSInteger resultsStart = NSMaxRange([resultsLabel rangeOfString:@"von "]); + NSInteger resultsEnd = [resultsLabel rangeOfString:@"<"].location; NSString *results = [resultsLabel substringWithRange:NSMakeRange(resultsStart, resultsEnd-resultsStart)]; resultCount = [results intValue]; } @@ -221,9 +221,9 @@ typedef enum { } -(NSString *) lyricsFromPage: (NSString *)page { - int lyricsStart = NSMaxRange([page rangeOfString:@"
"]) + [@"\n" length]; + NSInteger lyricsStart = NSMaxRange([page rangeOfString:@"
"]) + [@"\n" length]; NSRange restRange = NSMakeRange(lyricsStart, [page length]-lyricsStart); - int lyricsEnd = [page rangeOfString:@"
" options:NSCaseInsensitiveSearch range:restRange].location; + NSInteger lyricsEnd = [page rangeOfString:@"
" options:NSCaseInsensitiveSearch range:restRange].location; NSString *lyrics = [[page substringWithRange:NSMakeRange(lyricsStart, lyricsEnd-lyricsStart)] stringByRemovingHTMLTags]; return lyrics; } diff --git a/iLyrics/MainController.h b/iLyrics/MainController.h old mode 100644 new mode 100755 diff --git a/iLyrics/MainController.m b/iLyrics/MainController.m old mode 100644 new mode 100755 index 78115a3..b468327 --- a/iLyrics/MainController.m +++ b/iLyrics/MainController.m @@ -126,6 +126,7 @@ } - (IBAction)startNewSearch:(id)sender { + NSLog(@"New Search"); [self resetLoadedResults:sender]; if ([[searchField stringValue] length] > 0) { for (id hoster in [ilyrics lyricsHosters]) { diff --git a/iLyrics/PreferencesController.h b/iLyrics/PreferencesController.h old mode 100644 new mode 100755 diff --git a/iLyrics/PreferencesController.m b/iLyrics/PreferencesController.m old mode 100644 new mode 100755 diff --git a/iLyrics/PreferencesWindow.h b/iLyrics/PreferencesWindow.h old mode 100644 new mode 100755 diff --git a/iLyrics/PreferencesWindow.m b/iLyrics/PreferencesWindow.m old mode 100644 new mode 100755 diff --git a/iLyrics/SearchResult.h b/iLyrics/SearchResult.h old mode 100644 new mode 100755 diff --git a/iLyrics/SearchResult.m b/iLyrics/SearchResult.m old mode 100644 new mode 100755 diff --git a/iLyrics/Songtexte.h b/iLyrics/Songtexte.h old mode 100644 new mode 100755 diff --git a/iLyrics/Songtexte.m b/iLyrics/Songtexte.m old mode 100644 new mode 100755 diff --git a/iLyrics/Spotify.h b/iLyrics/Spotify.h old mode 100644 new mode 100755 diff --git a/iLyrics/de.lproj/Credits.rtf b/iLyrics/de.lproj/Credits.rtf old mode 100644 new mode 100755 diff --git a/iLyrics/de.lproj/MainMenu.xib b/iLyrics/de.lproj/MainMenu.xib old mode 100644 new mode 100755 diff --git a/iLyrics/en.lproj/Credits.rtf b/iLyrics/en.lproj/Credits.rtf old mode 100644 new mode 100755 diff --git a/iLyrics/en.lproj/InfoPlist.strings b/iLyrics/en.lproj/InfoPlist.strings old mode 100644 new mode 100755 diff --git a/iLyrics/en.lproj/MainMenu.xib b/iLyrics/en.lproj/MainMenu.xib old mode 100644 new mode 100755 diff --git a/iLyrics/iLyrics-Info.plist b/iLyrics/iLyrics-Info.plist old mode 100644 new mode 100755 diff --git a/iLyrics/iLyrics-Prefix.pch b/iLyrics/iLyrics-Prefix.pch old mode 100644 new mode 100755 diff --git a/iLyrics/iLyrics.h b/iLyrics/iLyrics.h old mode 100644 new mode 100755 diff --git a/iLyrics/iLyrics.m b/iLyrics/iLyrics.m old mode 100644 new mode 100755 index dfed7aa..0fae5a7 --- a/iLyrics/iLyrics.m +++ b/iLyrics/iLyrics.m @@ -34,7 +34,7 @@ iLyrics *ilyrics; magistrix = [[Magistrix alloc] init]; songtexte = [[Songtexte alloc] init]; //mp3Lyrics = [[MP3Lyrics alloc] init]; - lyricsHosters = [NSMutableArray arrayWithObjects:magistrix, songtexte, /*mp3Lyrics,*/ nil]; + lyricsHosters = [NSMutableArray arrayWithObjects:/*magistrix, */songtexte, /*mp3Lyrics,*/ nil]; [self loadFromDefaults:[NSUserDefaults standardUserDefaults]]; } return self; diff --git a/iLyrics/iTunes.h b/iLyrics/iTunes.h old mode 100644 new mode 100755 diff --git a/iLyrics/main.m b/iLyrics/main.m old mode 100644 new mode 100755 diff --git a/iTunes.icns b/iTunes.icns old mode 100644 new mode 100755