diff options
| author | Jan Djärv | 2012-07-31 18:19:03 +0200 |
|---|---|---|
| committer | Jan Djärv | 2012-07-31 18:19:03 +0200 |
| commit | 79e721e0f886f048bafd46e8dec6630e035e6ed4 (patch) | |
| tree | 1d633c08a4d52e9bd53833c1575ab9fa5b777138 /src | |
| parent | f1310128a0fc933830436ceb51bd6293d14d3f25 (diff) | |
| download | emacs-79e721e0f886f048bafd46e8dec6630e035e6ed4.tar.gz emacs-79e721e0f886f048bafd46e8dec6630e035e6ed4.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 6 | ||||
| -rw-r--r-- | src/nsmenu.m | 2 | ||||
| -rw-r--r-- | src/nsterm.m | 19 |
3 files changed, 20 insertions, 7 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 95de49dea14..41b87fc803e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,11 @@ | |||
| 1 | 2012-07-31 Jan Djärv <jan.h.d@swipnet.se> | 1 | 2012-07-31 Jan Djärv <jan.h.d@swipnet.se> |
| 2 | 2 | ||
| 3 | * nsmenu.m (update_frame_tool_bar): Change key from NSObject* to id. | ||
| 4 | |||
| 5 | * nsterm.m (ns_draw_fringe_bitmap, ns_dumpglyphs_image): Use drawInRect | ||
| 6 | instead of compositeToPoint. | ||
| 7 | (applicationShouldTerminate): Pass NS String literal to NSRunAlertPanel. | ||
| 8 | |||
| 3 | * nsfns.m, nsmenu.m, msterm.m: Adopt to struct frame/FVAR changes. | 9 | * nsfns.m, nsmenu.m, msterm.m: Adopt to struct frame/FVAR changes. |
| 4 | 10 | ||
| 5 | 2012-07-31 Dmitry Antipov <dmantipov@yandex.ru> | 11 | 2012-07-31 Dmitry Antipov <dmantipov@yandex.ru> |
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) | |||
| 1102 | NSDictionary *dict = [toolbar configurationDictionary]; | 1102 | NSDictionary *dict = [toolbar configurationDictionary]; |
| 1103 | NSMutableDictionary *newDict = [dict mutableCopy]; | 1103 | NSMutableDictionary *newDict = [dict mutableCopy]; |
| 1104 | NSEnumerator *keys = [[dict allKeys] objectEnumerator]; | 1104 | NSEnumerator *keys = [[dict allKeys] objectEnumerator]; |
| 1105 | NSObject *key; | 1105 | id key; |
| 1106 | while ((key = [keys nextObject]) != nil) | 1106 | while ((key = [keys nextObject]) != nil) |
| 1107 | { | 1107 | { |
| 1108 | NSObject *val = [dict objectForKey: key]; | 1108 | 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, | |||
| 2267 | if (p->which) | 2267 | if (p->which) |
| 2268 | { | 2268 | { |
| 2269 | NSRect r = NSMakeRect (p->x+xAdjust, p->y, p->wd, p->h); | 2269 | NSRect r = NSMakeRect (p->x+xAdjust, p->y, p->wd, p->h); |
| 2270 | NSPoint pt = r.origin; | ||
| 2271 | EmacsImage *img = bimgs[p->which - 1]; | 2270 | EmacsImage *img = bimgs[p->which - 1]; |
| 2272 | 2271 | ||
| 2273 | if (!img) | 2272 | if (!img) |
| @@ -2290,9 +2289,13 @@ ns_draw_fringe_bitmap (struct window *w, struct glyph_row *row, | |||
| 2290 | to erase the whole background. */ | 2289 | to erase the whole background. */ |
| 2291 | [ns_lookup_indexed_color(face->background, f) set]; | 2290 | [ns_lookup_indexed_color(face->background, f) set]; |
| 2292 | NSRectFill (r); | 2291 | NSRectFill (r); |
| 2293 | pt.y += p->h; | ||
| 2294 | [img setXBMColor: ns_lookup_indexed_color(face->foreground, f)]; | 2292 | [img setXBMColor: ns_lookup_indexed_color(face->foreground, f)]; |
| 2295 | [img compositeToPoint: pt operation: NSCompositeSourceOver]; | 2293 | [img drawInRect: r |
| 2294 | fromRect: NSZeroRect | ||
| 2295 | operation: NSCompositeSourceOver | ||
| 2296 | fraction: 1.0 | ||
| 2297 | respectFlipped: YES | ||
| 2298 | hints: nil]; | ||
| 2296 | } | 2299 | } |
| 2297 | ns_unfocus (f); | 2300 | ns_unfocus (f); |
| 2298 | } | 2301 | } |
| @@ -3035,8 +3038,12 @@ ns_dumpglyphs_image (struct glyph_string *s, NSRect r) | |||
| 3035 | 3038 | ||
| 3036 | /* Draw the image.. do we need to draw placeholder if img ==nil? */ | 3039 | /* Draw the image.. do we need to draw placeholder if img ==nil? */ |
| 3037 | if (img != nil) | 3040 | if (img != nil) |
| 3038 | [img compositeToPoint: NSMakePoint (x, y + s->slice.height) | 3041 | [img drawInRect: br |
| 3039 | operation: NSCompositeSourceOver]; | 3042 | fromRect: NSZeroRect |
| 3043 | operation: NSCompositeSourceOver | ||
| 3044 | fraction: 1.0 | ||
| 3045 | respectFlipped: YES | ||
| 3046 | hints: nil]; | ||
| 3040 | 3047 | ||
| 3041 | if (s->hl == DRAW_CURSOR) | 3048 | if (s->hl == DRAW_CURSOR) |
| 3042 | { | 3049 | { |
| @@ -4433,7 +4440,7 @@ ns_term_shutdown (int sig) | |||
| 4433 | return NSTerminateNow; | 4440 | return NSTerminateNow; |
| 4434 | 4441 | ||
| 4435 | ret = NSRunAlertPanel(ns_app_name, | 4442 | ret = NSRunAlertPanel(ns_app_name, |
| 4436 | [NSString stringWithUTF8String:"Exit requested. Would you like to Save Buffers and Exit, or Cancel the request?"], | 4443 | @"Exit requested. Would you like to Save Buffers and Exit, or Cancel the request?", |
| 4437 | @"Save Buffers and Exit", @"Cancel", nil); | 4444 | @"Save Buffers and Exit", @"Cancel", nil); |
| 4438 | 4445 | ||
| 4439 | if (ret == NSAlertDefaultReturn) | 4446 | if (ret == NSAlertDefaultReturn) |