Changeset 462 for trunk/ICeCoffEE
- Timestamp:
- 04/10/08 01:55:12 (17 years ago)
- Location:
- trunk/ICeCoffEE/ICeCoffEE
- Files:
-
- 2 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ICeCoffEE/ICeCoffEE/ICeCoffEEAction.c
r181 r462 12 12 #include "ICeCoffEEShared.h" 13 13 #include "ICeCoffEEBookmarks.h" 14 #include "ICeCoffEESharing.h" 14 15 15 16 #define THROW_ERR(e) { err = e; goto END; } … … 111 112 if (appItemTitle == NULL) return fnfErr; 112 113 113 err = AppendMenuItemTextWithCFString(ctx->menu, appItemTitle, 0, 0, &menuItemIndex);114 err = AppendMenuItemTextWithCFString(ctx->menu, appItemTitle, 0, menuCommand, &menuItemIndex); 114 115 if (err != noErr) return err; 115 116 … … 119 120 120 121 SetMenuItemIconHandle(ctx->menu, menuItemIndex, kMenuIconRefType, (Handle)appIcon); 121 SetMenuItemCommandID(ctx->menu, menuItemIndex, menuCommand);122 122 SetMenuItemRefCon(ctx->menu, menuItemIndex, (UInt32)appURL); 123 123 ReleaseIconRef(appIcon); … … 146 146 enum { 147 147 kICURLActionOpenWith = 'OpnW', 148 kICURLActionAddBookmark = 'AddB' 148 kICURLActionAddBookmark = 'AddB', 149 kICURLActionCopy = 'Copy' 149 150 }; 150 151 … … 227 228 THROW_ERR(err); 228 229 } 229 230 231 if ( (err = AppendMenuItemTextWithCFString(ctx.menu, CFSTR(""), kMenuItemAttrSeparator, 0, NULL)) != noErr) 232 THROW_ERR(err); 233 if ( (err = AppendMenuItemTextWithCFString(ctx.menu, ICCF_CopyLocalizedString(CFSTR("Copy Link")), 0, kICURLActionCopy, NULL)) != noErr) 234 THROW_ERR(err); 235 230 236 InsertMenu(ctx.menu, -1); 231 237 Point mousePoint; … … 246 252 } else if (menuCommand == kICURLActionAddBookmark) { 247 253 err = ICCF_DoBookmarkDialog(inst, CFURLGetString(url)); 248 } 254 } else if (menuCommand == kICURLActionCopy) { 255 err = ICCF_CopyLink(CFURLGetString(url)); 256 } 249 257 } 250 258 }
Note:
See TracChangeset
for help on using the changeset viewer.