On Thu, 6 Aug 2015 12:25:40 -0700 (PDT)
john lunzer <[email protected]> wrote:

> Directives in node headers cause a great deal of visual clutter,
> making it more difficult to navigate expansive trees filled primarily
> with @clean/@file/@edit nodes.

Ok, I've pushed what I've got.  I checked the unit tests and they
seemed unchanged.  It seems to work in py3 as well as py2.

Edward, I made two commits, you can see the combined changes here:
https://github.com/leo-editor/leo-editor/compare/00cdd48...8808ae3
the changes are confined to qt_tree.py (and leoSettings.leo) and aside
from the new code itself, are very clearly walled off from default
behavior by 
self.use_declutter = c.config.getBool('tree-declutter', default=False)

To make it work, copy @data tree-declutter-patterns and 
@bool tree-declutter = False from leoSettings.leo to your personal
settings and change False to True.  Examples below, docs. in the 
@data tree-declutter-patterns node.

I did find that there are two distinct pathways in the code for editing
a node headline.  Double-click, and with 
@bool single_click_auto_edits_headline = True, single-click on a
selected node do one thing, and `edit-headline` does another - i.e.
they seem to use different code to construct headline editing widgets,
it would be good at some time to unify them.  Because my hooks were so
small, I just applied them to both pathways.

So now we just need 16x16 pixel icons which clearly communicate the
difference between @edit, @auto, @clean, @file, and and @nosent :-)
The example code just replaces @clean with an icon.

  # if the node name starts with 'peacock node DEMO', make a mess of it
  RULE ^(peacock node DEMO)
  REPLACE LOOK: \1
  ICON Tango/16x16/emotes/face-grin.png
  ICON Tango/16x16/emotes/face-wink.png
  FG @solarized-magenta
  BG white
  FONT Times
  PX 40
  ITALIC 1
  WEIGHT Bold
  
  # remove @clean and use an icon
  RULE ^@clean (.*)
  REPLACE \1
  ICON Tango/16x16/mimetypes/ascii.png
  
  # show the last part of long filenames
  RULE ^.{1,1000}/(.{20})
  REPLACE …/\1
  
Cheers -Terry

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to