summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob McBroom <github@skurfer.com>2018-01-17 16:41:39 -0500
committerRob McBroom <github@skurfer.com>2018-01-17 16:41:39 -0500
commit59b5e3a2b72b86bdf96dbf2e77d2ea5e46d3605a (patch)
treefc505592ca834552f2e4993ca6220dc4d25c74ee
parent280f07dae443ddb9ab6f4189428190b04e8bee30 (diff)
fix deprecation warnings
-rw-r--r--QSDeliciousPlugIn_Source.m16
1 files changed, 9 insertions, 7 deletions
diff --git a/QSDeliciousPlugIn_Source.m b/QSDeliciousPlugIn_Source.m
index b0e727f..8dcc9b4 100644
--- a/QSDeliciousPlugIn_Source.m
+++ b/QSDeliciousPlugIn_Source.m
@@ -32,12 +32,13 @@
}
- (void)populateFields {
- NSLog(@"populating: %@/%@", [[selection info] objectForKey:@"username"], [[selection info] objectForKey:@"site"]);
+ NSLog(@"populating: %@/%@", [self.selectedEntry.sourceSettings objectForKey:@"username"], [self.selectedEntry.sourceSettings objectForKey:@"site"]);
}
- (NSView *) settingsView {
- if (![super settingsView])
- [NSBundle loadNibNamed:@"QSDeliciousPlugInSource" owner:self];
+ if (![super settingsView]) {
+ [[NSBundle bundleForClass:[self class]] loadNibNamed:@"QSDeliciousPlugInSource" owner:self topLevelObjects:NULL];
+ }
return [super settingsView];
}
@@ -73,7 +74,7 @@
NULL);
if (err == noErr) {
- NSString *password = [[[NSString alloc] initWithCString:buffer length:length] autorelease];
+ NSString *password = [NSString stringWithUTF8String:buffer];
SecKeychainItemFreeContent(NULL,(void *)buffer);
return password;
}
@@ -143,8 +144,9 @@
// Site Index/API/URL
-- (int)siteIndex {
- return [[selection info] objectForKey:@"site"] != nil ? [[[selection info] objectForKey:@"site"] integerValue] : 0;
+- (NSInteger)siteIndex {
+ NSDictionary *settings = self.selectedEntry.sourceSettings;
+ return [settings objectForKey:@"site"] != nil ? [[settings objectForKey:@"site"] integerValue] : 0;
}
- (NSString *)siteURLForIndex:(NSInteger)siteIndex {
@@ -185,7 +187,7 @@
// Useranme
- (NSString *)currentUsername {
- return [[selection info] objectForKey:@"username"];
+ return [self.selectedEntry.sourceSettings objectForKey:@"username"];
}
// Password Related