+2008-08-20 Adrian Robert <Adrian.B.Robert@gmail.com>
+
+ * nsfns.m (ns-read-file-name): Add casts to avoid warning.
+ (ns-convert-utf8-nfd-to-nfc): Warn if cannot execute correctly.
+ * nsfont.m (nsfont_draw): Compare indexed colors to 0, not nil.
+ * nsterm.h (EmacsView-unlockFocusNeedsFlush:): Add declaration.
+ (EmacsApp-cursor_blink_handler): Remove declaration.
+ * nsterm.m (ns_draw_glyph_string): Update first conditional body to
+ match 01 Feb 2008 changes in xterm.c.
+ (ns_read_socket): Add cast to avoid warning.
+ (EmacsApp-application:openFiles:): Don't call replyToOpenOrPrint: on
+ GNUstep.
+
2008-08-20 Chong Yidong <cyd@stupidchicken.com>
* xselect.c (x_get_foreign_selection): Return nil if desired
dirS = [dirS stringByExpandingTildeInPath];
panel = NILP (isLoad) ?
- [EmacsSavePanel savePanel] : [EmacsOpenPanel openPanel];
+ (id)[EmacsSavePanel savePanel] : (id)[EmacsOpenPanel openPanel];
[panel setTitle: promptS];
(str)
Lisp_Object str;
{
+/* TODO: If GNUstep ever implements precomposedStringWithCanonicalMapping,
+ remove this. */
NSString *utfStr;
CHECK_STRING (str);
- utfStr = [[NSString stringWithUTF8String: SDATA (str)]
- precomposedStringWithCanonicalMapping];
+ utfStr = [NSString stringWithUTF8String: SDATA (str)];
+ if (![utfStr respondsToSelector:
+ @selector (precomposedStringWithCanonicalMapping)])
+ {
+ message1
+ ("Warning: ns-convert-utf8-nfd-to-nfc unsupported under GNUstep.\n");
+ return Qnil;
+ }
+ else
+ utfStr = [utfStr precomposedStringWithCanonicalMapping];
return build_string ([utfStr UTF8String]);
}
/* do underline */
if (face->underline_p)
{
- if (face->underline_color != nil)
+ if (face->underline_color != 0)
[ns_lookup_indexed_color (face->underline_color, s->f) set];
else
[col set];
DPSmoveto (context, r.origin.x, r.origin.y + font->underpos);
DPSlineto (context, r.origin.x+r.size.width, r.origin.y+font->underpos);
- if (face->underline_color != nil)
+ if (face->underline_color != 0)
[col set];
}
else
- (void)showPreferencesWindow: (id)sender;
- (BOOL) openFile: (NSString *)fileName;
- (void)fd_handler: (NSTimer *) fdEntry;
-- (void)cursor_blink_handler: (NSTimer *)cursorEntry;
- (void)timeout_handler: (NSTimer *)timedEntry;
- (BOOL)fulfillService: (NSString *)name withArg: (NSString *)arg;
@end
- (void) setWindowClosing: (BOOL)closing;
- (EmacsToolbar *) toolbar;
- (void) deleteWorkingText;
+
+#ifdef NS_IMPL_GNUSTEP
+/* Not declared, but useful. */
+- (void) unlockFocusNeedsFlush: (BOOL)needs;
+#endif
@end
struct frame *f = WINDOW_XFRAME (w);
struct glyph *phys_cursor_glyph;
int overspill;
- unsigned char drawGlyph = 0, cursorType, oldCursorType;
+ char drawGlyph = 0, cursorType, oldCursorType;
int new_cursor_type;
int new_cursor_width;
int active_cursor;
NSTRACE (ns_draw_glyph_string);
- if (s->next && s->right_overhang && !s->for_overlaps && s->hl != DRAW_CURSOR)
+ if (s->next && s->right_overhang && !s->for_overlaps/* && s->hl != DRAW_CURSOR*/)
{
- xassert (s->next->img == NULL);
- n = ns_get_glyph_string_clip_rect (s->next, r);
- ns_focus (s->f, r, n);
- ns_maybe_dumpglyphs_background (s->next, 1);
- ns_unfocus (s->f);
+ int width;
+ struct glyph_string *next;
+
+ for (width = 0, next = s->next; next;
+ width += next->width, next = next->next)
+ if (next->first_glyph->type != IMAGE_GLYPH)
+ {
+ n = ns_get_glyph_string_clip_rect (s->next, r);
+ ns_focus (s->f, r, n);
+ ns_maybe_dumpglyphs_background (s->next, 1);
+ ns_unfocus (s->f);
+ next->num_clips = 0;
+ }
}
if (!s->for_overlaps && s->face->box != FACE_NO_BOX
ns_unfocus (s->f);
}
+ s->num_clips = 0;
}
/* If have pending open-file requests, attend to the next one of those. */
if (ns_pending_files && [ns_pending_files count] != 0
- && [NSApp openFile: [ns_pending_files objectAtIndex: 0]])
+ && [(EmacsApp *)NSApp openFile: [ns_pending_files objectAtIndex: 0]])
{
[ns_pending_files removeObjectAtIndex: 0];
}
while ((file = [files nextObject]) != nil)
[ns_pending_files addObject: file];
-#ifdef NS_IMPL_GNUSTEP
- [self replyToOpenOrPrint: 0];
-#else
+/* TODO: when GNUstep implements this (and we require that version of
+ GNUstep), remove. */
+#ifndef NS_IMPL_GNUSTEP
[self replyToOpenOrPrint: NSApplicationDelegateReplySuccess];
-#endif /* NS_IMPL_GNUSTEP */
+#endif /* !NS_IMPL_GNUSTEP */
}