Hi,
Below is a patch that makes the plug-in compile against the GIMP 1.2
API. Forget the Makefile that is included with the tarball and instead
use gimptool-1.2 to compile the plug-in. So in order to build it,
change to the Stegano source tree, apply the patch:
patch -p0 stegano.diff
compile and install using gimptool-1.2:
gimptool-1.2 --install stegano.c
I haven't even tested if the plug-in works but at least you should get
it compiled now.
Sven
--- stegano.c.orig 1998-12-01 20:15:53.0 +0100
+++ stegano.c 2003-06-14 11:37:29.0 +0200
@@ -7,6 +7,10 @@
**
*/
+/* Applied some Search-and-Replace rules to make it compile
+ * against the GIMP-1.2 API. -- June 2003, Sven Neumann [EMAIL PROTECTED]
+ */
+
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
@@ -28,6 +32,7 @@
#include stdlib.h
#include string.h
+#include stdio.h
#include math.h
#include sys/stat.h
@@ -52,11 +57,11 @@ typedef struct {
*/
static void query(void);
static void run(char *name, int nparams,
- GParam *param,
+ GimpParam *param,
int *nreturn_vals,
- GParam **return_vals);
-static void drawstegano(GDrawable *drawable);
-static void readstegano(GDrawable *drawable);
+ GimpParam **return_vals);
+static void drawstegano(GimpDrawable *drawable);
+static void readstegano(GimpDrawable *drawable);
static gint stegano_dialog(void);
static gint stegano_save_dialog(void);
static gint stegano_warning_dialog(void);
@@ -78,14 +83,14 @@ GtkTooltips *tips;
GdkColor tips_fg,tips_bg;
gchar filename[128];
gint saverun;
- static GParam values[1];
- GDrawable *drawable;
- GRunModeType run_mode;
- GStatusType status = STATUS_SUCCESS;
+ static GimpParam values[1];
+ GimpDrawable *drawable;
+ GimpRunModeType run_mode;
+ GimpPDBStatusType status = GIMP_PDB_SUCCESS;
-GPlugInInfo PLUG_IN_INFO =
+GimpPlugInInfo PLUG_IN_INFO =
{
NULL, /* init_proc */
NULL, /* quit_proc */
@@ -108,16 +113,16 @@ MAIN()
static void
query(void)
{
- static GParamDef args[] =
+ static GimpParamDef args[] =
{
-{ PARAM_INT32, run_mode, Interactive, non-interactive },
-{ PARAM_IMAGE, image, Input image (unused) },
-{ PARAM_DRAWABLE, drawable, Input drawable },
-{ PARAM_INT8, mode, FALSE: Hide file in image; TRUE: Get hidden file },
-{ PARAM_STRING, filename[128], Name of the file to hide in an image (only of
importance if mode=FALSE },
+{ GIMP_PDB_INT32, run_mode, Interactive, non-interactive },
+{ GIMP_PDB_IMAGE, image, Input image (unused) },
+{ GIMP_PDB_DRAWABLE, drawable, Input drawable },
+{ GIMP_PDB_INT8, mode, FALSE: Hide file in image; TRUE: Get hidden file },
+{ GIMP_PDB_STRING, filename[128], Name of the file to hide in an image (only
of importance if mode=FALSE },
};
- static GParamDef *return_vals = NULL;
+ static GimpParamDef *return_vals = NULL;
static int nargs = sizeof(args)/ sizeof(args[0]);
static int nreturn_vals = 0;
@@ -129,7 +134,7 @@ query(void)
December, 1998,
Image/Filters/Image/Stegano,
RGB*, GRAY*, INDEXED*,
-PROC_PLUG_IN,
+GIMP_PLUGIN,
nargs, nreturn_vals,
args, return_vals);
}
@@ -137,16 +142,16 @@ query(void)
static void
run(char *name,
int nparams,
-GParam *param,
+GimpParam *param,
int *nreturn_vals,
-GParam **return_vals)
+GimpParam **return_vals)
{
gchar **argv;
gint argc;
run_mode = param[0].data.d_int32;
- values[0].type = PARAM_STATUS;
+ values[0].type = GIMP_PDB_STATUS;
values[0].data.d_status = status;
*nreturn_vals = 1;
@@ -156,7 +161,7 @@ run(char *name,
switch(run_mode) {
- case RUN_INTERACTIVE:
+ case GIMP_RUN_INTERACTIVE:
/* Possibly retrieve data */
gimp_get_data(plug_in_stegano, wvals);
/* Get information from the dialog */
@@ -169,11 +174,11 @@ run(char *name,
stegano_dialog();
return;
- case RUN_NONINTERACTIVE:
+ case GIMP_RUN_NONINTERACTIVE:
/* Make sure all the arguments are present */
if (nparams != 5)
- status = STATUS_CALLING_ERROR;
- if (status == STATUS_SUCCESS)
+ status = GIMP_PDB_CALLING_ERROR;
+ if (status == GIMP_PDB_SUCCESS)
wvals.mode = param[3].data.d_int8;
strncpy (wvals.filename,param[4].data.d_string, 128);
wvals.filename[127]='\0';
@@ -186,7 +191,7 @@ run(char *name,
gtk_tooltips_set_delay(tips, 2500);
break;
- case RUN_WITH_LAST_VALS:
+ case GIMP_RUN_WITH_LAST_VALS:
/* Possibly retrieve data */
argc = 1;
argv = g_new(gchar *, 1);
@@ -202,18 +207,18 @@ run(char *name,