简体   繁体   中英

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM