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 =