You are here

SOLVED "Glade Python Gimp: registerproblem"

For one of my plugins I'm rewriting the GUI with Glade (new for me) to get a better user interface divided into logical groups. The problem is that I don't know how to register it for Gimp. The testsource beneath works (XML file is not enclosed) but what have I to add/change for GIMP or has anyone a (small) example for me. I've looked on several forums (Glade, Pyhon, and others) but found nothing usefull.


#!/usr/bin/env python

import pygtk
import sys
import gtk

class Tutorial:

def on_window1_destroy(self, widget, data=None):

def on_checkbutton1_toggled(self, widget, data=None):
print "button was toggled"
if widget.get_active():
print "True"
print "False"

def __init__(self):
builder = gtk.Builder()

self.window = builder.get_object("window1")

## def MyPluginName(arg1, arg2,....)
## do the job

if __name__ == "__main__":
editor = Tutorial()


On this site, see the Inspect plugin or the Make Shortcut plugin for examples of using Glade in Python Gimp plugins.

I've been looking at the makeshortcut plugin already. I didn't know that the inspect pluging also uses Glade I will study that one also.

This is for programmers only not for end users.

At least I solved my problem with help of a few examples of bootchk (inspect: and make shortcut:, thanks bootchk.

Uses bootchk a dictonairy to interface I used the "old style" for one reason: changing the original code as less as possible. For the result see the code of indexprint at

Subscribe to Comments for "SOLVED "Glade Python Gimp: registerproblem""