Re: [gedit-list] How determine file path of currently open document



The API documentation for Gedit is at <https://developer.gnome.org/gedit/3.14/>.
I believe the plugin system is based on libpeas so you might want to read the documentation for that as well.
This is also helpful when writing plugins: <https://wiki.gnome.org/Apps/Gedit/PluginsHowTos>.

And as for determining file path, I would first get the `GeditWindow` object, then get the active document using `gedit_window_get_active_document`  and finally use `gedit_document_get_location` to get the location.

On Tue, Jan 20, 2015 at 5:18 PM, Peter Bittner <peter bittner gmx net> wrote:
Hi there,

I'm working on a Gedit plugin that needs to determine the file path of
the currently open document (if the content of the document is already
saved as a file). In addition (for unsaved documents) I need to figure
out Gedit's "working directory" (the one displayed with the `Save
As...` dialog).

Is there any API documentation that helps me with that? It seems
surprisingly hard to find anything about this using a Web search. --
Alternatively, where can I find Gedit's source code?

Thanks in advance for any hints,
Peter
_______________________________________________
gedit-list mailing list
gedit-list gnome org
https://mail.gnome.org/mailman/listinfo/gedit-list



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