Commit 79e721e0 authored by Jan Djärv's avatar Jan Djärv
Browse files

Fix compiler and run time warnings in nsmenu.m and nsterm.m

*  nsfns.m, nsmenu.m, msterm.m: Adopt to struct frame/FVAR changes.

* nsmenu.m (update_frame_tool_bar): Change key from NSObject* to id.

* nsterm.m (ns_draw_fringe_bitmap, ns_dumpglyphs_image): Use drawInRect
instead of compositeToPoint.
(applicationShouldTerminate): Pass NS String literal to NSRunAlertPanel.
parent f1310128
2012-07-31 Jan Djärv <jan.h.d@swipnet.se>
* nsmenu.m (update_frame_tool_bar): Change key from NSObject* to id.
* nsterm.m (ns_draw_fringe_bitmap, ns_dumpglyphs_image): Use drawInRect
instead of compositeToPoint.
(applicationShouldTerminate): Pass NS String literal to NSRunAlertPanel.
* nsfns.m, nsmenu.m, msterm.m: Adopt to struct frame/FVAR changes.
2012-07-31 Dmitry Antipov <dmantipov@yandex.ru>
......
......@@ -1102,7 +1102,7 @@ - (Lisp_Object)runMenuAt: (NSPoint)p forFrame: (struct frame *)f
NSDictionary *dict = [toolbar configurationDictionary];
NSMutableDictionary *newDict = [dict mutableCopy];
NSEnumerator *keys = [[dict allKeys] objectEnumerator];
NSObject *key;
id key;
while ((key = [keys nextObject]) != nil)
{
NSObject *val = [dict objectForKey: key];
......
......@@ -2267,7 +2267,6 @@ Free a pool and temporary objects it refers to (callable from C)
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)
......@@ -2290,9 +2289,13 @@ Free a pool and temporary objects it refers to (callable from C)
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);
}
......@@ -3035,8 +3038,12 @@ Function modeled after x_draw_glyph_string_box ().
/* 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)
{
......@@ -4433,7 +4440,7 @@ - (NSApplicationTerminateReply)applicationShouldTerminate: (id)sender
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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment