Commit 08eb02ab authored by Scott Lembcke's avatar Scott Lembcke Committed by Scott Lembcke

Added a Gimp.gettext() method.

2006-08-04  Scott Lembcke <lemb0029@gnome.org>

        * ext/rbgimp.c: Added a Gimp.gettext() method.

        * gimp-lib/gimp.rb: Added _() and N_() methods.
parent c26f3255
2006-08-04 Scott Lembcke <lemb0029@gnome.org>
* ext/rbgimp.c: Added a Gimp.gettext() method.
* gimp-lib/gimp.rb: Added _() and N_() methods.
2006-08-04 Scott Lembcke <lemb0029@gnome.org>
* ext/ruby-fu-dialog.c: Added a '>>' prompt in front of the entry box.
......
......@@ -129,6 +129,13 @@ rb_gimp_get_progname(VALUE self)
return rb_str_new2(name);
}
static VALUE
rb_gimp_gettext(VALUE self, VALUE rbstr)
{
char *str = gettext(StringValuePtr(rbstr));
return rb_str_new2(str);
}
void
Init_gimpext (void)
{
......@@ -148,15 +155,17 @@ Init_gimpext (void)
rb_define_module_function(mGimp, "display_name", rb_gimp_display_name, 0);
rb_define_module_function(mGimp, "monitor_number", rb_gimp_monitor_number, 0);
rb_define_module_function(mGimp, "get_progname", rb_gimp_get_progname, 0);
Init_structures();
Init_ids();
Init_gimpconstants();
Init_gimpmain();
rb_define_module_function(mGimp, "gettext", rb_gimp_gettext, 1);
Init_structures();
Init_ids();
Init_gimpconstants();
Init_gimpmain();
Init_gimpproceduraldb();
Init_gimpcolorrgb();
Init_gimpcolorrgb();
Init_gimpcolorhsv();
Init_gimpcolorcmyk();
Init_gimpcolorspace();
......
......@@ -21,6 +21,16 @@ $KCODE = "UTF8"
require 'gimpext'
require 'pdb'
def _(str)
puts 'bam'
Gimp.gettext(str)
end
def N_(str)
puts 'whap'
str
end
module Gimp
def message(*messages)
messages.each do|message|
......
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