From: Jan Djärv Date: Tue, 31 Jul 2012 16:19:03 +0000 (+0200) Subject: Fix compiler and run time warnings in nsmenu.m and nsterm.m X-Git-Tag: emacs-24.2.90~958 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=79e721e0f886f048bafd46e8dec6630e035e6ed4;p=emacs.git 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. --- diff --git a/src/ChangeLog b/src/ChangeLog index 95de49dea14..41b87fc803e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,11 @@ 2012-07-31 Jan Djärv + * 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 diff --git a/src/nsmenu.m b/src/nsmenu.m index 61c4bd1e893..86ffeec2952 100644 --- a/src/nsmenu.m +++ b/src/nsmenu.m @@ -1102,7 +1102,7 @@ update_frame_tool_bar (FRAME_PTR 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]; diff --git a/src/nsterm.m b/src/nsterm.m index c1d889a94db..f8557aaf3f1 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -2267,7 +2267,6 @@ ns_draw_fringe_bitmap (struct window *w, struct glyph_row *row, 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 @@ ns_draw_fringe_bitmap (struct window *w, struct glyph_row *row, 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 @@ ns_dumpglyphs_image (struct glyph_string *s, NSRect r) /* 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 @@ ns_term_shutdown (int sig) 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)