Changeset 319 for trunk/ICeCoffEE/ICeCoffEE/ICeCoffEEKeyEquivalents.m
- Timestamp:
- 06/11/07 01:21:55 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ICeCoffEE/ICeCoffEE/ICeCoffEEKeyEquivalents.m
r142 r319 40 40 static NSFont *menuItemCmdKeyFont = nil; 41 41 static NSFont *menuItemFont = nil; 42 static NSFont *collisionFont = nil; 42 43 static NSParagraphStyle *keyEquivParaStyle; 43 44 … … 47 48 menuItemCmdKeyFont = [themeFont(kThemeMenuItemCmdKeyFont) retain]; 48 49 menuItemFont = [themeFont(kThemeMenuItemFont) retain]; 50 collisionFont = [themeFont(kThemeSmallSystemFont) retain]; 49 51 50 52 NSMutableParagraphStyle *paraStyle = [[NSMutableParagraphStyle alloc] init]; … … 108 110 } 109 111 110 NSAttributedString *ICCF_KeyEquivalentAttributedStringWithModifierFlags(NSString *self, unsigned int modifierFlags ) {112 NSAttributedString *ICCF_KeyEquivalentAttributedStringWithModifierFlags(NSString *self, unsigned int modifierFlags, unsigned count) { 111 113 initialize(); 112 114 NSString *keyEquivalentStringNoMask = keyEquivalentString(self); … … 128 130 [astr release]; 129 131 } 132 if (count > 1) { 133 NSMutableAttributedString *astr = [keyEquivalentAttributedString mutableCopy]; 134 [astr appendAttributedString: [[[NSAttributedString alloc] 135 initWithString: [NSString stringWithFormat: @" (%u)", count] 136 attributes: [NSDictionary dictionaryWithObjectsAndKeys: collisionFont, NSFontAttributeName, [NSColor redColor], NSForegroundColorAttributeName, nil]] autorelease]]; 137 keyEquivalentAttributedString = [[astr copy] autorelease]; 138 [astr release]; 139 } 130 140 return keyEquivalentAttributedString; 131 141 }
Note:
See TracChangeset
for help on using the changeset viewer.