unison

Fork of Unison, a bi-directional file synchronization tool
git clone git://git.laack.co/unison.git
Log | Files | Refs | README | LICENSE

ProfileTableView.m (894B)


      1 #import "MyController.h"
      2 #import "ProfileTableView.h"
      3 
      4 @implementation ProfileTableView
      5 
      6 - (void)keyDown:(NSEvent *)event
      7 {
      8     /* some keys return zero-length strings */
      9     if ([[event characters] length] == 0) {
     10         [super keyDown:event];
     11         return;
     12     }
     13 
     14     unichar c = [[event characters] characterAtIndex:0];
     15     switch (c) {
     16     case '\r':
     17         [myController openButton:self];
     18         break;
     19     default:
     20         [super keyDown:event];
     21         break;
     22     }
     23 }
     24 
     25 /* Override default highlight colour to match ReconTableView */
     26 - (id)_highlightColorForCell:(NSCell *)cell
     27 {
     28     if(([[self window] firstResponder] == self) &&
     29         [[self window] isMainWindow] &&
     30         [[self window] isKeyWindow])
     31 
     32         return [NSColor colorWithCalibratedRed:0.7 green:0.75 blue:0.8 alpha:1.0];
     33     else return [NSColor colorWithCalibratedRed:0.8 green:0.8 blue:0.8 alpha:1.0];
     34 }
     35 
     36 @end