Changeset 4081
- Timestamp:
- Dec 6, 2007, 5:21:42 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Transmission.xcodeproj/project.pbxproj
r4074 r4081 74 74 A21567ED0A9A5034004DECD6 /* MessageWindow.nib in Resources */ = {isa = PBXBuildFile; fileRef = A21567EB0A9A5034004DECD6 /* MessageWindow.nib */; }; 75 75 A215760B0C0D449A0057A26A /* NSBezierPathAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = A21576090C0D449A0057A26A /* NSBezierPathAdditions.m */; }; 76 A219798B0D07B78400438EA7 /* ButtonGroupToolbarItem.m in Sources */ = {isa = PBXBuildFile; fileRef = A219798A0D07B78400438EA7 /* ButtonGroupToolbarItem.m */; }; 76 77 A21DFF100A292B2B007C5F76 /* Transfers.png in Resources */ = {isa = PBXBuildFile; fileRef = A21DFF0F0A292B2B007C5F76 /* Transfers.png */; }; 77 78 A21F5B890AF25FB6008CE5CE /* ActionMenuRatioToDisplayRatioTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = A21F5B870AF25FB6008CE5CE /* ActionMenuRatioToDisplayRatioTransformer.m */; }; … … 407 408 A21576090C0D449A0057A26A /* NSBezierPathAdditions.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = NSBezierPathAdditions.m; path = macosx/NSBezierPathAdditions.m; sourceTree = "<group>"; }; 408 409 A215760A0C0D449A0057A26A /* NSBezierPathAdditions.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = NSBezierPathAdditions.h; path = macosx/NSBezierPathAdditions.h; sourceTree = "<group>"; }; 410 A21979890D07B78400438EA7 /* ButtonGroupToolbarItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ButtonGroupToolbarItem.h; path = macosx/ButtonGroupToolbarItem.h; sourceTree = "<group>"; }; 411 A219798A0D07B78400438EA7 /* ButtonGroupToolbarItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ButtonGroupToolbarItem.m; path = macosx/ButtonGroupToolbarItem.m; sourceTree = "<group>"; }; 409 412 A21DFF0F0A292B2B007C5F76 /* Transfers.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Transfers.png; path = macosx/Images/Transfers.png; sourceTree = "<group>"; }; 410 413 A21F5B860AF25FB6008CE5CE /* ActionMenuRatioToDisplayRatioTransformer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ActionMenuRatioToDisplayRatioTransformer.h; path = macosx/ActionMenuRatioToDisplayRatioTransformer.h; sourceTree = "<group>"; }; … … 781 784 A2C89D5F0CFCBF57004CC2BC /* ButtonToolbarItem.m */, 782 785 A28E1DDF0CFFD8EC00E16385 /* ButtonToolbarItem.h */, 786 A21979890D07B78400438EA7 /* ButtonGroupToolbarItem.h */, 787 A219798A0D07B78400438EA7 /* ButtonGroupToolbarItem.m */, 783 788 A257C17F0CAD3003004E121C /* PeerTableView.h */, 784 789 A257C1800CAD3003004E121C /* PeerTableView.m */, … … 1634 1639 A28E1DBA0CFFD41800E16385 /* BottomBarView.m in Sources */, 1635 1640 A28E1E160D00574A00E16385 /* ActionPopUpButton.m in Sources */, 1641 A219798B0D07B78400438EA7 /* ButtonGroupToolbarItem.m in Sources */, 1636 1642 ); 1637 1643 runOnlyForDeploymentPostprocessing = 0; -
trunk/macosx/Controller.h
r4063 r4081 214 214 - (void) showFilterBar: (BOOL) show animate: (BOOL) animate; 215 215 216 - (void) selectedToolbarClicked: (id) sender; 217 216 218 - (void) doNothing: (id) sender; //needed for menu items that use bindings with no associated action 217 219 -
trunk/macosx/Controller.m
r4072 r4081 33 33 #import "AboutWindowController.h" 34 34 #import "ButtonToolbarItem.h" 35 #import "ButtonGroupToolbarItem.h" 35 36 #import "NSApplicationAdditions.h" 36 37 #import "NSStringAdditions.h" … … 44 45 #import <Sparkle/Sparkle.h> 45 46 46 #define TOOLBAR_CREATE @"Toolbar Create" 47 #define TOOLBAR_OPEN @"Toolbar Open" 48 #define TOOLBAR_REMOVE @"Toolbar Remove" 49 #define TOOLBAR_INFO @"Toolbar Info" 50 #define TOOLBAR_PAUSE_ALL @"Toolbar Pause All" 51 #define TOOLBAR_RESUME_ALL @"Toolbar Resume All" 52 #define TOOLBAR_PAUSE_SELECTED @"Toolbar Pause Selected" 53 #define TOOLBAR_RESUME_SELECTED @"Toolbar Resume Selected" 54 #define TOOLBAR_FILTER @"Toolbar Toggle Filter" 47 #define TOOLBAR_CREATE @"Toolbar Create" 48 #define TOOLBAR_OPEN @"Toolbar Open" 49 #define TOOLBAR_REMOVE @"Toolbar Remove" 50 #define TOOLBAR_INFO @"Toolbar Info" 51 #define TOOLBAR_PAUSE_ALL @"Toolbar Pause All" 52 #define TOOLBAR_RESUME_ALL @"Toolbar Resume All" 53 #define TOOLBAR_PAUSE_RESUME_ALL @"Toolbar Pause / Resume All" 54 #define TOOLBAR_PAUSE_SELECTED @"Toolbar Pause Selected" 55 #define TOOLBAR_RESUME_SELECTED @"Toolbar Resume Selected" 56 #define TOOLBAR_PAUSE_RESUME_SELECTED @"Toolbar Pause / Resume Selected" 57 #define TOOLBAR_FILTER @"Toolbar Toggle Filter" 55 58 56 59 #define SORT_DATE @"Date" … … 215 218 - (void) awakeFromNib 216 219 { 217 NSToolbar * toolbar = [[NSToolbar alloc] initWithIdentifier: @"T ransmissionToolbar"];220 NSToolbar * toolbar = [[NSToolbar alloc] initWithIdentifier: @"TRMainToolbar"]; 218 221 [toolbar setDelegate: self]; 219 222 [toolbar setAllowsUserCustomization: YES]; … … 2638 2641 - (NSToolbarItem *) toolbar: (NSToolbar *) toolbar itemForItemIdentifier: (NSString *) ident willBeInsertedIntoToolbar: (BOOL) flag 2639 2642 { 2640 ButtonToolbarItem * item = [[ ButtonToolbarItem alloc] initWithItemIdentifier: ident];2643 ButtonToolbarItem * item = [[[ButtonToolbarItem alloc] initWithItemIdentifier: ident] autorelease]; 2641 2644 2642 2645 NSButton * button = [[NSButton alloc] initWithFrame: NSZeroRect]; … … 2708 2711 [item setAction: @selector(resumeAllTorrents:)]; 2709 2712 } 2710 else if ([ident isEqualToString: TOOLBAR_PAUSE_SELECTED]) 2711 { 2712 [item setLabel: NSLocalizedString(@"Pause", "Pause toolbar item -> label")]; 2713 [item setPaletteLabel: NSLocalizedString(@"Pause Selected", "Pause toolbar item -> palette label")]; 2714 [item setToolTip: NSLocalizedString(@"Pause selected transfers", "Pause toolbar item -> tooltip")]; 2715 [item setImage: [NSImage imageNamed: @"PauseSelected.png"]]; 2716 [item setTarget: self]; 2717 [item setAction: @selector(stopSelectedTorrents:)]; 2718 } 2719 else if ([ident isEqualToString: TOOLBAR_RESUME_SELECTED]) 2720 { 2721 [item setLabel: NSLocalizedString(@"Resume", "Resume toolbar item -> label")]; 2722 [item setPaletteLabel: NSLocalizedString(@"Resume Selected", "Resume toolbar item -> palette label")]; 2723 [item setToolTip: NSLocalizedString(@"Resume selected transfers", "Resume toolbar item -> tooltip")]; 2724 [item setImage: [NSImage imageNamed: @"ResumeSelected.png"]]; 2725 [item setTarget: self]; 2726 [item setAction: @selector(resumeSelectedTorrents:)]; 2713 else if ([ident isEqualToString: TOOLBAR_PAUSE_RESUME_ALL]) 2714 { 2715 ButtonGroupToolbarItem * groupItem = [[[ButtonGroupToolbarItem alloc] initWithItemIdentifier: ident] autorelease]; 2716 2717 NSSegmentedControl * segmentedControl = [[NSSegmentedControl alloc] initWithFrame: NSZeroRect]; 2718 [groupItem setView: segmentedControl]; 2719 2720 [segmentedControl setSegmentCount: 2]; 2721 [(NSSegmentedCell *)[segmentedControl cell] setTrackingMode: NSSegmentSwitchTrackingMomentary]; 2722 2723 NSSize groupSize = NSMakeSize(72.0, 25.0); 2724 [groupItem setMinSize: groupSize]; 2725 [groupItem setMaxSize: groupSize]; 2726 2727 [groupItem setLabel: NSLocalizedString(@"Apply All", "All toolbar item -> label")]; 2728 [groupItem setPaletteLabel: NSLocalizedString(@"Pause / Resume All", "All toolbar item -> palette label")]; 2729 [groupItem setTarget: self]; 2730 [groupItem setAction: @selector(allToolbarClicked:)]; 2731 2732 [groupItem setIdentifiers: [NSArray arrayWithObjects: TOOLBAR_PAUSE_ALL, TOOLBAR_RESUME_ALL, nil]]; 2733 2734 [segmentedControl setImage: [NSImage imageNamed: @"PauseAll.png"] forSegment: 0]; 2735 [(NSSegmentedCell *)[segmentedControl cell] setToolTip: NSLocalizedString(@"Pause all transfers", 2736 "All toolbar item -> tooltip") forSegment: 0]; 2737 2738 [segmentedControl setImage: [NSImage imageNamed: @"ResumeAll.png"] forSegment: 1]; 2739 [(NSSegmentedCell *)[segmentedControl cell] setToolTip: NSLocalizedString(@"Resume all transfers", 2740 "All toolbar item -> tooltip") forSegment: 1]; 2741 2742 [segmentedControl release]; 2743 return groupItem; 2744 } 2745 2746 else if ([ident isEqualToString: TOOLBAR_PAUSE_RESUME_SELECTED]) 2747 { 2748 ButtonGroupToolbarItem * groupItem = [[[ButtonGroupToolbarItem alloc] initWithItemIdentifier: ident] autorelease]; 2749 2750 NSSegmentedControl * segmentedControl = [[NSSegmentedControl alloc] initWithFrame: NSZeroRect]; 2751 [groupItem setView: segmentedControl]; 2752 2753 [segmentedControl setSegmentCount: 2]; 2754 [(NSSegmentedCell *)[segmentedControl cell] setTrackingMode: NSSegmentSwitchTrackingMomentary]; 2755 2756 NSSize groupSize = NSMakeSize(72.0, 25.0); 2757 [groupItem setMinSize: groupSize]; 2758 [groupItem setMaxSize: groupSize]; 2759 2760 [groupItem setLabel: NSLocalizedString(@"Apply Selected", "Selected toolbar item -> label")]; 2761 [groupItem setPaletteLabel: NSLocalizedString(@"Pause / Resume Selected", "Selected toolbar item -> palette label")]; 2762 [groupItem setTarget: self]; 2763 [groupItem setAction: @selector(selectedToolbarClicked:)]; 2764 2765 [groupItem setIdentifiers: [NSArray arrayWithObjects: TOOLBAR_PAUSE_SELECTED, TOOLBAR_RESUME_SELECTED, nil]]; 2766 2767 [segmentedControl setImage: [NSImage imageNamed: @"PauseSelected.png"] forSegment: 0]; 2768 [(NSSegmentedCell *)[segmentedControl cell] setToolTip: NSLocalizedString(@"Pause selected transfers", 2769 "Selected toolbar item -> tooltip") forSegment: 0]; 2770 2771 [segmentedControl setImage: [NSImage imageNamed: @"ResumeSelected.png"] forSegment: 1]; 2772 [(NSSegmentedCell *)[segmentedControl cell] setToolTip: NSLocalizedString(@"Resume selected transfers", 2773 "Selected toolbar item -> tooltip") forSegment: 1]; 2774 2775 [segmentedControl release]; 2776 return groupItem; 2727 2777 } 2728 2778 else if ([ident isEqualToString: TOOLBAR_FILTER]) … … 2737 2787 } 2738 2788 else 2739 {2740 [item release];2741 2789 return nil; 2742 } 2743 2744 return [item autorelease]; 2790 2791 return item; 2792 } 2793 2794 #warning use constants 2795 - (void) allToolbarClicked: (id) sender 2796 { 2797 if ([sender selectedSegment] == 0) 2798 [self stopAllTorrents: sender]; 2799 else if ([sender selectedSegment] == 1) 2800 [self resumeAllTorrents: sender]; 2801 else; 2802 } 2803 2804 #warning use constants 2805 - (void) selectedToolbarClicked: (id) sender 2806 { 2807 if ([sender selectedSegment] == 0) 2808 [self stopSelectedTorrents: sender]; 2809 else if ([sender selectedSegment] == 1) 2810 [self resumeSelectedTorrents: sender]; 2811 else; 2745 2812 } 2746 2813 … … 2749 2816 return [NSArray arrayWithObjects: 2750 2817 TOOLBAR_CREATE, TOOLBAR_OPEN, TOOLBAR_REMOVE, 2751 TOOLBAR_PAUSE_ SELECTED, TOOLBAR_RESUME_SELECTED,2752 TOOLBAR_ PAUSE_ALL, TOOLBAR_RESUME_ALL, TOOLBAR_FILTER, TOOLBAR_INFO,2818 TOOLBAR_PAUSE_RESUME_SELECTED, TOOLBAR_PAUSE_RESUME_ALL, 2819 TOOLBAR_FILTER, TOOLBAR_INFO, 2753 2820 NSToolbarSeparatorItemIdentifier, 2754 2821 NSToolbarSpaceItemIdentifier, … … 2762 2829 TOOLBAR_CREATE, TOOLBAR_OPEN, TOOLBAR_REMOVE, 2763 2830 NSToolbarSeparatorItemIdentifier, 2764 TOOLBAR_PAUSE_ ALL, TOOLBAR_RESUME_ALL,2831 TOOLBAR_PAUSE_RESUME_ALL, 2765 2832 NSToolbarFlexibleSpaceItemIdentifier, 2766 2833 TOOLBAR_FILTER, TOOLBAR_INFO, nil]; … … 2770 2837 { 2771 2838 NSString * ident = [toolbarItem itemIdentifier]; 2772 2839 2773 2840 //enable remove item 2774 2841 if ([ident isEqualToString: TOOLBAR_REMOVE]) -
trunk/macosx/English.lproj/Localizable.strings
r3996 r4081 57 57 58 58 /* Torrent -> remaining time */ 59 "%d days % d hr" = "%1$d days %2$d hr";59 "%d days %02d hr" = "%1$d days %2$d hr"; 60 60 61 61 /* Dock item - Downloading */ … … 74 74 75 75 /* Torrent -> remaining time */ 76 "%d hr % d min" = "%1$d hr %2$d min";76 "%d hr %02d min" = "%1$d hr %2$d min"; 77 77 78 78 /* Inspector -> Peers tab -> peers */ … … 83 83 84 84 /* Torrent -> remaining time */ 85 "%d min % d sec" = "%1$d min %2$d sec";85 "%d min %02d sec" = "%1$d min %2$d sec"; 86 86 87 87 /* Inspector -> Peers tab -> peers */ … … 109 109 "%d tracker" = "%d tracker"; 110 110 111 /* Filter Bar Button -> tool tip 112 Status bar transfer count */ 111 /* Status bar transfer count */ 112 "%d transfers" = "%d transfers"; 113 114 /* Filter Bar Button -> tool tip */ 113 115 "%d Transfers" = "%d Transfers"; 114 116 … … 127 129 128 130 /* Torrent -> remaining time */ 129 "1 day % d hr" = "1 day %d hr";131 "1 day %02d hr" = "1 day %02d hr"; 130 132 131 133 /* Drag overlay -> torrents … … 140 142 "1 time" = "1 time"; 141 143 142 /* Filter Button -> tool tip 143 Status bar transfer count */ 144 /* Filter Button -> tool tip */ 144 145 "1 Transfer" = "1 Transfer"; 146 147 /* Status bar transfer count */ 148 "1 transfer" = "1 transfer"; 145 149 146 150 /* Move folder cannot be used alert -> message */ … … 164 168 /* Open duplicate alert -> title */ 165 169 "A transfer of \"%@\" is already running." = "A transfer of \"%@\" is already running."; 166 167 /* peer -> status */168 "Active" = "Active";169 170 /* peer -> status */171 "Active & Interested" = "Active & Interested";172 170 173 171 /* Inspector -> title */ … … 206 204 "Checking port status" = "Checking port status"; 207 205 208 /* peer -> status */209 "Choked" = "Choked";210 211 /* peer -> status */212 "Choked & Interested" = "Choked & Interested";213 214 206 /* Folder cannot be used alert -> location button */ 215 207 "Choose New Location" = "Choose New Location"; … … 261 253 "Creation of \"%@\" failed." = "Creation of \"%@\" failed."; 262 254 255 /* status bar -> status label (3 spaces between) */ 256 "DL: %@ UL: %@" = "DL: %1$@ UL: %2$@"; 257 263 258 /* Torrent -> status string */ 264 259 "DL: %@, UL: %@" = "DL: %1$@, UL: %2$@"; … … 292 287 "Downloading from %d of 1 peer" = "Downloading from %d of 1 peer"; 293 288 289 /* Inspector -> peer -> status */ 290 "Downloading from peer" = "Downloading from peer"; 291 294 292 /* inspector -> peer table -> header tool tip */ 295 293 "Downloading From Peer" = "Downloading From Peer"; … … 299 297 "Encrypted Connection" = "Encrypted Connection"; 300 298 299 /* Torrent -> status string */ 300 "Error" = "Error"; 301 301 302 /* Ratio invalid 302 303 Transfer speed invalid */ … … 304 305 305 306 /* Torrent -> status string */ 306 "Error" = "Error";307 308 /* Torrent -> status string */309 307 "Error: " = "Error: "; 310 308 … … 336 334 "General Info" = "General Info"; 337 335 338 /* peer -> status */336 /* Inspector -> peer -> status */ 339 337 "Handshaking" = "Handshaking"; 340 338 … … 417 415 "Open" = "Open"; 418 416 417 /* Open toolbar item -> tooltip */ 418 "Open torrent files" = "Open torrent files"; 419 419 420 /* Open toolbar item -> palette label */ 420 421 "Open Torrent Files" = "Open Torrent Files"; 421 422 422 /* Open toolbar item -> tooltip */423 "Open torrent files" = "Open torrent files";424 425 423 /* Inspector -> title */ 426 424 "Options" = "Options"; … … 441 439 "Pause selected transfers" = "Pause selected transfers"; 442 440 441 /* Torrent Table -> tooltip */ 442 "Pause the transfer." = "Pause the transfer."; 443 443 444 /* Torrent -> status string */ 444 445 "Paused" = "Paused"; 445 446 446 /* peer -> status */ 447 "Peer is Choked" = "Peer is Choked"; 447 /* Inspector -> peer -> status */ 448 "Peer wants our data" = "Peer wants our data"; 449 450 /* Inspector -> peer -> status */ 451 "Peer will not send us data" = "Peer will not send us data"; 448 452 449 453 /* Inspector -> title */ … … 487 491 "Quit" = "Quit"; 488 492 489 /* Torrent -> status string */ 493 /* Torrent -> status string 494 status bar -> status label */ 490 495 "Ratio: " = "Ratio: "; 491 496 … … 493 498 "Ratio: %@, UL: %@" = "Ratio: %1$@, UL: %2$@"; 494 499 495 /* peer -> status */496 "Re ady" = "Ready";500 /* Inspector -> peer -> status */ 501 "Refusing to send data to peer" = "Refusing to send data to peer"; 497 502 498 503 /* Removal confirm panel -> button … … 506 511 "Remove selected transfers" = "Remove selected transfers"; 507 512 508 /* peer -> status */509 "Request Sent" = "Request Sent";513 /* Inspector -> peer -> status */ 514 "Requesting data from peer" = "Requesting data from peer"; 510 515 511 516 /* Resume toolbar item -> label */ … … 523 528 /* Resume toolbar item -> tooltip */ 524 529 "Resume selected transfers" = "Resume selected transfers"; 530 531 /* Torrent Table -> tooltip */ 532 "Resume the transfer right away." = "Resume the transfer right away."; 533 534 /* Torrent Table -> tooltip */ 535 "Resume the transfer." = "Resume the transfer."; 536 537 /* Torrent Table -> tooltip */ 538 "Reveal the data file in Finder." = "Reveal the data file in Finder."; 525 539 526 540 /* Torrent -> status string */ … … 564 578 "Select the new folder for \"%@\"." = "Select the new folder for \"%@\"."; 565 579 580 /* Torrent Table -> tooltip */ 581 "Shortcut for changing transfer settings." = "Shortcut for changing transfer settings."; 582 566 583 /* Main window -> 1st bottom left button (action) tooltip */ 567 584 "Shortcuts for changing global settings." = "Shortcuts for changing global settings."; … … 592 609 "Stop at Ratio (%.2f)" = "Stop at Ratio (%.2f)"; 593 610 611 /* Torrent Table -> tooltip */ 612 "Stop waiting to start." = "Stop waiting to start."; 613 594 614 /* File size */ 595 615 "TB" = "TB"; … … 687 707 "Torrent Inspector" = "Torrent Inspector"; 688 708 689 /* Status bar -> total download*/690 "Total DL: " = "Total DL:";709 /* Status Bar -> speed tooltip */ 710 "Total download speed" = "Total download speed"; 691 711 692 712 /* stats total */ 693 713 "Total N/A" = "Total N/A"; 694 714 695 /* Status bar -> total upload*/696 "Total UL: " = "Total UL:";715 /* Status Bar -> speed tooltip */ 716 "Total upload speed" = "Total upload speed"; 697 717 698 718 /* Preferences -> Transfers toolbar item title */ … … 717 737 "Uploading To Peer" = "Uploading To Peer"; 718 738 739 /* Inspector -> peer -> status */ 740 "Uploading to peer" = "Uploading to peer"; 741 719 742 /* Torrent -> status string */ 720 743 "Waiting to check existing data" = "Waiting to check existing data"; … … 722 745 /* Torrent -> status string */ 723 746 "Waiting to download" = "Waiting to download"; 747 748 /* Inspector -> peer -> status */ 749 "Waiting to request data from peer" = "Waiting to request data from peer"; 724 750 725 751 /* Torrent -> status string */
Note: See TracChangeset
for help on using the changeset viewer.