Changeset 464 for trunk/ICeCoffEE
- Timestamp:
- 04/10/08 21:55:16 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ICeCoffEE/ICeCoffEE/ICeCoffEEBookmarks.c
r122 r464 159 159 SAFE_RELEASE(bundleURL); 160 160 161 // get the bookmark helper's icon 162 bundleURL = ICCF_GetBookmarkHelperURL(inst); 163 if (bundleURL == NULL) return kICBookmarkNoHelperErr; 164 165 CFBundleRef bundle = CFBundleCreate(NULL, bundleURL); 166 SAFE_RELEASE(bundleURL); 167 if (bundle == NULL) return kICBookmarkNoHelperErr; 168 169 CFStringRef iconFile = CFBundleGetValueForInfoDictionaryKey(bundle, CFSTR("CFBundleIconFile")); 170 if (iconFile != NULL) { 171 CFURLRef iconURL = CFBundleCopyResourceURL(bundle, iconFile, NULL, NULL); 172 if (iconURL != NULL) { 173 CFDictionaryAddValue(dict, kCFUserNotificationIconURLKey, iconURL); 174 CFRelease(iconURL); 175 } 176 } 177 161 178 const CFStringRef textFieldTitles[] = { ICCF_CopyLocalizedString(CFSTR("Location:")), ICCF_CopyLocalizedString(CFSTR("Name:")), ICCF_CopyLocalizedString(CFSTR("Description:")) }; 162 179 const CFStringRef textFieldValues[] = { url, CFSTR(""), CFSTR("") }; … … 173 190 if (textFieldValuesArray != NULL) CFRelease(textFieldValuesArray); 174 191 175 // XXX suppress log message from Apple's code:176 // 2003-02-02 17:48:26.896 TextEdit[2790] CFLog (20): Add Bookmark: Bookmark name and description are optional.177 int errfd = dup(STDERR_FILENO), nullfd = open("/dev/null", O_WRONLY, 0);178 // need to have something open in STDERR_FILENO because if it isn't,179 // CFLog will log to /dev/console180 dup2(nullfd, STDERR_FILENO);181 close(nullfd);182 192 CFUserNotificationRef notification = CFUserNotificationCreate(NULL, 0, kCFUserNotificationPlainAlertLevel, &err, dict); 183 dup2(errfd, STDERR_FILENO);184 close(errfd);185 193 if (notification == NULL) { 186 194 CFRelease(dict);
Note:
See TracChangeset
for help on using the changeset viewer.