Mercurial > emacs
comparison src/macfns.c @ 74792:8486ab1d2401
(mac_update_title_bar) [TARGET_API_MAC_CARBON]: Call
mac_update_proxy_icon also when buffer modification flag changed.
[TARGET_API_MAC_CARBON] (mac_update_proxy_icon): Don't update alias,
but compare FSRef/FSSpec of resolved alias.
author | YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> |
---|---|
date | Fri, 22 Dec 2006 08:27:27 +0000 |
parents | 20a6a4a69f48 |
children | 3d45362f1d38 17e0dd217877 bc10a33dd40b |
comparison
equal
deleted
inserted
replaced
74791:6b69e86dc4cc | 74792:8486ab1d2401 |
---|---|
1967 | 1967 |
1968 if (STRINGP (file_name)) | 1968 if (STRINGP (file_name)) |
1969 { | 1969 { |
1970 AEDesc desc; | 1970 AEDesc desc; |
1971 #ifdef MAC_OSX | 1971 #ifdef MAC_OSX |
1972 FSRef fref; | 1972 FSRef fref, fref_proxy; |
1973 #else | 1973 #else |
1974 FSSpec fss; | 1974 FSSpec fss, fss_proxy; |
1975 #endif | 1975 #endif |
1976 Boolean changed; | 1976 Boolean changed; |
1977 Lisp_Object encoded_file_name = ENCODE_FILE (file_name); | 1977 Lisp_Object encoded_file_name = ENCODE_FILE (file_name); |
1978 | 1978 |
1979 #ifdef MAC_OSX | 1979 #ifdef MAC_OSX |
1995 } | 1995 } |
1996 if (err == noErr) | 1996 if (err == noErr) |
1997 { | 1997 { |
1998 if (alias) | 1998 if (alias) |
1999 { | 1999 { |
2000 /* (FS)ResolveAlias never sets `changed' to true if | |
2001 `alias' is minimal. */ | |
2000 #ifdef MAC_OSX | 2002 #ifdef MAC_OSX |
2001 err = FSUpdateAlias (NULL, &fref, alias, &changed); | 2003 err = FSResolveAlias (NULL, alias, &fref_proxy, &changed); |
2004 if (err == noErr) | |
2005 err = FSCompareFSRefs (&fref, &fref_proxy); | |
2002 #else | 2006 #else |
2003 err = UpdateAlias (NULL, &fss, alias, &changed); | 2007 err = ResolveAlias (NULL, alias, &fss_proxy, &changed); |
2008 if (err == noErr) | |
2009 err = !(fss.vRefNum == fss_proxy.vRefNum | |
2010 && fss.parID == fss_proxy.parID | |
2011 && EqualString (fss.name, fss_proxy.name, | |
2012 false, true)); | |
2004 #endif | 2013 #endif |
2005 } | 2014 } |
2006 if (err != noErr || alias == NULL) | 2015 if (err != noErr || alias == NULL) |
2007 { | 2016 { |
2008 if (alias) | 2017 if (alias) |
2049 if (windows_or_buffers_changed | 2058 if (windows_or_buffers_changed |
2050 /* Minibuffer modification status shown in the close button is | 2059 /* Minibuffer modification status shown in the close button is |
2051 confusing. */ | 2060 confusing. */ |
2052 || (!MINI_WINDOW_P (w) | 2061 || (!MINI_WINDOW_P (w) |
2053 && (modified_p != !NILP (w->last_had_star)))) | 2062 && (modified_p != !NILP (w->last_had_star)))) |
2054 SetWindowModified (FRAME_MAC_WINDOW (f), | 2063 { |
2055 !MINI_WINDOW_P (w) && modified_p); | 2064 SetWindowModified (FRAME_MAC_WINDOW (f), |
2056 | 2065 !MINI_WINDOW_P (w) && modified_p); |
2057 if (windows_or_buffers_changed) | 2066 mac_update_proxy_icon (f); |
2058 mac_update_proxy_icon (f); | 2067 } |
2059 #endif | 2068 #endif |
2060 } | 2069 } |
2061 | 2070 |
2062 | 2071 |
2063 /* Subroutines of creating a frame. */ | 2072 /* Subroutines of creating a frame. */ |