pythonpluginsgimppython-fu

Gimp python-fu how to change menu text (label)


I got this code:

from gimpfu import *
def goOn(url) :
    # change text
    return
register("won","auto go","include image","D.X","D.X","2020","Launch server...",
    "",[(PF_STRING, "string", "URL", 'http://localhost:3000')],
    [],goOn,menu="<Image>/Edit")
main()

This create a menu item that can launch the goOn function when you click on it, How to change the text "Launch server..." after clicking?


Solution

  • You cannot change the text of the menu to something else dynamically. The only way to change it would require to 1) change your code and 2) restart Gimp.