Re: [Nautilus-list] Directory Descriptions (Was: I am going toimplement cut, copy,paste forfiles)



On 22 Mar 2001 15:49:37 +0000, Matthew Walton wrote:

I think I'll throw some comments into this incremental proposal.

> I'm throwing stuff around randomly here because I don't know all that much about the
> performance issues related to XML parsing and so forth, but wouldn't it be better to
> have a central directoryinfo file that had entries for each directory complete with
> their paths? Thus:
> 
> <?xml version="1.0"?>
> <DirectoryInfoList>
>         <DirectoryInfo path="/etc">
>                 <title>Configuration files</title>
>                 <icon>/usr/share/icons/directoryicons/etc.xpm</icon>
>                 <hideinlevel>novice</hideinlevel>
>         </DirectoryInfo>
> ... (and so on)
> </DirectoryInfoList>

This looks much better to me.  It can then be called
/usr/share/nautilus/directory-info.en, or directory-info.fr etc. for
i18n.

Surely <hideinlevel> should be <showinlevel>?  Or did I mis-interpret
that node?

> However, I can see problems with this:
> 1) how do you generate the file to start with? Get the user to enter all the paths at
> first run? Don't think so somehow...

What do you mean?  The Linux Standard Base has a filesystem specificaton
which defines the standard paths for Unix systems, so we copy that and
add any common ones from distributions and programs.

> 2) you've still got the problem of reading the thing and checking every single
> directory against it to see if it should be displaying special info for it
> Although a possible solution might be to shove a tiny weeny little file with no
> useful information at all in it in each directory that has an entry in the global
> info file, so when Nautilus finds that it knows to go look in the main file for the
> info. Of course, this could still cause performance problems, not to mention
> inefficiency of storing small files on some file systems.


If the file is read once when Nautilus starts, and stored in a hash
table keyed on the path, checking it should be quite fast. Look ups only
need to be done when a directory is opened (if a distinction is made
between opening a directory and refreshing a directory) and as its a
hash table, it should be fast anyway.

Ross Burton

-- 
Ross Burton                     Software Engineer
OneEighty Software Ltd          Tel: +44 20 8263 2332
The Lansdowne Building          Fax: +44 20 8263 6314
2 Lansdowne Road                r burton 180sw com
Croydon, Surrey CR9 2ER, UK     http://www.180sw.com./
====================================================================
Under the Regulation of Investigatory Powers (RIP) Act 2000 together
with any and all Regulations in force pursuant to the Act OneEighty
Software Ltd reserves the right to monitor any or all incoming or
outgoing communications as provided for under the Act






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]