On Thu, June 28, 2007 9:50 am, Michael O'Keefe wrote: > Stewart Stremler wrote: >> begin quoting Michael O'Keefe as of Wed, Jun 27, 2007 at 07:37:15PM >> -0700: >>>> Then why don't you go help them out since its so simple? >>>> >>>> I'm sure they'd love the help. >>> http://dn.codegear.com/print/28199 >>> >>> This is what I would think is all it would need >>> Use of the XReparentWindow() function (that's all a WM does) >>> >>> http://dn.codegear.com/print/28199 >>> >>> Now that makes it X11 only, so I have NFI what to do on other OSes. >>> But there are other issues too. How does the browser, embedding the >>> editor inside itself, control where the editor saves files ? >>> It prolly can't. And it would have to know where the editor saved the >>> file to be able to include it in the email. >> >> And yet... mutt does it. >> >>> So the problem is prolly not that they couldn't get any old editor into >>> TB, but how to control it once they did ! >> >> You invoke the editor on a file of your own choosing. When the editor >> exits, you read the file in. > > But you'd have to exit the editor to tell the outside app that you're > finished. Now ppl (the original Q was why can't TB use an editor of my > choosing) hit the Send button. But now you'd have to quit your editor to > let TB know "Im done" and then automatically Send, or still require them > to hit send. > > Although, I'm complicating the issue by embedding it in TB, rather than > just launching independently and relying on a SIGCHLD to know it's done. > > I think they'd rather just use the TextArea widget and control it > themselves. Course, that creates a helluva lot of "editor" widgets out > there, none behaving all the same way or having different features. > >>> Should be able to write a pretty small X11 app that takes 2 window Id's >>> and XReparentWindow()'s one into the other. xwininfo will tell you all >>> about the Window's in an app. >> >> Hm... you're trying to connect to a running editor? > > No, start the editor to embed it's window inside your own. > So from a certain point of view, I suppose you could say that's it > already running (it has to be running to open a connection to the > XServer to create the TopLevel in the first place) >
Thought you might enjoy a Tcl solution: #!/usr/bin/tclsh package require Tk frame .f -container yes pack .f -fill both -expand yes exec xterm -into [expr [ winfo id .f ]] -e $env(EDITOR) & When you run it, the editor window might be tiny and need to be dragged open ... but that's an implementation detail. -- Lan Barnes SCM Analyst Linux Guy Tcl/Tk Enthusiast Biodiesel Brewer -- [email protected] http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list
