Commit ed6653f4 authored by Scott Lembcke's avatar Scott Lembcke Committed by Scott Lembcke

Changed all single quotes to double quotes.

2006-08-19  Scott Lembcke <slembcke@cvs.gnome.org>

        * plug-ins/*.rb: Changed all single quotes to double quotes.

        * ext/rbgimpdialog.c: Added an exception when using non-dialog
          friendly types.
parent 8ba62814
2006-08-14 Scott Lembcke <slembcke@cvs.gnome.org>
2006-08-19 Scott Lembcke <slembcke@cvs.gnome.org>
* plug-ins/*.rb: Changed all single quotes to double quotes.
* ext/rbgimpdialog.c: Added an exception when using non-dialog
friendly types.
2006-08-19 Scott Lembcke <slembcke@cvs.gnome.org>
* ChangeLog: Fixed my email address.
......
......@@ -588,10 +588,7 @@ make_widget (VALUE param,
break;
default:
widget = gtk_label_new("Unimplemented");
result->ptr = widget;
result->func = &nothing;
rb_raise(rb_eTypeError, "Unimplemented param type %d.", type);
break;
}
......
......@@ -18,23 +18,23 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor,Boston, MA
# 02110-1301, USA.
require 'rubyfu'
require "rubyfu"
include Gimp
include RubyFu
register(
'ruby-fu-gloom', #procedure name
_('Gives an image a darkened and softened cartoon look'), #blurb
_('Takes a radius and intensity for the effect'), #help
'Scott Lembcke', #author
'Scott Lembcke', #copyright
'2006', #date
_('Gloom'), #menupath
'*', #image types
"ruby-fu-gloom", #procedure name
_("Gives an image a darkened and softened cartoon look"), #blurb
_("Takes a radius and intensity for the effect"), #help
"Scott Lembcke", #author
"Scott Lembcke", #copyright
"2006", #date
_("Gloom"), #menupath
"*", #image types
[
ParamDef.SLIDER('radius', _('Radius'), 5.0, 0..50, 0.1),
ParamDef.SLIDER('amount', _('Amount'), 100, 0..100, 1),
ParamDef.SLIDER("radius", _("Radius"), 5.0, 0..50, 0.1),
ParamDef.SLIDER("amount", _("Amount"), 100, 0..100, 1),
], #params
[] #results
) do|run_mode, image, drawable, radius, amount|
......@@ -43,7 +43,7 @@ register(
image.undo_group do
gloom = Layer.new_from_drawable(drawable, image)
image.add_layer(gloom, nil)
gimp_drawable_set_name(gloom, _('gloom'))
gimp_drawable_set_name(gloom, _("gloom"))
gloom.set_mode(DARKEN_ONLY_MODE)
plug_in_gauss_iir2(image, gloom, radius, radius)
......@@ -52,4 +52,4 @@ register(
Display.flush
end
menu_register('ruby-fu-gloom', '<Image>/Ruby-Fu/')
menu_register("ruby-fu-gloom", "<Image>/Ruby-Fu/")
......@@ -18,27 +18,27 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor,Boston, MA
# 02110-1301, USA.
require 'rubyfu'
require "rubyfu"
RubyFu.register(
'ruby-fu-console', #procedure name
_('Starts an irb session in a console.'), #blurb
"ruby-fu-console", #procedure name
_("Starts an irb session in a console."), #blurb
nil, #help
nil, #author
nil, #copyright
nil, #date
_('Irb Console'), #menupath
_("Irb Console"), #menupath
nil, #image types
nil, #params
nil #results
) do
require 'irb'
require "irb"
include Gimp
include PDB::Access
console = File.join(GIMP_PLUG_IN_DIRECTORY, 'ruby', 'ruby-fu-console')
$stdin = $stdout = open("|#{console}", 'w+')
console = File.join(GIMP_PLUG_IN_DIRECTORY, "ruby", "ruby-fu-console")
$stdin = $stdout = open("|#{console}", "w+")
puts _("Interactive Gimp-Ruby Console")
puts _("Ruby version #{RUBY_VERSION}")
......@@ -58,4 +58,4 @@ RubyFu.register(
end
end
RubyFu.menu_register('ruby-fu-console', RubyFu::RubyFuMenu)
\ No newline at end of file
RubyFu.menu_register("ruby-fu-console", RubyFu::RubyFuMenu)
\ No newline at end of file
......@@ -18,8 +18,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor,Boston, MA
# 02110-1301, USA.
require 'rubyfu'
require "rubyfu"
include RubyFu
rfu_menu = menu_branch_register('<Toolbox>/Xtns/Languages/', 'Ruby-Fu')
menu_branch_register(rfu_menu, _('Examples'))
\ No newline at end of file
rfu_menu = menu_branch_register("<Toolbox>/Xtns/Languages/", "Ruby-Fu")
menu_branch_register(rfu_menu, _("Examples"))
\ No newline at end of file
......@@ -18,7 +18,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor,Boston, MA
# 02110-1301, USA.
require 'rubyfu'
require "rubyfu"
include Gimp
include RubyFu
......@@ -47,56 +47,56 @@ module RubyFu
end
help_string = _(
'The procedure argument should be the name of the ' +
'procedure defined in the file you wish to run. ' +
'The drawable argument is only needed if the procedure '+
'is image based.'
"The procedure argument should be the name of the " +
"procedure defined in the file you wish to run. " +
"The drawable argument is only needed if the procedure "+
"is image based."
)
register(
'ruby-fu-run-file', #procedure name
_('Runs a Ruby-Fu script without requiring you to install it.'), #blurb
"ruby-fu-run-file", #procedure name
_("Runs a Ruby-Fu script without requiring you to install it."), #blurb
help_string, #help
'Scott Lembcke', #author
'Scott Lembcke', #copyright
'2006', #date
_('Run File'), #menupath
"Scott Lembcke", #author
"Scott Lembcke", #copyright
"2006", #date
_("Run File"), #menupath
nil, #image types
[
ParamDef.FILE('file', _('File')),
ParamDef.STRING('procedure', _('Procedure name'), 'ruby-fu-'),
ParamDef.DRAWABLE('drawable', _('Drawable (if needed)')),
ParamDef.FILE("file", _("File")),
ParamDef.STRING("procedure", _("Procedure name"), "ruby-fu-"),
ParamDef.DRAWABLE("drawable", _("Drawable (if needed)")),
], #params
[] #results
) do|run_mode, filename, procname, drawable|
Shelf['ruby-fu-last-run-file'] = [filename, procname, drawable]
Shelf["ruby-fu-last-run-file"] = [filename, procname, drawable]
load(filename)
RubyFu.test_proc(procname, drawable)
end
menu_register('ruby-fu-run-file', RubyFuMenu)
menu_register("ruby-fu-run-file", RubyFuMenu)
register(
'ruby-fu-rerun-file', #procedure name
_('Reruns the last file ran using Runfile'), #blurb
"ruby-fu-rerun-file", #procedure name
_("Reruns the last file ran using Runfile"), #blurb
nil, #help
'Scott Lembcke', #author
'Scott Lembcke', #copyright
'2006', #date
_('Rerun File'), #menupath
"Scott Lembcke", #author
"Scott Lembcke", #copyright
"2006", #date
_("Rerun File"), #menupath
nil, #image types
[], #params
[] #results
) do|run_mode, filename, procname|
last = Shelf['ruby-fu-last-run-file']
last = Shelf["ruby-fu-last-run-file"]
if last
PDB.ruby_fu_run_file(*last)
else
Gimp.message _('No previous file to run')
Gimp.message _("No previous file to run")
end
end
menu_register('ruby-fu-rerun-file', RubyFuMenu)
menu_register("ruby-fu-rerun-file", RubyFuMenu)
......@@ -20,7 +20,7 @@
tim = Time.now
require 'rubyfu'
require "rubyfu"
include Gimp
include RubyFu
......@@ -28,13 +28,13 @@ include RubyFu
include PDB::Access
register(
'ruby-fu-speed', #procedure name
"ruby-fu-speed", #procedure name
nil, #blurb
nil, #help
nil, #author
nil, #copyright
nil, #date
'Speed', #menupath
"Speed", #menupath
nil,
nil, #params
nil #results
......@@ -44,4 +44,4 @@ register(
nil
end
menu_register('ruby-fu-speed', '<Toolbox>/Xtns/Languages/Ruby-Fu/Test')
menu_register("ruby-fu-speed", "<Toolbox>/Xtns/Languages/Ruby-Fu/Test")
......@@ -35,16 +35,16 @@ RubyFu.register(
"Spencer Kimball and Scott Lembcke",
"Spencer Kimball",
"1996",
_('Sphere'),
_("Sphere"),
"",
[
ParamDef.SPINNER('radius', _("Radius (pixels)"), 100, 0..1000, 1),
ParamDef.SLIDER('lighting', _("Lighting (degrees)"), 45, 0..360, 1),
ParamDef.TOGGLE('shadow', _("Shadow"), 1),
ParamDef.COLOR('bg color', _("Background Color"), Color(1.0, 1.0, 1.0)),
ParamDef.COLOR('color', _("Sphere Color"), Color(1.0, 0.0, 0.0)),
ParamDef.SPINNER("radius", _("Radius (pixels)"), 100, 0..1000, 1),
ParamDef.SLIDER("lighting", _("Lighting (degrees)"), 45, 0..360, 1),
ParamDef.TOGGLE("shadow", _("Shadow"), 1),
ParamDef.COLOR("bg color", _("Background Color"), Color(1.0, 1.0, 1.0)),
ParamDef.COLOR("color", _("Sphere Color"), Color(1.0, 0.0, 0.0)),
],
[ParamDef.IMAGE('image', 'Sphere Image')]
[ParamDef.IMAGE("image", _("Sphere Image"))]
) do |run_mode, radius, light, shadow, bg_color, sphere_color|
shadow = (shadow == 1)
......
......@@ -18,33 +18,33 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor,Boston, MA
# 02110-1301, USA.
require 'rubyfu'
require "rubyfu"
include Gimp
include RubyFu
register(
'ruby-fu-sunset', #procedure name
_('Creates a nice sunset over water'), #blurb
_('Creates a new image of the given size of a sunset.'), #help
'Scott Lembcke', #author
'Scott Lembcke', #copyright
'2006', #date
_('Sunset'), #menupath
"ruby-fu-sunset", #procedure name
_("Creates a nice sunset over water"), #blurb
_("Creates a new image of the given size of a sunset."), #help
"Scott Lembcke", #author
"Scott Lembcke", #copyright
"2006", #date
_("Sunset"), #menupath
nil, #image types
[
ParamDef.INT32('width', _('Width'), 640),
ParamDef.INT32('height', _('Height'), 480),
ParamDef.INT32("width", _("Width"), 640),
ParamDef.INT32("height", _("Height"), 480),
], #params
[
ParamDef.IMAGE('image', _('Image')),
ParamDef.IMAGE("image", _("Image")),
] #results
) do|run_mode, w, h|
include PDB::Access
image = Image.new(w, h, RGB)
sunset = Layer.new(image, w, h, RGB_IMAGE, _('sunset'), 100, NORMAL_MODE)
sunset = Layer.new(image, w, h, RGB_IMAGE, _("sunset"), 100, NORMAL_MODE)
image.add_layer(sunset, nil)
#Normally you would use Context.push to save this information,
......@@ -55,7 +55,7 @@ register(
Context.set_foreground(Color(0.025, 0.000, 0.219))
Context.set_background(Color(1.000, 0.870, 0.000))
Context.set_gradient('FG to BG (HSV counter-clockwise)')
Context.set_gradient("FG to BG (HSV counter-clockwise)")
gimp_rect_select(image, 0, 0, w, h/3, CHANNEL_OP_REPLACE, false, 0.0)
Edit.blend(sunset, CUSTOM_MODE, NORMAL_MODE, GRADIENT_LINEAR, 100, 0, REPEAT_NONE, FALSE, FALSE, 1, 0, TRUE, 0, 0, 0, h/3)
......@@ -63,7 +63,7 @@ register(
Edit.blend(sunset, CUSTOM_MODE, NORMAL_MODE, GRADIENT_LINEAR, 100, 0, REPEAT_NONE, FALSE, FALSE, 1, 0, TRUE, 0, h, 0, h/3)
Selection.none(image)
waves = Layer.new(image, w, h, RGB_IMAGE, 'waves', 100, NORMAL_MODE)
waves = Layer.new(image, w, h, RGB_IMAGE, "waves", 100, NORMAL_MODE)
image.add_layer(waves, nil)
plug_in_solid_noise(image, waves, false, false, rand(10_000), 15, 1.5, 16)
......@@ -87,5 +87,5 @@ register(
[image]
end
menu_register('ruby-fu-sunset', ExamplesMenu)
menu_register("ruby-fu-sunset", ExamplesMenu)
......@@ -18,12 +18,12 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor,Boston, MA
# 02110-1301, USA.
require 'rubyfu'
require "rubyfu"
TestMenu = RubyFu.menu_branch_register(RubyFu::RubyFuMenu, 'Test')
TestMenu = RubyFu.menu_branch_register(RubyFu::RubyFuMenu, "Test")
RubyFu.register(
'ruby-fu-test1', #procedure name
"ruby-fu-test1", #procedure name
nil, #blurb
nil, #help
nil, #author
......@@ -38,7 +38,7 @@ RubyFu.register(
end
RubyFu.register(
'ruby-fu-test2', #procedure name
"ruby-fu-test2", #procedure name
nil, #blurb
nil, #help
nil, #author
......@@ -53,7 +53,7 @@ RubyFu.register(
end
RubyFu.register(
'ruby-fu-test-echo', #procedure name
"ruby-fu-test-echo", #procedure name
nil, #blurb
nil, #help
nil, #author
......@@ -62,42 +62,42 @@ RubyFu.register(
nil, #menupath
nil, #image types
[
RubyFu::ParamDef.INT32('int32', 'int32', 1),
RubyFu::ParamDef.INT16('int16', 'int16', 1),
RubyFu::ParamDef.INT8('int8', 'int8', 1),
RubyFu::ParamDef.FLOAT('float', 'float', 1.1),
RubyFu::ParamDef.STRING('string', 'string', 'hello'),
RubyFu::ParamDef.INT32('length1', 'length1', 1),
RubyFu::ParamDef.INT32ARRAY('int32array', 'int32array', [1, 2, 3]),
RubyFu::ParamDef.INT32('length2', 'length2', 1),
RubyFu::ParamDef.INT16ARRAY('int16array', 'int16array', [1, 2, 3]),
RubyFu::ParamDef.INT32('length3', 'length3', 1),
RubyFu::ParamDef.INT8ARRAY('int8array', 'int8array', 'abc'),
RubyFu::ParamDef.INT32('length4', 'length4', 1),
RubyFu::ParamDef.FLOATARRAY('floatarray', 'floatarray', [1.1, 2.2, 3.3]),
RubyFu::ParamDef.INT32('length5', 'length5', 1),
RubyFu::ParamDef.STRINGARRAY('stringarray', 'stringarray', ['one', 'two', 'three']),
RubyFu::ParamDef.COLOR('color', 'color', Gimp::Rgb.new(1.0, 1.0, 1.0)),
RubyFu::ParamDef.PARASITE('parasite', 'parasite', Gimp::Parasite.new('name', 999, 'data')),
RubyFu::ParamDef.INT32("int32", "int32", 1),
RubyFu::ParamDef.INT16("int16", "int16", 1),
RubyFu::ParamDef.INT8("int8", "int8", 1),
RubyFu::ParamDef.FLOAT("float", "float", 1.1),
RubyFu::ParamDef.STRING("string", "string", "hello"),
RubyFu::ParamDef.INT32("length1", "length1", 1),
RubyFu::ParamDef.INT32ARRAY("int32array", "int32array", [1, 2, 3]),
RubyFu::ParamDef.INT32("length2", "length2", 1),
RubyFu::ParamDef.INT16ARRAY("int16array", "int16array", [1, 2, 3]),
RubyFu::ParamDef.INT32("length3", "length3", 1),
RubyFu::ParamDef.INT8ARRAY("int8array", "int8array", "abc"),
RubyFu::ParamDef.INT32("length4", "length4", 1),
RubyFu::ParamDef.FLOATARRAY("floatarray", "floatarray", [1.1, 2.2, 3.3]),
RubyFu::ParamDef.INT32("length5", "length5", 1),
RubyFu::ParamDef.STRINGARRAY("stringarray", "stringarray", ["one", "two", "three"]),
RubyFu::ParamDef.COLOR("color", "color", Gimp::Rgb.new(1.0, 1.0, 1.0)),
RubyFu::ParamDef.PARASITE("parasite", "parasite", Gimp::Parasite.new("name", 999, "data")),
], #params
[
Gimp::ParamDef.INT32('int32', 'int32'),
Gimp::ParamDef.INT16('int16', 'int16'),
Gimp::ParamDef.INT8('int8', 'int8'),
Gimp::ParamDef.FLOAT('float', 'float'),
Gimp::ParamDef.STRING('string', 'string'),
Gimp::ParamDef.INT32('length1', 'length1'),
Gimp::ParamDef.INT32ARRAY('int32array', 'int32array'),
Gimp::ParamDef.INT32('length2', 'length2'),
Gimp::ParamDef.INT16ARRAY('int16array', 'int16array'),
Gimp::ParamDef.INT32('length3', 'length3'),
Gimp::ParamDef.INT8ARRAY('int8array', 'int8array'),
Gimp::ParamDef.INT32('length4', 'length4'),
Gimp::ParamDef.FLOATARRAY('floatarray', 'floatarray'),
Gimp::ParamDef.INT32('length5', 'length5'),
Gimp::ParamDef.STRINGARRAY('stringarray', 'stringarray'),
Gimp::ParamDef.COLOR('color', 'color'),
Gimp::ParamDef.PARASITE('parasite', 'parasite'),
Gimp::ParamDef.INT32("int32", "int32"),
Gimp::ParamDef.INT16("int16", "int16"),
Gimp::ParamDef.INT8("int8", "int8"),
Gimp::ParamDef.FLOAT("float", "float"),
Gimp::ParamDef.STRING("string", "string"),
Gimp::ParamDef.INT32("length1", "length1"),
Gimp::ParamDef.INT32ARRAY("int32array", "int32array"),
Gimp::ParamDef.INT32("length2", "length2"),
Gimp::ParamDef.INT16ARRAY("int16array", "int16array"),
Gimp::ParamDef.INT32("length3", "length3"),
Gimp::ParamDef.INT8ARRAY("int8array", "int8array"),
Gimp::ParamDef.INT32("length4", "length4"),
Gimp::ParamDef.FLOATARRAY("floatarray", "floatarray"),
Gimp::ParamDef.INT32("length5", "length5"),
Gimp::ParamDef.STRINGARRAY("stringarray", "stringarray"),
Gimp::ParamDef.COLOR("color", "color"),
Gimp::ParamDef.PARASITE("parasite", "parasite"),
] #results
) do|int32, int16, int8, float, string,
l1, int32array, l2, int16array, l3, int8array, l4, floatarray, l5, stringarray,
......@@ -117,13 +117,13 @@ RubyFu.register(
end
RubyFu.register(
'ruby-fu-test-call-echo', #procedure name
'Check that parameter conversion is safe.', #blurb
"ruby-fu-test-call-echo", #procedure name
"Check that parameter conversion is safe.", #blurb
nil, #help
nil, #author
nil, #copyright
nil, #date
'Echo', #menupath
"Echo", #menupath
nil, #image types
[], #params
[] #results
......@@ -134,17 +134,17 @@ RubyFu.register(
-1,
129,
123.123,
'stringing it',
"stringing it",
3,
[1, 2, 3],
3,
[1, 2, 3],
3,
'abc',
"abc",
3,
[1.1, 2.2, 3.3],
3,
['one', 'two', 'three'],
["one", "two", "three"],
Gimp::Rgb.new(1.0, 1.0, 1.0),
Gimp::Parasite.new("a rose", 12, "some data")
]
......@@ -158,29 +158,29 @@ RubyFu.register(
end
end
RubyFu.menu_register('ruby-fu-test-call-echo', TestMenu)
RubyFu.menu_register("ruby-fu-test-call-echo", TestMenu)
RubyFu.register(
'ruby-fu-test-shelf', #procedure name
'Test that the shelf works correctly.', #blurb
"ruby-fu-test-shelf", #procedure name
"Test that the shelf works correctly.", #blurb
nil, #help
nil, #author
nil, #copyright
nil, #date
'Shelf', #menupath
"Shelf", #menupath
nil, #image types
[], #params
[] #results
) do|run_mode|
def test_method
return false if Gimp::Shelf['badstring'] != nil
return false if Gimp::Shelf["badstring"] != nil
Gimp.message "Previous value = #{Gimp::Shelf['goodstring'].inspect}"
obj = ['wow', 1]
Gimp::Shelf['goodstring'] = obj
return false if Gimp::Shelf['goodstring'] != obj
obj = ["wow", 1]
Gimp::Shelf["goodstring"] = obj
return false if Gimp::Shelf["goodstring"] != obj
return true
end
......@@ -192,11 +192,11 @@ RubyFu.register(
end
end
RubyFu.menu_register('ruby-fu-test-shelf', TestMenu)
RubyFu.menu_register("ruby-fu-test-shelf", TestMenu)
RubyFu.register(
'ruby-fu-test-crash', #procedure name
"ruby-fu-test-crash", #procedure name
nil, #blurb
nil, #help
nil, #author
......@@ -214,33 +214,33 @@ def test_exception(e)
begin
yield
rescue e
puts 'Success!'
puts "Success!"
return
end
puts 'Failure'
puts "Failure"
$failure = true
end
RubyFu.register(
'ruby-fu-test-call', #procedure name
'Check proper errors are raised when calling methods improperly.', #blurb
"ruby-fu-test-call", #procedure name
"Check proper errors are raised when calling methods improperly.", #blurb
nil, #help
nil, #author
nil, #copyright
nil, #date
'Call',
"Call",
nil, #image types
[], #params
[] #results
) do|run_mode|
require 'stringio'
require "stringio"
$stdout = StringIO.new
print 'Calling with bad params ... '
print "Calling with bad params ... "
test_exception(TypeError){PDB.gimp_message(123)}
print 'Calling with too many params ... '
print "Calling with too many params ... "
test_exception(ArgumentError){PDB.gimp_message(123, 123)}
#THIS CRASHES HORRIBLY. NOT SURE IF IT'S MY FAULT OR NOT.
......@@ -250,27 +250,27 @@ RubyFu.register(
# PDB.plug_in_script_fu_eval(Gimp::Interactive, '(ruby-fu-test-crash 123)')
#end
printf 'Execution error ... '
printf "Execution error ... "
test_exception(PDB::ExecutionError){PDB.ruby_fu_test_crash}
Gimp.message('Tests ' + ($failure ? 'failed' : 'successful') + ":\n" + $stdout.string)
Gimp.message("Tests " + ($failure ? "failed" : "successful") + ":\n" + $stdout.string)
$stdout = STDOUT
end
RubyFu.menu_register('ruby-fu-test-call', TestMenu)
RubyFu.menu_register("ruby-fu-test-call", TestMenu)
RubyFu.register(
'ruby-fu-test-OO', #procedure name
'Test that the object functionality works', #blurb
"ruby-fu-test-OO", #procedure name
"Test that the object functionality works", #blurb
nil, #help
nil, #author
nil, #copyright
nil, #date
'OO', #menupath
"OO", #menupath
nil, #image types
[], #params
[Gimp::ParamDef.IMAGE('image', 'Image')] #results
[Gimp::ParamDef.IMAGE("image", "Image")] #results
) do|run_mode|
PDB.verbose = true
......@@ -305,66 +305,66 @@ RubyFu.register(
img
end
RubyFu.menu_register('ruby-fu-test-OO', TestMenu)
RubyFu.menu_register("ruby-fu-test-OO", TestMenu)
RubyFu.register(
'ruby-fu-test-dialog', #procedure name
'runs dialog', #blurb
"ruby-fu-test-dialog", #procedure name
"runs dialog", #blurb
nil, #help
nil, #author
nil, #copyright
nil, #date
'Dialog', #menupath
"Dialog", #menupath
nil, #image types
[
RubyFu::ParamDef.INT32('int32', 'INT32', 32),
RubyFu::ParamDef.TOGGLE('toggle', 'TOGGLE', 1),
RubyFu::ParamDef.INT16('int16', 'INT16', 16),
RubyFu::ParamDef.INT8('int8', 'INT8', 8),
RubyFu::ParamDef.FLOAT('float', 'FLOAT', 123.4),
RubyFu::ParamDef.SPINNER('spinner', 'SPINNER', 6, (1.5..9.1), 0.01),
RubyFu::ParamDef.SLIDER('slider', 'SLIDER', 6, (1.5..9.1), 0.01),
RubyFu::ParamDef.STRING('string', 'STRING', 'string'),
RubyFu::ParamDef.TEXT('text', 'TEXT', "multi\nline\nstring"),
RubyFu::ParamDef.COLOR('color', 'COLOR', Gimp::Rgb.new(1.0, 0.0, 0.0, 0.0)),
RubyFu::ParamDef.ENUM('enum', 'ENUM', 0, 'GimpBlendMode')
RubyFu::ParamDef.INT32("int32", "INT32", 32),
RubyFu::ParamDef.TOGGLE("toggle", "TOGGLE", 1),
RubyFu::ParamDef.INT16("int16", "INT16", 16),
RubyFu::ParamDef.INT8("int8", "INT8", 8),
RubyFu::ParamDef.FLOAT("float", "FLOAT", 123.4),
RubyFu::ParamDef.SPINNER("spinner", "SPINNER", 6, (1.5..9.1), 0.01),
RubyFu::ParamDef.SLIDER("slider", "SLIDER", 6, (1.5..9.1), 0.01),
RubyFu::ParamDef.STRING("string", "STRING", "string"),
RubyFu::ParamDef.TEXT("text", "TEXT", "multi\nline\nstring"),
RubyFu::ParamDef.COLOR("color", "COLOR", Gimp::Rgb.new(1.0, 0.0, 0.0, 0.0)),
RubyFu::ParamDef.ENUM("enum", "ENUM", 0, "GimpBlendMode")
], #params
[] #results
) do|run_mode, *params|
Gimp.message(params.join("\n"))
end
RubyFu.menu_register('ruby-fu-test-dialog', TestMenu)
RubyFu.menu_register("ruby-fu-test-dialog", TestMenu)
RubyFu.register(
'ruby-fu-test-dialog2', #procedure name
'runs dialog', #blurb
"ruby-fu-test-dialog2", #procedure name
"runs dialog", #blurb
nil, #help
nil, #author
nil, #copyright
nil, #date
'More dialog', #menupath
"More dialog", #menupath
nil, #image types
[
RubyFu::ParamDef.LIST('list', 'LIST', ['a', 'two', '3', 'IV']),
RubyFu::ParamDef.IMAGE('image', 'IMAGE'),
RubyFu::ParamDef.DRAWABLE('drawable', 'DRAWABLE'),
RubyFu::ParamDef.CHANNEL('channel', 'CHANNEL'),
RubyFu::ParamDef.LAYER('layer', 'LAYER'),
RubyFu::ParamDef.FONT('font', 'FONT', 'Monaco'),
RubyFu::ParamDef.FILE('file', 'FILE', '/usr/share/dict/words'),
RubyFu::ParamDef.DIR('dir', 'DIR', '/usr/share/dict/'),
RubyFu::ParamDef.PALETTE('palette','PALETTE', 'Lights'),
RubyFu::ParamDef.GRADIENT('gradient', 'GRADIENT', 'CD'),
RubyFu::ParamDef.PATTERN('pattern', 'PATTERN', 'Pine'),
RubyFu::ParamDef.BRUSH('brush', 'BRUSH', 'Circle (11)'),
RubyFu::ParamDef.LIST("list", "LIST", ["a", "two", "3", "IV"]),
RubyFu::ParamDef.IMAGE("image", "IMAGE"),
RubyFu::ParamDef.DRAWABLE("drawable", "DRAWABLE"),
RubyFu::ParamDef.CHANNEL("channel", "CHANNEL"),
RubyFu::ParamDef.LAYER("layer", "LAYER"),
RubyFu::ParamDef.FONT("font", "FONT", "Monaco"),
RubyFu::ParamDef.FILE("file", "FILE", "/usr/share/dict/words"),
RubyFu::ParamDef.DIR("dir", "DIR", "/usr/share/dict/"),
RubyFu::ParamDef.PALETTE("palette","PALETTE", "Lights"),
RubyFu::ParamDef.GRADIENT("gradient", "GRADIENT", "CD"),
RubyFu::ParamDef.PATTERN("pattern", "PATTERN", "Pine"),
RubyFu::ParamDef.BRUSH("brush", "BRUSH", "Circle (11)"),
], #params
[] #results
) do|run_mode, *params|
Gimp.message(params.join("\n"))
end