NSString *binDir = [bundle bundlePath];
NSString *resourcePath, *resourcePaths;
NSRange range;
- BOOL onWindows = NO; /* FIXME determine this somehow */
- NSString *pathSeparator = onWindows ? @";" : @":";
+ NSString *pathSeparator = [NSString stringWithFormat: @"%c", SEPCHAR];
NSFileManager *fileManager = [NSFileManager defaultManager];
NSArray *paths;
NSEnumerator *pathEnum;
NSBundle *bundle = [NSBundle mainBundle];
NSString *resourceDir = [bundle resourcePath];
NSString *resourcePath, *resourcePaths;
- BOOL onWindows = NO; /* FIXME determine this somehow */
- NSString *pathSeparator = onWindows ? @";" : @":";
+ NSString *pathSeparator = [NSString stringWithFormat: @"%c", SEPCHAR];
NSFileManager *fileManager = [NSFileManager defaultManager];
BOOL isDir;
NSArray *paths = [resourceDir stringsByAppendingPaths:
: dpyinfo->x_focus_frame);
if (!FRAME_LIVE_P (dpyinfo->x_highlight_frame))
{
- FRAME_FOCUS_FRAME (dpyinfo->x_focus_frame) = Qnil;
+ FSET (dpyinfo->x_focus_frame, focus_frame, Qnil);
dpyinfo->x_highlight_frame = dpyinfo->x_focus_frame;
}
}
if (p->which)
{
NSRect r = NSMakeRect (p->x+xAdjust, p->y, p->wd, p->h);
- NSPoint pt = r.origin;
EmacsImage *img = bimgs[p->which - 1];
if (!img)
to erase the whole background. */
[ns_lookup_indexed_color(face->background, f) set];
NSRectFill (r);
- pt.y += p->h;
[img setXBMColor: ns_lookup_indexed_color(face->foreground, f)];
- [img compositeToPoint: pt operation: NSCompositeSourceOver];
+ [img drawInRect: r
+ fromRect: NSZeroRect
+ operation: NSCompositeSourceOver
+ fraction: 1.0
+ respectFlipped: YES
+ hints: nil];
}
ns_unfocus (f);
}
/* Draw the image.. do we need to draw placeholder if img ==nil? */
if (img != nil)
- [img compositeToPoint: NSMakePoint (x, y + s->slice.height)
- operation: NSCompositeSourceOver];
+ [img drawInRect: br
+ fromRect: NSZeroRect
+ operation: NSCompositeSourceOver
+ fraction: 1.0
+ respectFlipped: YES
+ hints: nil];
if (s->hl == DRAW_CURSOR)
{
{
bar = XNS_SCROLL_BAR (window->vertical_scroll_bar);
[bar removeFromSuperview];
- window->vertical_scroll_bar = Qnil;
+ WSET (window, vertical_scroll_bar, Qnil);
}
ns_clear_frame_area (f, sb_left, top, width, height);
UNBLOCK_INPUT;
{
ns_clear_frame_area (f, sb_left, top, width, height);
bar = [[EmacsScroller alloc] initFrame: r window: win];
- window->vertical_scroll_bar = make_save_value (bar, 0);
+ WSET (window, vertical_scroll_bar, make_save_value (bar, 0));
}
else
{
NSTRACE (ns_redeem_scroll_bar);
if (!NILP (window->vertical_scroll_bar))
{
- bar =XNS_SCROLL_BAR (window->vertical_scroll_bar);
+ bar = XNS_SCROLL_BAR (window->vertical_scroll_bar);
[bar reprieve];
}
}
return NSTerminateNow;
ret = NSRunAlertPanel(ns_app_name,
- [NSString stringWithUTF8String:"Exit requested. Would you like to Save Buffers and Exit, or Cancel the request?"],
+ @"Exit requested. Would you like to Save Buffers and Exit, or Cancel the request?",
@"Save Buffers and Exit", @"Cancel", nil);
if (ret == NSAlertDefaultReturn)
/* Don't open files from the command line, Cocoa parses the command line
wrong anyway, --option value tries to open value if --option is the last
option. */
- if (ns_ignore_open_file)
+ if (ns_do_open_file)
{
NSEnumerator *files = [fileList objectEnumerator];
NSString *file;
emacs_event->kind = TOOL_BAR_EVENT;
/* XSETINT (emacs_event->code, 0); */
emacs_event->arg = AREF (emacsframe->tool_bar_items,
- idx + TOOL_BAR_ITEM_KEY);
+ idx + TOOL_BAR_ITEM_KEY);
emacs_event->modifiers = EV_MODIFIERS (theEvent);
EV_TRAILER (theEvent);
return self;
{
NSTRACE (EmacsScroller_dealloc);
if (!NILP (win))
- XWINDOW (win)->vertical_scroll_bar = Qnil;
+ WSET (XWINDOW (win), vertical_scroll_bar, Qnil);
[super dealloc];
}