How can I create a gedit plugin using python?

163 Views Asked by At

I wanted to create a simple gedit plugin that could save the current file when mouse leaves the text area (just like the <<leave>> event in tkinter) using python3. I went through wiki but I couldn't get much from it (All I could do was to create a plugin that just showed in plugins menu,nothing more). Can anyone help me with this?

1

There are 1 best solutions below

0
Roland Smith On

According to the Python plugin HOWTO:

The gedit window based on Gtk.Window.

Looking at the documentation for Gtk.Window, it inherits from Gtk.Widget.

Looking at the signals documentation for Gtk.Widget, it looks like leave-notify-event is what you are looking for.