Revision: 22431
http://sourceforge.net/p/bibdesk/svn/22431
Author: hofman
Date: 2018-07-18 09:14:57 +0000 (Wed, 18 Jul 2018)
Log Message:
-----------
format warning is true when message is not nil
Modified Paths:
--------------
trunk/bibdesk/BibPref_AutoFile.m
trunk/bibdesk/BibPref_CiteKey.m
Modified: trunk/bibdesk/BibPref_AutoFile.m
===================================================================
--- trunk/bibdesk/BibPref_AutoFile.m 2018-07-18 06:30:29 UTC (rev 22430)
+++ trunk/bibdesk/BibPref_AutoFile.m 2018-07-18 09:14:57 UTC (rev 22431)
@@ -54,7 +54,7 @@
@interface BibPref_AutoFile (Private)
-- (void)setLocalUrlFormatInvalidWarning:(BOOL)set message:(NSString *)message;
+- (void)setLocalUrlFormatInvalidWarning:(NSString *)message;
- (void)updatePapersFolderUI;
- (void)updateFormatPresetUI;
- (void)updateFormatPreviewUI;
@@ -146,7 +146,7 @@
NSRect frame;
if ([BDSKFormatParser validateFormat:&formatString
attributedFormat:&attrFormat forField:BDSKLocalFileString error:&error]) {
- [self setLocalUrlFormatInvalidWarning:NO message:nil];
+ [self setLocalUrlFormatInvalidWarning:nil];
[previewTextField setStringValue:[[BDSKPreviewItem sharedItem]
suggestedLocalFilePath]];
[previewTextField sizeToFit];
@@ -157,7 +157,7 @@
}
[[self view] setNeedsDisplay:YES];
} else {
- [self setLocalUrlFormatInvalidWarning:YES message:error];
+ [self setLocalUrlFormatInvalidWarning:error];
[previewTextField setStringValue:NSLocalizedString(@"Invalid
Format", @"Preview for invalid autogeneration format")];
if (NO == [formatSheet isVisible])
[self showFormatSheet:self];
@@ -342,7 +342,7 @@
[self textFieldDidBecomeFirstResponder:formatSheetField];
NSString *formatError = [(BDSKFormatStringFormatter
*)[formatSheetField formatter] formatError];
- [self setLocalUrlFormatInvalidWarning:formatError != nil
message:formatError];
+ [self setLocalUrlFormatInvalidWarning:formatError];
}
}
@@ -433,10 +433,9 @@
contextInfo:NULL];
}
-- (void)setLocalUrlFormatInvalidWarning:(BOOL)set message:(NSString *)message{
- [formatWarningButton setToolTip:set ? message : nil];
- [formatWarningButton setHidden:set == NO];
- [formatSheetField setTextColor:(set ? [NSColor redColor] : [NSColor
blackColor])]; // overdone?
+- (void)setLocalUrlFormatInvalidWarning:(NSString *)message{
+ [formatWarningButton setToolTip:message];
+ [formatWarningButton setHidden:message == nil];
}
@end
Modified: trunk/bibdesk/BibPref_CiteKey.m
===================================================================
--- trunk/bibdesk/BibPref_CiteKey.m 2018-07-18 06:30:29 UTC (rev 22430)
+++ trunk/bibdesk/BibPref_CiteKey.m 2018-07-18 09:14:57 UTC (rev 22431)
@@ -52,7 +52,7 @@
@interface BibPref_CiteKey (Private)
-- (void)setCiteKeyFormatInvalidWarning:(BOOL)set message:(NSString *)message;
+- (void)setCiteKeyFormatInvalidWarning:(NSString *)message;
- (void)updateFormatPresetUI;
- (void)updateFormatPreviewUI;
@end
@@ -118,7 +118,7 @@
// update the UI elements
if ([BDSKFormatParser validateFormat:&citeKeyFormat
attributedFormat:&attrFormat forField:BDSKCiteKeyString error:&error]) {
- [self setCiteKeyFormatInvalidWarning:NO message:nil];
+ [self setCiteKeyFormatInvalidWarning:nil];
[citeKeyLine setStringValue:[[BDSKPreviewItem sharedItem]
suggestedCiteKey]];
[citeKeyLine sizeToFit];
@@ -129,7 +129,7 @@
}
[[self view] setNeedsDisplay:YES];
} else {
- [self setCiteKeyFormatInvalidWarning:YES message:error];
+ [self setCiteKeyFormatInvalidWarning:error];
[citeKeyLine setStringValue:NSLocalizedString(@"Invalid
Format", @"Preview for invalid autogeneration format")];
if (![formatSheet isVisible])
[self showFormatSheet:self];
@@ -253,7 +253,7 @@
[self textFieldDidBecomeFirstResponder:formatSheetField];
NSString *formatError = [(BDSKFormatStringFormatter *)[formatSheetField
formatter] formatError];
- [self setCiteKeyFormatInvalidWarning:formatError != nil
message:formatError];
+ [self setCiteKeyFormatInvalidWarning:formatError];
}
- (BOOL)control:(NSControl *)control textShouldEndEditing:(NSText
*)fieldEditor {
@@ -341,9 +341,9 @@
contextInfo:NULL];
}
-- (void)setCiteKeyFormatInvalidWarning:(BOOL)set message:(NSString *)message{
- [formatWarningButton setToolTip:set ? message : nil];
- [formatWarningButton setHidden:set == NO];
+- (void)setCiteKeyFormatInvalidWarning:(NSString *)message{
+ [formatWarningButton setToolTip:message];
+ [formatWarningButton setHidden:message == nil];
}
@end
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit