Re: [Gimp-developer] enhancement: warnings instead of fatal error for duplicate calls to gimp_env_init (David Gowers)

2010-03-05 Thread lloyd konneker
On Tue, Mar 2, 2010 at 2:58 PM, Sven Neumann s...@gimp.org wrote: On Tue, 2010-03-02 at 08:01 -0500, lloyd konneker wrote: I wonder if importing a plug-in from another plug-in is really something that we want to support. If the goal is to share code, then perhaps the code that is worth

Re: [Gimp-developer] enhancement: warnings instead of fatal error for duplicate calls to gimp_env_init (David Gowers)

2010-03-05 Thread David Gowers
On Tue, 2010-03-02 at 08:01 -0500, lloyd konneker wrote: I agree with Joao S. O. Bueno and disagree with David Bowers. Well, I'm glad you don't disagree with me, but who is that? Its better to make plugins meet the normal expectations of Python programmers (you can import any Python file to

Re: [Gimp-developer] enhancement: warnings instead of fatal error for duplicate calls to gimp_env_init (David Gowers)

2010-03-05 Thread lloyd konneker
On Sat, 2010-03-06 at 08:41 +1030, David Gowers wrote: On Tue, 2010-03-02 at 08:01 -0500, lloyd konneker wrote: I agree with Joao S. O. Bueno and disagree with David Bowers. Well, I'm glad you don't disagree with me, but who is that? Sorry I mangled your name. BTW David Bowers is a

Re: [Gimp-developer] enhancement: warnings instead of fatal error for duplicate calls to gimp_env_init

2010-03-03 Thread Joao S. O. Bueno
On Tue, Mar 2, 2010 at 2:58 PM, Sven Neumann s...@gimp.org wrote: On Tue, 2010-03-02 at 08:01 -0500, lloyd konneker wrote: Yes, I will submit a proper patch.  I'm new but I can figure it out. I mainly wanted to get feedback whether it was desirable.  I'm not clear when a discussion of an

Re: [Gimp-developer] enhancement: warnings instead of fatal error for duplicate calls to gimp_env_init

2010-03-03 Thread Sven Neumann
On Wed, 2010-03-03 at 08:46 -0300, Joao S. O. Bueno wrote: I wonder if importing a plug-in from another plug-in is really something that we want to support. If the goal is to share code, then perhaps the code that is worth sharing should be factored out into a Python module that the

Re: [Gimp-developer] enhancement: warnings instead of fatal error for duplicate calls to gimp_env_init

2010-03-03 Thread Joao S. O. Bueno
On Wed, Mar 3, 2010 at 9:07 AM, Sven Neumann s...@gimp.org wrote: On Wed, 2010-03-03 at 08:46 -0300, Joao S. O. Bueno wrote: I wonder if importing a plug-in from another plug-in is really something that we want to support. If the goal is to share code, then perhaps the code that is worth

Re: [Gimp-developer] enhancement: warnings instead of fatal error for duplicate calls to gimp_env_init

2010-03-03 Thread David Gowers
On Wed, Mar 3, 2010 at 10:16 PM, Joao S. O. Bueno gwid...@mpc.com.br wrote: On Tue, Mar 2, 2010 at 2:58 PM, Sven Neumann s...@gimp.org wrote: On Tue, 2010-03-02 at 08:01 -0500, lloyd konneker wrote: I wonder if importing a plug-in from another plug-in is really something that we want to

Re: [Gimp-developer] enhancement: warnings instead of fatal error for duplicate calls to gimp_env_init

2010-03-02 Thread lloyd konneker
Yes, I will submit a proper patch. I'm new but I can figure it out. I mainly wanted to get feedback whether it was desirable. I'm not clear when a discussion of an enhancement should move to Bugzilla. More testing reveals other issues and test cases: First, most plugins have unguarded calls

Re: [Gimp-developer] enhancement: warnings instead of fatal error for duplicate calls to gimp_env_init

2010-03-02 Thread Sven Neumann
On Tue, 2010-03-02 at 08:01 -0500, lloyd konneker wrote: Yes, I will submit a proper patch. I'm new but I can figure it out. I mainly wanted to get feedback whether it was desirable. I'm not clear when a discussion of an enhancement should move to Bugzilla. More testing reveals other

Re: [Gimp-developer] enhancement: warnings instead of fatal error for duplicate calls to gimp_env_init

2010-03-01 Thread Sven Neumann
On Sun, 2010-02-28 at 17:18 +, Omari Stephens wrote: On 02/28/2010 02:43 PM, lloyd konneker wrote: ::snip? SNIP!:: Here is proposed addition for plug-ins/gimpmodule.c in pygimp_main() that I have lightly tested. Note it raises a warning (Python prints warning on stderr once, on the

Re: [Gimp-developer] enhancement: warnings instead of fatal error for duplicate calls to gimp_env_init

2010-02-28 Thread Sven Neumann
On Sat, 2010-02-27 at 14:35 -0500, lloyd konneker wrote: This is an enhancement request. Repeated calls to gimp_env_init should yield warnings and not fatal errors. It has benefits for gimp plugins written in Python. Currently gimp_env_init() calls g_error (fatal) if called a second time.

Re: [Gimp-developer] enhancement: warnings instead of fatal error for duplicate calls to gimp_env_init

2010-02-28 Thread lloyd konneker
On Sun, 2010-02-28 at 11:23 +0100, Sven Neumann wrote: On Sat, 2010-02-27 at 14:35 -0500, lloyd konneker wrote: This is an enhancement request. Repeated calls to gimp_env_init should yield warnings and not fatal errors. It has benefits for gimp plugins written in Python. Currently

Re: [Gimp-developer] enhancement: warnings instead of fatal error for duplicate calls to gimp_env_init

2010-02-28 Thread Omari Stephens
On 02/28/2010 02:43 PM, lloyd konneker wrote: ::snip? SNIP!:: Here is proposed addition for plug-ins/gimpmodule.c in pygimp_main() that I have lightly tested. Note it raises a warning (Python prints warning on stderr once, on the second call), not an exception. Note it compiles with a C90

[Gimp-developer] enhancement: warnings instead of fatal error for duplicate calls to gimp_env_init

2010-02-27 Thread lloyd konneker
This is an enhancement request. Repeated calls to gimp_env_init should yield warnings and not fatal errors. It has benefits for gimp plugins written in Python. Currently gimp_env_init() calls g_error (fatal) if called a second time. Instead, pygimp_main(), which calls gimp_env_init(), should