diff --git a/ChangeLog b/ChangeLog index f3884ec523..c34c44afe8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +Tue May 26 01:17:14 PDT 1998 Manish Singh + + * gimptool.in: added --install-script. Use @INSTALL@ stuff + + * libgimp/gimpimage.c + * libgimp/gimplayer.c: fixes for silly errors from Marc Lehmann + + * libgimp/gimpchannel.c: implemented gimp_channel_set_show_masked + and gimp_channel_get_show_masked (already in gimp.h> + + * plug-ins/blinds/blinds.c + * plug-ins/bmp/bmp.h + * plug-ins/mosaic/mosaic.c + * plug-ins/ripple/ripple.c + * plug-ins/tga/tga.c + * plug-ins/tileit/tileit.c: remove definitions of TRUE and FALSE + since glib does it for us + Sun May 24 08:41:34 EST 1998 Stephen Norris * plug-ins/displace/displace.c: Fix to GUI bug. diff --git a/gimptool-1.2.in b/gimptool-1.2.in index f29cf0b1cd..de7cf8aa63 100644 --- a/gimptool-1.2.in +++ b/gimptool-1.2.in @@ -4,9 +4,10 @@ prefix=@prefix@ exec_prefix=@exec_prefix@ exec_prefix_set=no plug_in_dir=@gimpplugindir@ +data_dir=@gimpdatadir@ usage="\ -Usage: gimptool [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--libs] [--cflags] [--build plug-in.c] [--install plug-in.c] [--install-admin plug-in.c]" +Usage: gimptool [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--libs] [--cflags] [--build plug-in.c] [--install plug-in.c] [--install-admin plug-in.c] [--install-script script.scm] [--install-admin-script script.scm]" noarg="\ Error: Need a plug-in source file to build" @@ -72,16 +73,32 @@ while test $# -gt 0; do --libs) echo -L@libdir@ -lgimpui -lgimp `$gtk_config --libs` ;; - --install-bin | --install-admin-bin) + --install-bin | --install-admin-bin \ + | --install-script | --install-admin-script) case $1 in --install-bin) - install_dir="$HOME/.gimp/plug-ins" ;; + install_cmd="@INSTALL@ @INSTALL_PROGRAM@" + install_dir="$HOME/.gimp/plug-ins" + ;; --install-admin-bin) - install_dir="$plug_in_dir/plug-ins" ;; + install_cmd="@INSTALL@ @INSTALL_PROGRAM@" + install_dir="$plug_in_dir/plug-ins" + ;; + --install-script) + install_cmd="@INSTALL@ @INSTALL_DATA@" + install_dir="$HOME/.gimp/scripts" + ;; + --install-admin-script) + install_cmd="@INSTALL@ @INSTALL_DATA@" + install_dir="$data_dir/scripts" + ;; esac + shift if test "x$1" != "x"; then if test -e "$1"; then - cp -a "$1" "$install_dir/$1" + cmd="$install_cmd $1 $install_dir/$1" + echo $cmd + exec $cmd else echo "${notfound}" 1>&2 echo "${usage}" 1>&2 @@ -110,7 +127,7 @@ while test $# -gt 0; do if test -e "$1"; then cmd="$cc $cflags $includes `$gtk_config --cflags` -o $install_dir/`echo $1|sed 's/\.[^\.]*$//'` $1 -L@libdir@ -lgimpui -lgimp `$gtk_config --libs`" echo $cmd - eval $cmd + exec $cmd else echo "${notfound}" 1>&2 echo "${usage}" 1>&2 diff --git a/gimptool.in b/gimptool.in index f29cf0b1cd..de7cf8aa63 100644 --- a/gimptool.in +++ b/gimptool.in @@ -4,9 +4,10 @@ prefix=@prefix@ exec_prefix=@exec_prefix@ exec_prefix_set=no plug_in_dir=@gimpplugindir@ +data_dir=@gimpdatadir@ usage="\ -Usage: gimptool [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--libs] [--cflags] [--build plug-in.c] [--install plug-in.c] [--install-admin plug-in.c]" +Usage: gimptool [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--libs] [--cflags] [--build plug-in.c] [--install plug-in.c] [--install-admin plug-in.c] [--install-script script.scm] [--install-admin-script script.scm]" noarg="\ Error: Need a plug-in source file to build" @@ -72,16 +73,32 @@ while test $# -gt 0; do --libs) echo -L@libdir@ -lgimpui -lgimp `$gtk_config --libs` ;; - --install-bin | --install-admin-bin) + --install-bin | --install-admin-bin \ + | --install-script | --install-admin-script) case $1 in --install-bin) - install_dir="$HOME/.gimp/plug-ins" ;; + install_cmd="@INSTALL@ @INSTALL_PROGRAM@" + install_dir="$HOME/.gimp/plug-ins" + ;; --install-admin-bin) - install_dir="$plug_in_dir/plug-ins" ;; + install_cmd="@INSTALL@ @INSTALL_PROGRAM@" + install_dir="$plug_in_dir/plug-ins" + ;; + --install-script) + install_cmd="@INSTALL@ @INSTALL_DATA@" + install_dir="$HOME/.gimp/scripts" + ;; + --install-admin-script) + install_cmd="@INSTALL@ @INSTALL_DATA@" + install_dir="$data_dir/scripts" + ;; esac + shift if test "x$1" != "x"; then if test -e "$1"; then - cp -a "$1" "$install_dir/$1" + cmd="$install_cmd $1 $install_dir/$1" + echo $cmd + exec $cmd else echo "${notfound}" 1>&2 echo "${usage}" 1>&2 @@ -110,7 +127,7 @@ while test $# -gt 0; do if test -e "$1"; then cmd="$cc $cflags $includes `$gtk_config --cflags` -o $install_dir/`echo $1|sed 's/\.[^\.]*$//'` $1 -L@libdir@ -lgimpui -lgimp `$gtk_config --libs`" echo $cmd - eval $cmd + exec $cmd else echo "${notfound}" 1>&2 echo "${usage}" 1>&2 diff --git a/libgimp/gimpchannel.c b/libgimp/gimpchannel.c index 440c388eee..dc3d64806a 100644 --- a/libgimp/gimpchannel.c +++ b/libgimp/gimpchannel.c @@ -265,3 +265,40 @@ gimp_channel_set_visible (gint32 channel_ID, gimp_destroy_params (return_vals, nreturn_vals); } + +gint +gimp_channel_get_show_masked (gint32 channel_ID) +{ + GParam *return_vals; + int nreturn_vals; + int show_masked; + + return_vals = gimp_run_procedure ("gimp_channel_get_show_masked", + &nreturn_vals, + PARAM_CHANNEL, channel_ID, + PARAM_END); + + show_masked = -1; + if (return_vals[0].data.d_status == STATUS_SUCCESS) + show_masked = return_vals[1].data.d_int32; + + gimp_destroy_params (return_vals, nreturn_vals); + + return show_masked; +} + +void +gimp_channel_set_show_masked (gint32 channel_ID, + gint show_masked) +{ + GParam *return_vals; + int nreturn_vals; + + return_vals = gimp_run_procedure ("gimp_channel_set_show_masked", + &nreturn_vals, + PARAM_CHANNEL, channel_ID, + PARAM_INT32, show_masked, + PARAM_END); + + gimp_destroy_params (return_vals, nreturn_vals); +} diff --git a/libgimp/gimpchannel_pdb.c b/libgimp/gimpchannel_pdb.c index 440c388eee..dc3d64806a 100644 --- a/libgimp/gimpchannel_pdb.c +++ b/libgimp/gimpchannel_pdb.c @@ -265,3 +265,40 @@ gimp_channel_set_visible (gint32 channel_ID, gimp_destroy_params (return_vals, nreturn_vals); } + +gint +gimp_channel_get_show_masked (gint32 channel_ID) +{ + GParam *return_vals; + int nreturn_vals; + int show_masked; + + return_vals = gimp_run_procedure ("gimp_channel_get_show_masked", + &nreturn_vals, + PARAM_CHANNEL, channel_ID, + PARAM_END); + + show_masked = -1; + if (return_vals[0].data.d_status == STATUS_SUCCESS) + show_masked = return_vals[1].data.d_int32; + + gimp_destroy_params (return_vals, nreturn_vals); + + return show_masked; +} + +void +gimp_channel_set_show_masked (gint32 channel_ID, + gint show_masked) +{ + GParam *return_vals; + int nreturn_vals; + + return_vals = gimp_run_procedure ("gimp_channel_set_show_masked", + &nreturn_vals, + PARAM_CHANNEL, channel_ID, + PARAM_INT32, show_masked, + PARAM_END); + + gimp_destroy_params (return_vals, nreturn_vals); +} diff --git a/libgimp/gimpimage.c b/libgimp/gimpimage.c index 4a2e21b02c..9b20aa95e3 100644 --- a/libgimp/gimpimage.c +++ b/libgimp/gimpimage.c @@ -301,7 +301,7 @@ gimp_image_merge_visible_layers (gint32 image_ID, layer_ID = -1; if (return_vals[0].data.d_status == STATUS_SUCCESS) - layer_ID = return_vals[0].data.d_layer; + layer_ID = return_vals[1].data.d_layer; gimp_destroy_params (return_vals, nreturn_vals); @@ -326,7 +326,7 @@ gimp_image_pick_correlate_layer (gint32 image_ID, layer_ID = -1; if (return_vals[0].data.d_status == STATUS_SUCCESS) - layer_ID = return_vals[0].data.d_layer; + layer_ID = return_vals[1].data.d_layer; gimp_destroy_params (return_vals, nreturn_vals); diff --git a/libgimp/gimpimage_pdb.c b/libgimp/gimpimage_pdb.c index 4a2e21b02c..9b20aa95e3 100644 --- a/libgimp/gimpimage_pdb.c +++ b/libgimp/gimpimage_pdb.c @@ -301,7 +301,7 @@ gimp_image_merge_visible_layers (gint32 image_ID, layer_ID = -1; if (return_vals[0].data.d_status == STATUS_SUCCESS) - layer_ID = return_vals[0].data.d_layer; + layer_ID = return_vals[1].data.d_layer; gimp_destroy_params (return_vals, nreturn_vals); @@ -326,7 +326,7 @@ gimp_image_pick_correlate_layer (gint32 image_ID, layer_ID = -1; if (return_vals[0].data.d_status == STATUS_SUCCESS) - layer_ID = return_vals[0].data.d_layer; + layer_ID = return_vals[1].data.d_layer; gimp_destroy_params (return_vals, nreturn_vals); diff --git a/libgimp/gimplayer.c b/libgimp/gimplayer.c index 7540adcc88..0dbcbe453d 100644 --- a/libgimp/gimplayer.c +++ b/libgimp/gimplayer.c @@ -516,7 +516,7 @@ gimp_layer_set_opacity (gint32 layer_ID, return_vals = gimp_run_procedure ("gimp_layer_set_opacity", &nreturn_vals, PARAM_LAYER, layer_ID, - PARAM_INT32, opacity, + PARAM_FLOAT, opacity, PARAM_END); gimp_destroy_params (return_vals, nreturn_vals); diff --git a/libgimp/gimplayer_pdb.c b/libgimp/gimplayer_pdb.c index 7540adcc88..0dbcbe453d 100644 --- a/libgimp/gimplayer_pdb.c +++ b/libgimp/gimplayer_pdb.c @@ -516,7 +516,7 @@ gimp_layer_set_opacity (gint32 layer_ID, return_vals = gimp_run_procedure ("gimp_layer_set_opacity", &nreturn_vals, PARAM_LAYER, layer_ID, - PARAM_INT32, opacity, + PARAM_FLOAT, opacity, PARAM_END); gimp_destroy_params (return_vals, nreturn_vals); diff --git a/plug-ins/blinds/blinds.c b/plug-ins/blinds/blinds.c index f0b221f531..016b4f7d45 100644 --- a/plug-ins/blinds/blinds.c +++ b/plug-ins/blinds/blinds.c @@ -76,9 +76,6 @@ #define HORIZONTAL 0 #define VERTICAL 1 -#define TRUE 1 -#define FALSE 0 - /* Variables set in dialog box */ typedef struct data { gint angledsp; diff --git a/plug-ins/bmp/bmp.h b/plug-ins/bmp/bmp.h index 881d79918b..dcc2007b51 100644 --- a/plug-ins/bmp/bmp.h +++ b/plug-ins/bmp/bmp.h @@ -1,7 +1,5 @@ #include -#define TRUE 1 -#define FALSE 0 #define MAXCOLORS 256 #define Image gint32 diff --git a/plug-ins/common/blinds.c b/plug-ins/common/blinds.c index f0b221f531..016b4f7d45 100644 --- a/plug-ins/common/blinds.c +++ b/plug-ins/common/blinds.c @@ -76,9 +76,6 @@ #define HORIZONTAL 0 #define VERTICAL 1 -#define TRUE 1 -#define FALSE 0 - /* Variables set in dialog box */ typedef struct data { gint angledsp; diff --git a/plug-ins/common/mosaic.c b/plug-ins/common/mosaic.c index 4020b32fb9..b42a184e32 100644 --- a/plug-ins/common/mosaic.c +++ b/plug-ins/common/mosaic.c @@ -43,9 +43,6 @@ #define SQR(x) ((x) * (x)) -#define TRUE 1 -#define FALSE 0 - #define HORIZONTAL 0 #define VERTICAL 1 #define OPAQUE 255 diff --git a/plug-ins/common/ripple.c b/plug-ins/common/ripple.c index ab1221d3da..ccf57e480a 100644 --- a/plug-ins/common/ripple.c +++ b/plug-ins/common/ripple.c @@ -48,9 +48,6 @@ #define SAWTOOTH 0 #define SINE 1 -#define TRUE 1 -#define FALSE 0 - typedef struct { gint period; gint amplitude; diff --git a/plug-ins/common/tga.c b/plug-ins/common/tga.c index 1a1e45cae5..ef354e3766 100644 --- a/plug-ins/common/tga.c +++ b/plug-ins/common/tga.c @@ -79,9 +79,6 @@ #include #include "libgimp/gimp.h" -#define FALSE 0 -#define TRUE 1 - /* Round up a division to the nearest integer. */ #define ROUNDUP_DIVIDE(n,d) (((n) + (d - 1)) / (d)) diff --git a/plug-ins/common/tileit.c b/plug-ins/common/tileit.c index 8099ac3250..e7359680cd 100644 --- a/plug-ins/common/tileit.c +++ b/plug-ins/common/tileit.c @@ -57,9 +57,6 @@ #define MAX_SEGS 6 -#define TRUE 1 -#define FALSE 0 - #define PREVIEW_MASK GDK_EXPOSURE_MASK | \ GDK_BUTTON_PRESS_MASK | \ GDK_BUTTON_MOTION_MASK diff --git a/plug-ins/mosaic/mosaic.c b/plug-ins/mosaic/mosaic.c index 4020b32fb9..b42a184e32 100644 --- a/plug-ins/mosaic/mosaic.c +++ b/plug-ins/mosaic/mosaic.c @@ -43,9 +43,6 @@ #define SQR(x) ((x) * (x)) -#define TRUE 1 -#define FALSE 0 - #define HORIZONTAL 0 #define VERTICAL 1 #define OPAQUE 255 diff --git a/plug-ins/ripple/ripple.c b/plug-ins/ripple/ripple.c index ab1221d3da..ccf57e480a 100644 --- a/plug-ins/ripple/ripple.c +++ b/plug-ins/ripple/ripple.c @@ -48,9 +48,6 @@ #define SAWTOOTH 0 #define SINE 1 -#define TRUE 1 -#define FALSE 0 - typedef struct { gint period; gint amplitude; diff --git a/plug-ins/tga/tga.c b/plug-ins/tga/tga.c index 1a1e45cae5..ef354e3766 100644 --- a/plug-ins/tga/tga.c +++ b/plug-ins/tga/tga.c @@ -79,9 +79,6 @@ #include #include "libgimp/gimp.h" -#define FALSE 0 -#define TRUE 1 - /* Round up a division to the nearest integer. */ #define ROUNDUP_DIVIDE(n,d) (((n) + (d - 1)) / (d)) diff --git a/plug-ins/tileit/tileit.c b/plug-ins/tileit/tileit.c index 8099ac3250..e7359680cd 100644 --- a/plug-ins/tileit/tileit.c +++ b/plug-ins/tileit/tileit.c @@ -57,9 +57,6 @@ #define MAX_SEGS 6 -#define TRUE 1 -#define FALSE 0 - #define PREVIEW_MASK GDK_EXPOSURE_MASK | \ GDK_BUTTON_PRESS_MASK | \ GDK_BUTTON_MOTION_MASK