Ignore:
Timestamp:
06/11/07 01:21:55 (17 years ago)
Author:
Nicholas Riley
Message:

VERSION: Starting with 1.5d1.

ICeCoffEEKeyEquivalents.m: Support "collision font" for displaying key
equivalent conflicts.

ICeCoffEE.m: Increase debug ICCF_MAX_URL_LEN to 120 for testing. Set
icons in ICCF_ConsolidateServicesMenu (needs better caching).

ICeCoffEEServicePrefController.m: Display icons, proper key
equivalents (instead of #, what was I thinking?!) and conflicts. Fix
a dumb bug in ICCF_PropagateServiceStateChange. Ellipsize long menu
items rather than chopping them off. Fix key equivalent column
getting moved when expanding disclosure triangles.

ICeCoffEELabeledIconCell.[hm]: An IconRef-displaying text cell.

Info-APE Module.plist: Update version to 1.5d1.

ICeCoffEE.xcodeproj: Added files, no significant changes.

English.lproj/InfoPlist.strings: Update version to 1.5d1.

English.lproj/APEInfo.rtfd/TXT.rtf: Some overdue documentation
updates.

ICeCoffEEShared.[hm]: Enable debugging; we're now using
kICServiceShortcut (though not yet for customizable shortcuts) so
define its data type.

ICeCoffEETerminal.m: Remove some useless code to "extend to beginning
of string" which seems to have been stolen from the NSTextView
implementation and not well understood. Handle common uses of
parentheses in URLs; still need to do this for NSTextView.

ICeCoffEESetServicesMenu.[hm]: Needs renaming; now with icon
extraction functionality and semi-working code to create a service
info dictionary.

Info-APEManagerPrefPane.plist: Update version to 1.5d1.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ICeCoffEE/ICeCoffEE/ICeCoffEEKeyEquivalents.m

    r142 r319  
    4040static NSFont *menuItemCmdKeyFont = nil;
    4141static NSFont *menuItemFont = nil;
     42static NSFont *collisionFont = nil;
    4243static NSParagraphStyle *keyEquivParaStyle;
    4344
     
    4748    menuItemCmdKeyFont = [themeFont(kThemeMenuItemCmdKeyFont) retain];
    4849    menuItemFont = [themeFont(kThemeMenuItemFont) retain];
     50    collisionFont = [themeFont(kThemeSmallSystemFont) retain];
    4951
    5052    NSMutableParagraphStyle *paraStyle = [[NSMutableParagraphStyle alloc] init];
     
    108110}
    109111
    110 NSAttributedString *ICCF_KeyEquivalentAttributedStringWithModifierFlags(NSString *self, unsigned int modifierFlags) {
     112NSAttributedString *ICCF_KeyEquivalentAttributedStringWithModifierFlags(NSString *self, unsigned int modifierFlags, unsigned count) {
    111113    initialize();
    112114    NSString *keyEquivalentStringNoMask = keyEquivalentString(self);
     
    128130        [astr release];
    129131    }
     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    }
    130140    return keyEquivalentAttributedString;
    131141}
Note: See TracChangeset for help on using the changeset viewer.