Changeset 7081


Ignore:
Timestamp:
Nov 9, 2008, 12:33:09 PM (12 years ago)
Author:
livings124
Message:

more type conversions and remove pointless method call

Location:
trunk/macosx
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/GroupsController.h

    r6273 r7081  
    3232+ (GroupsController *) groups;
    3333
    34 - (int) numberOfGroups;
     34- (NSInteger) numberOfGroups;
    3535
    36 - (int) rowValueForIndex: (int) index;
    37 - (int) indexForRow: (int) row;
     36- (NSInteger) rowValueForIndex: (NSInteger) index;
     37- (NSInteger) indexForRow: (NSInteger) row;
    3838
    39 - (NSString *) nameForIndex: (int) index;
    40 - (void) setName: (NSString *) name forIndex: (int) index;
     39- (NSString *) nameForIndex: (NSInteger) index;
     40- (void) setName: (NSString *) name forIndex: (NSInteger) index;
    4141
    42 - (NSImage *) imageForIndex: (int) index;
     42- (NSImage *) imageForIndex: (NSInteger) index;
    4343
    44 - (NSColor *) colorForIndex: (int) index;
    45 - (void) setColor: (NSColor *) color forIndex: (int) index;
     44- (NSColor *) colorForIndex: (NSInteger) index;
     45- (void) setColor: (NSColor *) color forIndex: (NSInteger) index;
    4646
    4747- (void) addNewGroup;
    4848- (void) removeGroupWithRowIndexes: (NSIndexSet *) rowIndexes;
    4949
    50 - (NSIndexSet *) moveGroupsAtRowIndexes: (NSIndexSet *) indexes toRow: (int) newRow oldSelected: (NSIndexSet *) selectedIndexes;
     50- (NSIndexSet *) moveGroupsAtRowIndexes: (NSIndexSet *) indexes toRow: (NSInteger) newRow oldSelected: (NSIndexSet *) selectedIndexes;
    5151
    5252- (NSMenu *) groupMenuWithTarget: (id) target action: (SEL) action isSmall: (BOOL) small;
  • trunk/macosx/GroupsController.m

    r6889 r7081  
    107107}
    108108
    109 - (int) numberOfGroups
     109- (NSInteger) numberOfGroups
    110110{
    111111    return [fGroups count];
    112112}
    113113
    114 - (int) rowValueForIndex: (int) index
     114- (NSInteger) rowValueForIndex: (NSInteger) index
    115115{
    116116    if (index != -1)
     
    123123}
    124124
    125 - (int) indexForRow: (int) row
     125- (NSInteger) indexForRow: (NSInteger) row
    126126{
    127127    return [[[fGroups objectAtIndex: row] objectForKey: @"Index"] intValue];
    128128}
    129129
    130 - (NSString *) nameForIndex: (int) index
    131 {
    132     int orderIndex = [self rowValueForIndex: index];
     130- (NSString *) nameForIndex: (NSInteger) index
     131{
     132    NSInteger orderIndex = [self rowValueForIndex: index];
    133133    return orderIndex != -1 ? [[fGroups objectAtIndex: orderIndex] objectForKey: @"Name"] : nil;
    134134}
    135135
    136 - (void) setName: (NSString *) name forIndex: (int) index
    137 {
    138     int orderIndex = [self rowValueForIndex: index];
     136- (void) setName: (NSString *) name forIndex: (NSInteger) index
     137{
     138    NSInteger orderIndex = [self rowValueForIndex: index];
    139139    [[fGroups objectAtIndex: orderIndex] setObject: name forKey: @"Name"];
    140140    [self saveGroups];
     
    143143}
    144144
    145 - (NSImage *) imageForIndex: (int) index
    146 {
    147     int orderIndex = [self rowValueForIndex: index];
     145- (NSImage *) imageForIndex: (NSInteger) index
     146{
     147    NSInteger orderIndex = [self rowValueForIndex: index];
    148148    return orderIndex != -1 ? [self imageForGroup: [fGroups objectAtIndex: orderIndex]]
    149149                            : [NSImage imageNamed: @"GroupsNoneTemplate.png"];
    150150}
    151151
    152 - (NSColor *) colorForIndex: (int) index
    153 {
    154     int orderIndex = [self rowValueForIndex: index];
     152- (NSColor *) colorForIndex: (NSInteger) index
     153{
     154    NSInteger orderIndex = [self rowValueForIndex: index];
    155155    return orderIndex != -1 ? [[fGroups objectAtIndex: orderIndex] objectForKey: @"Color"] : nil;
    156156}
    157157
    158 - (void) setColor: (NSColor *) color forIndex: (int) index
     158- (void) setColor: (NSColor *) color forIndex: (NSInteger) index
    159159{
    160160    NSMutableDictionary * dict = [fGroups objectAtIndex: [self rowValueForIndex: index]];
     
    212212}
    213213
    214 - (NSIndexSet *) moveGroupsAtRowIndexes: (NSIndexSet *) indexes toRow: (int) newRow oldSelected: (NSIndexSet *) selectedIndexes
     214- (NSIndexSet *) moveGroupsAtRowIndexes: (NSIndexSet *) indexes toRow: (NSInteger) newRow oldSelected: (NSIndexSet *) selectedIndexes
    215215{
    216216    NSArray * selectedGroups = [fGroups objectsAtIndexes: selectedIndexes];
  • trunk/macosx/PrefsController.m

    r7080 r7081  
    716716{
    717717    NSString * address = [sender stringValue];
    718    
    719718    tr_sessionSetProxy(fHandle, [address UTF8String]);
    720     [sender setStringValue: address];
    721719    [fDefaults setObject: address forKey: @"ProxyAddress"];
    722720}
Note: See TracChangeset for help on using the changeset viewer.