Mercurial > emacs
diff src/xdisp.c @ 107700:5860ffa0c5d9
Clean up unneeded ns_set_icon_type calls.
Patch from Adrian Robert, see
http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg01391.html
* xdisp.c (x_consider_frame_title, update_window_cursor): Remove
HAVE_NS conditionals.
(prepare_menu_bars)[HAVE_NS]: Call ns_set_doc_edited.
* nsfns.m (x_implicitly_set_name): If frame-title-format is t, use
filename for the title.
(ns_set_doc_edited): Do nothing if the selected window is a
minibuffer window.
* nsterm.h: Add prototypes for ns_set_name_as_filename and
ns_set_doc_edited.
* nsterm.m: Remove unneeded prototype.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Mon, 29 Mar 2010 19:48:44 -0400 |
parents | fd2cdc4e0e6a |
children | 59d957b53239 |
line wrap: on
line diff
--- a/src/xdisp.c Mon Mar 29 17:35:39 2010 -0400 +++ b/src/xdisp.c Mon Mar 29 19:48:44 2010 -0400 @@ -9472,32 +9472,7 @@ if (! STRINGP (f->name) || SBYTES (f->name) != len || bcmp (title, SDATA (f->name), len) != 0) - { -#ifdef HAVE_NS - if (FRAME_NS_P (f)) - { - if (!MINI_WINDOW_P(XWINDOW(f->selected_window))) - { - if (EQ (fmt, Qt)) - ns_set_name_as_filename (f); - else - x_implicitly_set_name (f, make_string(title, len), - Qnil); - } - } - else -#endif - x_implicitly_set_name (f, make_string (title, len), Qnil); - } -#ifdef HAVE_NS - if (FRAME_NS_P (f)) - { - /* do this also for frames with explicit names */ - ns_implicitly_set_icon_type(f); - ns_set_doc_edited(f, Fbuffer_modified_p - (XWINDOW (f->selected_window)->buffer), Qnil); - } -#endif + x_implicitly_set_name (f, make_string (title, len), Qnil); } } @@ -9594,6 +9569,11 @@ #ifdef HAVE_WINDOW_SYSTEM update_tool_bar (f, 0); #endif +#ifdef HAVE_NS + if (windows_or_buffers_changed) + ns_set_doc_edited (f, Fbuffer_modified_p + (XWINDOW (f->selected_window)->buffer)); +#endif UNGCPRO; } @@ -22653,9 +22633,6 @@ /* Switch the display of W's cursor on or off, according to the value of ON. */ -#ifndef HAVE_NS -static -#endif void update_window_cursor (w, on) struct window *w;