Commit 374e55bc authored by Manish Singh's avatar Manish Singh

add pixmaps/dropper.xpm to EXTRA_DIST

* Makefile.am: add pixmaps/dropper.xpm to EXTRA_DIST

* app/appenv.h: minor formatting changes

* app/channel.c: #include "gdisplay.h"

* app/color_transfer.c
* app/dodgeburn.c
* app/gdisplay.c
* app/iscissors.c
* app/paint_core.c: remove extra SQR and ROUND definitions

* app/flip_tool.c: hackaround the flip tool options constant problem

* app/flip_tool.[ch]: use InternalOrientationType for flip_tool_flip
prototype

* app/interface.c: use GTK_LABEL case in gtk_label_set_justify

* plug-ins/common/mkgen.pl
* plug-ins/common/plugin-defs.pl: add @extra EXTRA_DIST processing

-Yosh
parent 8162b43d
Fri Aug 13 15:28:00 PDT 1999 Manish Singh <yosh@gimp.org>
* Makefile.am: add pixmaps/dropper.xpm to EXTRA_DIST
* app/appenv.h: minor formatting changes
* app/channel.c: #include "gdisplay.h"
* app/color_transfer.c
* app/dodgeburn.c
* app/gdisplay.c
* app/iscissors.c
* app/paint_core.c: remove extra SQR and ROUND definitions
* app/flip_tool.c: hackaround the flip tool options constant problem
* app/flip_tool.[ch]: use InternalOrientationType for flip_tool_flip
prototype
* app/interface.c: use GTK_LABEL case in gtk_label_set_justify
* plug-ins/common/mkgen.pl
* plug-ins/common/plugin-defs.pl: add @extra EXTRA_DIST processing
Fri Aug 13 16:39:25 1999 Adrian Likins <alikins@redhat.com>
* app/airbrush.c
......
......@@ -34,6 +34,7 @@ EXTRA_DIST = \
pixmaps/chain.xpm \
pixmaps/channel.xbm \
pixmaps/delete.xpm \
pixmaps/dropper.xpm \
pixmaps/duplicate.xpm \
pixmaps/eek.xpm \
pixmaps/eye.xbm \
......
......@@ -52,13 +52,13 @@
#ifdef HAVE_RINT
#define RINT(x) rint(x)
#else
#define RINT(x) floor ((x)+0.5)
#define RINT(x) floor ((x) + 0.5)
#endif
#define ROUND(x) ((int) ((x)+0.5))
#define ROUND(x) ((int) ((x) + 0.5))
/* Square */
#define SQR(x) ((x)*(x))
#define SQR(x) ((x) * (x))
/* limit a (0->511) int to 255 */
#define MAX255(a) ((a) | (((a) & 256) - (((a) & 256) >> 8)))
......
......@@ -24,6 +24,7 @@
#include "channel.h"
#include "drawable.h"
#include "errors.h"
#include "gdisplay.h"
#include "gimage_mask.h"
#include "layer.h"
#include "paint_funcs.h"
......
......@@ -21,8 +21,6 @@
#include "appenv.h"
#include "color_transfer.h"
#define SQR(x) ((x) * (x))
/* for lightening */
double highlights_add[256];
double midtones_add[256];
......
......@@ -24,6 +24,7 @@
#include "channel.h"
#include "drawable.h"
#include "errors.h"
#include "gdisplay.h"
#include "gimage_mask.h"
#include "layer.h"
#include "paint_funcs.h"
......
......@@ -24,6 +24,7 @@
#include "channel.h"
#include "drawable.h"
#include "errors.h"
#include "gdisplay.h"
#include "gimage_mask.h"
#include "layer.h"
#include "paint_funcs.h"
......
......@@ -52,8 +52,6 @@
#define OVERHEAD 25 /* in units of pixel area */
#define EPSILON 5
#define ROUND(x) ((int) (x + 0.5))
#define MAX_TITLE_BUF 256
/* variable declarations */
......
......@@ -52,8 +52,6 @@
#define OVERHEAD 25 /* in units of pixel area */
#define EPSILON 5
#define ROUND(x) ((int) (x + 0.5))
#define MAX_TITLE_BUF 256
/* variable declarations */
......
......@@ -1376,7 +1376,7 @@ message_box (gchar *message,
gtk_widget_show (vbox);
label = gtk_label_new (message);
gtk_label_set_justify (label, GTK_JUSTIFY_LEFT);
gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT);
gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, FALSE, 0);
gtk_widget_show (label);
......
......@@ -1376,7 +1376,7 @@ message_box (gchar *message,
gtk_widget_show (vbox);
label = gtk_label_new (message);
gtk_label_set_justify (label, GTK_JUSTIFY_LEFT);
gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT);
gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, FALSE, 0);
gtk_widget_show (label);
......
......@@ -35,7 +35,6 @@
#include "gimage.h"
#include "libgimp/gimpintl.h"
#define ROUND(x) (int)((x) + .5)
/* the dodgeburn structures */
......
......@@ -50,15 +50,18 @@ struct _FlipOptions
static FlipOptions *flip_options = NULL;
/* functions */
/* FIXME: Lame - 1 hacks abound since the code assumes certain values for
* the ORIENTATION_FOO constants.
*/
static void
flip_options_reset (void)
{
FlipOptions *options = flip_options;
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (options->type_w[options->type_d]), TRUE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (options->type_w[options->type_d - 1]), TRUE);
}
static FlipOptions *
......@@ -88,7 +91,7 @@ flip_options_new (void)
type_label,
type_value,
2);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (options->type_w[options->type_d]), TRUE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (options->type_w[options->type_d - 1]), TRUE);
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
......@@ -108,9 +111,9 @@ flip_modifier_key_func (Tool *tool,
break;
case GDK_Control_L: case GDK_Control_R:
if (flip_options->type == ORIENTATION_HORIZONTAL)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (flip_options->type_w[ORIENTATION_VERTICAL]), TRUE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (flip_options->type_w[ORIENTATION_VERTICAL - 1]), TRUE);
else
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (flip_options->type_w[ORIENTATION_HORIZONTAL]), TRUE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (flip_options->type_w[ORIENTATION_HORIZONTAL - 1]), TRUE);
break;
}
}
......@@ -140,7 +143,8 @@ flip_tool_transform (Tool *tool,
case FINISH :
/* transform_core->trans_info[FLIP] *= -1.0;*/
return flip_tool_flip (gdisp->gimage, gimage_active_drawable (gdisp->gimage),
return flip_tool_flip (gdisp->gimage,
gimage_active_drawable (gdisp->gimage),
transform_core->original,
(int)transform_core->trans_info[FLIP_INFO],
flip_options->type);
......@@ -171,14 +175,15 @@ flip_cursor_update (Tool *tool,
&x, &y, TRUE, FALSE);
if (x >= off_x && y >= off_y &&
x < (off_x + drawable_width (GIMP_DRAWABLE(layer))) &&
y < (off_y + drawable_height (GIMP_DRAWABLE(layer))))
x < (off_x + drawable_width (GIMP_DRAWABLE(layer))) &&
y < (off_y + drawable_height (GIMP_DRAWABLE(layer))))
{
/* Is there a selected region? If so, is cursor inside? */
if (gimage_mask_is_empty (gdisp->gimage) || gimage_mask_value (gdisp->gimage, x, y))
if (gimage_mask_is_empty (gdisp->gimage) ||
gimage_mask_value (gdisp->gimage, x, y))
{
if (flip_options->type == ORIENTATION_HORIZONTAL)
ctype = GDK_SB_H_DOUBLE_ARROW;
ctype = GDK_SB_H_DOUBLE_ARROW;
else
ctype = GDK_SB_V_DOUBLE_ARROW;
}
......@@ -188,7 +193,7 @@ flip_cursor_update (Tool *tool,
}
Tool *
tools_new_flip ()
tools_new_flip (void)
{
Tool * tool;
TransformCore * private;
......@@ -219,11 +224,11 @@ tools_free_flip_tool (Tool *tool)
}
TileManager *
flip_tool_flip (GimpImage *gimage,
GimpDrawable *drawable,
TileManager *orig,
int flip,
OrientationType type)
flip_tool_flip (GimpImage *gimage,
GimpDrawable *drawable,
TileManager *orig,
int flip,
InternalOrientationType type)
{
TileManager *new;
PixelRegion srcPR, destPR;
......
......@@ -27,7 +27,7 @@
void * flip_tool_transform (Tool *, gpointer, int);
TileManager * flip_tool_flip (GimpImage *, GimpDrawable *,
TileManager *, int, OrientationType);
TileManager *, int, InternalOrientationType);
Tool * tools_new_flip (void);
void tools_free_flip_tool (Tool *);
......
......@@ -52,8 +52,6 @@
#define OVERHEAD 25 /* in units of pixel area */
#define EPSILON 5
#define ROUND(x) ((int) (x + 0.5))
#define MAX_TITLE_BUF 256
/* variable declarations */
......
......@@ -24,6 +24,7 @@
#include "channel.h"
#include "drawable.h"
#include "errors.h"
#include "gdisplay.h"
#include "gimage_mask.h"
#include "layer.h"
#include "paint_funcs.h"
......
......@@ -1376,7 +1376,7 @@ message_box (gchar *message,
gtk_widget_show (vbox);
label = gtk_label_new (message);
gtk_label_set_justify (label, GTK_JUSTIFY_LEFT);
gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT);
gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, FALSE, 0);
gtk_widget_show (label);
......
......@@ -139,7 +139,6 @@ static IScissorsOptions *iscissors_options = NULL;
#define EPSILON 0.00001
/* functional defines */
#define SQR(x) ((x) * (x))
#define BILINEAR(jk,j1k,jk1,j1k1,dx,dy) \
((1-dy) * ((1-dx)*jk + dx*j1k) + \
dy * ((1-dx)*jk1 + dx*j1k1))
......
......@@ -35,7 +35,6 @@
#include "gimage.h"
#include "libgimp/gimpintl.h"
#define ROUND(x) (int)((x) + .5)
/* the dodgeburn structures */
......
......@@ -43,7 +43,6 @@
#define TARGET_HEIGHT 15
#define TARGET_WIDTH 15
#define SQR(x) ((x) * (x))
#define EPSILON 0.00001
/* global variables--for use in the various paint tools */
......
......@@ -35,7 +35,6 @@
#include "gimage.h"
#include "libgimp/gimpintl.h"
#define ROUND(x) (int)((x) + .5)
/* the dodgeburn structures */
......
......@@ -50,15 +50,18 @@ struct _FlipOptions
static FlipOptions *flip_options = NULL;
/* functions */
/* FIXME: Lame - 1 hacks abound since the code assumes certain values for
* the ORIENTATION_FOO constants.
*/
static void
flip_options_reset (void)
{
FlipOptions *options = flip_options;
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (options->type_w[options->type_d]), TRUE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (options->type_w[options->type_d - 1]), TRUE);
}
static FlipOptions *
......@@ -88,7 +91,7 @@ flip_options_new (void)
type_label,
type_value,
2);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (options->type_w[options->type_d]), TRUE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (options->type_w[options->type_d - 1]), TRUE);
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
......@@ -108,9 +111,9 @@ flip_modifier_key_func (Tool *tool,
break;
case GDK_Control_L: case GDK_Control_R:
if (flip_options->type == ORIENTATION_HORIZONTAL)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (flip_options->type_w[ORIENTATION_VERTICAL]), TRUE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (flip_options->type_w[ORIENTATION_VERTICAL - 1]), TRUE);
else
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (flip_options->type_w[ORIENTATION_HORIZONTAL]), TRUE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (flip_options->type_w[ORIENTATION_HORIZONTAL - 1]), TRUE);
break;
}
}
......@@ -140,7 +143,8 @@ flip_tool_transform (Tool *tool,
case FINISH :
/* transform_core->trans_info[FLIP] *= -1.0;*/
return flip_tool_flip (gdisp->gimage, gimage_active_drawable (gdisp->gimage),
return flip_tool_flip (gdisp->gimage,
gimage_active_drawable (gdisp->gimage),
transform_core->original,
(int)transform_core->trans_info[FLIP_INFO],
flip_options->type);
......@@ -171,14 +175,15 @@ flip_cursor_update (Tool *tool,
&x, &y, TRUE, FALSE);
if (x >= off_x && y >= off_y &&
x < (off_x + drawable_width (GIMP_DRAWABLE(layer))) &&
y < (off_y + drawable_height (GIMP_DRAWABLE(layer))))
x < (off_x + drawable_width (GIMP_DRAWABLE(layer))) &&
y < (off_y + drawable_height (GIMP_DRAWABLE(layer))))
{
/* Is there a selected region? If so, is cursor inside? */
if (gimage_mask_is_empty (gdisp->gimage) || gimage_mask_value (gdisp->gimage, x, y))
if (gimage_mask_is_empty (gdisp->gimage) ||
gimage_mask_value (gdisp->gimage, x, y))
{
if (flip_options->type == ORIENTATION_HORIZONTAL)
ctype = GDK_SB_H_DOUBLE_ARROW;
ctype = GDK_SB_H_DOUBLE_ARROW;
else
ctype = GDK_SB_V_DOUBLE_ARROW;
}
......@@ -188,7 +193,7 @@ flip_cursor_update (Tool *tool,
}
Tool *
tools_new_flip ()
tools_new_flip (void)
{
Tool * tool;
TransformCore * private;
......@@ -219,11 +224,11 @@ tools_free_flip_tool (Tool *tool)
}
TileManager *
flip_tool_flip (GimpImage *gimage,
GimpDrawable *drawable,
TileManager *orig,
int flip,
OrientationType type)
flip_tool_flip (GimpImage *gimage,
GimpDrawable *drawable,
TileManager *orig,
int flip,
InternalOrientationType type)
{
TileManager *new;
PixelRegion srcPR, destPR;
......
......@@ -27,7 +27,7 @@
void * flip_tool_transform (Tool *, gpointer, int);
TileManager * flip_tool_flip (GimpImage *, GimpDrawable *,
TileManager *, int, OrientationType);
TileManager *, int, InternalOrientationType);
Tool * tools_new_flip (void);
void tools_free_flip_tool (Tool *);
......
......@@ -35,7 +35,6 @@
#include "gimage.h"
#include "libgimp/gimpintl.h"
#define ROUND(x) (int)((x) + .5)
/* the dodgeburn structures */
......
......@@ -50,15 +50,18 @@ struct _FlipOptions
static FlipOptions *flip_options = NULL;
/* functions */
/* FIXME: Lame - 1 hacks abound since the code assumes certain values for
* the ORIENTATION_FOO constants.
*/
static void
flip_options_reset (void)
{
FlipOptions *options = flip_options;
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (options->type_w[options->type_d]), TRUE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (options->type_w[options->type_d - 1]), TRUE);
}
static FlipOptions *
......@@ -88,7 +91,7 @@ flip_options_new (void)
type_label,
type_value,
2);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (options->type_w[options->type_d]), TRUE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (options->type_w[options->type_d - 1]), TRUE);
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
......@@ -108,9 +111,9 @@ flip_modifier_key_func (Tool *tool,
break;
case GDK_Control_L: case GDK_Control_R:
if (flip_options->type == ORIENTATION_HORIZONTAL)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (flip_options->type_w[ORIENTATION_VERTICAL]), TRUE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (flip_options->type_w[ORIENTATION_VERTICAL - 1]), TRUE);
else
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (flip_options->type_w[ORIENTATION_HORIZONTAL]), TRUE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (flip_options->type_w[ORIENTATION_HORIZONTAL - 1]), TRUE);
break;
}
}
......@@ -140,7 +143,8 @@ flip_tool_transform (Tool *tool,
case FINISH :
/* transform_core->trans_info[FLIP] *= -1.0;*/
return flip_tool_flip (gdisp->gimage, gimage_active_drawable (gdisp->gimage),
return flip_tool_flip (gdisp->gimage,
gimage_active_drawable (gdisp->gimage),
transform_core->original,
(int)transform_core->trans_info[FLIP_INFO],
flip_options->type);
......@@ -171,14 +175,15 @@ flip_cursor_update (Tool *tool,
&x, &y, TRUE, FALSE);
if (x >= off_x && y >= off_y &&
x < (off_x + drawable_width (GIMP_DRAWABLE(layer))) &&
y < (off_y + drawable_height (GIMP_DRAWABLE(layer))))
x < (off_x + drawable_width (GIMP_DRAWABLE(layer))) &&
y < (off_y + drawable_height (GIMP_DRAWABLE(layer))))
{
/* Is there a selected region? If so, is cursor inside? */
if (gimage_mask_is_empty (gdisp->gimage) || gimage_mask_value (gdisp->gimage, x, y))
if (gimage_mask_is_empty (gdisp->gimage) ||
gimage_mask_value (gdisp->gimage, x, y))
{
if (flip_options->type == ORIENTATION_HORIZONTAL)
ctype = GDK_SB_H_DOUBLE_ARROW;
ctype = GDK_SB_H_DOUBLE_ARROW;
else
ctype = GDK_SB_V_DOUBLE_ARROW;
}
......@@ -188,7 +193,7 @@ flip_cursor_update (Tool *tool,
}
Tool *
tools_new_flip ()
tools_new_flip (void)
{
Tool * tool;
TransformCore * private;
......@@ -219,11 +224,11 @@ tools_free_flip_tool (Tool *tool)
}
TileManager *
flip_tool_flip (GimpImage *gimage,
GimpDrawable *drawable,
TileManager *orig,
int flip,
OrientationType type)
flip_tool_flip (GimpImage *gimage,
GimpDrawable *drawable,
TileManager *orig,
int flip,
InternalOrientationType type)
{
TileManager *new;
PixelRegion srcPR, destPR;
......
......@@ -27,7 +27,7 @@
void * flip_tool_transform (Tool *, gpointer, int);
TileManager * flip_tool_flip (GimpImage *, GimpDrawable *,
TileManager *, int, OrientationType);
TileManager *, int, InternalOrientationType);
Tool * tools_new_flip (void);
void tools_free_flip_tool (Tool *);
......
......@@ -139,7 +139,6 @@ static IScissorsOptions *iscissors_options = NULL;
#define EPSILON 0.00001
/* functional defines */
#define SQR(x) ((x) * (x))
#define BILINEAR(jk,j1k,jk1,j1k1,dx,dy) \
((1-dy) * ((1-dx)*jk + dx*j1k) + \
dy * ((1-dx)*jk1 + dx*j1k1))
......
......@@ -139,7 +139,6 @@ static IScissorsOptions *iscissors_options = NULL;
#define EPSILON 0.00001
/* functional defines */
#define SQR(x) ((x) * (x))
#define BILINEAR(jk,j1k,jk1,j1k1,dx,dy) \
((1-dy) * ((1-dx)*jk + dx*j1k) + \
dy * ((1-dx)*jk1 + dx*j1k1))
......
......@@ -43,7 +43,6 @@
#define TARGET_HEIGHT 15
#define TARGET_WIDTH 15
#define SQR(x) ((x) * (x))
#define EPSILON 0.00001
/* global variables--for use in the various paint tools */
......
......@@ -18,6 +18,12 @@ foreach (sort keys %plugins) {
$bins .= " \\\n";
}
$extra = "";
foreach (@extra) { $extra .= "\t$_\t\\\n" }
if ($extra) {
$extra =~ s/\t\\\n$//s;
$extra = "\t\\\n$extra";
}
foreach ($bins, $opts) { s/ \\\n$//s }
......@@ -26,7 +32,7 @@ libexecdir = \$(gimpplugindir)/plug-ins
EXTRA_DIST = \\
mkgen.pl \\
plugin-defs.pl
plugin-defs.pl$extra
AM_CPPFLAGS = \\
-DLOCALEDIR=\\""\$(localedir)"\\"
......
......@@ -116,3 +116,8 @@
'xwd' => { libdep => 'glib' },
'zealouscrop' => { libdep => 'glib' }
);
@extra = qw(
winclipboard.c
winprint.c
);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment