[referencer] Default folder for files

Miguel Pagano miguel.pagano at gmail.com
Wed Oct 1 20:13:12 EDT 2008


On Thu, Oct 2, 2008 at 1:35 AM, John Spray <jcspray at icculus.org> wrote:
> On Thu, 2008-10-02 at 01:19 +0200, Miguel Pagano wrote:
>  612              * Really we should just show the user a save dialog
> and let him choose
> Apologies for the profanity, but it's accurately used :-)
Ok, I think is nicer the idea of the managed directory.

> One of the features I'm halfway through implementing (shelved it in
> favour of other more obscure projects a while back) is a "managed
> directory" for a library where pdfs dropped in that directory are
> automatically added -- this would also be where the downloaded documents
> would drop.
Nice!

>> I've added manually an attribute "docs_home" that
>> defines which is the folder where the files for this
>> library are. Does this make sense for other people?
>
> Yes, that's the right idea.  There is actually a <library_folder> tag in
> the file format which isn't exposed anywhere because I'm a horrible
> person and only got halfway through doing that piece of code.  I shipped
> a release with the GUI bits for this hidden in order to get other bug
> fixes out.
Ok, I should look more carefully in the code. (Why a tag? See below).

>> Also, a more general question: how would be the best
>> form of defining attributes for a library? From what I've
>> seen, there is yet no attribute for the library. Is this because
>> you think there shouldn't be any attribute associated with
>> the library? Or is it just because you haven't  needed it yet?
>
> I'm not sure in what sense you're using "attributes" -- currently there
> are things like <manage_target> and the aforementioned <library_folder>
> which map to the manage_target_ and library_folder_uri_ members of the
> Library class in src/Library.h.  A more general mechanism would be
> possible, but since special-case behaviour in the GUI is required for
> anything like that I would question the utility of a generalised
> mechanism -- I prefer to define XML tags rather than defining valid
> values for a generic map.  But perhaps I'm not understanding you
> correctly.

Attribute in my sentence has two meanings: an attribute in the XML
file and this attribute seen as a member in the corresponding class.
Sorry for being ambiguous. With respect of using attributes or tags, I
think that a path looks like something which should be in an attribute.
Again it seems that I've overlooked some things or that the source
I've get from debian is not up-to-date.

I'll try to read more carefully the (last version of the) code and see if I
can get my feature done in a right way. I'd very grateful if you give
me any suggestion on how to start, or how to avoid you the need of
profanities ;).



More information about the referencer mailing list