Skip to content

Commit

Permalink
updated code to work with latest PsiToolkit
Browse files Browse the repository at this point in the history
  • Loading branch information
mackuba committed Jan 3, 2011
1 parent 13cd720 commit ad94190
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 18 deletions.
12 changes: 6 additions & 6 deletions Classes/Commit.m
Expand Up @@ -25,12 +25,12 @@ - (BOOL) isMergeCommit {
}

- (NSDictionary *) toDictionary {
return PSDict(
authorName, @"authorName",
authorEmail, @"authorEmail",
subject, @"subject",
gitHash, @"gitHash",
date, @"date"
return PSHash(
@"authorName", authorName,
@"authorEmail", authorEmail,
@"subject", subject,
@"gitHash", gitHash,
@"date", date
);
}

Expand Down
16 changes: 8 additions & 8 deletions Classes/Defaults.m
Expand Up @@ -12,14 +12,14 @@
@implementation Defaults

+ (void) initialize {
defaultPreferenceValues = PSDict(
PSInt(5), MONITOR_INTERVAL_KEY,
PSBool(YES), IGNORE_MERGES_KEY,
PSBool(YES), IGNORE_OWN_COMMITS,
PSBool(NO), STICKY_NOTIFICATIONS_KEY,
PSBool(YES), SHOW_DIFF_WINDOW_KEY,
PSBool(NO), OPEN_DIFF_IN_BROWSER_KEY,
PSBool(YES), KEEP_WINDOWS_ON_TOP_KEY
defaultPreferenceValues = PSHash(
MONITOR_INTERVAL_KEY, PSInt(5),
IGNORE_MERGES_KEY, PSBool(YES),
IGNORE_OWN_COMMITS, PSBool(YES),
STICKY_NOTIFICATIONS_KEY, PSBool(NO),
SHOW_DIFF_WINDOW_KEY, PSBool(YES),
OPEN_DIFF_IN_BROWSER_KEY, PSBool(NO),
KEEP_WINDOWS_ON_TOP_KEY, PSBool(YES)
);
}

Expand Down
2 changes: 1 addition & 1 deletion Classes/Git.m
Expand Up @@ -26,7 +26,7 @@ + (void) setGitExecutable: (NSString *) path {
path = [path psTrimmedString];
gitExecutable = [path isEqual: @""] ? nil : path;
[self didChangeValueForKey: @"gitExecutable"];
PSNotifyWithData(GitExecutableSetNotification, PSDict(path, @"path"));
PSNotifyWithData(GitExecutableSetNotification, PSHash(@"path", path));
}

- (id) initWithDelegate: (id) aDelegate {
Expand Down
2 changes: 1 addition & 1 deletion Classes/GitifierAppDelegate.m
Expand Up @@ -183,7 +183,7 @@ - (void) commandCompleted: (NSString *) command output: (NSString *) output {
if ([command isEqual: @"config"]) {
if (output && output.length > 0) {
userEmail = [output psTrimmedString];
PSNotifyWithData(UserEmailChangedNotification, PSDict(userEmail, @"email"));
PSNotifyWithData(UserEmailChangedNotification, PSHash(@"email", userEmail));
}
} else if ([command isEqual: @"version"]) {
if (!output || ![output isMatchedByRegex: @"^git version \\d"]) {
Expand Down
2 changes: 1 addition & 1 deletion Classes/GrowlController.m
Expand Up @@ -73,7 +73,7 @@ - (void) openGrowlPreferences {

- (void) showGrowlWithCommit: (Commit *) commit repository: (Repository *) repository {
BOOL sticky = [GitifierDefaults boolForKey: STICKY_NOTIFICATIONS_KEY];
NSDictionary *commitData = PSDict([commit toDictionary], @"commit", repository.url, @"repository");
NSDictionary *commitData = PSHash(@"commit", [commit toDictionary], @"repository", repository.url);

[GrowlApplicationBridge notifyWithTitle: PSFormat(@"%@%@", repository.name, commit.authorName)
description: commit.subject
Expand Down
2 changes: 1 addition & 1 deletion Classes/Repository.m
Expand Up @@ -72,7 +72,7 @@ - (id) initWithUrl: (NSString *) anUrl {
}

- (NSDictionary *) hashRepresentation {
return PSDict(url, @"url", name, @"name");
return PSHash(@"url", url, @"name", name);
}

- (void) resetStatus {
Expand Down
2 changes: 2 additions & 0 deletions Gitifier_Prefix.pch
Expand Up @@ -4,5 +4,7 @@

#ifdef __OBJC__
#import <Cocoa/Cocoa.h>
#define PSITOOLKIT_ENABLE_COCOA
#define PSITOOLKIT_ENABLE_MODELS
#import "PsiToolkit.h"
#endif

0 comments on commit ad94190

Please sign in to comment.