Re: Bug in color display filter (yet another...)

2000-11-22 Thread David Odin



   Hi,

Gee! I've found yet another weirdness in this display filter box:
  - Select a filter
  - move it (up or down)
  - click on configure
  - you're configuring the wrong filter...

 Now that I know well this part of code, I'm working on it.

   I'll send a fix today.

  Best Regards,

DindinX

-- 
[EMAIL PROTECTED]



Re: Bug in color display filter (yet another...)

2000-11-22 Thread David Odin

On Thu, Nov 23, 2000 at 12:57:13AM +0100, David Odin wrote:
 
Hi,
 
 Gee! I've found yet another weirdness in this display filter box:
   - Select a filter
   - move it (up or down)
   - click on configure
   - you're configuring the wrong filter...
 
  Now that I know well this part of code, I'm working on it.
 
I'll send a fix today.
 
   Well, here it is (attached)

   NB: this patch is on today CVS and should NOT be applied on top my
previous patch.

Best Regards,

DindinX

-- 
[EMAIL PROTECTED]

 gdisplay_color_ui.patch.gz


Bug in color display filter

2000-11-20 Thread David Odin



  Hi,

  I've found a sure way to make Gimp segfault (today's CVS):
start Gimp
File-Dialog-Display filter
Add a filter
select it on the right list
Click on Remove
Click on Remove again-Segfault.

A little bit of GDB shows that this patch solve this:
-
--- gimp/app/gdisplay_color.c.orig  Tue Nov 21 02:19:41 2000
+++ gimp/app/gdisplay_color.c   Tue Nov 21 02:19:59 2000
@@ -231,6 +231,7 @@
   ColorDisplayNode *node)
 {
   g_return_if_fail (gdisp != NULL);
+  g_return_if_fail (node != NULL);

   gdisplay_color_detach_real (gdisp, node, TRUE);
   gdisp-cd_list = g_list_remove (gdisp-cd_list, node);


  However, even if this patch works (and it does work, I've tested it),
it only hide the problem. I guess a more appropriate patch would be to
update cdd-dest_row to -1 after the removing of a filter as the
following patch shows:

--- gimp/app/gdisplay_color_ui.c.orig   Tue Nov 21 02:33:16 2000
+++ gimp/app/gdisplay_color_ui.cTue Nov 21 02:34:09 2000
@@ -310,6 +310,7 @@
   else
 gdisplay_color_detach_destroy (gdisp, node);

+  cdd-dest_row = -1;
   UPDATE_DISPLAY (gdisp);
 }



  I really think these two patches should be applied before 1.2.

  In the best of world, the Remove, Up, Down and Configure buttons
should be grayed out when there're not supposed to have an action (i.e.
when no filter is selected in the right list).

 Best regards,

   DindinX



-- 
[EMAIL PROTECTED]




4069 Mo?

2000-10-15 Thread David Odin


  Well, this isn't really a bug, but I was browering the libgimp code and I
found the following line in gimp_mem_size_entry_new()
(gimpwidgets.c, line 1023) :
spinbutton =
gimp_spin_button_new (divided_adj, divided_mem_size,
  0.0, (4069.0 * 1024 * 1024 - 1), 1.0, 16.0, 0.0,
  1.0, 0.0);

   I was wondering about the 4069.0. Shouldn't it be a 4096.0?

DindinX
-- 
[EMAIL PROTECTED]



Re: Code cleanup

2000-08-31 Thread David Odin

On Thu, Aug 31, 2000 at 03:48:37PM -0400, Federico Mena Quintero wrote:
 Maurits Rijk [EMAIL PROTECTED] writes:
 
 [ ... ]
 
  3) sometimes it's just lack of C knowledge:
  
  if (p)
 free(p);
  
  can be simply replaced by just: 
  
  free(p);
 
 If p is a null pointer then "free (p)" may (and should!) crash.  You
 are incorrect here.
 [ ... ]

  I disagree with you there. Here's an excerpt from the free(3) man page:
 free()  frees  the  memory  space pointed to by ptr, which
 must have been returned by a previous  call  to  malloc(),
 calloc()  or  realloc().   Otherwise,  or if free(ptr) has
 already been called before,  undefined  behaviour  occurs.
 If ptr is NULL, no operation is performed.
 
  It doesn't says: "If ptr is NULL, the program may crash".

