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



On Thu, 22 Mar 2001, Matthew Walton wrote:

>
>
> Gernot Poetsch wrote:
>
> > The first - if not most - irritating thing to a new Linux user is the
> > file structure. It's great from the system's point of view, but it
> > really takes some time until the user gets the idea how it works. Since
> > most newbies will take their first steps in exploring the filesystem in
> > Nautilus, why can't Nautilus help them finding out what a particular
> > directory is for? In the Beginner's mode there could be a little "What's
> > this directory for?" icon in the sidebar, that brings up a description
> > of what "/usr/local" or "/sbin", etc. is all about. It would help a lot
> > of the newbies I know....
>
> That could be useful - although some distros do diverge a bit on intended
> directory purposes. /home is obvious, but things like init scripts could cause
> problems, as they tend to vary quite a bit I believe (although I don't have all
> that much experience with multiple distros being a big Slackware fan).

I assume to implement this properly, a special .directoryinfo file should
be put in the designated directories that has some ID to a description of
the  purpose of that directory.

Since XML is so trendy, that .directoryinfo file could like like:

/etc/.directoryinfo:   (possibly: /etc/.directoryinfo.xml) ?
<?xml version="1.0"?>
<DirectoryInfoList>
    <title>Configuration files</title>
    <icon>/usr/share/icons/directoryicons/etc.xpm</icon>
    <hideinlevel>novice</hideinlevel>
    ... (perhaps some more info)
</DirectoryInfoList>

However, since
	- people do not only speak english
	- it's bad to scatter translatable strings in all the
	  filesystem,

another scheme may look better:

a) /etc/.directoryinfo
<?xml version="1.0"?>
<Directory>
	<ID>main_configuration_files</ID>
</Directory>

b) /usr/share/directoryinfos/C/directoryinfo.xml
<?xml version="1.0"?>
<DirectoryInfoList>
	<DirectoryInfo ID="main_configuration_files">
		<title>Configuration files</title>
		<icon>/usr/share/icons/directoryicons/etc.xpm</icon>
   		<hideinlevel>novice</hideinlevel>
	</DirectoryInfo>
... (and so on)
</DirectoryInfoList>

For performance purposes, it is bad to
	1) read the small /etc/.directoryinfo
	2) parse XML
	3) read the big /usr/share/directoryinfos/$LANG/directoryinfo.xml
	4) parse the big XML
	5) execute the logic of the directory description
every time the user accesses the directory,
this information should be either cached in memory or have their default
values for the chosen $LANG put directly to the .directoryinfo file using
some automated method.

simos.






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