On Wed, Mar 10, 2010 at 11:21 AM, Andrew Wagner <[email protected]> wrote: > Hello- > > I'm exploring the idea of doing a urwid port of Notational Velocity: > > http://notational.net/ > > If you're not familiar with it, it is a very minimalistic program for > keeping track of small text-based notes. It is an osx only program > build on top of Cocoa, and there is nothing quite like it on linux. > > I'm new to urwid, but I have read the tutorial, tinkered with the > examples a bit, and glanced at a handful of reference pages. > > I'd be interested to hear suggestions for how to structure an urwid > version. It probably be something like a {Pile or ListBox?} > containing a single line Edit, a ListBox, and a multi-line Edit. > > Cheers, > Drew > > _______________________________________________ > Urwid mailing list > [email protected] > http://lists.excess.org/mailman/listinfo/urwid >
Drew, Not to rain on your parade or anything, but there really isn't much of a need for an application like that in *nix. In a GUI-based OS like windows, sure, it'd be really handy. But in linux, an application like that is rendered superfluous by grep. If you know the note's title/filename you want has a specific word in it, but don't remember the whole title: ls | grep -i word. If you want to find a note that contains a word that isn't in its title: grep -i word *. That said, It is hard to suggest what widgets you should use when we have no idea what the application looks like. From the description of how the app works on notational.net though, the way I see the widgets being structured is with the top-most widget being a Frame. Frames have a body and can either have a header or a footer widget (or both). The header would be an Edit widget, and it would have focus to begin with. You'd use some key combination to change focus, like tab or ctrl+t. You'd need two different widgets for the body: one for auto-complete suggestions, and one for editing. The editing widget would obviously be an Edit you initialize with multiline=True. The autocomplete would be a ListBox around a ListWalker of some sort. In the ListWalker would be a list with Text widgets representing the autocomplete choices. -- Dominic LoBue _______________________________________________ Urwid mailing list [email protected] http://lists.excess.org/mailman/listinfo/urwid
