diff --git a/libtransmission/torrent.c b/libtransmission/torrent.c index aced253a6..378c357fe 100644 --- a/libtransmission/torrent.c +++ b/libtransmission/torrent.c @@ -2914,8 +2914,6 @@ setLocation( void * vdata ) if( !tr_is_same_file( location, tor->currentDir ) ) { tr_file_index_t i; - tr_ptrArray copiedxattrs = TR_PTR_ARRAY_INIT; - const void * const vstrcmp = strcmp; /* bad idea to move files while they're being verified... */ tr_verifyRemove( tor ); @@ -2937,7 +2935,6 @@ setLocation( void * vdata ) if( do_move && !tr_is_same_file( oldpath, newpath ) ) { - char * cursub; bool renamed = false; errno = 0; tr_torinf( tor, "moving \"%s\" to \"%s\"", oldpath, newpath ); @@ -2947,24 +2944,6 @@ setLocation( void * vdata ) tr_torerr( tor, "error moving \"%s\" to \"%s\": %s", oldpath, newpath, tr_strerror( errno ) ); } - - /* copy extended attributes */ - cursub = tr_dirname( sub ); - while( strcmp( cursub, "." ) != 0 ) { - char * tmp; - if ( tr_ptrArrayFindSorted( &copiedxattrs, cursub, vstrcmp ) == NULL ) { - char * olddir = tr_buildPath( oldbase, cursub, NULL ); - char * newdir = tr_buildPath( location, cursub, NULL ); - tr_copyXattr( olddir, newdir ); - tr_free( olddir ); - tr_free( newdir ); - tr_ptrArrayInsertSorted( &copiedxattrs, tr_strdup( cursub ), vstrcmp ); - } - tmp = tr_dirname( cursub ); - tr_free( cursub ); - cursub = tmp; - } - tr_free(cursub); } tr_free( newpath ); @@ -2988,7 +2967,6 @@ setLocation( void * vdata ) /* set the new location and reverify */ tr_torrentSetDownloadDir( tor, location ); } - tr_ptrArrayDestruct( &copiedxattrs, tr_free ); } if( !err && do_move ) diff --git a/libtransmission/utils.c b/libtransmission/utils.c index 89de3fd46..c09295791 100644 --- a/libtransmission/utils.c +++ b/libtransmission/utils.c @@ -19,7 +19,6 @@ #define HAVE_ICONV_OPEN #define HAVE_MKDTEMP #define HAVE_VALLOC - #define HAVE_XATTRS_MACOS #endif #include @@ -41,9 +40,6 @@ #include #include #include -#ifdef HAVE_XATTRS_MACOS - #include /* listxattr(), getxattr(), setxattr() */ -#endif #include /* stat(), getcwd(), getpagesize(), unlink() */ #include @@ -1514,75 +1510,6 @@ tr_strratio( char * buf, size_t buflen, double ratio, const char * infinity ) return buf; } -int -tr_copyXattr( const char* srcpath, const char* dstpath ) -{ - int ret = 0; -#ifdef HAVE_XATTRS_MACOS - char * listbuf = NULL, * valuebuf = NULL; - ssize_t listlen = 0, valuelen = 0; - char* name; - - listlen = listxattr( srcpath, NULL, 0, 0 ); - - if( listlen <= 0 ) { - ret = -1; - goto out; - } - - listbuf = tr_malloc( listlen ); - if( listbuf == NULL ) { - ret = -1; - goto out; - } - - listlen = listxattr( srcpath, listbuf, listlen, 0 ); - if( listlen <= 0) { - ret = -1; - goto out; - } - - for( name = listbuf; name < listbuf + listlen; name = strchr( name, '\0' ) + 1) { - ssize_t len = getxattr( srcpath, name, NULL, 0, 0, 0); - if( len < 0 ) { - ret = -1; - goto out; - } - - if( len > valuelen ) { - valuelen = len; - valuebuf = reallocf( valuebuf, valuelen ); - if (valuebuf == NULL) { - ret = -1; - goto out; - } - } - - len = getxattr( srcpath, name, valuebuf, valuelen, 0, 0 ); - if ( len < 0) { - ret = -1; - goto out; - } - - ret = setxattr( dstpath, name, valuebuf, len, 0, 0 ); - if( ret != 0 ) { - ret = -1; - goto out; - } - } - -out: - tr_free( valuebuf ); - tr_free( listbuf ); - - if( ret != 0 ) - tr_err( "Couldn't copy xattrs from \"%s\" to \"%s\": %s", - srcpath, dstpath, tr_strerror( errno ) ); - -#endif - return ret; -} - /*** **** ***/ @@ -1651,7 +1578,6 @@ tr_moveFile( const char * oldpath, const char * newpath, bool * renamed ) if( bytesLeft != 0 ) return -1; - tr_copyXattr( oldpath, newpath ); unlink( oldpath ); return 0; } diff --git a/libtransmission/utils.h b/libtransmission/utils.h index 1dc8c06ac..826a9b30c 100644 --- a/libtransmission/utils.h +++ b/libtransmission/utils.h @@ -481,12 +481,6 @@ char* tr_strratio( char * buf, size_t buflen, double ratio, const char * infinit struct tm * tr_localtime_r( const time_t *_clock, struct tm *_result ); -/** - * @brief copy extended attributes of a file or a folder - * @return 0 on success; otherwise, return -1 and set errno - */ -int tr_copyXattr( const char* srcpath, const char* dstpath ) TR_GNUC_NONNULL(1,2); - /** * @brief move a file * @return 0 on success; otherwise, return -1 and set errno diff --git a/macosx/Growl.framework/Versions/A/Growl b/macosx/Growl.framework/Versions/A/Growl index f61df8393..db8d5b1af 100755 Binary files a/macosx/Growl.framework/Versions/A/Growl and b/macosx/Growl.framework/Versions/A/Growl differ diff --git a/macosx/Growl.framework/Versions/A/Headers/GrowlApplicationBridge.h b/macosx/Growl.framework/Versions/A/Headers/GrowlApplicationBridge.h index 363975762..d74182dc5 100644 --- a/macosx/Growl.framework/Versions/A/Headers/GrowlApplicationBridge.h +++ b/macosx/Growl.framework/Versions/A/Headers/GrowlApplicationBridge.h @@ -112,7 +112,7 @@ * * @param inDelegate The delegate for the GrowlApplicationBridge. It must conform to the GrowlApplicationBridgeDelegate protocol. */ -+ (void) setGrowlDelegate:(id)inDelegate; ++ (void) setGrowlDelegate:(NSObject *)inDelegate; /*! * @method growlDelegate @@ -120,7 +120,7 @@ * @discussion See setGrowlDelegate: for details. * @result The Growl delegate. */ -+ (id) growlDelegate; ++ (NSObject *) growlDelegate; #pragma mark - @@ -260,7 +260,6 @@ * 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. @@ -362,7 +361,6 @@ * 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, @@ -402,32 +400,6 @@ + (NSDictionary *) notificationDictionaryByFillingInDictionary:(NSDictionary *)regDict; + (NSDictionary *) frameworkInfoDictionary; - -#pragma mark - - -/*! - *@method growlURLSchemeAvailable - *@abstract Lets the app know whether growl:// is registered on the system, used for certain methods below this - *@return Returns whether growl:// is registered on the system - *@discussion Methods such as openGrowlPreferences rely on the growl:// URL scheme to function - * Further, this method can provide a check on whether Growl is installed, - * however, the framework will not be relying on this method for choosing when/how to notify, - * and it is not recommended that the app rely on it for other than whether to use growl:// methods - *@since Growl.framework 1.4 - */ -+ (BOOL) isGrowlURLSchemeAvailable; - -/*! - * @method openGrowlPreferences: - * @abstract Open Growl preferences, optionally to this app's settings, growl:// method - * @param showApp Whether to show the application's settings, otherwise just opens to the last position - * @return Return's whether opening the URL was succesfull or not. - * @discussion Will launch if Growl is installed, but not running, and open the preferences window - * Uses growl:// URL scheme - * @since Growl.framework 1.4 - */ -+ (BOOL) openGrowlPreferences:(BOOL)showApp; - @end //------------------------------------------------------------------------------ @@ -436,15 +408,27 @@ /*! * @protocol GrowlApplicationBridgeDelegate * @abstract Required protocol for the Growl delegate. - * @discussion The methods in this protocol are optional and are called + * @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 +@protocol GrowlApplicationBridgeDelegate -@optional +// -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 diff --git a/macosx/Growl.framework/Versions/A/Headers/GrowlDefines.h b/macosx/Growl.framework/Versions/A/Headers/GrowlDefines.h index 0a196f1e3..51ef630d2 100644 --- a/macosx/Growl.framework/Versions/A/Headers/GrowlDefines.h +++ b/macosx/Growl.framework/Versions/A/Headers/GrowlDefines.h @@ -99,14 +99,6 @@ * This key is optional. */ #define GROWL_NOTIFICATIONS_DESCRIPTIONS XSTR("NotificationDescriptions") -/*! @defined GROWL_NOTIFICATIONS_ICONS - * @abstract A dictionary of icons for each notification - * @discussion This is an NSDictionary whose keys are GROWL_NOTIFICATION_NAME strings and whose objects are - * icons for each notification, for GNTP spec - * - * This key is optional. - */ -#define GROWL_NOTIFICATIONS_ICONS XSTR("NotificationIcons") /*! @defined GROWL_TICKET_VERSION * @abstract The version of your registration ticket. @@ -220,19 +212,6 @@ */ #define GROWL_NOTIFICATION_PROGRESS XSTR("NotificationProgress") -/*! @defined GROWL_NOTIFICATION_ALREADY_SHOWN - * @abstract If this key is set, it should contain a bool value wrapped - * in a NSNumber which describes whether the notification has - * already been displayed, for instance by built in Notification - * Center support. This value can be used to allow display - * plugins to skip a notification, while still allowing Growl - * actions to run on them. - * - * Optional. Not supported by all display plugins. - */ -#define GROWL_NOTIFICATION_ALREADY_SHOWN XSTR("AlreadyShown") - - // Notifications #pragma mark Notifications @@ -337,28 +316,6 @@ */ #define GROWL_DISTRIBUTED_NOTIFICATION_TIMED_OUT_SUFFIX XSTR("GrowlTimedOut!") -/*! @defined GROWL_DISTRIBUTED_NOTIFICATION_NOTIFICATIONCENTER_ON - * @abstract The distributed notification sent when the Notification Center support is toggled on in Growl 2.0 - * @discussion When the user enables Notification Center support in Growl 2.0, this notification is sent - * to inform all running apps that they should now speak to Notification Center directly. - */ -#define GROWL_DISTRIBUTED_NOTIFICATION_NOTIFICATIONCENTER_ON XSTR("GrowlNotificationCenterOn!") - -/*! @defined GROWL_DISTRIBUTED_NOTIFICATION_NOTIFICATIONCENTER_OFF - * @abstract The distributed notification sent when the Notification Center support is toggled off in Growl 2.0 - * @discussion When the user enables Notification Center support in Growl 2.0, this notification is sent - * to inform all running apps that they should no longer speak to Notification Center directly. - */ -#define GROWL_DISTRIBUTED_NOTIFICATION_NOTIFICATIONCENTER_OFF XSTR("GrowlNotificationCenterOff!") - -/*! @defined GROWL_DISTRIBUTED_NOTIFICATION_NOTIFICATIONCENTER_QUERY - * @abstract The distributed notification sent by an application to query Growl 2.0's notification center support. - * @discussion When an app starts up, it will send this query to get Growl 2.0 to spit out whether notification - * center support is on or off. - */ -#define GROWL_DISTRIBUTED_NOTIFICATION_NOTIFICATIONCENTER_QUERY XSTR("GrowlNotificationCenterYN?") - - /*! @group Other symbols */ /* Symbols which don't fit into any of the other categories. */ @@ -381,6 +338,4 @@ #define GROWL_POSITION_PREFERENCE_KEY @"GrowlSelectedPosition" -#define GROWL_PLUGIN_CONFIG_ID XSTR("GrowlPluginConfigurationID") - #endif //ndef _GROWLDEFINES_H diff --git a/macosx/Growl.framework/Versions/A/Resources/Info.plist b/macosx/Growl.framework/Versions/A/Resources/Info.plist index 4d9bd5f7a..5f2a1f46d 100644 --- a/macosx/Growl.framework/Versions/A/Resources/Info.plist +++ b/macosx/Growl.framework/Versions/A/Resources/Info.plist @@ -3,7 +3,7 @@ BuildMachineOSBuild - 12A269 + 11C74 CFBundleDevelopmentRegion English CFBundleExecutable @@ -15,25 +15,25 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 2.0 + 1.3.1 CFBundleSignature GRRR CFBundleVersion - 2.0 + 1.3.1 DTCompiler com.apple.compilers.llvm.clang.1_0 DTPlatformBuild - 4F250 + 4D199 DTPlatformVersion GM DTSDKBuild - 12A264 + 11C63 DTSDKName - macosx10.8 + macosx10.7 DTXcode - 0440 + 0420 DTXcodeBuild - 4F250 + 4D199 NSPrincipalClass GrowlApplicationBridge diff --git a/macosx/Growl.framework/Versions/A/_CodeSignature/CodeResources b/macosx/Growl.framework/Versions/A/_CodeSignature/CodeResources index d4a95e252..d65442552 100644 --- a/macosx/Growl.framework/Versions/A/_CodeSignature/CodeResources +++ b/macosx/Growl.framework/Versions/A/_CodeSignature/CodeResources @@ -6,7 +6,7 @@ Resources/Info.plist - lnx8exuPwE/bsUq32R5DXDQholc= + SwzGt9RQsuVafBBrfBalB75dCwU= rules