emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r109331: Fix compiler and run time wa


From: Jan D.
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r109331: Fix compiler and run time warnings in nsmenu.m and nsterm.m
Date: Tue, 31 Jul 2012 18:19:03 +0200
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 109331
committer: Jan D. <address@hidden>
branch nick: trunk
timestamp: Tue 2012-07-31 18:19:03 +0200
message:
  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.
modified:
  src/ChangeLog
  src/nsmenu.m
  src/nsterm.m
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2012-07-31 15:15:29 +0000
+++ b/src/ChangeLog     2012-07-31 16:19:03 +0000
@@ -1,5 +1,11 @@
 2012-07-31  Jan Djärv  <address@hidden>
 
+       * 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  <address@hidden>

=== modified file 'src/nsmenu.m'
--- a/src/nsmenu.m      2012-07-31 15:15:29 +0000
+++ b/src/nsmenu.m      2012-07-31 16:19:03 +0000
@@ -1102,7 +1102,7 @@
       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];

=== modified file 'src/nsterm.m'
--- a/src/nsterm.m      2012-07-31 15:15:29 +0000
+++ b/src/nsterm.m      2012-07-31 16:19:03 +0000
@@ -2267,7 +2267,6 @@
   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 @@
          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 @@
 
   /* 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 @@
     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)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]