Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

63 lines (50 sloc) 1.9 kb
// PBPrefsWindowController.m
// GitX
// Created by Christian Jacobsen on 02/10/2008.
// Copyright 2008 __MyCompanyName__. All rights reserved.
#import "PBPrefsWindowController.h"
#import "PBGitRepository.h"
@implementation PBPrefsWindowController
# pragma mark DBPrefsWindowController overrides
- (void)setupToolbar
[self addView:generalPrefsView label:@"General" image:[NSImage imageNamed:@"gitx"]];
[self addView:integrationPrefsView label:@"Integration" image:[NSImage imageNamed:NSImageNameNetwork]];
[self addView:updatesPrefsView label:@"Updates"];
#pragma mark -
#pragma mark Delegate methods
- (IBAction) checkGitValidity: sender
// FIXME: This does not work reliably, probably due to:
//[badGitPathIcon setHidden:[PBGitRepository validateGit:[[NSValueTransformer valueTransformerForName:@"PBNSURLPathUserDefaultsTransfomer"] reverseTransformedValue:[gitPathController URL]]]];
- (IBAction) resetGitPath: sender
[[NSUserDefaults standardUserDefaults] removeObjectForKey:@"gitExecutable"];
- (void)pathCell:(NSPathCell *)pathCell willDisplayOpenPanel:(NSOpenPanel *)openPanel
[openPanel setCanChooseDirectories:NO];
[openPanel setCanChooseFiles:YES];
[openPanel setAllowsMultipleSelection:NO];
[openPanel setTreatsFilePackagesAsDirectories:YES];
[openPanel setAccessoryView:gitPathOpenAccessory];
//[[openPanel _navView] setShowsHiddenFiles:YES];
gitPathOpenPanel = openPanel;
#pragma mark -
#pragma mark Git Path open panel actions
- (IBAction) showHideAllFiles: sender
/* FIXME: This uses undocumented OpenPanel features to show hidden files! */
NSNumber *showHidden = [NSNumber numberWithBool:[sender state] == NSOnState];
[[gitPathOpenPanel valueForKey:@"_navView"] setValue:showHidden forKey:@"showsHiddenFiles"];
Jump to Line
Something went wrong with that request. Please try again.