Ignore:
Timestamp:
Aug 12, 2012, 1:55:06 PM (9 years ago)
Author:
livings124
Message:

add creation date and client information to the quick look preview

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Controller.m

    r13416 r13424  
    19241924            NSAssert1(row != -1, @"expected a row to be found for torrent %@", torrent);
    19251925            [fTableView selectRowIndexes: [NSIndexSet indexSetWithIndex: row] byExtendingSelection:NO];
     1926            #warning focus the window
    19261927        }
    19271928    }
     
    19621963        NSString * location = [torrent dataLocation];
    19631964       
     1965        NSString *notificationTitle = NSLocalizedString(@"Download Complete", "notification title");
    19641966        if ([NSApp isOnMountainLionOrBetter])
    19651967        {
    19661968            NSUserNotification * notification = [[NSUserNotificationMtLion alloc] init];
    1967             [notification setTitle: NSLocalizedString(@"Download Complete", "notification title")];
     1969            [notification setTitle: notificationTitle];
    19681970            [notification setInformativeText: [torrent name]];
    19691971           
    19701972            [notification setHasActionButton: YES];
    1971             [notification setActionButtonTitle: NSLocalizedString(@"Reveal", "notification button")];
     1973            [notification setActionButtonTitle: NSLocalizedString(@"Show", "notification button")];
    19721974           
    19731975            NSMutableDictionary * userInfo = [NSMutableDictionary dictionaryWithObject: [torrent hashString] forKey: @"Hash"];
     
    19781980            [[NSUserNotificationCenterMtLion defaultUserNotificationCenter] deliverNotification: notification];
    19791981            [notification release];
    1980         }
    1981        
    1982         NSMutableDictionary * clickContext = [NSMutableDictionary dictionaryWithObject: GROWL_DOWNLOAD_COMPLETE forKey: @"Type"];
     1982           
     1983            NSLog(@"delegate: %@", [[NSUserNotificationCenterMtLion defaultUserNotificationCenter] delegate]);
     1984        }
     1985       
     1986        NSMutableDictionary * clickContext = [NSMutableDictionary dictionaryWithObjectsAndKeys:
     1987                                              GROWL_DOWNLOAD_COMPLETE, @"Type", nil];
    19831988       
    19841989        if (location)
    19851990            [clickContext setObject: location forKey: @"Location"];
    19861991       
    1987         [GrowlApplicationBridge notifyWithTitle: NSLocalizedString(@"Download Complete", "Growl notification title")
     1992        [GrowlApplicationBridge notifyWithTitle: notificationTitle
    19881993                                    description: [torrent name] notificationName: GROWL_DOWNLOAD_COMPLETE
    19891994                                    iconData: nil priority: 0 isSticky: NO clickContext: clickContext];
     1995       
     1996        NSLog(@"delegate: %@", [[NSUserNotificationCenterMtLion defaultUserNotificationCenter] delegate]);
    19901997       
    19911998        if (![fWindow isMainWindow])
     
    20222029    NSString * location = [torrent dataLocation];
    20232030   
     2031    NSString *notificationTitle = NSLocalizedString(@"Seeding Complete", "notification title");
    20242032    if ([NSApp isOnMountainLionOrBetter])
    20252033    {
    20262034        NSUserNotification * notification = [[NSUserNotificationMtLion alloc] init];
    2027         [notification setTitle: NSLocalizedString(@"Seeding Complete", "notification title")];
     2035        [notification setTitle: notificationTitle];
    20282036        [notification setInformativeText: [torrent name]];
    20292037       
     
    20452053        [clickContext setObject: location forKey: @"Location"];
    20462054   
    2047     [GrowlApplicationBridge notifyWithTitle: NSLocalizedString(@"Seeding Complete", "Growl notification title")
     2055    [GrowlApplicationBridge notifyWithTitle: notificationTitle
    20482056                                description: [torrent name] notificationName: GROWL_SEEDING_COMPLETE
    20492057                                   iconData: nil priority: 0 isSticky: NO clickContext: clickContext];
     
    29602968                [self openFiles: [NSArray arrayWithObject: fullFile] addType: ADD_AUTO forcePath: nil];
    29612969               
     2970                NSString *notificationTitle = NSLocalizedString(@"Torrent File Auto Added", "notification title");
    29622971                if ([NSApp isOnMountainLionOrBetter])
    29632972                {
    29642973                    NSUserNotification* notification = [[NSUserNotificationMtLion alloc] init];
    2965                     [notification setTitle: NSLocalizedString(@"Torrent File Auto Added", "notification title")];
     2974                    [notification setTitle: notificationTitle];
    29662975                    [notification setInformativeText: file];
    29672976                   
     
    29722981                }
    29732982               
    2974                 [GrowlApplicationBridge notifyWithTitle: NSLocalizedString(@"Torrent File Auto Added", "Growl notification title")
     2983                [GrowlApplicationBridge notifyWithTitle: notificationTitle
    29752984                    description: file notificationName: GROWL_AUTO_ADD iconData: nil priority: 0 isSticky: NO
    29762985                    clickContext: nil];
     
    46394648- (NSDictionary *) registrationDictionaryForGrowl
    46404649{
    4641     NSArray * notifications = [NSArray arrayWithObjects: GROWL_DOWNLOAD_COMPLETE, GROWL_SEEDING_COMPLETE,
    4642                                                             GROWL_AUTO_ADD, GROWL_AUTO_SPEED_LIMIT, nil];
    4643     return [NSDictionary dictionaryWithObjectsAndKeys: notifications, GROWL_NOTIFICATIONS_ALL,
    4644                                 notifications, GROWL_NOTIFICATIONS_DEFAULT, nil];
     4650    NSArray * notifications = @[GROWL_DOWNLOAD_COMPLETE, GROWL_SEEDING_COMPLETE, GROWL_AUTO_ADD, GROWL_AUTO_SPEED_LIMIT];
     4651   
     4652    return @{GROWL_NOTIFICATIONS_ALL : notifications,
     4653                GROWL_NOTIFICATIONS_DEFAULT : notifications };
    46454654}
    46464655
Note: See TracChangeset for help on using the changeset viewer.