DindinX
 

-- 
[EMAIL PROTECTED]
Author of the French Book: Programmation Linux avec GTK+

A man with one watch knows what time it is.
A man with two watches is never quite sure.



Re: Wrong test for newer/older version of autoconf in the cvs

2000-06-25 Thread David Odin

On Sun, Jun 25, 2000 at 03:30:55PM +0200, David Odin wrote:
 On Sun, Jun 25, 2000 at 02:26:57PM +0200, Steinar H. Gunderson wrote:
  On Sun, Jun 25, 2000 at 01:39:43AM +0200, David Odin wrote:
  Testing autoconf...
  expr: syntax error
  too old! (Need 2.13, have 2.14
[ ... ]
  
  Most likely, you have 2.14a or something like that.
 
   Yes I have 2.14a
 
  I sent a patch
  to Sven a few days ago that should fix this -- you may want to do
  a CVS update to see if he's commited it. If not, here's the patch I
  sent Sven:
[ ... ]
 
   This patch was already applied when I first report this buglet.
   It seems that $VER contains more than one line.
   The following patch fixes that problem:

  [ ... ]

After having tried w/ Autoconf 2.13, it seems that this patch is more
appropriate:

--
diff -Nru gimp.orig/autogen.sh gimp/autogen.sh
--- gimp.orig/autogen.shSat Jun 24 02:32:27 2000
+++ gimp/autogen.sh Sun Jun 25 15:21:56 2000
@@ -34,7 +34,7 @@
 echo
 
 echo "Testing autoconf... "
-VER=`autoconf --version | sed "s/.* \([0-9.]*\)[a-z]\?$/\1/"`
+VER=`autoconf --version | head -1 | sed "s/.* \([0-9.]*\)[a-z]\?$/\1/"`
 if expr $VER \= 2.13 /dev/null; then
echo "looks OK."
 else
---

Regards,

  DindinX

-- 
[EMAIL PROTECTED]
Author of the French Book: Programmation Linux avec GTK+

"There are some things that even a baby shouldn't fool around with."
   -- Tommy, from Angelica The Magnificent



Re: Help System

1999-11-11 Thread David Odin

On Thu, Nov 11, 1999 at 09:03:46PM +0100, Marc Lehmann wrote:
 On Thu, Nov 11, 1999 at 02:50:18AM +0100, David Odin [EMAIL PROTECTED] wrote:
I don't think I'm alone, since nobody complain about gimp perl any more
  these days. 
 
 They don't? Then why do I get so many complaints? ;)

  At least, on this list, I don't really see complaints but only unproductive
things as : 'This damned gimp-perl thing doesn't work'. I don't see
complaints here but just silly people.

 Indeed the installation is still very problematic, but unfortunately
 most of the problems are not under my control (and also affect all other
 non-trivial plug-ins like python or tiff_load/save).
 
  Once the installation has been done right once, everything goes right though.

 In any case, it is extremely nice to get a letter like yours from time to
 time ;)

  I guess! I'm just fed up reading people's messages that just says your work
is bad. I wanted to say that I think you're work is valuable. Even if it needs
some polishing.

  Oh, I have one complaint to make:
I wanted to try the Image/Filter/Map/Xach Blocks script, just to see what
it does. Unfortunately, it fails with this error :
xacklego.pl: Unable to grok '0' as colour specifier at
/usr/local/lib/gimp/1.1/plug-ins/xachlego.pl line 77 (ERROR)

The line in question is:
  $gridlayer-plug_in_grid($blocksize, $blocksize, 0, 0);
  
 I don't know if you're the one who maintain this script, but you may want
 to know.

Regards,

 DindinX

-- 
[EMAIL PROTECTED]

If you have nothing to do, don't do it here.