require python 2.2.1, so True and False are always there. Check for pygtk
2005-06-03 Manish Singh <yosh@gimp.org> * configure.in: require python 2.2.1, so True and False are always there. Check for pygtk codegen stuff, we'll be using that in the future. * plug-ins/pygimp/plug-ins/*.py: Use True and False instead of TRUE and FALSE.
This commit is contained in:

committed by
Manish Singh

parent
cfed1f28ea
commit
93490ae76b
@ -1,3 +1,12 @@
|
||||
2005-06-03 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* configure.in: require python 2.2.1, so True and False are always
|
||||
there. Check for pygtk codegen stuff, we'll be using that in the
|
||||
future.
|
||||
|
||||
* plug-ins/pygimp/plug-ins/*.py: Use True and False instead of
|
||||
TRUE and FALSE.
|
||||
|
||||
2005-06-03 Bill Skaggs <weskaggs@primate.ucdavis.edu>
|
||||
|
||||
* app/core/gimpitem-align.c
|
||||
|
12
configure.in
12
configure.in
@ -1349,12 +1349,22 @@ AC_ARG_ENABLE(python,
|
||||
|
||||
if test "x$enable_python" != xno; then
|
||||
dnl check for Python
|
||||
AM_PATH_PYTHON(2.2)
|
||||
AM_PATH_PYTHON(2.2.1)
|
||||
AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)])
|
||||
|
||||
dnl check for PyGTK
|
||||
PKG_CHECK_MODULES(PYGTK, pygtk-2.0 >= pygtk_required_version)
|
||||
|
||||
AC_PATH_PROG(PYGTK_CODEGEN, pygtk-codegen-2.0, no)
|
||||
if test "x$PYGTK_CODEGEN" = xno; then
|
||||
AC_MSG_ERROR(could not find pygtk-codegen-2.0 script)
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(for pygtk defs)
|
||||
PYGTK_DEFSDIR=`$PKG_CONFIG --variable=defsdir pygtk-2.0`
|
||||
AC_SUBST(PYGTK_DEFSDIR)
|
||||
AC_MSG_RESULT($PYGTK_DEFSDIR)
|
||||
|
||||
dnl enable -fno-strict-aliasing if compiler supports it
|
||||
PYGIMP_EXTRA_CFLAGS=
|
||||
case " $CFLAGS " in
|
||||
|
@ -50,7 +50,7 @@ def python_clothify(timg, tdrawable, bx=9, by=9,
|
||||
pdb.plug_in_c_astretch(img, bump_layer)
|
||||
pdb.plug_in_noisify(img, bump_layer, 0, 0.2, 0.2, 0.2, 0.2)
|
||||
pdb.plug_in_bump_map(img, tdrawable, bump_layer, azimuth,
|
||||
elevation, depth, 0, 0, 0, 0, TRUE, FALSE, 0)
|
||||
elevation, depth, 0, 0, 0, 0, True, False, 0)
|
||||
|
||||
gimp.delete(img)
|
||||
|
||||
|
@ -97,7 +97,7 @@ def python_colorxhtml(img, drawable, filename, raw_filename,
|
||||
else:
|
||||
data = list('X' * 80)
|
||||
|
||||
pr = drawable.get_pixel_rgn(0, 0, width, height, FALSE, FALSE)
|
||||
pr = drawable.get_pixel_rgn(0, 0, width, height, False, False)
|
||||
|
||||
gimp.progress_init("Saving '%s' as COLORXHTML..." % filename)
|
||||
|
||||
@ -189,7 +189,7 @@ register(
|
||||
(PF_FILE, "characters", "The filename to read or the characters to use",
|
||||
""),
|
||||
(PF_INT, "font_size", "The font size in pixels", 10),
|
||||
(PF_BOOL, "separate", "Separate CSS file", TRUE)
|
||||
(PF_BOOL, "separate", "Separate CSS file", True)
|
||||
],
|
||||
[],
|
||||
python_colorxhtml,
|
||||
|
@ -157,7 +157,7 @@ def get_guides(image):
|
||||
|
||||
class TableWriter:
|
||||
def __init__(self, filename, cellpadding=0, cellspacing=0, border=0,
|
||||
capitalize=FALSE):
|
||||
capitalize=False):
|
||||
self.table_attrs = {}
|
||||
|
||||
self.table_attrs['cellpadding'] = cellpadding
|
||||
@ -221,9 +221,9 @@ register(
|
||||
(PF_STRING, "html_filename", "Filename to export", "py-slice.html"),
|
||||
(PF_STRING, "image_basename", "What to call the images", "pyslice"),
|
||||
(PF_RADIO, "image_extension", "The format of the images: {gif, jpg, png}", "gif", (("gif", "gif"), ("jpg", "jpg"), ("png", "png"))),
|
||||
(PF_TOGGLE, "separate_image_dir", "Use a separate directory for images?", FALSE),
|
||||
(PF_TOGGLE, "separate_image_dir", "Use a separate directory for images?", False),
|
||||
(PF_STRING, "relative_image_path", "The path to export the images to, relative to the Save Path", "images/"),
|
||||
(PF_TOGGLE, "capitalize_tags", "Capitalize HTML tags?", FALSE),
|
||||
(PF_TOGGLE, "capitalize_tags", "Capitalize HTML tags?", False),
|
||||
(PF_SPINNER, "cellspacing", "Add space between the table elements", 0, (0,15,1))
|
||||
],
|
||||
[],
|
||||
|
@ -24,21 +24,21 @@ def shadow_bevel(img, drawable, blur, bevel, do_shadow, drop_x, drop_y):
|
||||
img.undo_group_start()
|
||||
|
||||
# copy the layer
|
||||
shadow = drawable.copy(TRUE)
|
||||
shadow = drawable.copy(True)
|
||||
img.add_layer(shadow, img.layers.index(drawable)+1)
|
||||
shadow.name = drawable.name + " shadow"
|
||||
shadow.preserve_trans = FALSE
|
||||
shadow.preserve_trans = False
|
||||
|
||||
# threshold the shadow layer to all white
|
||||
pdb.gimp_threshold(shadow, 0, 255)
|
||||
|
||||
# blur the shadow layer
|
||||
pdb.plug_in_gauss_iir(img, shadow, blur, TRUE, TRUE)
|
||||
pdb.plug_in_gauss_iir(img, shadow, blur, True, True)
|
||||
|
||||
# do the bevel thing ...
|
||||
if bevel:
|
||||
pdb.plug_in_bump_map(img, drawable, shadow, 135, 45, 3,
|
||||
0, 0, 0, 0, TRUE, FALSE, 0)
|
||||
0, 0, 0, 0, True, False, 0)
|
||||
|
||||
# make the shadow layer black now ...
|
||||
pdb.gimp_invert(shadow)
|
||||
@ -64,8 +64,8 @@ register(
|
||||
"RGBA, GRAYA",
|
||||
[
|
||||
(PF_SLIDER, "blur", "Shadow blur", 6, (1, 30, 1)),
|
||||
(PF_BOOL, "bevel", "Bevel the image", TRUE),
|
||||
(PF_BOOL, "shadow", "Make a drop shadow", TRUE),
|
||||
(PF_BOOL, "bevel", "Bevel the image", True),
|
||||
(PF_BOOL, "shadow", "Make a drop shadow", True),
|
||||
(PF_INT, "drop_x", "Drop shadow X displacement", 3),
|
||||
(PF_INT, "drop_y", "Drop shadow Y displacement", 6)
|
||||
],
|
||||
|
@ -70,14 +70,14 @@ def python_sphere(radius, light, shadow, bg_colour, sphere_colour):
|
||||
shadow_w = -shadow_w
|
||||
|
||||
pdb.gimp_ellipse_select(img, shadow_x, shadow_y, shadow_w, shadow_h,
|
||||
CHANNEL_OP_REPLACE, TRUE, TRUE, 7.5)
|
||||
CHANNEL_OP_REPLACE, True, True, 7.5)
|
||||
pdb.gimp_edit_bucket_fill(drawable, BG_BUCKET_FILL,
|
||||
MULTIPLY_MODE, 100, 0, FALSE, 0, 0)
|
||||
MULTIPLY_MODE, 100, 0, False, 0, 0)
|
||||
|
||||
pdb.gimp_ellipse_select(img, cx - radius, cy - radius, 2 * radius,
|
||||
2 * radius, CHANNEL_OP_REPLACE, TRUE, FALSE, 0)
|
||||
2 * radius, CHANNEL_OP_REPLACE, True, False, 0)
|
||||
pdb.gimp_edit_blend(drawable, FG_BG_RGB_MODE, NORMAL_MODE, GRADIENT_RADIAL,
|
||||
100, offset, REPEAT_NONE, FALSE, FALSE, 0, 0, TRUE,
|
||||
100, offset, REPEAT_NONE, False, False, 0, 0, True,
|
||||
light_x, light_y, light_end_x, light_end_y)
|
||||
|
||||
pdb.gimp_selection_none(img)
|
||||
|
@ -54,7 +54,7 @@ class pixel_fetcher:
|
||||
rowoff = y % self.tile_height
|
||||
|
||||
if col != self.col or row != self.row or self.tile == None:
|
||||
self.tile = self.drawable.get_tile(FALSE, row, col)
|
||||
self.tile = self.drawable.get_tile(False, row, col)
|
||||
self.col = col
|
||||
self.row = row
|
||||
return self.tile[coloff, rowoff]
|
||||
@ -97,7 +97,7 @@ def python_whirl_pinch(image, drawable, whirl, pinch, radius):
|
||||
|
||||
whirl = whirl * math.pi / 180
|
||||
dest_rgn = drawable.get_pixel_rgn(self.sel_x1, self.sel_y1,
|
||||
self.sel_w, self.sel_h, TRUE, TRUE)
|
||||
self.sel_w, self.sel_h, True, True)
|
||||
pft = pixel_fetcher(drawable)
|
||||
pfb = pixel_fetcher(drawable)
|
||||
bg_colour = gimp.get_background()
|
||||
@ -159,7 +159,7 @@ def python_whirl_pinch(image, drawable, whirl, pinch, radius):
|
||||
progress = progress + self.sel_w * 2
|
||||
gimp.progress_update(float(progress) / max_progress)
|
||||
drawable.flush()
|
||||
drawable.merge_shadow(TRUE)
|
||||
drawable.merge_shadow(True)
|
||||
drawable.update(self.sel_x1,self.sel_y1,self.sel_w,self.sel_h)
|
||||
|
||||
def calc_undistorted_coords(self, wx, wy, whirl, pinch, radius):
|
||||
|
Reference in New Issue
Block a user