+2006-12-22 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
+
+ * macfns.c (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.
+
2006-12-21 Kim F. Storm <storm@cua.dk>
* w32.c (_sys_wait_accept): Fix handle leak.
{
AEDesc desc;
#ifdef MAC_OSX
- FSRef fref;
+ FSRef fref, fref_proxy;
#else
- FSSpec fss;
+ FSSpec fss, fss_proxy;
#endif
Boolean changed;
Lisp_Object encoded_file_name = ENCODE_FILE (file_name);
{
if (alias)
{
+ /* (FS)ResolveAlias never sets `changed' to true if
+ `alias' is minimal. */
#ifdef MAC_OSX
- err = FSUpdateAlias (NULL, &fref, alias, &changed);
+ err = FSResolveAlias (NULL, alias, &fref_proxy, &changed);
+ if (err == noErr)
+ err = FSCompareFSRefs (&fref, &fref_proxy);
#else
- err = UpdateAlias (NULL, &fss, alias, &changed);
+ err = ResolveAlias (NULL, alias, &fss_proxy, &changed);
+ if (err == noErr)
+ err = !(fss.vRefNum == fss_proxy.vRefNum
+ && fss.parID == fss_proxy.parID
+ && EqualString (fss.name, fss_proxy.name,
+ false, true));
#endif
}
if (err != noErr || alias == NULL)
confusing. */
|| (!MINI_WINDOW_P (w)
&& (modified_p != !NILP (w->last_had_star))))
- SetWindowModified (FRAME_MAC_WINDOW (f),
- !MINI_WINDOW_P (w) && modified_p);
-
- if (windows_or_buffers_changed)
- mac_update_proxy_icon (f);
+ {
+ SetWindowModified (FRAME_MAC_WINDOW (f),
+ !MINI_WINDOW_P (w) && modified_p);
+ mac_update_proxy_icon (f);
+ }
#endif
}