Jean-Marc Lasgouttes wrote:
> Angus> I'm going to take this approach. It seems silly to use
> Angus> configure to define a macro to be used as a check for whether a
> Angus> macro needs defining...
> 
> That's fair.
> 
> Angus> I'll add some commentary though.
> 
> Angus> // Three macros are used by Posix to establish who has permission
> Angus> // to execute a file:
> Angus> // * S_IXUSR --- owner has execute permission;
> Angus> // * S_IXGRP --- group has execute permission;
> Angus> // * S_IXOTH --- others have execute permission.
> Angus> // S_IXGRP and S_IXOTH are undefined on Windows, so we define them
> Angus> // as S_IXUSR to simplify the user code below.
> 
> What annoys me is that we do not basically need this information. Who
> cares to know whether a file is executable?
> 
> I'd advocate to remove all this nonsense from the xforms filedialog.
> If the user really needs extra info, I think the date of the file and
> its read/write status is enough.

This, too, seems fair. I see that *only* the XForms file dialog uses 
FileInfo::typeIndicator. However, the directory indicator, '/', is 
certainly a useful visual aid, so I don't think we should remove 
FileInfo::typeIndicator entirely.

Nonetheless, I basically agree. The dialog already displays the 
"rwxr-xr-x" status of the file, so why don't I change the patch to:

 char FileInfo::typeIndicator() const
 {
        ...
-       if (S_ISREG(buf_.st_mode) && 
-           (buf_.st_mode & (S_IEXEC | S_IXGRP | S_IXOTH)))
-               return '*';
        return ' ';
 }

Happy?

-- 
Angus

Reply via email to