From 0f26c5c3b3e606c89724067d4785323de3fee751 Mon Sep 17 00:00:00 2001 From: Ruben Beltran del Rio Date: Sun, 7 Sep 2025 13:14:48 +0200 Subject: Autosave on change --- QSDeliciousPlugIn_Source.h | 2 ++ QSDeliciousPlugIn_Source.m | 11 +++++------ QSDeliciousPlugIn_Source.xib | 5 +++++ 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/QSDeliciousPlugIn_Source.h b/QSDeliciousPlugIn_Source.h index 9d22d91..1eff1c7 100644 --- a/QSDeliciousPlugIn_Source.h +++ b/QSDeliciousPlugIn_Source.h @@ -17,6 +17,8 @@ IBOutlet NSTextField *passField; IBOutlet NSTextField *hostField; } + +- (IBAction)settingsChanged:(id)sender; @end @interface QSCatalogEntry (OldStyleSourceSupport) diff --git a/QSDeliciousPlugIn_Source.m b/QSDeliciousPlugIn_Source.m index ab8c1f1..fb09a97 100644 --- a/QSDeliciousPlugIn_Source.m +++ b/QSDeliciousPlugIn_Source.m @@ -12,10 +12,6 @@ @implementation QSDeliciousPlugIn_Source -+ (void)initialize { - [self setKeys:[NSArray arrayWithObject:@"selection"] triggerChangeNotificationsForDependentKey:@"currentPassword"]; -} - - (BOOL)indexIsValidFromDate:(NSDate *)indexDate forEntry:(NSDictionary *)theEntry { return -[indexDate timeIntervalSinceNow] < 24 * 60 * 60; } @@ -59,6 +55,11 @@ return [[self.selectedEntry.sourceSettings objectForKey:@"includeTags"] boolValue]; } + +- (IBAction)settingsChanged:(id)sender { + [[NSNotificationCenter defaultCenter] postNotificationName:QSCatalogEntryChangedNotification object:self.selectedEntry]; +} + #pragma mark - Keychain Access - (SecProtocolType)protocolTypeForString:(NSString *)protocol { @@ -206,8 +207,6 @@ - (NSArray *)objectsForEntry:(NSDictionary *)theEntry { NSLog(@"WE HAVE BEEN REQUESTED"); - [[NSNotificationCenter defaultCenter] postNotificationName:QSCatalogEntryChangedNotification object:theEntry]; - SocialSite site = [self siteIndex]; NSString *username = [self currentUsername]; NSString *password = [self currentPassword]; diff --git a/QSDeliciousPlugIn_Source.xib b/QSDeliciousPlugIn_Source.xib index 65d8dda..83b620f 100644 --- a/QSDeliciousPlugIn_Source.xib +++ b/QSDeliciousPlugIn_Source.xib @@ -88,6 +88,7 @@ + @@ -107,6 +108,7 @@ + @@ -122,6 +124,7 @@ + @@ -140,6 +143,7 @@ + @@ -155,6 +159,7 @@ + -- cgit