Comment 1 for bug 1117881

Revision history for this message
tbnorth (terry-n-brown) wrote : Re: [Bug 1117881] [NEW] link from log pane to @file nodes

On Thu, 07 Feb 2013 01:40:32 -0000
Matt Wilkie <email address hidden> wrote:

> - *wouldn't it be nice if 2x-clicking on "wrote: dissolve-all.py" in
> the log pane opened up or selected that @file node in the outline? or
> myLeoSettings? or ...?*

This should be really easy, just another form of the code I just posted
for the overview pane
http://permalink.gmane.org/gmane.comp.python.leo.general/22138
because the URL behind the link can be a Leo UNL. In a really quick
test:

  from PyQt4 import QtCore
  w = c.frame.top.findChild(QtCore.QObject, 'log-widget')
  w.append("<div><a href='http://www.google.com/'>Google</a></div>")

  def anchorClicked(url, c=c):
      url = str(url.toString())
      g.handleUrl(url,c=c,p=c.p)

  w.anchorClicked.connect(anchorClicked)

it didn't immediately work, but there shouldn't be much more to it than
that - and updating a lot of log messages of course.

Cheers -Terry