ref: tooltips on options
This commit is contained in:
@@ -23,45 +23,79 @@
|
|||||||
ColumnIcon(self, __X, RSSImageSettingsFeed);
|
ColumnIcon(self, __X, RSSImageSettingsFeed);
|
||||||
// Generate checkbox matrix
|
// Generate checkbox matrix
|
||||||
self.y = PAD_WIN + IconSize + PAD_S;
|
self.y = PAD_WIN + IconSize + PAD_S;
|
||||||
[[self entry:NSLocalizedString(@"Tint menu bar icon on unread", nil)
|
[self entry:NSLocalizedString(@"Tint menu bar icon on unread", nil)
|
||||||
c1:Pref_globalTintMenuIcon c2:nil c3:nil]
|
help:NSLocalizedString(@"If active, a color will indicate if there are unread articles.", nil)
|
||||||
tooltip:NSLocalizedString(@"If active, a color will indicate if there are unread articles.", nil)];
|
tip:nil
|
||||||
|
c1:Pref_globalTintMenuIcon c1tt:NSLocalizedString(@"menu bar icon", nil)
|
||||||
|
c2:nil c2tt:nil
|
||||||
|
c3:nil c3tt:nil];
|
||||||
|
|
||||||
[[self entry:NSLocalizedString(@"Update all feeds", nil)
|
[self entry:NSLocalizedString(@"Update all feeds", nil)
|
||||||
c1:Pref_globalUpdateAll c2:nil c3:nil]
|
help:NSLocalizedString(@"Show button in status bar menu to reload all feeds. This will force fetch new online content regardless of next-update timer.", nil)
|
||||||
tooltip:NSLocalizedString(@"Show a button in status bar menu to reload all feeds. This will force fetch new online content regardless of next-update timer.", nil)];
|
tip:nil
|
||||||
|
c1:Pref_globalUpdateAll c1tt:NSLocalizedString(@"in main menu", nil)
|
||||||
|
c2:nil c2tt:nil
|
||||||
|
c3:nil c3tt:nil];
|
||||||
|
|
||||||
[[self entry:NSLocalizedString(@"Open all unread", nil)
|
[self entry:NSLocalizedString(@"Open all unread", nil)
|
||||||
c1:Pref_globalOpenUnread c2:Pref_groupOpenUnread c3:Pref_feedOpenUnread]
|
help:NSLocalizedString(@"Show button to open unread articles.", nil)
|
||||||
tooltip:NSLocalizedString(@"Show a button to open unread articles. (globally / per group / per feed)\n\nIf you hold down option key, this will become an “open a few” unread articles button.", nil)];
|
tip:NSLocalizedString(@"If you hold down option-key, this will become an “open a few” unread articles button.", nil)
|
||||||
|
c1:Pref_globalOpenUnread c1tt: NSLocalizedString(@"in main menu", nil)
|
||||||
|
c2:Pref_groupOpenUnread c2tt: NSLocalizedString(@"in group menu", nil)
|
||||||
|
c3:Pref_feedOpenUnread c3tt: NSLocalizedString(@"in feed menu", nil)];
|
||||||
|
|
||||||
[[self entry:NSLocalizedString(@"Mark all read", nil)
|
[self entry:NSLocalizedString(@"Mark all read", nil)
|
||||||
c1:Pref_globalMarkRead c2:Pref_groupMarkRead c3:Pref_feedMarkRead]
|
help:NSLocalizedString(@"Show button to mark articles read.", nil)
|
||||||
tooltip:NSLocalizedString(@"Show a button to mark articles read. (globally / per group / per feed)", nil)];
|
tip:nil
|
||||||
|
c1:Pref_globalMarkRead c1tt: NSLocalizedString(@"in main menu", nil)
|
||||||
|
c2:Pref_groupMarkRead c2tt: NSLocalizedString(@"in group menu", nil)
|
||||||
|
c3:Pref_feedMarkRead c3tt: NSLocalizedString(@"in feed menu", nil)];
|
||||||
|
|
||||||
[[self entry:NSLocalizedString(@"Mark all unread", nil)
|
[self entry:NSLocalizedString(@"Mark all unread", nil)
|
||||||
c1:Pref_globalMarkUnread c2:Pref_groupMarkUnread c3:Pref_feedMarkUnread]
|
help:NSLocalizedString(@"Show button to mark articles unread.", nil)
|
||||||
tooltip:NSLocalizedString(@"Show a button to mark articles unread. (globally / per group / per feed)\n\nYou can hold down option key and click on an article to toggle that item (un-)read.", nil)];
|
tip:NSLocalizedString(@"You can hold down option-key and click on an article to toggle that item (un-)read.", nil)
|
||||||
|
c1:Pref_globalMarkUnread c1tt: NSLocalizedString(@"in main menu", nil)
|
||||||
|
c2:Pref_groupMarkUnread c2tt: NSLocalizedString(@"in group menu", nil)
|
||||||
|
c3:Pref_feedMarkUnread c3tt: NSLocalizedString(@"in feed menu", nil)];
|
||||||
|
|
||||||
[[self entry:NSLocalizedString(@"Number of unread articles", nil)
|
[self entry:NSLocalizedString(@"Number of unread articles", nil)
|
||||||
c1:Pref_globalUnreadCount c2:Pref_groupUnreadCount c3:Pref_feedUnreadCount]
|
help:NSLocalizedString(@"Show count of unread articles in parenthesis.", nil)
|
||||||
tooltip:NSLocalizedString(@"Show count of unread articles in parenthesis. (on menu bar icon / on group folder / on feed folder)", nil)];
|
tip:nil
|
||||||
|
c1:Pref_globalUnreadCount c1tt:NSLocalizedString(@"on menu bar icon", nil)
|
||||||
|
c2:Pref_groupUnreadCount c2tt:NSLocalizedString(@"on group folder", nil)
|
||||||
|
c3:Pref_feedUnreadCount c3tt:NSLocalizedString(@"on feed folder", nil)];
|
||||||
|
|
||||||
[[self entry:NSLocalizedString(@"Indicator for unread articles", nil)
|
[self entry:NSLocalizedString(@"Indicator for unread articles", nil)
|
||||||
c1:nil c2:Pref_groupUnreadIndicator c3:Pref_feedUnreadIndicator]
|
help:NSLocalizedString(@"Show blue dot on menu items with unread articles.", nil)
|
||||||
tooltip:NSLocalizedString(@"Show blue dot on menu items with unread articles. (on group & feed folder / on article entry)", nil)];
|
tip:nil
|
||||||
|
c1:nil c1tt:nil
|
||||||
|
c2:Pref_groupUnreadIndicator c2tt:NSLocalizedString(@"on group & feed folder", nil)
|
||||||
|
c3:Pref_feedUnreadIndicator c3tt:NSLocalizedString(@"on article entry", nil)];
|
||||||
|
|
||||||
[[self entry:NSLocalizedString(@"Show only unread", nil)
|
[self entry:NSLocalizedString(@"Show only unread", nil)
|
||||||
c1:nil c2:Pref_groupUnreadOnly c3:Pref_feedUnreadOnly]
|
help:NSLocalizedString(@"Hide articles which have been read.", nil)
|
||||||
tooltip:NSLocalizedString(@"Hide articles which have been read. (hide group & feed folders / hide articles inside of feed folder)", nil)];
|
tip:NSLocalizedString(@"You can hold down option-key before opening the menu bar menu to quickly show hidden articles even if this setting is on.", nil)
|
||||||
|
c1:nil c1tt:nil
|
||||||
|
c2:Pref_groupUnreadOnly c2tt:NSLocalizedString(@"hide group & feed folders", nil)
|
||||||
|
c3:Pref_feedUnreadOnly c3tt:NSLocalizedString(@"hide articles inside of feed folder", nil)];
|
||||||
|
|
||||||
[[self entry:NSLocalizedString(@"Truncate article title", nil)
|
[self entry:NSLocalizedString(@"Truncate article title", nil)
|
||||||
c1:nil c2:nil c3:Pref_feedTruncateTitle]
|
help:NSLocalizedString(@"Truncate article title after 60 characters. If a title is longer than that, show an ellipsis character “…” instead.", nil)
|
||||||
tooltip:NSLocalizedString(@"Truncate article title after 60 characters. If a title is longer than that, show an ellipsis character “…” instead.", nil)];
|
tip:nil
|
||||||
|
c1:nil c1tt:nil
|
||||||
|
c2:nil c2tt:nil
|
||||||
|
c3:Pref_feedTruncateTitle c3tt:NSLocalizedString(@"article title", nil)];
|
||||||
|
|
||||||
[[self entry:NSLocalizedString(@"Limit number of articles", nil)
|
[self entry:NSLocalizedString(@"Limit number of articles", nil)
|
||||||
c1:nil c2:nil c3:Pref_feedLimitArticles]
|
help:NSLocalizedString(@"Display at most 40 articles in feed menu. Remaining articles will be hidden from view but are still there. Unread count may be confusing as it will also count unread and hidden articles.", nil)
|
||||||
tooltip:NSLocalizedString(@"Display at most 40 articles in feed menu. Remaining articles will be hidden from view but are still there. Unread count may be confusing as it will also count unread and hidden articles.", nil)];
|
tip:nil
|
||||||
|
c1:nil c1tt:nil
|
||||||
|
c2:nil c2tt:nil
|
||||||
|
c3:Pref_feedLimitArticles c3tt:NSLocalizedString(@"in feed menu", nil)];
|
||||||
|
|
||||||
|
[[[[[NSView label:@"Note: you can hover over all options to display explanatory tooltips."]
|
||||||
|
multiline:NSMakeSize(100, 2 * HEIGHT_LABEL)] gray]
|
||||||
|
placeIn:self x:PAD_WIN yTop:self.y + PAD_L] sizeToRight:PAD_WIN];
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -78,14 +112,22 @@ static inline NSButton* Checkbox(id this, CGFloat x, CGFloat y, NSString *key) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Create new entry with 1-3 checkboxes and a descriptive label
|
/// Create new entry with 1-3 checkboxes and a descriptive label
|
||||||
- (NSTextField*)entry:(NSString*)label c1:(NSString*)pref1 c2:(NSString*)pref2 c3:(NSString*)pref3 {
|
- (NSTextField*)entry:(NSString*)label help:(NSString*)ttip tip:(NSString*)extraTip
|
||||||
|
c1:(NSString*)pref1 c1tt:(NSString*)ttip1
|
||||||
|
c2:(NSString*)pref2 c2tt:(NSString*)ttip2
|
||||||
|
c3:(NSString*)pref3 c3tt:(NSString*)ttip3
|
||||||
|
{
|
||||||
CGFloat y = self.y;
|
CGFloat y = self.y;
|
||||||
self.y += (PAD_S + HEIGHT_LABEL);
|
self.y += (PAD_S + HEIGHT_LABEL);
|
||||||
// TODO: localize: global, group, feed
|
// TODO: localize: global, group, feed
|
||||||
if (pref1) Checkbox(self, X__ + 2, y + 2, pref1).accessibilityLabel = [label stringByAppendingString:@" (global)"];
|
if (pref1) [Checkbox(self, X__ + 2, y + 2, pref1) tooltip:ttip1].accessibilityLabel = [label stringByAppendingString:@" (global)"];
|
||||||
if (pref2) Checkbox(self, _X_ + 2, y + 2, pref2).accessibilityLabel = [label stringByAppendingString:@" (group)"];
|
if (pref2) [Checkbox(self, _X_ + 2, y + 2, pref2) tooltip:ttip2].accessibilityLabel = [label stringByAppendingString:@" (group)"];
|
||||||
if (pref3) Checkbox(self, __X + 2, y + 2, pref3).accessibilityLabel = [label stringByAppendingString:@" (feed)"];
|
if (pref3) [Checkbox(self, __X + 2, y + 2, pref3) tooltip:ttip3].accessibilityLabel = [label stringByAppendingString:@" (feed)"];
|
||||||
return [[[NSView label:label] placeIn:self x:PAD_WIN + 3 * colWidth yTop:y] sizeToRight:PAD_WIN];
|
if (extraTip != nil) {
|
||||||
|
label = [label stringByAppendingString:@" *"];
|
||||||
|
ttip = [ttip stringByAppendingFormat:@"\n\nTip: %@", extraTip];
|
||||||
|
}
|
||||||
|
return [[[[NSView label:label] placeIn:self x:PAD_WIN + 3 * colWidth yTop:y] sizeToRight:PAD_WIN] tooltip:ttip];
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
Reference in New Issue
Block a user