summaryrefslogtreecommitdiff
path: root/QSDeliciousPrefPane.m
diff options
context:
space:
mode:
authorjnj <jnj@57e2f9b5-c12c-0410-8e95-a1ee7272c91a>2008-11-13 18:59:12 +0000
committerjnj <jnj@57e2f9b5-c12c-0410-8e95-a1ee7272c91a>2008-11-13 18:59:12 +0000
commitba310e8b58d686ee9897b26a7edab5b778a8d96f (patch)
treef7b5feaf4151d88b2283ed657133737b378f7eba /QSDeliciousPrefPane.m
Add remaining plugins
git-svn-id: https://blacktree-elements-public.googlecode.com/svn/trunk@41 57e2f9b5-c12c-0410-8e95-a1ee7272c91a
Diffstat (limited to 'QSDeliciousPrefPane.m')
-rw-r--r--QSDeliciousPrefPane.m39
1 files changed, 39 insertions, 0 deletions
diff --git a/QSDeliciousPrefPane.m b/QSDeliciousPrefPane.m
new file mode 100644
index 0000000..f0dde4e
--- /dev/null
+++ b/QSDeliciousPrefPane.m
@@ -0,0 +1,39 @@
+
+
+#import "QSDeliciousPrefPane.h"
+#import <QSCore/QSResourceManager.h>
+
+@implementation QSDeliciousPrefPane
+- (id)init {
+ self = [super initWithBundle:[NSBundle bundleForClass:[QSDeliciousPrefPane class]]];
+ if (self) {
+ }
+ return self;
+}
+
+- (NSImage *) icon{
+ return [[NSBundle bundleForClass:[self class]] imageNamed:@"del.icio.us"];
+}
+
+- (NSString *) mainNibName{
+ return @"QSDeliciousPrefPane";
+}
+
+- (void)awakeFromNib{
+ NSString *account=[[NSUserDefaults standardUserDefaults] objectForKey:@"QSDeliciousUserName"];
+ NSURL *url=[NSURL URLWithString:[NSString stringWithFormat:@"http://%@@del.icio.us/",account]];
+ NSString *password=[url keychainPassword];
+ if (account)[userField setStringValue:account];
+ if (password)[passField setStringValue:password];
+}
+
+- (IBAction)savePassword:(id)sender{
+ NSString *account=[userField stringValue];
+ NSString *pass=[passField stringValue];
+
+ NSURL *url=[NSURL URLWithString:[NSString stringWithFormat:@"http://%@:%@@del.icio.us/",account,pass]];
+ if ([pass length])
+ [url addPasswordToKeychain];
+}
+
+@end