Re: [Gimp-developer] Fix for the gif plugin.

2001-09-09 Thread Austin Donnelly

On Sunday, 9 Sep 2001, David Odin wrote:

   I've two question about this plugin:
- why gifload and gif are kept separated, when, for most image
  formats, the loader and the saver is in the same plugin?

Patent reasons: you need a Unisys LZW compression patent licence in
order to use the gif save plugin, whereas gifloader doesn't need you
to have a patent licence.  Since most people don't have an LZW
compression licence they aren't allowed to use the saver but everyone
is allowed to use the loader.  Hence they are separate plugins so you
can choose to install both if you possess a licence, but only the
loader if you don't.

Of course, we can't stop you using the saver gif plugin illegally (ie
without a licence), but then that's your own problem, not ours.

- the code of gif.c looks unmaintained, and rather dirty (lots of
  code commented out, define for FACEHUGGERS, no real copyright
  notice, etc.) Who is the current maintainer?

It is maintained (and fairly regularly), by Adam Moss.

Austin
___
Gimp-developer mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer



Re: [Gimp-developer] Fix for the gif plugin.

2001-09-09 Thread Sven Neumann

Hi,

David Odin [EMAIL PROTECTED] writes:

   OK. I've attached a similar patch for the gif plugin. It does
 basically the same thing as my patch for the jpeg plugin (replacing a
 GtkText by a GtkTextView/GtkTextBuffer couple).
 
   I've two question about this plugin:
- why gifload and gif are kept separated, when, for most image
  formats, the loader and the saver is in the same plugin?
- the code of gif.c looks unmaintained, and rather dirty (lots of
  code commented out, define for FACEHUGGERS, no real copyright
  notice, etc.) Who is the current maintainer?

as stated in PLUGIN_MAINTAINERS Adam D. Moss [EMAIL PROTECTED] maintains
the gif plug-ins. He should be able to tell you why he chose two 
separate plug-ins (licensing?!). Oh, and yes, Adam has this very special 
british humour that makes his code fun to read...


Salut, Sven
___
Gimp-developer mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer



[Gimp-developer] Fix for the gif plugin.

2001-09-08 Thread David Odin

On Tue, Sep 04, 2001 at 03:41:14PM +0200, Michael Natterer wrote:
 David Odin [EMAIL PROTECTED] writes:
 
Hi,
  
I've attached a patch that allow the compilation (and installation) of
  the jpeg plugin. It uses a GtkTextView/GtkTextBuffer couple instead of
  the deprecated GtkText for the image comment.
  
Well, to use this patch, you'll also have to remove the '#' in front
  of the jpeg plugin definition in plugin-defs.pl, and re-run mkgen.pl.
  
The patch works OK. I've tested it, and I'm happy to see this plugin
  back :-).
  
Please apply.
 
 Done.
 
  Thanks.

 PS: please attach patches unzipped so we can read them in the mail client ;)

  OK. I've attached a similar patch for the gif plugin. It does
basically the same thing as my patch for the jpeg plugin (replacing a
GtkText by a GtkTextView/GtkTextBuffer couple).

  I've two question about this plugin:
   - why gifload and gif are kept separated, when, for most image
 formats, the loader and the saver is in the same plugin?
   - the code of gif.c looks unmaintained, and rather dirty (lots of
 code commented out, define for FACEHUGGERS, no real copyright
 notice, etc.) Who is the current maintainer?

   Thanks,

 DindinX

-- 
[EMAIL PROTECTED]
Paranoid schizophrenics outnumber their enemies at least two to one.


--- gimp/plug-ins/common/gif.c.orig Sat Sep  8 02:01:01 2001
+++ gimp/plug-ins/common/gif.c  Sat Sep  8 18:17:13 2001
@@ -314,28 +314,27 @@
 /* Declare some local functions.
  */
 static void   query(void);
-static void   run  (gchar  *name,
-   gintnparams,
-   GimpParam  *param,
-   gint   *nreturn_vals,
-   GimpParam **return_vals);
-static gint   save_image   (gchar  *filename,
-   gint32  image_ID,
-   gint32  drawable_ID,
-   gint32  orig_image_ID);
+static void   run  (gchar  *name,
+   gintnparams,
+   GimpParam  *param,
+   gint   *nreturn_vals,
+   GimpParam **return_vals);
+static gint   save_image   (gchar  *filename,
+   gint32  image_ID,
+   gint32  drawable_ID,
+   gint32  orig_image_ID);
 
-static gboolean boundscheck(gint32  image_ID);
+static gboolean boundscheck(gint32  image_ID);
 static gboolean badbounds_dialog   (void);
 
-static void   cropok_callback  (GtkWidget  *widget,
-   gpointerdata);
+static void   cropok_callback  (GtkWidget  *widget,
+   gpointerdata);
 
-static gint   save_dialog  (gint32  image_ID);
+static gint   save_dialog  (gint32  image_ID);
 
-static void   save_ok_callback (GtkWidget  *widget,
-   gpointerdata);
-static void   comment_entry_callback   (GtkWidget  *widget,
-   gpointerdata);
+static void   save_ok_callback (GtkWidget  *widget,
+   gpointerdata);
+static void   comment_entry_callback   (GtkTextBuffer  *buffer);
 
 
 static gboolean comment_was_edited = FALSE;
@@ -1198,21 +1197,21 @@
 static gint
 save_dialog (gint32 image_ID)
 {
-  GtkWidget *dlg;
-  GtkWidget *main_vbox;
-  GtkWidget *toggle;
-  GtkWidget *label;
-  GtkWidget *spinbutton;
-  GtkObject *adj;
-  GtkWidget *text;
-  GtkWidget *frame;
-  GtkWidget *vbox;
-  GtkWidget *hbox;
-  GtkWidget *disposal_option_menu;
-  GtkWidget *com_table;
-  GtkWidget *vscrollbar;
+  GtkWidget *dlg;
+  GtkWidget *main_vbox;
+  GtkWidget *toggle;
+  GtkWidget *label;
+  GtkWidget *spinbutton;
+  GtkObject *adj;
+  GtkWidget *text_view;
+  GtkTextBuffer *text_buffer; 
+  GtkWidget *frame;
+  GtkWidget *vbox;
+  GtkWidget *hbox;
+  GtkWidget *disposal_option_menu;
+  GtkWidget *scrolled_window;
 #ifdef FACEHUGGERS
-  GimpParasite* GIF2_CMNT;
+  GimpParasite  *GIF2_CMNT;
 #endif
 
   gint32 nlayers;
@@ -1268,16 +1267,24 @@
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), gsvals.save_comment);
   gtk_widget_show (toggle);
 
-  com_table = gtk_table_new (1, 1, FALSE);
-  gtk_box_pack_start (GTK_BOX (hbox), com_table, TRUE, TRUE, 0);
+  /* the comment text_view in a gtk_scrolled_window */
+  scrolled_window =