Changeset 5255


Ignore:
Timestamp:
Mar 15, 2008, 8:17:19 PM (14 years ago)
Author:
livings124
Message:

use a single xib file for all Message window localizations, localizing just from the strings file

Location:
trunk
Files:
1 added
6 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Transmission.xcodeproj/project.pbxproj

    r5206 r5255  
    9292                A231274C0D11D0B7003F9AFF /* AboutWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = A231274B0D11D0B7003F9AFF /* AboutWindow.xib */; };
    9393                A232D29E0A70903E00973B12 /* Filter.png in Resources */ = {isa = PBXBuildFile; fileRef = A232D29D0A70903E00973B12 /* Filter.png */; };
     94                A233BD330D8C6585007EE7B4 /* MessageWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = A233BD320D8C6585007EE7B4 /* MessageWindow.xib */; };
    9495                A234D0D20C79FB3600A82373 /* NSMenuAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = A234D0D00C79FB3600A82373 /* NSMenuAdditions.m */; };
    9596                A2385DD40BFE06C800B24EF6 /* DragOverlayWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = A2385DD20BFE06C800B24EF6 /* DragOverlayWindow.m */; };
     
    139140                A277DA0B0C693D9C00DA2CD4 /* ActionOn.png in Resources */ = {isa = PBXBuildFile; fileRef = A277DA090C693D9C00DA2CD4 /* ActionOn.png */; };
    140141                A29576030D11D63C0093B167 /* Creator.xib in Resources */ = {isa = PBXBuildFile; fileRef = A29576010D11D63C0093B167 /* Creator.xib */; };
    141                 A29576080D11D70E0093B167 /* MessageWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = A29576060D11D70E0093B167 /* MessageWindow.xib */; };
    142142                A29576130D11D8DD0093B167 /* InfoWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = A29576110D11D8DD0093B167 /* InfoWindow.xib */; };
    143143                A29AF4F70D01BADC00D097EC /* DownArrowTemplate.png in Resources */ = {isa = PBXBuildFile; fileRef = A29AF4F60D01BADC00D097EC /* DownArrowTemplate.png */; };
     
    456456                A223AA800D220CEB00840069 /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = macosx/nl.lproj/Localizable.strings; sourceTree = "<group>"; };
    457457                A223AA810D220CEB00840069 /* nl */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = nl; path = macosx/nl.lproj/MainMenu.xib; sourceTree = "<group>"; };
    458                 A223AA820D220CEB00840069 /* nl */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = nl; path = macosx/nl.lproj/MessageWindow.xib; sourceTree = "<group>"; };
    459458                A223AA830D220CEB00840069 /* nl */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = nl; path = macosx/nl.lproj/PrefsWindow.xib; sourceTree = "<group>"; };
    460459                A223AA840D220CEB00840069 /* nl */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = nl; path = macosx/nl.lproj/StatsWindow.xib; sourceTree = "<group>"; };
     
    462461                A223AAB70D22ECE800840069 /* it */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = it; path = macosx/it.lproj/InfoWindow.xib; sourceTree = "<group>"; };
    463462                A223AAB80D22ECE800840069 /* it */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = it; path = macosx/it.lproj/MainMenu.xib; sourceTree = "<group>"; };
    464                 A223AAB90D22ECE800840069 /* it */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = it; path = macosx/it.lproj/MessageWindow.xib; sourceTree = "<group>"; };
    465463                A223AABA0D22ECE800840069 /* it */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = it; path = macosx/it.lproj/PrefsWindow.xib; sourceTree = "<group>"; };
    466464                A223AABB0D22ECE800840069 /* it */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = it; path = macosx/it.lproj/StatsWindow.xib; sourceTree = "<group>"; };
     
    471469                A231274B0D11D0B7003F9AFF /* AboutWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = AboutWindow.xib; path = macosx/AboutWindow.xib; sourceTree = "<group>"; };
    472470                A232D29D0A70903E00973B12 /* Filter.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Filter.png; path = macosx/Images/Filter.png; sourceTree = "<group>"; };
     471                A233BD320D8C6585007EE7B4 /* MessageWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = MessageWindow.xib; path = macosx/MessageWindow.xib; sourceTree = "<group>"; };
    473472                A234D0CF0C79FB3600A82373 /* NSMenuAdditions.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = NSMenuAdditions.h; path = macosx/NSMenuAdditions.h; sourceTree = "<group>"; };
    474473                A234D0D00C79FB3600A82373 /* NSMenuAdditions.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = NSMenuAdditions.m; path = macosx/NSMenuAdditions.m; sourceTree = "<group>"; };
     
    523522                A265A32F0D25767700198AC8 /* fr */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = fr; path = macosx/fr.lproj/InfoWindow.xib; sourceTree = "<group>"; };
    524523                A265A3300D25767700198AC8 /* fr */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = fr; path = macosx/fr.lproj/MainMenu.xib; sourceTree = "<group>"; };
    525                 A265A3310D25767700198AC8 /* fr */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = fr; path = macosx/fr.lproj/MessageWindow.xib; sourceTree = "<group>"; };
    526524                A265A3320D25767700198AC8 /* fr */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = fr; path = macosx/fr.lproj/PrefsWindow.xib; sourceTree = "<group>"; };
    527525                A265A3330D25767700198AC8 /* fr */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = fr; path = macosx/fr.lproj/StatsWindow.xib; sourceTree = "<group>"; };
     
    529527                A265A3BF0D25AE7800198AC8 /* es */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = es; path = macosx/es.lproj/InfoWindow.xib; sourceTree = "<group>"; };
    530528                A265A3C00D25AE7800198AC8 /* es */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = es; path = macosx/es.lproj/MainMenu.xib; sourceTree = "<group>"; };
    531                 A265A3C10D25AE7800198AC8 /* es */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = es; path = macosx/es.lproj/MessageWindow.xib; sourceTree = "<group>"; };
    532529                A265A3C20D25AE7800198AC8 /* es */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = es; path = macosx/es.lproj/PrefsWindow.xib; sourceTree = "<group>"; };
    533530                A265A3C30D25AE7800198AC8 /* es */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = es; path = macosx/es.lproj/StatsWindow.xib; sourceTree = "<group>"; };
     
    537534                A26AF1070D2855FC00FF7140 /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = macosx/ru.lproj/Localizable.strings; sourceTree = "<group>"; };
    538535                A26AF1080D2855FC00FF7140 /* ru */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = ru; path = macosx/ru.lproj/MainMenu.xib; sourceTree = "<group>"; };
    539                 A26AF1090D2855FC00FF7140 /* ru */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = ru; path = macosx/ru.lproj/MessageWindow.xib; sourceTree = "<group>"; };
    540536                A26AF10A0D2855FC00FF7140 /* ru */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = ru; path = macosx/ru.lproj/PrefsWindow.xib; sourceTree = "<group>"; };
    541537                A26AF10B0D2855FC00FF7140 /* ru */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = ru; path = macosx/ru.lproj/StatsWindow.xib; sourceTree = "<group>"; };
     
    554550                A28E1DDF0CFFD8EC00E16385 /* ButtonToolbarItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ButtonToolbarItem.h; path = macosx/ButtonToolbarItem.h; sourceTree = "<group>"; };
    555551                A29576020D11D63C0093B167 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = macosx/English.lproj/Creator.xib; sourceTree = "<group>"; };
    556                 A29576070D11D70E0093B167 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = macosx/English.lproj/MessageWindow.xib; sourceTree = "<group>"; };
    557552                A29576120D11D8DD0093B167 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = macosx/English.lproj/InfoWindow.xib; sourceTree = "<group>"; };
    558553                A29AF4F60D01BADC00D097EC /* DownArrowTemplate.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = DownArrowTemplate.png; path = macosx/Images/DownArrowTemplate.png; sourceTree = "<group>"; };
     
    914909                                A29576110D11D8DD0093B167 /* InfoWindow.xib */,
    915910                                A29576010D11D63C0093B167 /* Creator.xib */,
    916                                 A29576060D11D70E0093B167 /* MessageWindow.xib */,
    917911                                A25892750CF1FCE800CCCDDF /* StatsWindow.xib */,
    918912                                A26AF27C0D2DBDDF00FF7140 /* AddWindow.xib */,
     913                                A233BD320D8C6585007EE7B4 /* MessageWindow.xib */,
    919914                                A22180B50D148F0F007D09ED /* GroupsWindow.xib */,
    920915                                A231274B0D11D0B7003F9AFF /* AboutWindow.xib */,
     
    16481643                                A231274C0D11D0B7003F9AFF /* AboutWindow.xib in Resources */,
    16491644                                A29576030D11D63C0093B167 /* Creator.xib in Resources */,
    1650                                 A29576080D11D70E0093B167 /* MessageWindow.xib in Resources */,
    16511645                                A29576130D11D8DD0093B167 /* InfoWindow.xib in Resources */,
    16521646                                A22180B60D148F0F007D09ED /* GroupsWindow.xib in Resources */,
     
    16691663                                A2F41F8E0D73595100B82116 /* InfoTracker.png in Resources */,
    16701664                                A2012AE20D77151D0056FD71 /* YingYangGroupTemplate.png in Resources */,
     1665                                A233BD330D8C6585007EE7B4 /* MessageWindow.xib in Resources */,
    16711666                        );
    16721667                        runOnlyForDeploymentPostprocessing = 0;
     
    20252020                        sourceTree = "<group>";
    20262021                };
    2027                 A29576060D11D70E0093B167 /* MessageWindow.xib */ = {
    2028                         isa = PBXVariantGroup;
    2029                         children = (
    2030                                 A29576070D11D70E0093B167 /* English */,
    2031                                 A223AA820D220CEB00840069 /* nl */,
    2032                                 A223AAB90D22ECE800840069 /* it */,
    2033                                 A265A3310D25767700198AC8 /* fr */,
    2034                                 A265A3C10D25AE7800198AC8 /* es */,
    2035                                 A26AF1090D2855FC00FF7140 /* ru */,
    2036                         );
    2037                         name = MessageWindow.xib;
    2038                         sourceTree = "<group>";
    2039                 };
    20402022                A29576110D11D8DD0093B167 /* InfoWindow.xib */ = {
    20412023                        isa = PBXVariantGroup;
  • trunk/macosx/MessageWindowController.h

    r4423 r5255  
    3030   
    3131    IBOutlet NSPopUpButton * fLevelButton;
     32    IBOutlet NSButton * fSaveButton, * fClearButton;
    3233   
    3334    NSMutableArray * fMessages;
  • trunk/macosx/MessageWindowController.m

    r5245 r5255  
    2424
    2525#import "MessageWindowController.h"
     26#import "NSStringAdditions.h"
    2627#import <transmission.h>
    2728
     
    7677    fDebugImage = [NSImage imageNamed: @"PurpleDot.png"];
    7778   
    78     //set images to popup button items
     79    //set images and text for popup button items
    7980    [[fLevelButton itemAtIndex: LEVEL_ERROR] setImage: fErrorImage];
     81    [[fLevelButton itemAtIndex: LEVEL_ERROR] setTitle: NSLocalizedString(@"Error", "Message window -> level string")];
    8082    [[fLevelButton itemAtIndex: LEVEL_INFO] setImage: fInfoImage];
     83    [[fLevelButton itemAtIndex: LEVEL_INFO] setTitle: NSLocalizedString(@"Info", "Message window -> level string")];
    8184    [[fLevelButton itemAtIndex: LEVEL_DEBUG] setImage: fDebugImage];
     85    [[fLevelButton itemAtIndex: LEVEL_DEBUG] setTitle: NSLocalizedString(@"Debug", "Message window -> level string")];
     86   
     87    //set table column text
     88    [[[fMessageTable tableColumnWithIdentifier: @"Date"] headerCell] setTitle: NSLocalizedString(@"Date",
     89        "Message window -> table column")];
     90    [[[fMessageTable tableColumnWithIdentifier: @"Name"] headerCell] setTitle: NSLocalizedString(@"Process",
     91        "Message window -> table column")];
     92    [[[fMessageTable tableColumnWithIdentifier: @"Message"] headerCell] setTitle: NSLocalizedString(@"Message",
     93        "Message window -> table column")];
     94   
     95    //set and size buttons
     96    [fSaveButton setTitle: [NSLocalizedString(@"Save", "Message window -> save button") stringByAppendingEllipsis]];
     97    [fSaveButton sizeToFit];
     98   
     99    NSRect saveButtonFrame = [fSaveButton frame];
     100    saveButtonFrame.size.width += 10.0;
     101    [fSaveButton setFrame: saveButtonFrame];
     102   
     103    float oldClearButtonWidth = [fClearButton frame].size.width;
     104   
     105    [fClearButton setTitle: NSLocalizedString(@"Clear", "Message window -> save button")];
     106    [fClearButton sizeToFit];
     107   
     108    NSRect clearButtonFrame = [fClearButton frame];
     109    clearButtonFrame.size.width = MAX(clearButtonFrame.size.width + 10.0, saveButtonFrame.size.width);
     110    clearButtonFrame.origin.x -= clearButtonFrame.size.width - oldClearButtonWidth;
     111    [fClearButton setFrame: clearButtonFrame];
    82112   
    83113    //select proper level in popup button
Note: See TracChangeset for help on using the changeset viewer.