[referencer] Adding "Notes" functionality

John Spray jcspray at icculus.org
Mon May 5 15:02:50 EDT 2008


On Mon, 2008-05-05 at 13:35 -0400, Charlotte Curtis wrote:
> Hi all,
> 
> I've been using referencer for a while, but one thing I always wanted
> to be able to do was to take notes about my articles.  I had a bit of
> free time and a desire to learn about gtkmm, so I tried to add some
> basic note functionality.  I've attached the patch to this email in
> case anyone wants to check it out.  The functionality that should
> exist now is:

Good stuff.  You're not the first person to wish for annotation, so I
expect this to be popular.

I've committed the patch with the following changes:
      * Fixed up the label strings to be translatable
      * Got rid of the accelerator for export to HTML, it clashed with
        "Save As".  I don't think it's really frequently used enough to
        need an accelerator anyway.
      * Move the export action from the Tools menu to the Library menu:
        the Tools menu is provided primarily for plugins providing any
        truly obscure items: actions starting "export" should probably
        go together.  Library menu is a bit cluttered now, but it's the
        lesser of two evils until I figure out a non-evil way.
Diff at http://hg.icculus.org/jcspray/referencer/rev/922d9cf167b9

I couldn't find any serious bugs in the patch, but that doesn't mean
the ravenous hordes won't: I'd encourage anyone comfortable with running
from hg to try out the latest.

There are some other changes I'd like to see before releasing it:
      * The HTML output should include a meta tag specifying UTF-8
        encoding, assuming this is what comes out when one does a <<
        between std::ofstream and Glib::ustring.  See for example
        www/index.html.
      * I don't like the invocation of docSelectionChanged in
        onSaveLibrary: I think adding a function that commits any
        outstanding notes changes would be preferable, even if this is
        the only place it's used.
      * Document titles should be ellipsized to the available space -
        really long titles otherwise cause the window to be resized.  I
        tried using set_ellipsize on the label from
        notespane_->get_label_widget, but it didn't have the correct
        effect.  Probably a Gtk::Frame problem.  See the first item of
        the next list.

And some things that would be nice:
      * A Gtk::Stock::CLOSE button in the top right corner of the notes
        area.  Should be simple if you replace the Gtk::Frame(TextView)
        with Vbox(Hbox(Label,Button), TextView).  That would also allow
        adding some space around the "Notes for" label which is a bit
        cramped as it is.
      * The size of the notes area should be saved as a preference -- I
        can imagine users having wildly different expectations of the
        "right" size.
      * If a document has an empty title it would be nice to use the key
        name instead or failing that put "unnamed" rather than having
        the abrupt "Notes for"


Cheers,
John




More information about the referencer mailing list