Re: [Gimp-developer] quit signal for plugins
Hi, On Wed, 2009-02-04 at 08:12 -0600, Glimmer Labs wrote: It seems like several different plugins could take advantage of that because they make temporary images. (or would this still be only on plugin quit and not gimp quit?) I think it would make sense to call the quit method in all running plug-ins when the core is quit. So a patch that does this would be much appreciated. We need to somehow deal with the problem of hanging plug-ins though. Sven ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] quit signal for plugins
Thank you for the link to that thread, it was very informative. I have yet to find any sort of workaround. I tried trapping all the TERM type signals but no luck there. Is doing a non blocking wait still under discussion? Actually, for my purposes it doesn't matter whether the wait is blocking, because I just need to run a gedit style Save changes? dialog. Or, if I only had a second, just save some sort of backup. It seems like several different plugins could take advantage of that because they make temporary images. (or would this still be only on plugin quit and not gimp quit?) Thanks again for your continued assistance, -Soren Berg On Tue, Feb 3, 2009 at 12:47 PM, Sven Neumann s...@gimp.org wrote: I very much doubt that any real-world plug-in is actually using the quit function. I tried to use it once in a patch attached to http://bugzilla.gnome.org/show_bug.cgi?id=8141#c7 Sven ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] quit signal for plugins
Hi, On Tue, 2009-02-03 at 10:27 -0600, Glimmer Labs wrote: If a plugin has a quit function that hangs or takes a long time, won't that affect the gimp when the quit function is normally called (on closing of plugin)? I very much doubt that any real-world plug-in is actually using the quit function. I tried to use it once in a patch attached to http://bugzilla.gnome.org/show_bug.cgi?id=8141#c7 Sven ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] quit signal for plugins
On Fri, Jan 30, 2009 at 12:33 PM, Glimmer Labs glimme...@gmail.com wrote: I have been developing a plugin that involves users editing files and I need to be able to prompt them to save when the gimp closes. [...] I don't think there is any way to do this using current functionality. Communication between GIMP and its plug-ins is controlled by the plug-ins -- there is no way to send a signal from GIMP to a plug-in. When GIMP shuts down while a plug-in is running, the only thing that tells the plug-in about it is the fact that the wire -- the shared memory channel used for communication -- stops functioning. That's why you typically see a wire read error message in this situation. -- Bill ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] quit signal for plugins
Hi, On Fri, 2009-01-30 at 14:33 -0600, Glimmer Labs wrote: I have been developing a plugin that involves users editing files and I need to be able to prompt them to save when the gimp closes. I have tried using the quit signal in pluginInfo: GimpPlugInInfo PLUG_IN_INFO = { NULL, quit, query, run }; This only seems to be called, however, when the plugin closes and not the gimp. (It is a GTK plugin with it's own window like script-fu, I get the signal when I close the plugin window, but if the user closes the gimp I have no way to clean up.) Is this a bug or is my understanding of what this callback is supposed to do flawed? The latter. The quit function is called by libgimp whenever the plug-in quits, not when GIMP quits. This is not very useful, but that is how it was designed a long time ago. I am not entirely sure how plug-ins are quit by the core when the GIMP core exits. It would probably make sense to make sure that the plug-in's quit function is called. On the other hand we don't want the application to hang there waiting for plug-ins to quit. If you want to investigate this further, we could try to help you to fix this issue. Sven ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer