rem
stringlengths
1
322k
add
stringlengths
0
2.05M
context
stringlengths
4
228k
meta
stringlengths
156
215
pdb.gimp_file_save(temp_image, temp_image.active_layer, filename, filename)
if image_extension == "gif" and image.base_type == RGB: pdb.gimp_image_convert_indexed (temp_image,NO_DITHER, MAKE_PALETTE, 255, True, False, False) if image_extension == "jpg" and image.base_type == INDEXED: pdb.gimp_image_convert_rgb (temp_image) pdb.gimp_file_save(temp_image, temp_drawable, filename, filename)
def slice(image, image_path, image_basename, image_extension, left, right, top, bottom, i, j): src = "%s-%d-%d.%s" % (image_basename, i, j, image_extension) filename = os.path.join(image_path, src) temp_image = image.duplicate() temp_image.disable_undo() temp_image.crop(right - left, bottom - top, left, top) pdb.gim...
98a11508ee7ce705e2061e739b1a77ec9b6008b1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/98a11508ee7ce705e2061e739b1a77ec9b6008b1/py-slice.py
def slice(image, image_path, image_basename, image_extension, left, right, top, bottom, i, j): src = "%s-%d-%d.%s" % (image_basename, i, j, image_extension) filename = os.path.join(image_path, src) temp_image = image.duplicate() temp_image.disable_undo() temp_image.crop(right - left, bottom - top, left, top) pdb.gim...
98a11508ee7ce705e2061e739b1a77ec9b6008b1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/98a11508ee7ce705e2061e739b1a77ec9b6008b1/py-slice.py
capitalize=False):
animate=False): self.filename = filename
def __init__(self, filename, cellpadding=0, cellspacing=0, border=0, capitalize=False): self.table_attrs = {}
98a11508ee7ce705e2061e739b1a77ec9b6008b1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/98a11508ee7ce705e2061e739b1a77ec9b6008b1/py-slice.py
self.capitalize = capitalize self.html = file(filename, 'w')
self.image_prefix = os.path.basename (filename) self.image_prefix = self.image_prefix.split(".")[0] self.image_prefix = self.image_prefix.replace ("-", "_") self.image_prefix = self.image_prefix.replace (" ", "_") if animate: self.animate = True self.images = [] else: self.animate = False if os.path.exists (filename...
def __init__(self, filename, cellpadding=0, cellspacing=0, border=0, capitalize=False): self.table_attrs = {}
98a11508ee7ce705e2061e739b1a77ec9b6008b1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/98a11508ee7ce705e2061e739b1a77ec9b6008b1/py-slice.py
if self.capitalize: s = s.upper() s = s.replace('%S', '%s') else: s = s.lower()
def write(self, s, vals=None): if self.capitalize: s = s.upper() s = s.replace('%S', '%s') else: s = s.lower()
98a11508ee7ce705e2061e739b1a77ec9b6008b1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/98a11508ee7ce705e2061e739b1a77ec9b6008b1/py-slice.py
out = '<table'
out = '''<!--HTML SNIPPET GENERATED BY THE GIMP WARNING!! This is NOT a fully valid HTML document, it is rather a piece of HTML generated by the GIMP's py-slice plugin that should be embedded in an HTML or XHTML document to be valid. Replace the href targets in the anchor (<a >) for your URLS to have it working as a ...
def open(self): out = '<table'
98a11508ee7ce705e2061e739b1a77ec9b6008b1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/98a11508ee7ce705e2061e739b1a77ec9b6008b1/py-slice.py
out += ' %s=%s' % (attr, value)
out += ' %s="%s"' % (attr, value)
def open(self): out = '<table'
98a11508ee7ce705e2061e739b1a77ec9b6008b1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/98a11508ee7ce705e2061e739b1a77ec9b6008b1/py-slice.py
self.write('</table>') self.html.close()
self.write('</table>\n') prefix = self.image_prefix if self.animate: out = """ <script language="javascript" type="text/javascript"> /* Made with The GIMP */ /* Preload images: */ images_%s = new Array(); \n""" % prefix for image in self.images: for type_ in ("plain", "hover", "clicked"): if image.has_key(type_): i...
def close(self): self.write('</table>') self.html.close()
98a11508ee7ce705e2061e739b1a77ec9b6008b1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/98a11508ee7ce705e2061e739b1a77ec9b6008b1/py-slice.py
self.write('\t<tr>')
self.write(' <tr>')
def row_start(self): self.write('\t<tr>')
98a11508ee7ce705e2061e739b1a77ec9b6008b1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/98a11508ee7ce705e2061e739b1a77ec9b6008b1/py-slice.py
self.write('\t</tr>') def cell(self, src, width, height): out = ('\t\t<td><img alt=" " src="%%s" width="%d" height="%d"></td>' % (width, height)) self.write(out, src)
self.write('</tr>\n') def cell(self, src, width, height, row=0, col=0, skip_stub = False): if isinstance (src, list): prefix = "images_%s" % self.image_prefix self.images.append ({"index" : (row, col), "plain" : src[0]}) out = (' <td><a href="%s"><img alt="" src="%s" ' + 'style="width: %dpx; height: %dpx; border-w...
def row_end(self): self.write('\t</tr>')
98a11508ee7ce705e2061e739b1a77ec9b6008b1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/98a11508ee7ce705e2061e739b1a77ec9b6008b1/py-slice.py
"Guillotine implemented ala python, with html output (based on perlotine by Seth Burgess)", "Add guides to an image. Then run this. It will cut along the guides, and give you the html to reassemble the resulting images.",
"""Cuts an image along its guides and save subimages and a HTML \ table snippet. If "generate javascript..." is enabled, the 3 topmost visible \ layers are used as clicked, mouse over and normal views.""", """Add guides to an image. Then run this. It will cut along the guides, and give you the html to reassemble the r...
def cell(self, src, width, height): out = ('\t\t<td><img alt=" " src="%%s" width="%d" height="%d"></td>' % (width, height)) self.write(out, src)
98a11508ee7ce705e2061e739b1a77ec9b6008b1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/98a11508ee7ce705e2061e739b1a77ec9b6008b1/py-slice.py
(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_STRING, "relative_image_path", "The path to export the images to, relative to the Save Path", "images...
(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_STRING, "relative_image_path", "The path where to export the" + " images, relative to the Save Path",...
def cell(self, src, width, height): out = ('\t\t<td><img alt=" " src="%%s" width="%d" height="%d"></td>' % (width, height)) self.write(out, src)
98a11508ee7ce705e2061e739b1a77ec9b6008b1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/98a11508ee7ce705e2061e739b1a77ec9b6008b1/py-slice.py
print 'void %s(GimpCompositeContext *);' % (function_table[key][0])
print 'GimpCompositeFunction %s();' % (function_table[key][0])
def print_function_table(filename, function_table): function_table_declarations = dict() function_table_keys = function_table.keys() function_table_keys.sort() for key in function_table_keys: if not function_table_declarations.has_key(function_table[key][0]): print 'void %s(GimpCompositeContext *);' % (function_tabl...
f5e839a39c751867051e44f224ab9ad5de4a6598 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/f5e839a39c751867051e44f224ab9ad5de4a6598/make-gimp-composite-dispatch.py
print 'extern void %s(GimpCompositeContext *);' % ("gimp_composite_unsupported")
print 'extern GimpCompositeFunction %s();' % ("gimp_composite_unsupported")
def main(argv): objects = map(ns.nmx, argv) objs = objects objs.reverse() gimp_composite_function = dict() for o in objs: for mode in composite_modes: for A in filter(lambda pf: pf != "GIMP_PIXELFORMAT_ANY", pixel_format): for B in filter(lambda pf: pf != "GIMP_PIXELFORMAT_ANY", pixel_format): for D in filter(lambda...
f5e839a39c751867051e44f224ab9ad5de4a6598 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/f5e839a39c751867051e44f224ab9ad5de4a6598/make-gimp-composite-dispatch.py
print 'extern void %s(GimpCompositeContext *);' % (f[0])
print 'extern GimpCompositeFunction %s();' % (f[0])
def main(argv): objects = map(ns.nmx, argv) objs = objects objs.reverse() gimp_composite_function = dict() for o in objs: for mode in composite_modes: for A in filter(lambda pf: pf != "GIMP_PIXELFORMAT_ANY", pixel_format): for B in filter(lambda pf: pf != "GIMP_PIXELFORMAT_ANY", pixel_format): for D in filter(lambda...
f5e839a39c751867051e44f224ab9ad5de4a6598 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/f5e839a39c751867051e44f224ab9ad5de4a6598/make-gimp-composite-dispatch.py
print 'extern GimpCompositeFunction %s;' % ("gimp_composite_unsupported")
print 'extern GimpCompositeFunction %s();' % ("gimp_composite_unsupported")
print >>fpout, 'typedef GimpCompositeFunction (*GimpCompositeFunctionTable[%s][%s][%s][%s]);' % ("GIMP_COMPOSITE_N", "GIMP_PIXELFORMAT_N", "GIMP_PIXELFORMAT_N", "GIMP_PIXELFORMAT_N")
f5e839a39c751867051e44f224ab9ad5de4a6598 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/f5e839a39c751867051e44f224ab9ad5de4a6598/make-gimp-composite-dispatch.py
op.add_option('-n', '--n-pixels', action='store', type="int", dest='n_pixels', default=128*8192+16+1,
op.add_option('-n', '--n-pixels', action='store', type="int", dest='n_pixels', default=1024*8192+16+1,
def gimp_composite_cfile(fpout, name, function_table, requirements=[]): print >>fpout, '/* THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT */' print >>fpout, '/* REGENERATE BY USING make-installer.py */' print >>fpout, '#include "config.h"' print >>fpout, '#include <glib-object.h>' print >>fpout, '#include <stdlib.h...
bac9cfa0830cc1b62027185c2d2c81cac3b5ffdb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/bac9cfa0830cc1b62027185c2d2c81cac3b5ffdb/make-installer.py
bounds[2], bounds[2])
bounds[2], 0)
def __init__(self, default=0, bounds=(0, 100, 5)): self.adj = gtk.Adjustment(default, bounds[0], bounds[1], bounds[2], bounds[2], bounds[2]) gtk.HScale.__init__(self, self.adj)
f499a2aacdab9ed0718af496e8d67a2db047c5a5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/f499a2aacdab9ed0718af496e8d67a2db047c5a5/gimpfu.py
bounds[2], bounds[2])
bounds[2], 0)
def __init__(self, default=0, bounds=(0, 100, 5)): self.adj = gtk.Adjustment(default, bounds[0], bounds[1], bounds[2], bounds[2], bounds[2]) gtk.SpinButton.__init__(self, self.adj, 1, 0)
f499a2aacdab9ed0718af496e8d67a2db047c5a5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/f499a2aacdab9ed0718af496e8d67a2db047c5a5/gimpfu.py
(PF_SLIDER, "light", "light angle", 45, (0,360,1)), (PF_TOGGLE, "shadow", "shadow?", 1), (PF_COLOR, "bg_colour", "background", (255,255,255)), (PF_COLOR, "sphere_colour", "sphere", (255,0,0))
(PF_SLIDER, "light", "Light angle", 45, (0,360,1)), (PF_TOGGLE, "shadow", "Shadow?", 1), (PF_COLOR, "bg_colour", "Background", (255,255,255)), (PF_COLOR, "sphere_colour", "Sphere", (255,0,0))
def python_sphere(radius, light, shadow, bg_colour, sphere_colour): if radius < 1: radius = 1 width = int(radius * 3.75) height = int(radius * 2.5) img = gimp.Image(width, height, RGB) drawable = gimp.Layer(img, "Sphere Layer", width, height, RGB_IMAGE, 100, NORMAL_MODE) radians = light * math.pi / 180 cx = width ...
e7a14aaa7119fd587a4c0058caafa55b9365c102 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/e7a14aaa7119fd587a4c0058caafa55b9365c102/sphere.py
(PF_STRING, "save_path", "The path to export the HTML to", os.getcwd()),
(PF_DIRNAME, "save_path", "The path to export the HTML to", os.getcwd()),
def parse_urls (self): """ This will parse any url targets in the href="XX" fields of the given file and return then as a list """ import re url_list = [] try: html_file = open (self.filename) #Regular expression to pick everything up to the next doublequote #character after finding the sequence 'href="'. The found ...
3f1dd8ace4366c5288589187bd8690b2ec8356e4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/3f1dd8ace4366c5288589187bd8690b2ec8356e4/py-slice.py
if run_mode != RUN_NONINTERACTIVE: gimp.displays_flush()
if run_mode != RUN_NONINTERACTIVE: gimp.displays_flush() return res
def _run(func_name, params): run_mode = params[0] plugin_type = _registered_plugins_[func_name][7] menupath = _registered_plugins_[func_name][5] func = _registered_plugins_[func_name][10] if plugin_type == PLUGIN and menupath[:10] != '<Toolbox>/': if menupath[:7] == '<Save>/': end = 5 else: end = 3 start_params = par...
a63a2e86d67bb4c32a4e720674d448dca87dc94b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/a63a2e86d67bb4c32a4e720674d448dca87dc94b/gimpfu.py
image = pdb.gimp_file_load (RUN_NONINTERACTIVE, image_name, image_name)
image = pdb.gimp_file_load (image_name, image_name)
def benchmark (folder, save_output): folder = os.path.abspath (folder) if not os.path.exists (folder): gimp.message("Folder '" + folder + "' doesn't exist.\n") return; total_unclassified = 0 total_misclassified = 0 total_time = 0.0 images = os.path.join (folder, "images") for name in os.listdir (images): try: gimp.d...
73d324225c2e6ad1d9cd333b71543790e8e7fb32 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/73d324225c2e6ad1d9cd333b71543790e8e7fb32/benchmark-foreground-extract.py
mask = pdb.gimp_file_load (RUN_NONINTERACTIVE, mask_name, mask_name)
mask = pdb.gimp_file_load (mask_name, mask_name)
def benchmark (folder, save_output): folder = os.path.abspath (folder) if not os.path.exists (folder): gimp.message("Folder '" + folder + "' doesn't exist.\n") return; total_unclassified = 0 total_misclassified = 0 total_time = 0.0 images = os.path.join (folder, "images") for name in os.listdir (images): try: gimp.d...
73d324225c2e6ad1d9cd333b71543790e8e7fb32 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/73d324225c2e6ad1d9cd333b71543790e8e7fb32/benchmark-foreground-extract.py
truth = pdb.gimp_file_load (RUN_NONINTERACTIVE, truth_name, truth_name)
truth = pdb.gimp_file_load (truth_name, truth_name)
def benchmark (folder, save_output): folder = os.path.abspath (folder) if not os.path.exists (folder): gimp.message("Folder '" + folder + "' doesn't exist.\n") return; total_unclassified = 0 total_misclassified = 0 total_time = 0.0 images = os.path.join (folder, "images") for name in os.listdir (images): try: gimp.d...
73d324225c2e6ad1d9cd333b71543790e8e7fb32 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/73d324225c2e6ad1d9cd333b71543790e8e7fb32/benchmark-foreground-extract.py
pdb.gimp_file_save (RUN_NONINTERACTIVE, mask, mask_layer, filename, filename)
pdb.gimp_file_save (mask, mask_layer, filename, filename)
def benchmark (folder, save_output): folder = os.path.abspath (folder) if not os.path.exists (folder): gimp.message("Folder '" + folder + "' doesn't exist.\n") return; total_unclassified = 0 total_misclassified = 0 total_time = 0.0 images = os.path.join (folder, "images") for name in os.listdir (images): try: gimp.d...
73d324225c2e6ad1d9cd333b71543790e8e7fb32 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/73d324225c2e6ad1d9cd333b71543790e8e7fb32/benchmark-foreground-extract.py
if len(vert) == 0 or len(horz) == 0:
if len(vert) == 0 and len(horz) == 0:
def pyslice(image, drawable, save_path, html_filename, image_basename, image_extension, separate, image_path, capitalize, cellspacing): vert, horz = get_guides(image) if len(vert) == 0 or len(horz) == 0: return gimp.progress_init("Py-Slice") progress_increment = 1 / ((len(horz) + 1) * (len(vert) + 1)) progress = 0.0...
7ef0073577d4ef91cfdcfda1445908f21e753ec5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/7ef0073577d4ef91cfdcfda1445908f21e753ec5/py-slice.py
if not os.path.isdir(path):
if not os.path.exists(path):
def check_path(path): path = os.path.abspath(path)
7ef0073577d4ef91cfdcfda1445908f21e753ec5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/7ef0073577d4ef91cfdcfda1445908f21e753ec5/py-slice.py
tw.cell(src, right - left, bottom - top)
if image_relative_path: if image_relative_path.endswith('/'): src_path = image_relative_path + src else: src_path = image_relative_path + '/' + src else: src_path = src tw.cell(src_path, right - left, bottom - top)
def check_path(path): path = os.path.abspath(path)
7ef0073577d4ef91cfdcfda1445908f21e753ec5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/7ef0073577d4ef91cfdcfda1445908f21e753ec5/py-slice.py
(PF_STRING, "save_path", "The path to export the HTML to", "/tmp"),
(PF_STRING, "save_path", "The path to export the HTML to", os.getcwd()),
def cell(self, src, width, height): out = ('\t\t<td><img alt=" " src="%%s" width="%d" height="%d"></td>' % (width, height)) self.write(out, src)
7ef0073577d4ef91cfdcfda1445908f21e753ec5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/7ef0073577d4ef91cfdcfda1445908f21e753ec5/py-slice.py
self.selected = default children = self.menu.children() for child in range(len(children)): if children[child].get_data("Gimp-ID") == default: self.set_history(child) break
if default == None: self.selected = self.menu.children()[0].get_data("Gimp-ID") self.set_history (0) else: self.selected = default children = self.menu.children() for child in range(len(children)): if children[child].get_data("Gimp-ID") == default: self.set_history(child) break
def __init__(self, default=None): gtk.OptionMenu.__init__(self) self.menu = ImageMenu(None, self.clicked) self.set_menu(self.menu) self.selected = default children = self.menu.children() for child in range(len(children)): if children[child].get_data("Gimp-ID") == default: self.set_history(child) break
ed0ff9f51947e99429f4ee8e045e0cf67f3109ff /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/ed0ff9f51947e99429f4ee8e045e0cf67f3109ff/gimpui.py
self.selected = default children = self.menu.children() for child in range(len(children)): if children[child].get_data("Gimp-ID") == default: self.set_history(child) break
if default == None: self.selected = self.menu.children()[0].get_data("Gimp-ID") self.set_history (0) else: self.selected = default children = self.menu.children() for child in range(len(children)): if children[child].get_data("Gimp-ID") == default: self.set_history(child) break
def __init__(self, default=None): gtk.OptionMenu.__init__(self) self.menu = LayerMenu(None, self.clicked) self.set_menu(self.menu) self.selected = default children = self.menu.children() for child in range(len(children)): if children[child].get_data("Gimp-ID") == default: self.set_history(child) break
ed0ff9f51947e99429f4ee8e045e0cf67f3109ff /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/ed0ff9f51947e99429f4ee8e045e0cf67f3109ff/gimpui.py
self.selected = default children = self.menu.children() for child in range(len(children)): if children[child].get_data("Gimp-ID") == default: self.set_history(child) break
if default == None: self.selected = self.menu.children()[0].get_data("Gimp-ID") self.set_history (0) else: self.selected = default children = self.menu.children() for child in range(len(children)): if children[child].get_data("Gimp-ID") == default: self.set_history(child) break
def __init__(self, default=None): gtk.OptionMenu.__init__(self) self.menu = ChannelMenu(None, self.clicked) self.set_menu(self.menu) self.selected = default children = self.menu.children() for child in range(len(children)): if children[child].get_data("Gimp-ID") == default: self.set_history(child) break
ed0ff9f51947e99429f4ee8e045e0cf67f3109ff /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/ed0ff9f51947e99429f4ee8e045e0cf67f3109ff/gimpui.py
self.selected = default children = self.menu.children() for child in range(len(children)): if children[child].get_data("Gimp-ID") == default: self.set_history(child) break
if default == None: self.selected = self.menu.children()[0].get_data("Gimp-ID") self.set_history (0) else: self.selected = default children = self.menu.children() for child in range(len(children)): if children[child].get_data("Gimp-ID") == default: self.set_history(child) break
def __init__(self, default=None): gtk.OptionMenu.__init__(self) self.menu = DrawableMenu(None, self.clicked) self.set_menu(self.menu) self.selected = default children = self.menu.children() for child in range(len(children)): if children[child].get_data("Gimp-ID") == default: self.set_history(child) break
ed0ff9f51947e99429f4ee8e045e0cf67f3109ff /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/ed0ff9f51947e99429f4ee8e045e0cf67f3109ff/gimpui.py
"Evaulate python code under the python interpreter (primarily for batch mode)",
"Evaluate python code under the python interpreter (primarily for batch mode)",
def code_eval(code): if code == '-': import sys code = sys.stdin exec code
50a8cde19adbe88bac9379ab271a6d77d5a034ba /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/50a8cde19adbe88bac9379ab271a6d77d5a034ba/happy-valley-relief.py
items.append((img.filename, img))
if not img.filename: filename = img.name else: filename = img.filename items.append((filename, img))
def ImageMenu(constraint=None, callback=None, data=None): items = [] for img in gimp.image_list(): if constraint and not constraint(img): continue items.append((img.filename, img)) items.sort() return _createMenu(items, callback, data)
027a85b17b937a3cc7d71d7f09eb0da9a278c2c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/027a85b17b937a3cc7d71d7f09eb0da9a278c2c9/gimpui.py
print "/* $Id$ */"
print ' print ' print '
def gimp_composite_init(function_tables): for o in function_tables: print "extern void %s_init();" % (functionnameify(o[0])) pass print "" print """
9bad7d216b887f3a71bf64a90323e8674a69453e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/9bad7d216b887f3a71bf64a90323e8674a69453e/make-gimp-composite-dispatch.py
dlg.format_secondary_text( "".join( traceback.format_exception_only(sys.exc_type, sys.exc_value) ) )
dlg.format_secondary_text(exc_only_str)
def error_dialog(parent, proc_name): import sys, traceback title = _("An error occured running %s") % proc_name dlg = gtk.MessageDialog(parent, gtk.DIALOG_DESTROY_WITH_PARENT, gtk.MESSAGE_ERROR, gtk.BUTTONS_CLOSE, title) dlg.format_secondary_text( "".join( traceback.format_exception_only(sys.exc_type, sys.exc_value) ) ...
a8855ae6327fe2c22913a5cf6a6bfb2a8d05f544 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/a8855ae6327fe2c22913a5cf6a6bfb2a8d05f544/gimpfu.py
label = gtk.Label(traceback.format_exc());
label = gtk.Label(exc_str)
def error_dialog(parent, proc_name): import sys, traceback title = _("An error occured running %s") % proc_name dlg = gtk.MessageDialog(parent, gtk.DIALOG_DESTROY_WITH_PARENT, gtk.MESSAGE_ERROR, gtk.BUTTONS_CLOSE, title) dlg.format_secondary_text( "".join( traceback.format_exception_only(sys.exc_type, sys.exc_value) ) ...
a8855ae6327fe2c22913a5cf6a6bfb2a8d05f544 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/a8855ae6327fe2c22913a5cf6a6bfb2a8d05f544/gimpfu.py
self.set_active(default) def get_value(self): return self.get_active()
self.set_active_image(default) def get_value(self): return self.get_active_image()
def __init__(self, default=None): ImageComboBox.__init__(self) if default is not None: self.set_active(default)
473c0c010fbd5f64db7cacfcafad21b38dae50ae /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/473c0c010fbd5f64db7cacfcafad21b38dae50ae/gimpui.py
self.set_active(default) def get_value(self): return self.get_active()
self.set_active_layer(default) def get_value(self): return self.get_active_layer()
def __init__(self, default=None): LayerComboBox.__init__(self) if default is not None: self.set_active(default)
473c0c010fbd5f64db7cacfcafad21b38dae50ae /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/473c0c010fbd5f64db7cacfcafad21b38dae50ae/gimpui.py
self.set_active(default) def get_value(self): return self.get_active()
self.set_active_channel(default) def get_value(self): return self.get_active_channel()
def __init__(self, default=None): ChannelComboBox.__init__(self) if default is not None: self.set_active(default)
473c0c010fbd5f64db7cacfcafad21b38dae50ae /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/473c0c010fbd5f64db7cacfcafad21b38dae50ae/gimpui.py
self.set_active(default) def get_value(self): return self.get_active()
self.set_active_drawable(default) def get_value(self): return self.get_active_drawable()
def __init__(self, default=None): DrawableComboBox.__init__(self) if default is not None: self.set_active(default)
473c0c010fbd5f64db7cacfcafad21b38dae50ae /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/473c0c010fbd5f64db7cacfcafad21b38dae50ae/gimpui.py
self.set_active(default) def get_value(self): return self.get_active()
self.set_active_vectors(default) def get_value(self): return self.get_active_vectors()
def __init__(self, default=None): VectorsComboBox.__init__(self) if default is not None: self.set_active(default)
473c0c010fbd5f64db7cacfcafad21b38dae50ae /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/473c0c010fbd5f64db7cacfcafad21b38dae50ae/gimpui.py
features.append('cpu & CPU_ACCEL_%s' % f)
features.append('cpu & GIMP_CPU_ACCEL_%s' % f)
def gimp_composite_installer_install3(fpout, name, requirements=[], cpu_feature=[]): if not requirements and not cpu_feature: return print >>fpout, '' print >>fpout, 'gboolean' print >>fpout, '%s_init (void)' % (functionnameify(name)) print >>fpout, '{' need_endif = False for r in requirements: print >>fpout, '#if %...
db75625d273fe1088bcb6f28c77fbbf9143769ad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/db75625d273fe1088bcb6f28c77fbbf9143769ad/make-installer.py
print >>fpout, ' guint32 cpu = cpu_accel ();'
print >>fpout, ' GimpCpuAccelFlags cpu = gimp_cpu_accel_get_support ();'
def gimp_composite_installer_install3(fpout, name, requirements=[], cpu_feature=[]): if not requirements and not cpu_feature: return print >>fpout, '' print >>fpout, 'gboolean' print >>fpout, '%s_init (void)' % (functionnameify(name)) print >>fpout, '{' need_endif = False for r in requirements: print >>fpout, '#if %...
db75625d273fe1088bcb6f28c77fbbf9143769ad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/db75625d273fe1088bcb6f28c77fbbf9143769ad/make-installer.py
feature_test = 'cpu_accel () & CPU_ACCEL_%s' % cpu_feature[0]
feature_test = 'gimp_cpu_accel_get_support () & GIMP_CPU_ACCEL_%s' % cpu_feature[0]
def gimp_composite_installer_install3(fpout, name, requirements=[], cpu_feature=[]): if not requirements and not cpu_feature: return print >>fpout, '' print >>fpout, 'gboolean' print >>fpout, '%s_init (void)' % (functionnameify(name)) print >>fpout, '{' need_endif = False for r in requirements: print >>fpout, '#if %...
db75625d273fe1088bcb6f28c77fbbf9143769ad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/db75625d273fe1088bcb6f28c77fbbf9143769ad/make-installer.py
print >>fpout, '
def gimp_composite_cfile(fpout, name, function_table, requirements=[], cpu_feature=[]): print >>fpout, '/* THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT */' print >>fpout, '/* REGENERATE BY USING make-installer.py */' print >>fpout, '#include "config.h"' print >>fpout, '#include <glib-object.h>' print >>fpout, '#i...
db75625d273fe1088bcb6f28c77fbbf9143769ad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/db75625d273fe1088bcb6f28c77fbbf9143769ad/make-installer.py
if cpu_feature: print >>fpout, '
def gimp_composite_cfile(fpout, name, function_table, requirements=[], cpu_feature=[]): print >>fpout, '/* THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT */' print >>fpout, '/* REGENERATE BY USING make-installer.py */' print >>fpout, '#include "config.h"' print >>fpout, '#include <glib-object.h>' print >>fpout, '#i...
db75625d273fe1088bcb6f28c77fbbf9143769ad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/db75625d273fe1088bcb6f28c77fbbf9143769ad/make-installer.py
def get_value(self): return self.selected
9396fb5b6609afc5f2bbe1d5c2eb54424e5b9330 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/9396fb5b6609afc5f2bbe1d5c2eb54424e5b9330/gimpui.py
self.entry = gtk.Entry() self.pack_start(self.entry) self.entry.show() self.button = gtk.Button("...") self.button.connect("clicked", self.show_dialog) self.pack_start(self.button, expand=False)
self.button = gtk.FileChooserButton("Pick a file") self.pack_start(self.button, False, False, 6) self.button.set_filename (default)
def __init__(self, default=""): gtk.HBox.__init__(self, False, 5) self.entry = gtk.Entry() self.pack_start(self.entry) self.entry.show() self.button = gtk.Button("...") self.button.connect("clicked", self.show_dialog) self.pack_start(self.button, expand=False) self.button.show()
9396fb5b6609afc5f2bbe1d5c2eb54424e5b9330 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/9396fb5b6609afc5f2bbe1d5c2eb54424e5b9330/gimpui.py
self.dialog = gtk.FileSelection("Files") self.dialog.set_default_size(400, 300) def delete_event(win, event): win.hide() return True self.dialog.connect("delete_event", delete_event) self.dialog.set_filename(default) self.selected = self.dialog.get_filename() self.entry.set_text(self.selected)
def __init__(self, default=""): gtk.HBox.__init__(self, False, 5) self.entry = gtk.Entry() self.pack_start(self.entry) self.entry.show() self.button = gtk.Button("...") self.button.connect("clicked", self.show_dialog) self.pack_start(self.button, expand=False) self.button.show()
9396fb5b6609afc5f2bbe1d5c2eb54424e5b9330 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/9396fb5b6609afc5f2bbe1d5c2eb54424e5b9330/gimpui.py
print 'static int gimp_composite_initialised = 0;' print 'void' print 'gimp_composite_init()' print '{' print 'if (!gimp_composite_initialised) {' for o in objects: print ' %s_init();' % (functionnameify(o.filename)) pass print ' gimp_composite_initialised = 1;' print ' }' print '}'
def main(argv): objects = map(ns.nmx, argv) objs = objects objs.reverse() gimp_composite_function = dict() for o in objs: for mode in composite_modes: for A in filter(lambda pf: pf != "GIMP_PIXELFORMAT_ANY", pixel_format): for B in filter(lambda pf: pf != "GIMP_PIXELFORMAT_ANY", pixel_format): for D in filter(lambda...
9e3bd94760fbc10b227bced10aaabde7049cf9e8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/9e3bd94760fbc10b227bced10aaabde7049cf9e8/make-gimp-composite-dispatch.py
print 'static int gimp_composite_initialised = 0;' print ''
def gimp_composite_init(function_tables): for o in function_tables: print 'extern void %s_init();' % (functionnameify(o[0])) pass print '' print 'static int gimp_composite_initialised = 0;' print '' print 'void' print 'gimp_composite_init()' print '{' print ' if (!gimp_composite_initialised) {' for o in function_tab...
9e3bd94760fbc10b227bced10aaabde7049cf9e8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/9e3bd94760fbc10b227bced10aaabde7049cf9e8/make-gimp-composite-dispatch.py
print ' if (!gimp_composite_initialised) {'
print ' char *p;' print '' print ' if ((p = getenv("GIMP_COMPOSITE"))) {' print ' gimp_composite_options.use = atol(p);' print ' g_printerr("Using new image composite functions\n");' print ' }' print '' print ' if (!gimp_composite_options.initialised) {'
def gimp_composite_init(function_tables): for o in function_tables: print 'extern void %s_init();' % (functionnameify(o[0])) pass print '' print 'static int gimp_composite_initialised = 0;' print '' print 'void' print 'gimp_composite_init()' print '{' print ' if (!gimp_composite_initialised) {' for o in function_tab...
9e3bd94760fbc10b227bced10aaabde7049cf9e8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/9e3bd94760fbc10b227bced10aaabde7049cf9e8/make-gimp-composite-dispatch.py
print ' gimp_composite_initialised = 1;'
print ' gimp_composite_options.initialised = 1;'
def gimp_composite_init(function_tables): for o in function_tables: print 'extern void %s_init();' % (functionnameify(o[0])) pass print '' print 'static int gimp_composite_initialised = 0;' print '' print 'void' print 'gimp_composite_init()' print '{' print ' if (!gimp_composite_initialised) {' for o in function_tab...
9e3bd94760fbc10b227bced10aaabde7049cf9e8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/9e3bd94760fbc10b227bced10aaabde7049cf9e8/make-gimp-composite-dispatch.py
print "void %s(GimpCompositeContext *);" % (function_table[key][0])
print 'void %s(GimpCompositeContext *);' % (function_table[key][0])
def print_function_table(filename, function_table): function_table_declarations = dict() function_table_keys = function_table.keys() function_table_keys.sort() for key in function_table_keys: if not function_table_declarations.has_key(function_table[key][0]): print "void %s(GimpCompositeContext *);" % (function_tabl...
9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95/make-gimp-composite-dispatch.py
print "" print "void (*%s[%d][%d][%d][%d])() = {" % (functionnameify(filename), len(composite_modes), len(pixel_format)-1, len(pixel_format)-1, len(pixel_format)-1)
print '' print 'GimpCompositeFunction (*%s[%s][%s][%s][%s])() = {' % (functionnameify(filename), "GIMP_COMPOSITE_N", "GIMP_PIXELFORMAT_N", "GIMP_PIXELFORMAT_N", "GIMP_PIXELFORMAT_N")
def print_function_table(filename, function_table): function_table_declarations = dict() function_table_keys = function_table.keys() function_table_keys.sort() for key in function_table_keys: if not function_table_declarations.has_key(function_table[key][0]): print "void %s(GimpCompositeContext *);" % (function_tabl...
9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95/make-gimp-composite-dispatch.py
print " { /* %s */" % (mode)
print ' { /* %s */' % (mode)
def print_function_table(filename, function_table): function_table_declarations = dict() function_table_keys = function_table.keys() function_table_keys.sort() for key in function_table_keys: if not function_table_declarations.has_key(function_table[key][0]): print "void %s(GimpCompositeContext *);" % (function_tabl...
9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95/make-gimp-composite-dispatch.py
print " { /* A = %s */" % (pixel_depth_name(A))
print ' { /* A = %s */' % (pixel_depth_name(A))
def print_function_table(filename, function_table): function_table_declarations = dict() function_table_keys = function_table.keys() function_table_keys.sort() for key in function_table_keys: if not function_table_declarations.has_key(function_table[key][0]): print "void %s(GimpCompositeContext *);" % (function_tabl...
9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95/make-gimp-composite-dispatch.py
print " /* %-6s */ {" % (pixel_depth_name(B)),
print ' /* %-6s */ {' % (pixel_depth_name(B)),
def print_function_table(filename, function_table): function_table_declarations = dict() function_table_keys = function_table.keys() function_table_keys.sort() for key in function_table_keys: if not function_table_declarations.has_key(function_table[key][0]): print "void %s(GimpCompositeContext *);" % (function_tabl...
9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95/make-gimp-composite-dispatch.py
print "%s, " % (function_table[key][0]),
print '%s, ' % (function_table[key][0]),
def print_function_table(filename, function_table): function_table_declarations = dict() function_table_keys = function_table.keys() function_table_keys.sort() for key in function_table_keys: if not function_table_declarations.has_key(function_table[key][0]): print "void %s(GimpCompositeContext *);" % (function_tabl...
9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95/make-gimp-composite-dispatch.py
print "%s, " % ("NULL"), pass pass print "}," pass print " }," pass print " }," pass print "};\n"
print '%s, ' % ("NULL"), pass pass print '},' pass print ' },' pass print ' },' pass print '};\n'
def print_function_table(filename, function_table): function_table_declarations = dict() function_table_keys = function_table.keys() function_table_keys.sort() for key in function_table_keys: if not function_table_declarations.has_key(function_table[key][0]): print "void %s(GimpCompositeContext *);" % (function_tabl...
9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95/make-gimp-composite-dispatch.py
print "" print "char *%s_name[%d][%d][%d][%d] = {" % (functionnameify(filename), len(composite_modes), len(pixel_format)-1, len(pixel_format)-1, len(pixel_format)-1)
print '' print 'char *%s_name[%s][%s][%s][%s] = {' % (functionnameify(filename), "GIMP_COMPOSITE_N", "GIMP_PIXELFORMAT_N", "GIMP_PIXELFORMAT_N", "GIMP_PIXELFORMAT_N")
def print_function_table_name(filename, function_table): print "" print "char *%s_name[%d][%d][%d][%d] = {" % (functionnameify(filename), len(composite_modes), len(pixel_format)-1, len(pixel_format)-1, len(pixel_format)-1) for mode in composite_modes: print " { /* %s */" % (mode) for A in filter(lambda pf: pf != "GIMP...
9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95/make-gimp-composite-dispatch.py
print " { /* %s */" % (mode)
print ' { /* %s */' % (mode)
def print_function_table_name(filename, function_table): print "" print "char *%s_name[%d][%d][%d][%d] = {" % (functionnameify(filename), len(composite_modes), len(pixel_format)-1, len(pixel_format)-1, len(pixel_format)-1) for mode in composite_modes: print " { /* %s */" % (mode) for A in filter(lambda pf: pf != "GIMP...
9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95/make-gimp-composite-dispatch.py
print " { /* A = %s */" % (pixel_depth_name(A))
print ' { /* A = %s */' % (pixel_depth_name(A))
def print_function_table_name(filename, function_table): print "" print "char *%s_name[%d][%d][%d][%d] = {" % (functionnameify(filename), len(composite_modes), len(pixel_format)-1, len(pixel_format)-1, len(pixel_format)-1) for mode in composite_modes: print " { /* %s */" % (mode) for A in filter(lambda pf: pf != "GIMP...
9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95/make-gimp-composite-dispatch.py
print " /* %-6s */ {" % (pixel_depth_name(B)),
print ' /* %-6s */ {' % (pixel_depth_name(B)),
def print_function_table_name(filename, function_table): print "" print "char *%s_name[%d][%d][%d][%d] = {" % (functionnameify(filename), len(composite_modes), len(pixel_format)-1, len(pixel_format)-1, len(pixel_format)-1) for mode in composite_modes: print " { /* %s */" % (mode) for A in filter(lambda pf: pf != "GIMP...
9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95/make-gimp-composite-dispatch.py
print "}," pass print " }," pass print " }," pass print "};\n"
print '},' pass print ' },' pass print ' },' pass print '};\n'
def print_function_table_name(filename, function_table): print "" print "char *%s_name[%d][%d][%d][%d] = {" % (functionnameify(filename), len(composite_modes), len(pixel_format)-1, len(pixel_format)-1, len(pixel_format)-1) for mode in composite_modes: print " { /* %s */" % (mode) for A in filter(lambda pf: pf != "GIMP...
9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95/make-gimp-composite-dispatch.py
print "/* THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT */" print "$Id$"
print '/* THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT */' print '$Id$'
def main(argv): objects = map(ns.nmx, argv) objs = objects objs.reverse() gimp_composite_function = dict() for o in objs: for mode in composite_modes: for A in filter(lambda pf: pf != "GIMP_PIXELFORMAT_ANY", pixel_format): for B in filter(lambda pf: pf != "GIMP_PIXELFORMAT_ANY", pixel_format): for D in filter(lambda...
9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95/make-gimp-composite-dispatch.py
print "extern void %s(GimpCompositeContext *);" % ("gimp_composite_unsupported")
print 'extern void %s(GimpCompositeContext *);' % ("gimp_composite_unsupported")
def main(argv): objects = map(ns.nmx, argv) objs = objects objs.reverse() gimp_composite_function = dict() for o in objs: for mode in composite_modes: for A in filter(lambda pf: pf != "GIMP_PIXELFORMAT_ANY", pixel_format): for B in filter(lambda pf: pf != "GIMP_PIXELFORMAT_ANY", pixel_format): for D in filter(lambda...
9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95/make-gimp-composite-dispatch.py
print "extern void %s(GimpCompositeContext *);" % (f[0])
print 'extern void %s(GimpCompositeContext *);' % (f[0])
def main(argv): objects = map(ns.nmx, argv) objs = objects objs.reverse() gimp_composite_function = dict() for o in objs: for mode in composite_modes: for A in filter(lambda pf: pf != "GIMP_PIXELFORMAT_ANY", pixel_format): for B in filter(lambda pf: pf != "GIMP_PIXELFORMAT_ANY", pixel_format): for D in filter(lambda...
9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95/make-gimp-composite-dispatch.py
print "char *gimp_composite_function_name[%d][%d][%d][%d] = {" % (len(composite_modes), len(pixel_format)-1, len(pixel_format)-1, len(pixel_format)-1)
print 'char *gimp_composite_function_name[%d][%d][%d][%d] = {' % (len(composite_modes), len(pixel_format)-1, len(pixel_format)-1, len(pixel_format)-1)
def main(argv): objects = map(ns.nmx, argv) objs = objects objs.reverse() gimp_composite_function = dict() for o in objs: for mode in composite_modes: for A in filter(lambda pf: pf != "GIMP_PIXELFORMAT_ANY", pixel_format): for B in filter(lambda pf: pf != "GIMP_PIXELFORMAT_ANY", pixel_format): for D in filter(lambda...
9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95/make-gimp-composite-dispatch.py
print " {"
print ' {'
def main(argv): objects = map(ns.nmx, argv) objs = objects objs.reverse() gimp_composite_function = dict() for o in objs: for mode in composite_modes: for A in filter(lambda pf: pf != "GIMP_PIXELFORMAT_ANY", pixel_format): for B in filter(lambda pf: pf != "GIMP_PIXELFORMAT_ANY", pixel_format): for D in filter(lambda...
9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95/make-gimp-composite-dispatch.py
print " {"
print ' {'
def main(argv): objects = map(ns.nmx, argv) objs = objects objs.reverse() gimp_composite_function = dict() for o in objs: for mode in composite_modes: for A in filter(lambda pf: pf != "GIMP_PIXELFORMAT_ANY", pixel_format): for B in filter(lambda pf: pf != "GIMP_PIXELFORMAT_ANY", pixel_format): for D in filter(lambda...
9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95/make-gimp-composite-dispatch.py
print " {",
print ' {',
def main(argv): objects = map(ns.nmx, argv) objs = objects objs.reverse() gimp_composite_function = dict() for o in objs: for mode in composite_modes: for A in filter(lambda pf: pf != "GIMP_PIXELFORMAT_ANY", pixel_format): for B in filter(lambda pf: pf != "GIMP_PIXELFORMAT_ANY", pixel_format): for D in filter(lambda...
9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95/make-gimp-composite-dispatch.py
print "}," pass print " },"
print '},' pass print ' },'
def main(argv): objects = map(ns.nmx, argv) objs = objects objs.reverse() gimp_composite_function = dict() for o in objs: for mode in composite_modes: for A in filter(lambda pf: pf != "GIMP_PIXELFORMAT_ANY", pixel_format): for B in filter(lambda pf: pf != "GIMP_PIXELFORMAT_ANY", pixel_format): for D in filter(lambda...
9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95/make-gimp-composite-dispatch.py
print " }," pass print "};" pass print "" print "void (*gimp_composite_function[%d][%d][%d][%d])() = {" % (len(composite_modes), len(pixel_format)-1, len(pixel_format)-1, len(pixel_format)-1)
print ' },' pass print '};' pass print '' print 'void (*gimp_composite_function[%d][%d][%d][%d])() = {' % (len(composite_modes), len(pixel_format)-1, len(pixel_format)-1, len(pixel_format)-1)
def main(argv): objects = map(ns.nmx, argv) objs = objects objs.reverse() gimp_composite_function = dict() for o in objs: for mode in composite_modes: for A in filter(lambda pf: pf != "GIMP_PIXELFORMAT_ANY", pixel_format): for B in filter(lambda pf: pf != "GIMP_PIXELFORMAT_ANY", pixel_format): for D in filter(lambda...
9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95/make-gimp-composite-dispatch.py
print " { /* %s */" % (mode)
print ' { /* %s */' % (mode)
def main(argv): objects = map(ns.nmx, argv) objs = objects objs.reverse() gimp_composite_function = dict() for o in objs: for mode in composite_modes: for A in filter(lambda pf: pf != "GIMP_PIXELFORMAT_ANY", pixel_format): for B in filter(lambda pf: pf != "GIMP_PIXELFORMAT_ANY", pixel_format): for D in filter(lambda...
9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95/make-gimp-composite-dispatch.py
print " { /* A = %s */" % (pixel_depth_name(A))
print ' { /* A = %s */' % (pixel_depth_name(A))
def main(argv): objects = map(ns.nmx, argv) objs = objects objs.reverse() gimp_composite_function = dict() for o in objs: for mode in composite_modes: for A in filter(lambda pf: pf != "GIMP_PIXELFORMAT_ANY", pixel_format): for B in filter(lambda pf: pf != "GIMP_PIXELFORMAT_ANY", pixel_format): for D in filter(lambda...
9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95/make-gimp-composite-dispatch.py
print " /* %s */ {" % (pixel_depth_name(B)),
print ' /* %s */ {' % (pixel_depth_name(B)),
def main(argv): objects = map(ns.nmx, argv) objs = objects objs.reverse() gimp_composite_function = dict() for o in objs: for mode in composite_modes: for A in filter(lambda pf: pf != "GIMP_PIXELFORMAT_ANY", pixel_format): for B in filter(lambda pf: pf != "GIMP_PIXELFORMAT_ANY", pixel_format): for D in filter(lambda...
9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95/make-gimp-composite-dispatch.py
print "%s, " % (gimp_composite_function[key][0]),
print '%s, ' % (gimp_composite_function[key][0]),
def main(argv): objects = map(ns.nmx, argv) objs = objects objs.reverse() gimp_composite_function = dict() for o in objs: for mode in composite_modes: for A in filter(lambda pf: pf != "GIMP_PIXELFORMAT_ANY", pixel_format): for B in filter(lambda pf: pf != "GIMP_PIXELFORMAT_ANY", pixel_format): for D in filter(lambda...
9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95/make-gimp-composite-dispatch.py
print "%s, " % ("gimp_composite_unsupported"), pass pass print "}," pass print " },"
print '%s, ' % ("gimp_composite_unsupported"), pass pass print '},' pass print ' },'
def main(argv): objects = map(ns.nmx, argv) objs = objects objs.reverse() gimp_composite_function = dict() for o in objs: for mode in composite_modes: for A in filter(lambda pf: pf != "GIMP_PIXELFORMAT_ANY", pixel_format): for B in filter(lambda pf: pf != "GIMP_PIXELFORMAT_ANY", pixel_format): for D in filter(lambda...
9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95/make-gimp-composite-dispatch.py
print " }," pass print "};" print """ static int gimp_composite_initialised = 0; void gimp_composite_init() { if (!gimp_composite_initialised) { """
print ' },' pass print '};' print 'static int gimp_composite_initialised = 0;' print 'void' print 'gimp_composite_init()' print '{' print 'if (!gimp_composite_initialised) {'
def main(argv): objects = map(ns.nmx, argv) objs = objects objs.reverse() gimp_composite_function = dict() for o in objs: for mode in composite_modes: for A in filter(lambda pf: pf != "GIMP_PIXELFORMAT_ANY", pixel_format): for B in filter(lambda pf: pf != "GIMP_PIXELFORMAT_ANY", pixel_format): for D in filter(lambda...
9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95/make-gimp-composite-dispatch.py
print " %s_init();" % (functionnameify(o.filename)) pass print " gimp_composite_initialised = 1;" print " }" print "}"
print ' %s_init();' % (functionnameify(o.filename)) pass print ' gimp_composite_initialised = 1;' print ' }' print '}'
def main(argv): objects = map(ns.nmx, argv) objs = objects objs.reverse() gimp_composite_function = dict() for o in objs: for mode in composite_modes: for A in filter(lambda pf: pf != "GIMP_PIXELFORMAT_ANY", pixel_format): for B in filter(lambda pf: pf != "GIMP_PIXELFORMAT_ANY", pixel_format): for D in filter(lambda...
9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95/make-gimp-composite-dispatch.py
print """ void gimp_composite_regression() { GimpCompositeContext generic_ctx; GimpCompositeContext special_ctx; """
print 'void' print 'gimp_composite_regression()' print '{' print ' GimpCompositeContext generic_ctx;' print ' GimpCompositeContext special_ctx;'
def gimp_composite_regression(function_tables): print """
9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95/make-gimp-composite-dispatch.py
print "" print " special_ctx.op = %s;" % (mode) print " generic_ctx.op = %s;" % (mode) print " %s(&special_ctx);" % (f[1][key][0]) print " %s(&generic_ctx);" % (generic_table[key][0])
print '' print ' special_ctx.op = %s;' % (mode) print ' generic_ctx.op = %s;' % (mode) print ' %s(&special_ctx);' % (f[1][key][0]) print ' %s(&generic_ctx);' % (generic_table[key][0])
def gimp_composite_regression(function_tables): print """
9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95/make-gimp-composite-dispatch.py
print """ } """
print '}'
def gimp_composite_regression(function_tables): print """
9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95/make-gimp-composite-dispatch.py
print "extern void %s_init();" % (functionnameify(o[0])) pass print "" print """ static int gimp_composite_initialised = 0; void gimp_composite_init() { if (!gimp_composite_initialised) { """
print 'extern void %s_init();' % (functionnameify(o[0])) pass print '' print 'static int gimp_composite_initialised = 0;' print '' print 'void' print 'gimp_composite_init()' print '{' print ' if (!gimp_composite_initialised) {'
def gimp_composite_init(function_tables): for o in function_tables: print "extern void %s_init();" % (functionnameify(o[0])) pass print "" print """
9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95/make-gimp-composite-dispatch.py
print " %s_init();" % (functionnameify(o[0])) pass print " gimp_composite_initialised = 1;" print " }" print "}"
print ' %s_init();' % (functionnameify(o[0])) pass print ' gimp_composite_initialised = 1;' print ' }' print '}'
def gimp_composite_init(function_tables): for o in function_tables: print "extern void %s_init();" % (functionnameify(o[0])) pass print "" print """
9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95/make-gimp-composite-dispatch.py
print "/* THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT */"
def gimp_composite_hfile(fpout): print >>fpout, '/* THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT */' print >>fpout, '' print >>fpout, 'typedef void (*GimpCompositeFunction)(GimpCompositeContext *);' print >>fpout, 'typedef GimpCompositeFunction (*GimpCompositeFunctionTable[%s][%s][%s][%s]);' % ("GIMP_COMPOSITE_N"...
def gimp_composite_init(function_tables): for o in function_tables: print "extern void %s_init();" % (functionnameify(o[0])) pass print "" print """
9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95/make-gimp-composite-dispatch.py
print "extern void %s(GimpCompositeContext *);" % ("gimp_composite_unsupported") print ""
print ' print 'extern GimpCompositeFunction %s;' % ("gimp_composite_unsupported") print ''
def gimp_composite_init(function_tables): for o in function_tables: print "extern void %s_init();" % (functionnameify(o[0])) pass print "" print """
9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95/make-gimp-composite-dispatch.py
apply(getattr(self, name), params)
return apply(getattr(self, name), params)
def _run(self, name, params): if hasattr(self, name): apply(getattr(self, name), params) else: raise AttributeError, name
3aede25d6fabceacd46cac5e2a79b9b66d6f0b8a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/3aede25d6fabceacd46cac5e2a79b9b66d6f0b8a/gimpplugin.py
print 'extern void %s_init();' % (functionnameify(o[0]))
print 'extern void %s_init (void);' % (functionnameify(o[0]))
def gimp_composite_init(function_tables): for o in function_tables: print 'extern void %s_init();' % (functionnameify(o[0])) pass print '' print 'void' print 'gimp_composite_init()' print '{' print ' char *p;' print '' print ' if ((p = getenv("GIMP_COMPOSITE"))) {' print ' gimp_composite_options.use = atol(p);' p...
73af860ff4a9ad2d64dbee32023a1ec49e63a340 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/73af860ff4a9ad2d64dbee32023a1ec49e63a340/make-gimp-composite-dispatch.py
print 'gimp_composite_init()'
print 'gimp_composite_init (void)'
def gimp_composite_init(function_tables): for o in function_tables: print 'extern void %s_init();' % (functionnameify(o[0])) pass print '' print 'void' print 'gimp_composite_init()' print '{' print ' char *p;' print '' print ' if ((p = getenv("GIMP_COMPOSITE"))) {' print ' gimp_composite_options.use = atol(p);' p...
73af860ff4a9ad2d64dbee32023a1ec49e63a340 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/73af860ff4a9ad2d64dbee32023a1ec49e63a340/make-gimp-composite-dispatch.py
print ' char *p;'
print ' if (g_getenv ("GIMP_COMPOSITE"))' print ' {' print ' gimp_composite_options.use = TRUE;' print ' g_printerr ("Using new image composite functions\\n");' print ' }'
def gimp_composite_init(function_tables): for o in function_tables: print 'extern void %s_init();' % (functionnameify(o[0])) pass print '' print 'void' print 'gimp_composite_init()' print '{' print ' char *p;' print '' print ' if ((p = getenv("GIMP_COMPOSITE"))) {' print ' gimp_composite_options.use = atol(p);' p...
73af860ff4a9ad2d64dbee32023a1ec49e63a340 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/73af860ff4a9ad2d64dbee32023a1ec49e63a340/make-gimp-composite-dispatch.py
print ' if ((p = getenv("GIMP_COMPOSITE"))) {' print ' gimp_composite_options.use = atol(p);' print ' g_printerr("Using new image composite functions\n");' print ' }' print '' print ' if (!gimp_composite_options.initialised) {'
print ' if (! gimp_composite_options.initialised)' print ' {'
def gimp_composite_init(function_tables): for o in function_tables: print 'extern void %s_init();' % (functionnameify(o[0])) pass print '' print 'void' print 'gimp_composite_init()' print '{' print ' char *p;' print '' print ' if ((p = getenv("GIMP_COMPOSITE"))) {' print ' gimp_composite_options.use = atol(p);' p...
73af860ff4a9ad2d64dbee32023a1ec49e63a340 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/73af860ff4a9ad2d64dbee32023a1ec49e63a340/make-gimp-composite-dispatch.py
print ' %s_init();' % (functionnameify(o[0])) pass print ' gimp_composite_options.initialised = 1;' print ' }'
print ' %s_init ();' % (functionnameify(o[0])) pass print ' gimp_composite_options.initialised = TRUE;' print ' }'
def gimp_composite_init(function_tables): for o in function_tables: print 'extern void %s_init();' % (functionnameify(o[0])) pass print '' print 'void' print 'gimp_composite_init()' print '{' print ' char *p;' print '' print ' if ((p = getenv("GIMP_COMPOSITE"))) {' print ' gimp_composite_options.use = atol(p);' p...
73af860ff4a9ad2d64dbee32023a1ec49e63a340 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/73af860ff4a9ad2d64dbee32023a1ec49e63a340/make-gimp-composite-dispatch.py
"<Image>/Filters/Web/Py-Slice...",
"<Image>/Filters/Web/_Py-Slice...",
def cell(self, src, width, height): out = ('\t\t<td><img alt=" " src="%%s" width="%d" height="%d"></td>' % (width, height)) self.write(out, src)
d08584c0c4b1df347439d45bec816a0c2ac5b1aa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/d08584c0c4b1df347439d45bec816a0c2ac5b1aa/py-slice.py
if orientation == ORIENTATION_VERTICAL: vguides.append((image.get_guide_position(guide), guide)) elif orientation == ORIENTATION_HORIZONTAL: hguides.append((image.get_guide_position(guide), guide))
guide_position = image.get_guide_position(guide) if guide_position > 0: if orientation == ORIENTATION_VERTICAL: if guide_position < image.width: vguides.append((guide_position, guide)) elif orientation == ORIENTATION_HORIZONTAL: if guide_position < image.height: hguides.append((guide_position, guide))
def get_guides(image): vguides = [] hguides = [] for guide in GuideIter(image): orientation = image.get_guide_orientation(guide) if orientation == ORIENTATION_VERTICAL: vguides.append((image.get_guide_position(guide), guide)) elif orientation == ORIENTATION_HORIZONTAL: hguides.append((image.get_guide_position(guide),...
caaf65cc7cdbce1b38dec58b3013377d3827fdcf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/caaf65cc7cdbce1b38dec58b3013377d3827fdcf/py-slice.py
(PF_RADIO, "image-extension", _("Image format") + "{gif, jpg, png}", "gif", (("gif", "gif"), ("jpg", "jpg"), ("png", "png"))), (PF_TOGGLE, "separate-image-dir", _("Separate image folder"),
(PF_RADIO, "image-extension", _("Image format"), "gif", (("gif", "gif"), ("jpg", "jpg"), ("png", "png"))), (PF_TOGGLE, "separate-image-dir", _("Separate image folder"),
def parse_urls (self): """ This will parse any url targets in the href="XX" fields of the given file and return then as a list """ import re url_list = [] try: html_file = open (self.filename) #Regular expression to pick everything up to the next doublequote #character after finding the sequence 'href="'. The found ...
6ff59cece0a71d11edcde2d16701b57caf1132f1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/6ff59cece0a71d11edcde2d16701b57caf1132f1/py-slice.py