Hi:
I would like to use the render pane to show the image contained in a path
that I point out.
It would be great to be able to use the renderpane on demand, such as:
c.render(image) -> Shows the image
c.render(movie) -> Shows the movie in the path pointed out.
Im trying to do this after failing at including both an image and some more
information within a same node (Tried to put the path in the header, then
in the first line, and both will give as result invalid file when I add
some more text afterwards).
Been checking the update_image definition from the plugin code and the
switch doesnt seem so complex to do (just adding the (path) used in the
fuction as a new argument would do):
@file viewrendered.py-->class ViewRenderedController (QWidget)-->update &
helpers-->update_image
def update_image (self,s,keywords):
> pc = self
> w = pc.ensure_text_widget()
> ok,path = pc.get_fn(s,'@image')
> if not ok:
> w.setPlainText('@image: file not found:\n%s' % (path))
> return
> path = path.replace('\\','/')
> template = '''\
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
> <head></head>
> <body bgcolor="#fffbdc">
> <img src="%s">
> </body>
> </html>
> ''' % (path)
> # Only works in Python 3.x.
> template = g.adjustTripleString(template,pc.c.tab_width).strip() #
> Sensitive to leading blank lines.
> # template = g.toUnicode(template)
> pc.show()
> w.setReadOnly(False)
> w.setHtml(template)
> w.setReadOnly(True)
But here comes my real nightmare: If we add the simple modified function,
how would we call it?
--
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/groups/opt_out.