Changeset 6
- Timestamp:
- Jan 12, 2006, 6:33:20 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/AUTHORS
r4 r6 1 Authors: 1 AUTHORS for Transmission <http://transmission.m0k.org/> 2 ======================================================= 3 4 Transmission is written is maintained by: 2 5 3 6 Eric Petit <titer@m0k.org> 4 + About everything until now 7 + Back-end 8 + OS X interface 9 10 Josh Elsasser <josh@elsasser.org> 11 + GTK interface 12 13 Michael Demars <keul@m0k.org> 14 + OS X interface 15 + Growl notifications 16 + AppleScript support 5 17 6 18 … … 15 27 Omar and Adrien 16 28 + Beta testing 17 18 Michael Demars19 + Beta testing20 + OS X UI patches21 29 22 30 Various people -
trunk/Jamfile
r5 r6 7 7 if $(OS) = MACOSX 8 8 { 9 OSXLinks macosx/Frameworks/Growl.framework/Growl ; 9 10 OSXInfoPlist macosx/Info.plist : macosx/Info.plist.in ; 10 11 OSXBundle Transmission.app : libtransmission.a … … 16 17 macosx/English.lproj/MainMenu.nib/info.nib 17 18 macosx/English.lproj/MainMenu.nib/keyedobjects.nib 19 macosx/Frameworks/Growl.framework/Growl 18 20 macosx/Images/Info.png 19 21 macosx/Images/Open.png -
trunk/Jamrules
r4 r6 17 17 RM = rm -Rf ; 18 18 19 rule SystemLibraries 20 { 21 LINKLIBS on [ FAppendSuffix $(<) : $(SUFEXE) ] ?= $(LINKLIBS) ; 22 LINKLIBS on [ FAppendSuffix $(<) : $(SUFEXE) ] += $(>) ; 23 } 24 19 25 if $(OS) = MACOSX 20 26 { … … 33 39 { 34 40 libtool -static $(>) -o $(<) ; 41 } 42 43 rule OSXLinks 44 { 45 } 46 actions OSXLinks 47 { 48 ( cd macosx/Frameworks/Growl.framework/ && \ 49 ln -s Versions/Current/Growl && \ 50 ln -s Versions/Current/Headers && \ 51 ln -s Versions/Current/Resources && \ 52 ln -s A Versions/Current ) 35 53 } 36 54 … … 74 92 ditto LICENSE "$TMP/LICENSE.txt" && 75 93 ditto NEWS "$TMP/NEWS.txt" && 94 strip -S "$TMP/Transmission.app/Contents/MacOS/Transmission" && 76 95 ( echo "[InternetShortcut]"; \ 77 96 echo "URL=http://transmission.m0k.org/" ) > \ -
trunk/configure
r5 r6 46 46 gtk_test() 47 47 { 48 cat > testconf.c << EOF 49 #include <gtk/gtk.h> 50 int main() 51 { 52 gtk_main(); 53 } 54 EOF 55 if $CC `pkg-config gtk+-2.0 --cflags --libs 2>/dev/null` -o testconf testconf.c 48 if pkg-config gtk+-2.0 > /dev/null 2>&1 56 49 then 57 echo "GTK+: yes" 58 GTK=yes 59 GTKCCFLAGS=`pkg-config gtk+-2.0 --cflags` 60 GTKLINKLIBS=`pkg-config gtk+-2.0 --libs` 50 cat > testconf.c << EOF 51 #include <gtk/gtk.h> 52 int main() 53 { 54 gtk_main(); 55 } 56 EOF 57 if $CC `pkg-config gtk+-2.0 --cflags --libs` -o testconf testconf.c > /dev/null 2>&1 58 then 59 echo "GTK+: yes" 60 GTK=yes 61 GTKCCFLAGS=`pkg-config gtk+-2.0 --cflags` 62 GTKLINKLIBS=`pkg-config gtk+-2.0 --libs` 63 else 64 echo "GTK+: no" 65 GTK=no 66 fi 67 rm -f testconf.c testconf 61 68 else 62 echo "GTK+: no"69 echo "GTK+: no" 63 70 GTK=no 64 71 fi 65 rm -f testconf.c testconf66 72 } 67 73 … … 156 162 echo "System: $SYSTEM" 157 163 158 # Check for GTK159 if pkg-config gtk+-2.0160 then161 echo "GTK+: yes"162 GTK=yes163 GTKCCFLAGS=`pkg-config gtk+-2.0 --cflags`164 GTKLINKLIBS=`pkg-config gtk+-2.0 --libs`165 else166 echo "GTK+: no"167 GTK=no168 fi169 170 164 # 171 165 # OpenSSL settings … … 181 175 # 182 176 if [ ${gtk_disable} = 1 ]; then 183 echo "GTK+: no"177 echo "GTK+: no" 184 178 else 185 179 gtk_test -
trunk/gtk/Jamfile
r5 r6 1 { 2 SubDir TOP gtk ; 1 SubDir TOP gtk ; 3 2 4 3 GTK_SRC = conf.c main.c util.c ; 5 4 6 local CCFLAGS = $(CCFLAGS) $(GTKCCFLAGS) ; 7 #local LINKLIBS = $(LINKLIBS) $(GTKLINKLIBS) ; 8 local HDRS = $(HDRS) $(TOP)/libtransmission ; 5 Main transmission-gtk : $(GTK_SRC) ; 6 LinkLibraries transmission-gtk : libtransmission.a ; 9 7 10 # jesus fucking christ, I give up 11 LINKLIBS += $(GTKLINKLIBS) ; 12 13 Main transmission-gtk : $(GTK_SRC) ; 14 LinkLibraries transmission-gtk : libtransmission.a ; 15 } 8 ObjectCcFlags $(GTK_SRC) : $(GTKCCFLAGS) ; 9 ObjectHdrs $(GTK_SRC) : $(TOP)/libtransmission ; 10 SystemLibraries transmission-gtk : $(GTKLINKLIBS) ; -
trunk/libtransmission/internal.h
r3 r6 128 128 129 129 int status; 130 int finished; 130 131 char error[128]; 131 132 -
trunk/libtransmission/metainfo.c
r1 r6 42 42 struct stat sb; 43 43 44 snprintf( inf->torrent, MAX_PATH_LENGTH, path );44 snprintf( inf->torrent, MAX_PATH_LENGTH, "%s", path ); 45 45 46 46 if( stat( path, &sb ) ) … … 143 143 return 1; 144 144 } 145 snprintf( inf->trackerAnnounce, MAX_PATH_LENGTH, s2 );145 snprintf( inf->trackerAnnounce, MAX_PATH_LENGTH, "%s", s2 ); 146 146 147 147 /* Piece length */ -
trunk/libtransmission/tracker.c
r3 r6 359 359 tor->status |= TR_TRACKER_ERROR; 360 360 snprintf( tor->error, sizeof( tor->error ), 361 bePeers->val.s.s );361 "%s", bePeers->val.s.s ); 362 362 goto cleanup; 363 363 } … … 607 607 return 0; 608 608 } 609 610 int tr_trackerSeeders( tr_torrent_t * tor) 611 { 612 if (tor->status != TR_STATUS_PAUSE) 613 { 614 return (tor->tracker)->seeders; 615 } 616 return 0; 617 } 618 619 int tr_trackerLeechers( tr_torrent_t * tor) 620 { 621 if (tor->status != TR_STATUS_PAUSE) 622 { 623 return (tor->tracker)->leechers; 624 } 625 return 0; 626 } -
trunk/libtransmission/tracker.h
r1 r6 32 32 void tr_trackerClose ( tr_tracker_t * ); 33 33 34 /*********************************************************************** 35 * tr_trackerSeeders 36 *********************************************************************** 37 * Looks for the seeders/leechers as returned by the tracker. 38 **********************************************************************/ 39 int tr_trackerSeeders ( tr_torrent_t * ); 40 41 /*********************************************************************** 42 * tr_trackerLeechers 43 *********************************************************************** 44 * Looks for the seeders/leechers as returned by the tracker. 45 **********************************************************************/ 46 int tr_trackerLeechers ( tr_torrent_t * ); 47 34 48 int tr_trackerScrape ( tr_torrent_t *, int *, int * ); 35 49 -
trunk/libtransmission/transmission.c
r5 r6 173 173 tor->id = h->id; 174 174 tor->key = h->key; 175 tor->finished = 0; 176 175 177 176 178 /* Guess scrape URL */ … … 316 318 { 317 319 return h->torrentCount; 320 } 321 322 int tr_getFinished( tr_handle_t * h, int i) 323 { 324 return h->torrents[i]->finished; 325 } 326 void tr_setFinished( tr_handle_t * h, int i, int val) 327 { 328 h->torrents[i]->finished = val; 318 329 } 319 330 … … 375 386 s[i].rateDownload = rateDownload( tor ); 376 387 s[i].rateUpload = rateUpload( tor ); 388 389 s[i].seeders = tr_trackerSeeders(tor); 390 s[i].leechers = tr_trackerLeechers(tor); 377 391 378 392 if( s[i].rateDownload < 0.1 ) … … 497 511 /* Done */ 498 512 tor->status = TR_STATUS_SEED; 513 tor->finished = 1; 499 514 tr_trackerCompleted( tor->tracker ); 500 515 } -
trunk/libtransmission/transmission.h
r2 r6 72 72 73 73 /*********************************************************************** 74 * tr_getFinished 75 *********************************************************************** 76 * Tests to see if torrent is finished 77 **********************************************************************/ 78 int tr_getFinished( tr_handle_t *, int ); 79 80 /*********************************************************************** 81 * tr_setFinished 82 *********************************************************************** 83 * Sets the boolean value finished in the torrent back to false 84 **********************************************************************/ 85 void tr_setFinished( tr_handle_t *, int, int ); 86 87 /*********************************************************************** 74 88 * tr_torrentInit 75 89 *********************************************************************** … … 206 220 int peersDownloading; 207 221 char pieces[120]; 222 int seeders; 223 int leechers; 208 224 209 225 uint64_t downloaded; -
trunk/macosx/Controller.h
r4 r6 27 27 #include <transmission.h> 28 28 #include "PrefsController.h" 29 #include <Growl/Growl.h> 29 30 30 31 @class TorrentTableView; 31 32 32 @interface Controller : NSObject 33 @interface Controller : NSObject <GrowlApplicationBridgeDelegate> 33 34 { 34 35 tr_handle_t * fHandle; … … 44 45 IBOutlet NSMenuItem * fPauseResumeItem; 45 46 IBOutlet NSMenuItem * fRemoveItem; 47 IBOutlet NSMenuItem * fRevealItem; 46 48 47 49 IBOutlet NSWindow * fWindow; … … 58 60 IBOutlet NSTextField * fInfoPieces; 59 61 IBOutlet NSTextField * fInfoPieceSize; 62 IBOutlet NSTextField * fInfoSeeders; 63 IBOutlet NSTextField * fInfoLeechers; 60 64 IBOutlet NSTextField * fInfoFolder; 61 65 IBOutlet NSTextField * fInfoDownloaded; … … 72 76 contextInfo: (void *) info; 73 77 - (void) stopTorrent: (id) sender; 78 - (void) stopAllTorrents: (id) sender; 74 79 - (void) stopTorrentWithIndex: (int) index; 75 80 - (void) resumeTorrent: (id) sender; 81 - (void) resumeAllTorrents: (id) sender; 76 82 - (void) resumeTorrentWithIndex: (int) index; 77 83 - (void) removeTorrent: (id) sender; … … 93 99 - (void) linkHomepage: (id) sender; 94 100 - (void) linkForums: (id) sender; 101 - (void) notifyGrowl: (NSString *) file folder: (NSString *) folder; 102 - (void) revealInFinder: (NSString *) path; 95 103 96 104 @end -
trunk/macosx/Controller.m
r4 r6 78 78 if( row < 0 ) 79 79 { 80 [fRevealItem setAction: NULL]; 80 81 return; 81 82 } 83 84 [fRevealItem setAction: @selector( revealFromMenu: )]; 85 82 86 if( fStat[row].status & TR_STATUS_PAUSE ) 83 87 { … … 186 190 } 187 191 } 188 192 193 /* Register with the growl system */ 194 [GrowlApplicationBridge setGrowlDelegate:self]; 195 189 196 /* Update the interface every 500 ms */ 190 197 fCount = 0; … … 359 366 [defaults setObject:@"YES" forKey:@"UseAdvancedBar"]; 360 367 } 368 [fTableView display]; 369 } 370 371 /* called on by applescript */ 372 - (void) open: (NSArray *) files 373 { 374 fFilenames = [files retain]; 375 [self performSelectorOnMainThread: @selector(cantFindAName:) 376 withObject: NULL waitUntilDone: NO]; 361 377 } 362 378 … … 404 420 } 405 421 422 - (void) resumeAllTorrents: (id) sender 423 { 424 int i; 425 for ( i = 0; i < fCount; i++) 426 { 427 if ( fStat[i].status & ( TR_STATUS_STOPPING 428 | TR_STATUS_PAUSE | TR_STATUS_STOPPED ) ) 429 { 430 [self resumeTorrentWithIndex: i]; 431 } 432 } 433 } 434 406 435 - (void) resumeTorrentWithIndex: (int) idx 407 436 { … … 413 442 { 414 443 [self stopTorrentWithIndex: [fTableView selectedRow]]; 444 } 445 446 - (void) stopAllTorrents: (id) sender 447 { 448 int i; 449 for ( i = 0; i < fCount; i++) 450 { 451 if ( fStat[i].status & ( TR_STATUS_CHECK 452 | TR_STATUS_DOWNLOAD | TR_STATUS_SEED) ) 453 { 454 [self stopTorrentWithIndex: i]; 455 } 456 } 415 457 } 416 458 … … 435 477 NSAlert *alert = [[[NSAlert alloc] init] autorelease]; 436 478 437 [alert addButtonWithTitle:@" No"];438 [alert addButtonWithTitle:@" Yes"];479 [alert addButtonWithTitle:@"Delete"]; 480 [alert addButtonWithTitle:@"Cancel"]; 439 481 [alert setAlertStyle:NSWarningAlertStyle]; 440 [alert setMessageText:@" Are you sure you want to remove and delete?"];482 [alert setMessageText:@"Do you want to remove this torrent from Transmission?"]; 441 483 442 484 if ( (deleteTorrent && torrentWarning) && … … 444 486 { 445 487 /* delete torrent warning YES, delete data warning NO */ 446 [alert setInformativeText:@" If you choose yes, the .torrent file will"447 " be deleted. This cannot be undone."];488 [alert setInformativeText:@"This will delete the .torrent file only. " 489 "This can not be undone!"]; 448 490 } 449 491 else if( (deleteData && dataWarning) && … … 451 493 { 452 494 /* delete torrent warning NO, delete data warning YES */ 453 [alert setInformativeText:@" If you choose yes, the downloaded data will"454 " be deleted. This cannot be undone."];495 [alert setInformativeText:@"This will delete the downloaded data. " 496 "This can not be undone!"]; 455 497 } 456 498 else 457 499 { 458 500 /* delete torrent warning YES, delete data warning YES */ 459 [alert setInformativeText:@" If you choose yes, bothdownloaded data and "460 " torrent file will be deleted. This cannot be undone."];501 [alert setInformativeText:@"This will delete the downloaded data and " 502 ".torrent file. This can not be undone!"]; 461 503 } 462 504 463 if ( [alert runModal] == NSAlert FirstButtonReturn )505 if ( [alert runModal] == NSAlertSecondButtonReturn ) 464 506 return; 465 507 } … … 535 577 { 536 578 float dl, ul; 537 int row ;579 int row, i; 538 580 539 581 /* Update the NSTableView */ … … 561 603 stringForFileSize( fStat[row].uploaded )]; 562 604 } 605 606 /* check if torrents have recently ended. */ 607 for (i = 0; i < fCount; i++) 608 { 609 if( !tr_getFinished( fHandle, i ) ) 610 { 611 continue; 612 } 613 [self notifyGrowl: [NSString stringWithUTF8String: 614 fStat[i].info.name] folder: [NSString stringWithUTF8String: 615 fStat[i].folder]]; 616 tr_setFinished( fHandle, i, 0 ); 617 } 563 618 564 619 /* Must we do this? Can't remember */ … … 576 631 int status = fStat[idx].status; 577 632 578 NSMenuItem *pauseItem = [fContextMenu itemWithTag: CONTEXT_PAUSE];633 NSMenuItem *pauseItem = [fContextMenu itemWithTag: CONTEXT_PAUSE]; 579 634 NSMenuItem *removeItem = [fContextMenu itemAtIndex: 1]; 635 NSMenuItem *infoItem = [fContextMenu itemAtIndex: 2]; 580 636 581 637 [pauseItem setTarget: self]; … … 600 656 } 601 657 658 if( [fInfoPanel isVisible] ) 659 { 660 [infoItem setTitle: @"Hide Info"]; 661 } else { 662 [infoItem setTitle: @"Show Info"]; 663 } 664 602 665 return fContextMenu; 603 666 } … … 669 732 [fInfoDownloaded setStringValue: @""]; 670 733 [fInfoUploaded setStringValue: @""]; 734 [fInfoSeeders setStringValue: @""]; 735 [fInfoLeechers setStringValue: @""]; 671 736 return; 672 737 } … … 687 752 [fInfoFolder setStringValue: [[NSString stringWithUTF8String: 688 753 tr_torrentGetFolder( fHandle, row )] lastPathComponent]]; 754 755 if ( fStat[row].seeders == -1 ) { 756 [fInfoSeeders setStringValue: [NSString stringWithUTF8String: "?"]]; 757 } else { 758 [fInfoSeeders setStringValue: [NSString stringWithFormat: @"%d", 759 fStat[row].seeders]]; 760 } 761 if ( fStat[row].leechers == -1 ) { 762 [fInfoLeechers setStringValue: [NSString stringWithUTF8String: "?"]]; 763 } else { 764 [fInfoLeechers setStringValue: [NSString stringWithFormat: @"%d", 765 fStat[row].leechers]]; 766 } 689 767 } 690 768 … … 806 884 rectWin = [fWindow frame]; 807 885 rectView = [[fWindow contentView] frame]; 808 foo = 68.0 + MAX( 1, tr_torrentCount( fHandle ) ) * 62.0 -886 foo = 47.0 + MAX( 1, tr_torrentCount( fHandle ) ) * 62.0 - 809 887 rectView.size.height; 810 888 … … 832 910 } 833 911 912 - (void) notifyGrowl: (NSString * ) file folder: (NSString *) folder 913 { 914 [GrowlApplicationBridge 915 notifyWithTitle: @"Download complete." 916 description: [NSString stringWithFormat: @"Seeding: %@", file] 917 notificationName: @"Download complete." 918 iconData: nil 919 priority: 0 920 isSticky: FALSE 921 clickContext: [NSString stringWithFormat: @"%@/%@", folder, file]]; 922 } 923 924 - (NSDictionary *)registrationDictionaryForGrowl 925 { 926 NSString *title = [NSString stringWithUTF8String: "Download complete."]; 927 NSMutableArray *defNotesArray = [NSMutableArray array]; 928 NSMutableArray *allNotesArray = [NSMutableArray array]; 929 930 [allNotesArray addObject:title]; 931 [defNotesArray addObject:[NSNumber numberWithUnsignedInt:0]]; 932 933 NSDictionary *regDict = [NSDictionary dictionaryWithObjectsAndKeys: 934 @"Transmission", GROWL_APP_NAME, 935 allNotesArray, GROWL_NOTIFICATIONS_ALL, 936 defNotesArray, GROWL_NOTIFICATIONS_DEFAULT, 937 nil]; 938 939 return regDict; 940 } 941 942 - (NSString *) applicationNameForGrowl 943 { 944 return [NSString stringWithUTF8String: "Transmission"]; 945 } 946 947 - (void) growlNotificationWasClicked: (id) clickContext 948 { 949 [self revealInFinder: (NSString *) clickContext]; 950 } 951 952 - (void) revealFromMenu: (id) sender 953 { 954 [fTableView revealInFinder: [fTableView selectedRow]]; 955 } 956 957 - (void) revealInFinder: (NSString *) path 958 { 959 NSString * string; 960 NSAppleScript * appleScript; 961 NSDictionary * error; 962 963 string = [NSString stringWithFormat: @"tell application " 964 "\"Finder\"\nactivate\nreveal (POSIX file \"%@\")\nend tell", 965 path]; 966 appleScript = [[NSAppleScript alloc] initWithSource: string]; 967 if( ![appleScript executeAndReturnError: &error] ) 968 { 969 printf( "Reveal in Finder: AppleScript failed\n" ); 970 } 971 [appleScript release]; 972 } 973 974 834 975 @end -
trunk/macosx/English.lproj/MainMenu.nib/classes.nib
r4 r6 11 11 removeTorrentDeleteData = id; 12 12 removeTorrentDeleteFile = id; 13 resumeAllTorrents = id; 13 14 resumeTorrent = id; 15 revealFromMenu = id; 14 16 showInfo = id; 15 17 showMainWindow = id; 18 stopAllTorrents = id; 16 19 stopTorrent = id; 17 20 }; … … 24 27 fInfoDownloaded = NSTextField; 25 28 fInfoFolder = NSTextField; 29 fInfoLeechers = NSTextField; 26 30 fInfoPanel = NSPanel; 27 31 fInfoPieceSize = NSTextField; 28 32 fInfoPieces = NSTextField; 33 fInfoSeeders = NSTextField; 29 34 fInfoSize = NSTextField; 30 35 fInfoTitle = NSTextField; … … 34 39 fPrefsController = PrefsController; 35 40 fRemoveItem = NSMenuItem; 41 fRevealItem = NSMenuItem; 36 42 fTableView = TorrentTableView; 37 43 fTotalDLField = NSTextField; -
trunk/macosx/English.lproj/MainMenu.nib/info.nib
r4 r6 4 4 <dict> 5 5 <key>IBDocumentLocation</key> 6 <string> 185 138361 432 0 0 1280 832 </string>6 <string>231 62 361 432 0 0 1280 832 </string> 7 7 <key>IBEditorPositions</key> 8 8 <dict> 9 9 <key>29</key> 10 <string> 105 768371 44 0 0 1280 832 </string>10 <string>92 769 371 44 0 0 1280 832 </string> 11 11 <key>456</key> 12 <string>1 74 512 147 870 0 1280 832 </string>12 <string>116 510 147 106 0 0 1280 832 </string> 13 13 </dict> 14 14 <key>IBFramework Version</key> … … 18 18 <key>IBOpenObjects</key> 19 19 <array> 20 <integer>456</integer> 20 21 <integer>29</integer> 21 <integer>456</integer> 22 <integer>21</integer> 23 <integer>273</integer> 22 24 </array> 23 25 <key>IBSystem Version</key> -
trunk/macosx/Info.plist.in
r1 r6 42 42 <key>NSPrincipalClass</key> 43 43 <string>NSApplication</string> 44 <key>NSAppleScriptEnabled</key> 45 <string>YES</string> 44 46 </dict> 45 47 </plist> -
trunk/macosx/ProgressCell.h
r2 r6 36 36 37 37 NSBitmapImageRep * fBgBmp; 38 NSImage * fImg;39 38 NSBitmapImageRep * fBmp; 40 39 } -
trunk/macosx/ProgressCell.m
r4 r6 85 85 fBgBmp = [[bgImg representations] objectAtIndex: 0]; 86 86 size = [bgImg size]; 87 fImg = [[NSImage alloc] initWithSize: size];88 87 fBmp = [[NSBitmapImageRep alloc] 89 88 initWithBitmapDataPlanes: NULL pixelsWide: size.width … … 93 92 bytesPerRow: 0 bitsPerPixel: 0]; 94 93 95 [fImg addRepresentation: fBmp];96 97 94 return self; 98 95 } … … 111 108 @"UL: %.2f KB/s", fStat->rateUpload]; 112 109 113 for( i = 0; i < [f Imgsize].height; i++ )110 for( i = 0; i < [fBmp size].height; i++ ) 114 111 { 115 112 memcpy( [fBmp bitmapData] + i * [fBmp bytesPerRow], 116 113 [fBgBmp bitmapData] + i * [fBgBmp bytesPerRow], 117 [f Imgsize].width * 4 );114 [fBmp size].width * 4 ); 118 115 } 119 116 … … 141 138 for( w = 0; w < 120; w++ ) 142 139 { 140 if( w >= (int) ( fStat->progress * 120 ) ) 141 { 142 break; 143 } 144 143 145 if( fStat->status & TR_STATUS_SEED ) 144 146 { … … 149 151 *p = kBlue2[h]; 150 152 } 151 152 if( w >= (int) ( fStat->progress * 120 ) )153 {154 break;155 }156 157 153 p++; 158 154 } … … 182 178 { 183 179 /* First two lines: dark blue to show progression */ 180 if( w >= (int) ( fStat->progress * 120 ) ) 181 { 182 break; 183 } 184 184 *p = kBlue4[h]; 185 186 if( w >= (int) ( fStat->progress * 120 ) )187 {188 break;189 }190 185 } 191 186 else … … 223 218 - (void) drawWithFrame: (NSRect) cellFrame inView: (NSView *) view 224 219 { 220 NSImage * img; 221 225 222 if( ![view lockFocusIfCanDraw] ) 226 223 { … … 237 234 pen.x += 5; pen.y += 5; 238 235 239 pen.y += [fImg size].height; 240 [fImg compositeToPoint: pen operation: NSCompositeSourceOver]; 241 pen.y -= [fImg size].height; 236 img = [[NSImage alloc] initWithSize: [fBmp size]]; 237 [img addRepresentation: fBmp]; 238 [img setFlipped: YES]; 239 [img drawAtPoint: pen fromRect: 240 NSMakeRect( 0, 0, [fBmp size].width, [fBmp size].height ) 241 operation: NSCompositeSourceOver fraction: 1.0]; 242 [img release]; 242 243 243 244 [attributes setObject: [NSFont messageFontOfSize:10.0] -
trunk/macosx/TorrentTableView.m
r3 r6 107 107 else if( [self pointInRevealRect: point] ) 108 108 { 109 [self revealInFinder: row]; 109 [fController revealInFinder: [NSString stringWithFormat: 110 @"%@/%@", [NSString stringWithUTF8String: fStat[row].folder], 111 [NSString stringWithUTF8String: fStat[row].info.name]]]; 110 112 [self display]; 113 } 114 else if( row >= 0 && col == [self columnWithIdentifier: @"Progress"] 115 && ( [e modifierFlags] & NSAlternateKeyMask ) ) 116 { 117 [fController advancedChanged: NULL]; 111 118 } 112 119 else -
trunk/macosx/Transmission.xcodeproj/project.pbxproj
r3 r6 19 19 4D752E930913C949008EAAD4 /* Preferences.png in Resources */ = {isa = PBXBuildFile; fileRef = 4D752E920913C949008EAAD4 /* Preferences.png */; }; 20 20 4D813EB508AA43AC00191DB4 /* Progress.png in Resources */ = {isa = PBXBuildFile; fileRef = 4D813EB408AA43AC00191DB4 /* Progress.png */; }; 21 4D81E2E4092EF0CB00F24127 /* Growl.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4D81E2E3092EF0CB00F24127 /* Growl.framework */; }; 22 4D81E309092EF26F00F24127 /* Growl.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4D81E2E3092EF0CB00F24127 /* Growl.framework */; }; 21 23 4DA6FDBA0911233800450CB1 /* PauseOn.png in Resources */ = {isa = PBXBuildFile; fileRef = 4DA6FDB80911233800450CB1 /* PauseOn.png */; }; 22 24 4DA6FDBB0911233800450CB1 /* PauseOff.png in Resources */ = {isa = PBXBuildFile; fileRef = 4DA6FDB90911233800450CB1 /* PauseOff.png */; }; … … 60 62 }; 61 63 /* End PBXBuildStyle section */ 64 65 /* Begin PBXCopyFilesBuildPhase section */ 66 4D81E301092EF24500F24127 /* CopyFiles */ = { 67 isa = PBXCopyFilesBuildPhase; 68 buildActionMask = 2147483647; 69 dstPath = ""; 70 dstSubfolderSpec = 10; 71 files = ( 72 4D81E309092EF26F00F24127 /* Growl.framework in CopyFiles */, 73 ); 74 runOnlyForDeploymentPostprocessing = 0; 75 }; 76 /* End PBXCopyFilesBuildPhase section */ 62 77 63 78 /* Begin PBXFileReference section */ … … 85 100 4D752E920913C949008EAAD4 /* Preferences.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Preferences.png; path = Images/Preferences.png; sourceTree = "<group>"; }; 86 101 4D813EB408AA43AC00191DB4 /* Progress.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Progress.png; path = Images/Progress.png; sourceTree = "<group>"; }; 102 4D81E2E3092EF0CB00F24127 /* Growl.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Growl.framework; path = Frameworks/Growl.framework; sourceTree = "<group>"; }; 87 103 4DA6FDB80911233800450CB1 /* PauseOn.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = PauseOn.png; path = Images/PauseOn.png; sourceTree = "<group>"; }; 88 104 4DA6FDB90911233800450CB1 /* PauseOff.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = PauseOff.png; path = Images/PauseOff.png; sourceTree = "<group>"; }; … … 107 123 4DF0C5AE08991C1600DD8943 /* libtransmission.a in Frameworks */, 108 124 4D3EA0AA08AE13C600EA10C2 /* IOKit.framework in Frameworks */, 125 4D81E2E4092EF0CB00F24127 /* Growl.framework in Frameworks */, 109 126 ); 110 127 runOnlyForDeploymentPostprocessing = 0; … … 134 151 children = ( 135 152 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */, 153 4D81E2E3092EF0CB00F24127 /* Growl.framework */, 136 154 ); 137 155 name = "Linked Frameworks"; … … 221 239 8D11072C0486CEB800E47090 /* Sources */, 222 240 8D11072E0486CEB800E47090 /* Frameworks */, 241 4D81E301092EF24500F24127 /* CopyFiles */, 223 242 ); 224 243 buildRules = ( … … 331 350 ppc, 332 351 i386, 352 ); 353 FRAMEWORK_SEARCH_PATHS = ( 354 "$(FRAMEWORK_SEARCH_PATHS)", 355 "$(SRCROOT)/Frameworks", 333 356 ); 334 357 GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
Note: See TracChangeset
for help on using the changeset viewer.