Ignore:
Timestamp:
02/03/03 08:13:19 (18 years ago)
Author:
Nicholas Riley
Message:

ICeCoffEE 1.3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ICeCoffEE/ICeCoffEE/ICeCoffEEBookmarks.c

    r75 r82  
    140140}
    141141
     142// XXX workaround for CFUserNotificationCreate log message in 10.2.4 at least
     143#include <stdio.h>
     144#include <unistd.h>
     145#include <fcntl.h>
     146// XXX end workaround
     147
    142148OSStatus ICCF_DoBookmarkDialog(ICInstance inst, CFStringRef url) {
    143149
     
    165171    if (textFieldTitlesArray != NULL) CFRelease(textFieldTitlesArray);
    166172    if (textFieldValuesArray != NULL) CFRelease(textFieldValuesArray);
    167    
     173
     174    // XXX suppress log message from Apple's code:
     175    // 2003-02-02 17:48:26.896 TextEdit[2790] CFLog (20): Add Bookmark:  Bookmark name and description are optional.
     176    int errfd = dup(STDERR_FILENO), nullfd = open("/dev/null", O_WRONLY, 0);
     177    // need to have something open in STDERR_FILENO because if it isn't,
     178    // CFLog will log to /dev/console
     179    dup2(nullfd, STDERR_FILENO);
     180    close(nullfd);
    168181    CFUserNotificationRef notification = CFUserNotificationCreate(NULL, 0, kCFUserNotificationPlainAlertLevel, &err, dict);
     182    dup2(errfd, STDERR_FILENO);
     183    close(errfd);
    169184    if (notification == NULL) {
    170185        CFRelease(dict);
Note: See TracChangeset for help on using the changeset viewer.