Commit f2f7f42c authored by Adrian Robert's avatar Adrian Robert

* nsfns.m (ns-read-file-name): Add casts to avoid warning. ...

* 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.
parent 795d9358
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
......
......@@ -1440,7 +1440,7 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side
dirS = [dirS stringByExpandingTildeInPath];
panel = NILP (isLoad) ?
[EmacsSavePanel savePanel] : [EmacsOpenPanel openPanel];
(id)[EmacsSavePanel savePanel] : (id)[EmacsOpenPanel openPanel];
[panel setTitle: promptS];
......@@ -1988,11 +1988,21 @@ DISPLAY should be either a frame or a display name (a string).
(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]);
}
......
......@@ -1016,13 +1016,13 @@ WITH_BACKGROUND is zero when (FROM > 0 || TO < S->nchars). */
/* 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
......
......@@ -41,7 +41,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
- (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
......@@ -83,6 +82,11 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
- (void) setWindowClosing: (BOOL)closing;
- (EmacsToolbar *) toolbar;
- (void) deleteWorkingText;
#ifdef NS_IMPL_GNUSTEP
/* Not declared, but useful. */
- (void) unlockFocusNeedsFlush: (BOOL)needs;
#endif
@end
......
......@@ -2273,7 +2273,7 @@ External call (RIF): draw cursor
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;
......@@ -2928,13 +2928,21 @@ Function modeled after x_draw_glyph_string_box ().
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
......@@ -3044,6 +3052,7 @@ overwriting cursor (usually when cursor on a tab) */
ns_unfocus (s->f);
}
s->num_clips = 0;
}
......@@ -3149,7 +3158,7 @@ overwriting cursor (usually when cursor on a tab) */
/* 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];
}
......@@ -4194,11 +4203,11 @@ - (void)application: sender openFiles: (NSArray *)fileList
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 */
}
......
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