[gedit-list] Re: Howto embed gedit in other app?



Hi,

> I have another application that uses several text-entry boxes,
> and I want to be able to pop-up gedit to edit the contents of those
> fields.  The app is gnotime, a time-keeping/diary type thing,
> at http://gttr.sourceforge.net, the fields in question are the 
> 'notes' and 'diary entry' fields.  Thus I want to pipe the text
> to gedit (yes, thats currently possible), and then, whenever the 
> user hits the gedit save button, to have the contents piped back
> to gnotime.  

You could create a temporary file and monitor it for changes (using
gnome-vfs monitors).
When the user hits the gedit save button, you will be notified by
gnome-vfs.
You can then read the file from disk and remove it.
I know... this is not a great solution.

> Whatever that stunt may be, I haven't yet quite figured it out.
> If gedit really uses gnome-vfs, then should I write a gnome-vfs plugin
> for gnotime, so that gnotime data looks like a filesystem?  Hmmm.

Note that ATM gedit does not use gnome-vfs for saving files.

> 
> Should I just copy most of the gedit source code into gnotime,
> and perform some vicious hacks to make it work? Yuck....
> 
> Is there some way to make oaf/bonobo do this for me?

gedit exposes a simple CORBA interface, but I don't think it can help
you in this case. You could try to modify it and send us a patch :-)

Ciao,
Paolo

-- 
Paolo Maggi                      E-mail: paolo DOT maggi AT polito DOT it
Dip. Automatica e Informatica    Tel.  : + 39 011 564 7078 
Politecnico di Torino            Fax   : + 39 011 564 7099

A Bugless Program is an Abstract Theoretical Concept.







[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]