[referencer] [PATCH] Add tags through a cell in the tags view instead of a dialog

Eric Lesh eclesh at ucla.edu
Thu May 17 03:52:15 EDT 2007


On Thu, 2007-05-17 at 08:16 +0100, John Spray wrote:
> The idea was that eventually there would be tags such as "All documents
> <1 year old" or "All documents by author foo".  But yes, as long as
> those don't actually exist the dialog is a bit excessive and can easily
> be reinstated if it's needed.
> 
> One thing that makes me uncomfortable is the way the treepath for the
> new tag is found -- I'm not sure the assumption that it's going to be at
> the end will always be valid, if there is any sorting going on.  Also,
> adding 2 to skip the "All documents" and "Untagged documents" is a
> dangerously magic number.

I thought the same thing and originally had a comment to that effect in
there.  Of course, the sort should be done after the tag is actually
edited and so the "Type a tag" should always end up at the bottom for
consistency sake.  Having your new tag always appear between the T's
would be a pain.

The  magic 2 is pretty shifty.  Will fix.

> I've committed your version, but could you look into making it a little
> bit more robust?  For instance, newTag returns the integer ID of the new
> tag, and you could find this in the tag treemodel to be sure you're
> getting the right path without making too many assumptions.

Oh, that was dumb not to see that newTag returns the integer ID.  That
should make things a little nicer.

Thanks for applying as is.

-Eric




More information about the referencer mailing list