LightningIsMyName wrote: Thanks a lot for your help! With a just a little of refactoring I've managed to let the plugin be launched at startup as an extension, and handling procedures as temps. Works great and I could dynamically change the menu items after a procedure has been executed. The only "problem" - the plugin has to be damn clean since it will live as long as gimp does. > Hello Gena, > > I tried to browse the source of the script-fu plugin to answer your > question, and this is what I came up with: > > >> "A temporary procedure is a procedure which is only available while one >> of your plug-in's "real" procedures is running. " >> > > That is correct - If you will look at line 107 > http://git.gnome.org/browse/gimp/tree/plug-ins/script-fu/script-fu.c#n107, > you will see that the plugin is registerd as an extension and not as a > regular GIMP plugin. On line 217 and 221, the plugin registers itself > as an extension, and this way it allows itself to run from the moment > gimp starts up, untill GIMP is exited. > When registering an extension instead of a "normal" GIMP plugin, the > run procedure will be called during GIMP's start-up, and the plugin > will then be able to register temporary procedures (exactly like the > Script-Fu scripts) that will be available untill GIMP exits. > > Just to show you how the script-fu extension continues to run after it > was intialized, look at the list of all the running procedures on your > computer and you should see that as long as gimp is open, there is > also a procedure called script-fu running. > > After creating the temporary procedures with your extension, you can > unregister them using gimp_uninstall_temp_proc, and the register them > again inside another menu. > What I suggested is probably not the best way in the world, but it's > the only way I can think of. > > Hope this helps, > ~ LightningIsMyName > > On Tue, Feb 16, 2010 at 10:27 AM, Gena Batsyan <gbatyan@xxxxxxxxx> wrote: > >> Hi! >> I've been trying to find a way for a plugin to update menu entries it >> has initially registered from query() via gimp_install_procedure() >> >> When the plugin is being run it wishes to update the menu entries, for >> instance putting some named presets previously selected in the plugin >> interface to be easily and directly accessible from the gimp menu >> without opening plugin interface again. >> >> Is there a way to affect menu entries generated by a plugin after it's >> query() has been called? >> >> I thought maybe using gimp_install_temp_proc instead of >> gimp_install_procedure would do the trick, but documentation says: >> >> "A temporary procedure is a procedure which is only available while one >> of your plug-in's "real" procedures is running. " >> >> What exactly does it mean "while my 'real' procedure is RUNNING"? >> >> gimp_install_temp_proc does also accept the menu spec, so the procedure >> should also be available in menu, but at which times? >> >> Kind regards >> _______________________________________________ >> Gimp-developer mailing list >> Gimp-developer@xxxxxxxxxxxxxxxxxxxxxx >> https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer >> >> > > _______________________________________________ Gimp-developer mailing list Gimp-developer@xxxxxxxxxxxxxxxxxxxxxx https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer