Changeset 13470


Ignore:
Timestamp:
Sep 6, 2012, 3:23:50 AM (9 years ago)
Author:
livings124
Message:

Whoops! Revert new changes committed in r13469

Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/torrent.c

    r13469 r13470  
    29152915    {
    29162916        tr_file_index_t i;
    2917         tr_ptrArray copiedxattrs = TR_PTR_ARRAY_INIT;
    2918         const void * const vstrcmp = strcmp;
    29192917
    29202918        /* bad idea to move files while they're being verified... */
     
    29382936                if( do_move && !tr_is_same_file( oldpath, newpath ) )
    29392937                {
    2940                     char * cursub;
    29412938                    bool renamed = false;
    29422939                    errno = 0;
     
    29482945                                        oldpath, newpath, tr_strerror( errno ) );
    29492946                    }
    2950 
    2951                     /* copy extended attributes */
    2952                     cursub = tr_dirname( sub );
    2953                     while( strcmp( cursub, "." ) != 0 ) {
    2954                         char * tmp;
    2955                         if ( tr_ptrArrayFindSorted( &copiedxattrs, cursub, vstrcmp ) == NULL ) {
    2956                             char * olddir = tr_buildPath( oldbase, cursub, NULL );
    2957                             char * newdir = tr_buildPath( location, cursub, NULL );
    2958                             tr_copyXattr( olddir, newdir );
    2959                             tr_free( olddir );
    2960                             tr_free( newdir );
    2961                             tr_ptrArrayInsertSorted( &copiedxattrs, tr_strdup( cursub ), vstrcmp );
    2962                         }
    2963                         tmp = tr_dirname( cursub );
    2964                         tr_free( cursub );
    2965                         cursub = tmp;
    2966                     }
    2967                     tr_free(cursub);
    29682947                }
    29692948
     
    29892968            tr_torrentSetDownloadDir( tor, location );
    29902969        }
    2991         tr_ptrArrayDestruct( &copiedxattrs, tr_free );
    29922970    }
    29932971
  • trunk/libtransmission/utils.c

    r13469 r13470  
    2020 #define HAVE_MKDTEMP
    2121 #define HAVE_VALLOC
    22  #define HAVE_XATTRS_MACOS
    2322#endif
    2423
     
    4241#include <sys/types.h>
    4342#include <sys/stat.h>
    44 #ifdef HAVE_XATTRS_MACOS
    45  #include <sys/xattr.h> /*  listxattr(), getxattr(), setxattr() */
    46 #endif
    4743#include <unistd.h> /* stat(), getcwd(), getpagesize(), unlink() */
    4844
     
    15151511}
    15161512
    1517 int
    1518 tr_copyXattr( const char* srcpath, const char* dstpath )
    1519 {
    1520     int ret = 0;
    1521 #ifdef HAVE_XATTRS_MACOS
    1522     char * listbuf = NULL, * valuebuf = NULL;
    1523     ssize_t listlen = 0, valuelen = 0;
    1524     char* name;
    1525 
    1526     listlen = listxattr( srcpath, NULL, 0, 0 );
    1527 
    1528     if( listlen <= 0 ) {
    1529         ret = -1;
    1530         goto out;
    1531     }
    1532 
    1533     listbuf = tr_malloc( listlen );
    1534     if( listbuf == NULL ) {
    1535         ret = -1;
    1536         goto out;
    1537     }
    1538 
    1539     listlen = listxattr( srcpath, listbuf, listlen, 0 );
    1540     if( listlen <= 0) {
    1541         ret = -1;
    1542         goto out;
    1543     }
    1544 
    1545     for( name = listbuf; name < listbuf + listlen; name = strchr( name, '\0' ) + 1) {
    1546         ssize_t len = getxattr( srcpath, name, NULL, 0, 0, 0);
    1547         if( len < 0 ) {
    1548             ret = -1;
    1549             goto out;
    1550         }
    1551 
    1552         if( len > valuelen ) {
    1553             valuelen = len;
    1554             valuebuf = reallocf( valuebuf, valuelen );
    1555             if (valuebuf == NULL) {
    1556                 ret = -1;
    1557                 goto out;
    1558             }
    1559         }
    1560 
    1561         len = getxattr( srcpath, name, valuebuf, valuelen, 0, 0 );
    1562         if ( len < 0) {
    1563             ret = -1;
    1564             goto out;
    1565         }
    1566 
    1567         ret = setxattr( dstpath, name, valuebuf, len, 0, 0 );
    1568         if( ret != 0 ) {
    1569             ret = -1;
    1570             goto out;
    1571         }
    1572     }
    1573 
    1574 out:
    1575     tr_free( valuebuf );
    1576     tr_free( listbuf );
    1577 
    1578     if( ret != 0 )
    1579         tr_err( "Couldn't copy xattrs from \"%s\" to \"%s\": %s",
    1580                 srcpath, dstpath, tr_strerror( errno ) );
    1581 
    1582 #endif
    1583     return ret;
    1584 }
    1585 
    15861513/***
    15871514****
     
    16521579        return -1;
    16531580
    1654     tr_copyXattr( oldpath, newpath );
    16551581    unlink( oldpath );
    16561582    return 0;
  • trunk/libtransmission/utils.h

    r13469 r13470  
    481481struct tm * tr_localtime_r( const time_t *_clock, struct tm *_result );
    482482
    483 
    484 /**
    485  * @brief copy extended attributes of a file or a folder
    486  * @return 0 on success; otherwise, return -1 and set errno
    487  */
    488 int tr_copyXattr( const char* srcpath, const char* dstpath ) TR_GNUC_NONNULL(1,2);
    489483
    490484/**
  • trunk/macosx/Growl.framework/Versions/A/Headers/GrowlApplicationBridge.h

    r13469 r13470  
    113113 *      @param inDelegate The delegate for the GrowlApplicationBridge. It must conform to the GrowlApplicationBridgeDelegate protocol.
    114114 */
    115 + (void) setGrowlDelegate:(id<GrowlApplicationBridgeDelegate>)inDelegate;
     115+ (void) setGrowlDelegate:(NSObject<GrowlApplicationBridgeDelegate> *)inDelegate;
    116116
    117117/*!
     
    121121 *      @result The Growl delegate.
    122122 */
    123 + (id<GrowlApplicationBridgeDelegate>) growlDelegate;
     123+ (NSObject<GrowlApplicationBridgeDelegate> *) growlDelegate;
    124124
    125125#pragma mark -
     
    261261 */
    262262+ (void) setWillRegisterWhenGrowlIsReady:(BOOL)flag;
    263 
    264263/*!     @method willRegisterWhenGrowlIsReady
    265264 *      @abstract       Reports whether GrowlApplicationBridge will register with Growl
     
    363362 */
    364363+ (NSDictionary *) registrationDictionaryByFillingInDictionary:(NSDictionary *)regDict;
    365 
    366364/*!     @method registrationDictionaryByFillingInDictionary:restrictToKeys:
    367365 *      @abstract       Tries to fill in missing keys in a registration dictionary.
     
    403401
    404402+ (NSDictionary *) frameworkInfoDictionary;
    405 
    406 #pragma mark -
    407 
    408 /*!
    409  *@method growlURLSchemeAvailable
    410  *@abstract Lets the app know whether growl:// is registered on the system, used for certain methods below this
    411  *@return Returns whether growl:// is registered on the system
    412  *@discussion Methods such as openGrowlPreferences rely on the growl:// URL scheme to function
    413  * Further, this method can provide a check on whether Growl is installed,
    414  * however, the framework will not be relying on this method for choosing when/how to notify,
    415  * and it is not recommended that the app rely on it for other than whether to use growl:// methods
    416  *@since Growl.framework 1.4
    417  */
    418 + (BOOL) isGrowlURLSchemeAvailable;
    419 
    420 /*!
    421  * @method openGrowlPreferences:
    422  * @abstract Open Growl preferences, optionally to this app's settings, growl:// method
    423  * @param showApp Whether to show the application's settings, otherwise just opens to the last position
    424  * @return Return's whether opening the URL was succesfull or not. 
    425  * @discussion Will launch if Growl is installed, but not running, and open the preferences window
    426  * Uses growl:// URL scheme
    427  * @since Growl.framework 1.4
    428  */
    429 + (BOOL) openGrowlPreferences:(BOOL)showApp;
    430 
    431403@end
    432404
     
    437409 *      @protocol GrowlApplicationBridgeDelegate
    438410 *      @abstract Required protocol for the Growl delegate.
    439  *      @discussion The methods in this protocol are optional and are called
     411 *      @discussion The methods in this protocol are required and are called
    440412 *       automatically as needed by GrowlApplicationBridge. See
    441413 *       <code>+[GrowlApplicationBridge setGrowlDelegate:]</code>.
     
    443415 */
    444416
    445 @protocol GrowlApplicationBridgeDelegate <NSObject>
    446 
    447 @optional
     417@protocol GrowlApplicationBridgeDelegate
     418
     419// -registrationDictionaryForGrowl has moved to the informal protocol as of 0.7.
     420
     421@end
     422
     423//------------------------------------------------------------------------------
     424#pragma mark -
     425
     426/*!
     427 *      @category NSObject(GrowlApplicationBridgeDelegate_InformalProtocol)
     428 *      @abstract Methods which may be optionally implemented by the GrowlDelegate.
     429 *      @discussion The methods in this informal protocol will only be called if implemented by the delegate.
     430 */
     431@interface NSObject (GrowlApplicationBridgeDelegate_InformalProtocol)
    448432
    449433/*!
  • trunk/macosx/Growl.framework/Versions/A/Headers/GrowlDefines.h

    r13469 r13470  
    100100*/
    101101#define GROWL_NOTIFICATIONS_DESCRIPTIONS                XSTR("NotificationDescriptions")
    102 /*! @defined GROWL_NOTIFICATIONS_ICONS
    103  *  @abstract A dictionary of icons for each notification
    104  *  @discussion This is an NSDictionary whose keys are GROWL_NOTIFICATION_NAME strings and whose objects are
    105  *  icons for each notification, for GNTP spec
    106  *
    107  *  This key is optional.
    108  */
    109 #define GROWL_NOTIFICATIONS_ICONS XSTR("NotificationIcons")
    110102
    111103/*!     @defined        GROWL_TICKET_VERSION
     
    220212*/
    221213#define GROWL_NOTIFICATION_PROGRESS             XSTR("NotificationProgress")
    222 
    223 /*!     @defined GROWL_NOTIFICATION_ALREADY_SHOWN
    224  *      @abstract If this key is set, it should contain a bool value wrapped
    225  *   in a NSNumber which describes whether the notification has
    226  *   already been displayed, for instance by built in Notification
    227  *   Center support.  This value can be used to allow display
    228  *   plugins to skip a notification, while still allowing Growl
    229  *   actions to run on them.
    230  *
    231  *       Optional. Not supported by all display plugins.
    232  */
    233 #define GROWL_NOTIFICATION_ALREADY_SHOWN                XSTR("AlreadyShown")
    234 
    235214
    236215// Notifications
     
    338317#define GROWL_DISTRIBUTED_NOTIFICATION_TIMED_OUT_SUFFIX         XSTR("GrowlTimedOut!")
    339318
    340 /*!     @defined GROWL_DISTRIBUTED_NOTIFICATION_NOTIFICATIONCENTER_ON
    341  *      @abstract The distributed notification sent when the Notification Center support is toggled on in Growl 2.0
    342  *      @discussion When the user enables Notification Center support in Growl 2.0, this notification is sent
    343  *      to inform all running apps that they should now speak to Notification Center directly.
    344  */
    345 #define GROWL_DISTRIBUTED_NOTIFICATION_NOTIFICATIONCENTER_ON            XSTR("GrowlNotificationCenterOn!")
    346 
    347 /*!     @defined GROWL_DISTRIBUTED_NOTIFICATION_NOTIFICATIONCENTER_OFF
    348  *      @abstract The distributed notification sent when the Notification Center support is toggled off in Growl 2.0
    349  *      @discussion When the user enables Notification Center support in Growl 2.0, this notification is sent
    350  *      to inform all running apps that they should no longer speak to Notification Center directly.
    351  */
    352 #define GROWL_DISTRIBUTED_NOTIFICATION_NOTIFICATIONCENTER_OFF           XSTR("GrowlNotificationCenterOff!")
    353 
    354 /*!     @defined GROWL_DISTRIBUTED_NOTIFICATION_NOTIFICATIONCENTER_QUERY
    355  *      @abstract The distributed notification sent by an application to query Growl 2.0's notification center support.
    356  *      @discussion When an app starts up, it will send this query to get Growl 2.0 to spit out whether notification
    357  *      center support is on or off.
    358  */
    359 #define GROWL_DISTRIBUTED_NOTIFICATION_NOTIFICATIONCENTER_QUERY         XSTR("GrowlNotificationCenterYN?")
    360 
    361 
    362319/*!     @group Other symbols */
    363320/* Symbols which don't fit into any of the other categories. */
     
    382339#define GROWL_POSITION_PREFERENCE_KEY                   @"GrowlSelectedPosition"
    383340
    384 #define GROWL_PLUGIN_CONFIG_ID XSTR("GrowlPluginConfigurationID")
    385 
    386341#endif //ndef _GROWLDEFINES_H
  • trunk/macosx/Growl.framework/Versions/A/Resources/Info.plist

    r13469 r13470  
    44<dict>
    55        <key>BuildMachineOSBuild</key>
    6         <string>12A269</string>
     6        <string>11C74</string>
    77        <key>CFBundleDevelopmentRegion</key>
    88        <string>English</string>
     
    1616        <string>FMWK</string>
    1717        <key>CFBundleShortVersionString</key>
    18         <string>2.0</string>
     18        <string>1.3.1</string>
    1919        <key>CFBundleSignature</key>
    2020        <string>GRRR</string>
    2121        <key>CFBundleVersion</key>
    22         <string>2.0</string>
     22        <string>1.3.1</string>
    2323        <key>DTCompiler</key>
    2424        <string>com.apple.compilers.llvm.clang.1_0</string>
    2525        <key>DTPlatformBuild</key>
    26         <string>4F250</string>
     26        <string>4D199</string>
    2727        <key>DTPlatformVersion</key>
    2828        <string>GM</string>
    2929        <key>DTSDKBuild</key>
    30         <string>12A264</string>
     30        <string>11C63</string>
    3131        <key>DTSDKName</key>
    32         <string>macosx10.8</string>
     32        <string>macosx10.7</string>
    3333        <key>DTXcode</key>
    34         <string>0440</string>
     34        <string>0420</string>
    3535        <key>DTXcodeBuild</key>
    36         <string>4F250</string>
     36        <string>4D199</string>
    3737        <key>NSPrincipalClass</key>
    3838        <string>GrowlApplicationBridge</string>
  • trunk/macosx/Growl.framework/Versions/A/_CodeSignature/CodeResources

    r13469 r13470  
    77                <key>Resources/Info.plist</key>
    88                <data>
    9                 lnx8exuPwE/bsUq32R5DXDQholc=
     9                SwzGt9RQsuVafBBrfBalB75dCwU=
    1010                </data>
    1111        </dict>
Note: See TracChangeset for help on using the changeset viewer.