Commit dea7f1ce authored by Manish Singh's avatar Manish Singh
Browse files

libgimp/gimpintl.h use G_STMT_START and G_STMT_END for multiline #defines

* libgimp/gimpintl.h
* libgimp/stdplugins-intl.h: use G_STMT_START and G_STMT_END for
multiline #defines

i18n stuff from David Monniaux

-Yosh
parent 4f6393de
Fri Oct 8 15:04:45 PDT 1999 Manish Singh <yosh@gimp.org>
* libgimp/gimpintl.h
* libgimp/stdplugins-intl.h: use G_STMT_START and G_STMT_END for
multiline #defines
* plug-ins/AlienMap/AlienMap.c
* plug-ins/AlienMap/AlienMap2.c
* tips/gimp_conseils.fr.txt: i18n stuff from David Monniaux
Fri Oct 8 22:00:00 MEST 1999 Sven Neumann <sven@gimp.org> Fri Oct 8 22:00:00 MEST 1999 Sven Neumann <sven@gimp.org>
   
* libgimp/gimpfeatures.h.in: #define GIMP_HAVE_EXPORT so that authors * libgimp/gimpfeatures.h.in: #define GIMP_HAVE_EXPORT so that authors
......
#ifndef __GIMPINTL_H__ #ifndef __GIMPINTL_H__
#define __GIMPINTL_H__ #define __GIMPINTL_H__
#include <glib.h>
#include <locale.h> #include <locale.h>
/* Copied from gnome-i18n.h by Tom Tromey <tromey@creche.cygnus.com> * /* Copied from gnome-i18n.h by Tom Tromey <tromey@creche.cygnus.com> *
...@@ -33,10 +34,11 @@ ...@@ -33,10 +34,11 @@
# define N_(String) (String) # define N_(String) (String)
#endif #endif
# define INIT_LOCALE( domain ) \ #define INIT_LOCALE( domain ) G_STMT_START{ \
gtk_set_locale (); \ gtk_set_locale (); \
setlocale (LC_NUMERIC, "C"); \ setlocale (LC_NUMERIC, "C"); \
bindtextdomain (domain, LOCALEDIR); \ bindtextdomain (domain, LOCALEDIR); \
textdomain (domain); textdomain (domain); \
}G_STMT_END
#endif /* __GIMPINTL_H__ */ #endif /* __GIMPINTL_H__ */
...@@ -6,19 +6,22 @@ ...@@ -6,19 +6,22 @@
#include "libgimp/gimpintl.h" #include "libgimp/gimpintl.h"
#ifdef HAVE_LC_MESSAGES #ifdef HAVE_LC_MESSAGES
#define INIT_I18N() \ #define INIT_I18N() G_STMT_START{ \
setlocale(LC_MESSAGES, ""); \ setlocale(LC_MESSAGES, ""); \
bindtextdomain("gimp-std-plugins", LOCALEDIR); \ bindtextdomain("gimp-std-plugins", LOCALEDIR); \
textdomain("gimp-std-plugins") textdomain("gimp-std-plugins"); \
}G_STMT_END
#else #else
#define INIT_I18N() \ #define INIT_I18N() G_STMT_START{ \
bindtextdomain("gimp-std-plugins", LOCALEDIR); \ bindtextdomain("gimp-std-plugins", LOCALEDIR); \
textdomain("gimp-std-plugins") textdomain("gimp-std-plugins"); \
}G_STMT_END
#endif #endif
#define INIT_I18N_UI() \ #define INIT_I18N_UI() G_STMT_START{ \
gtk_set_locale(); \ gtk_set_locale(); \
setlocale (LC_NUMERIC, "C"); \ setlocale (LC_NUMERIC, "C"); \
INIT_I18N(); INIT_I18N(); \
}G_STMT_END
#endif /* __STDPLUGINS_INTL_H__ */ #endif /* __STDPLUGINS_INTL_H__ */
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
#include "gtk/gtk.h" #include "gtk/gtk.h"
#include "libgimp/gimp.h" #include "libgimp/gimp.h"
#include "logo.h" #include "logo.h"
#include "libgimp/stdplugins-intl.h"
/***** Macros *****/ /***** Macros *****/
...@@ -181,13 +182,15 @@ query () ...@@ -181,13 +182,15 @@ query ()
static int nargs = sizeof (args) / sizeof (args[0]); static int nargs = sizeof (args) / sizeof (args[0]);
static int nreturn_vals = 0; static int nreturn_vals = 0;
INIT_I18N();
gimp_install_procedure ("plug_in_alienmap", gimp_install_procedure ("plug_in_alienmap",
"AlienMap Color Transformation Plug-In", _("AlienMap Color Transformation Plug-In"),
"No help yet. Just try it and you'll see!", _("No help yet. Just try it and you'll see!"),
"Daniel Cotting (cotting@mygale.org, http://www.mygale.org/~cotting)", "Daniel Cotting (cotting@mygale.org, http://www.mygale.org/~cotting)",
"Daniel Cotting (cotting@mygale.org, http://www.mygale.org/~cotting)", "Daniel Cotting (cotting@mygale.org, http://www.mygale.org/~cotting)",
"1th May 1997", _("1th May 1997"),
"<Image>/Filters/Colors/Alien Map", N_("<Image>/Filters/Colors/Alien Map"),
"RGB*", "RGB*",
PROC_PLUG_IN, PROC_PLUG_IN,
nargs, nreturn_vals, nargs, nreturn_vals,
...@@ -267,7 +270,8 @@ run (char *name, ...@@ -267,7 +270,8 @@ run (char *name,
double xhsiz, yhsiz; double xhsiz, yhsiz;
int pwidth, pheight; int pwidth, pheight;
GStatusType status = STATUS_SUCCESS; GStatusType status = STATUS_SUCCESS;
INIT_I18N_UI ();
run_mode = param[0].data.d_int32; run_mode = param[0].data.d_int32;
...@@ -371,7 +375,7 @@ run (char *name, ...@@ -371,7 +375,7 @@ run (char *name,
/* Make sure that the drawable is indexed or RGB color */ /* Make sure that the drawable is indexed or RGB color */
if (gimp_drawable_color (drawable->id)) if (gimp_drawable_color (drawable->id))
{ {
gimp_progress_init ("AlienMap: Transforming ..."); gimp_progress_init (_("AlienMap: Transforming ..."));
/* Set the tile cache size */ /* Set the tile cache size */
...@@ -658,7 +662,7 @@ alienmap_dialog(void) ...@@ -658,7 +662,7 @@ alienmap_dialog(void)
build_preview_source_image(); build_preview_source_image();
dialog = maindlg = gtk_dialog_new(); dialog = maindlg = gtk_dialog_new();
gtk_window_set_title(GTK_WINDOW(dialog), "AlienMap"); gtk_window_set_title(GTK_WINDOW(dialog), _("AlienMap"));
gtk_window_position(GTK_WINDOW(dialog), GTK_WIN_POS_MOUSE); gtk_window_position(GTK_WINDOW(dialog), GTK_WIN_POS_MOUSE);
gtk_container_border_width(GTK_CONTAINER(dialog), 0); gtk_container_border_width(GTK_CONTAINER(dialog), 0);
gtk_signal_connect(GTK_OBJECT(dialog), "destroy", gtk_signal_connect(GTK_OBJECT(dialog), "destroy",
...@@ -702,7 +706,7 @@ alienmap_dialog(void) ...@@ -702,7 +706,7 @@ alienmap_dialog(void)
gtk_table_attach(GTK_TABLE(top_table), table, 0, 4, 1, 2, GTK_EXPAND | GTK_FILL, 0, 0, 0); gtk_table_attach(GTK_TABLE(top_table), table, 0, 4, 1, 2, GTK_EXPAND | GTK_FILL, 0, 0, 0);
gtk_widget_show(table); gtk_widget_show(table);
dialog_create_value("R", GTK_TABLE(table), 0, &wvals.redstretch,0,128.00000000000, "Change intensity of the red channel"); dialog_create_value("R", GTK_TABLE(table), 0, &wvals.redstretch,0,128.00000000000, _("Change intensity of the red channel"));
table2 = gtk_table_new(1, 3, FALSE); table2 = gtk_table_new(1, 3, FALSE);
...@@ -710,7 +714,7 @@ alienmap_dialog(void) ...@@ -710,7 +714,7 @@ alienmap_dialog(void)
gtk_table_attach(GTK_TABLE(top_table), table2, 0, 4, 2, 3, GTK_EXPAND | GTK_FILL, 0, 0, 0); gtk_table_attach(GTK_TABLE(top_table), table2, 0, 4, 2, 3, GTK_EXPAND | GTK_FILL, 0, 0, 0);
gtk_widget_show(table2); gtk_widget_show(table2);
dialog_create_value("G", GTK_TABLE(table2), 0, &wvals.greenstretch,0,128.0000000000000, "Change intensity of the green channel"); dialog_create_value("G", GTK_TABLE(table2), 0, &wvals.greenstretch,0,128.0000000000000, _("Change intensity of the green channel"));
table3 = gtk_table_new(1, 3, FALSE); table3 = gtk_table_new(1, 3, FALSE);
...@@ -718,17 +722,17 @@ alienmap_dialog(void) ...@@ -718,17 +722,17 @@ alienmap_dialog(void)
gtk_table_attach(GTK_TABLE(top_table), table3, 0, 4, 3, 4, GTK_EXPAND | GTK_FILL, 0, 0, 0); gtk_table_attach(GTK_TABLE(top_table), table3, 0, 4, 3, 4, GTK_EXPAND | GTK_FILL, 0, 0, 0);
gtk_widget_show(table3); gtk_widget_show(table3);
dialog_create_value("B", GTK_TABLE(table3), 0, &wvals.bluestretch,0,128.00000000000000, "Change intensity of the blue channel"); dialog_create_value("B", GTK_TABLE(table3), 0, &wvals.bluestretch,0,128.00000000000000, _("Change intensity of the blue channel"));
/* Redmode toggle box */ /* Redmode toggle box */
frame = gtk_frame_new ("Red:"); frame = gtk_frame_new (_("Red:"));
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN); gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN);
gtk_table_attach (GTK_TABLE (top_table), frame, 1, 2, 0, 1, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 5, 5); gtk_table_attach (GTK_TABLE (top_table), frame, 1, 2, 0, 1, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 5, 5);
toggle_vbox = gtk_vbox_new (FALSE, 5); toggle_vbox = gtk_vbox_new (FALSE, 5);
gtk_container_border_width (GTK_CONTAINER (toggle_vbox), 5); gtk_container_border_width (GTK_CONTAINER (toggle_vbox), 5);
gtk_container_add (GTK_CONTAINER (frame), toggle_vbox); gtk_container_add (GTK_CONTAINER (frame), toggle_vbox);
toggle = gtk_radio_button_new_with_label (redmode_group, "Sine"); toggle = gtk_radio_button_new_with_label (redmode_group, _("Sine"));
redmode_group = gtk_radio_button_group (GTK_RADIO_BUTTON (toggle)); redmode_group = gtk_radio_button_group (GTK_RADIO_BUTTON (toggle));
gtk_box_pack_start (GTK_BOX (toggle_vbox), toggle, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (toggle_vbox), toggle, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (toggle), "toggled", gtk_signal_connect (GTK_OBJECT (toggle), "toggled",
...@@ -737,9 +741,9 @@ alienmap_dialog(void) ...@@ -737,9 +741,9 @@ alienmap_dialog(void)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), do_redsinus); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), do_redsinus);
gtk_widget_show (toggle); gtk_widget_show (toggle);
set_tooltip(tips,toggle,"Use sine-function for red component"); set_tooltip(tips,toggle,_("Use sine-function for red component"));
toggle = gtk_radio_button_new_with_label (redmode_group, "Cosine"); toggle = gtk_radio_button_new_with_label (redmode_group, _("Cosine"));
redmode_group = gtk_radio_button_group (GTK_RADIO_BUTTON (toggle)); redmode_group = gtk_radio_button_group (GTK_RADIO_BUTTON (toggle));
gtk_box_pack_start (GTK_BOX (toggle_vbox), toggle, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (toggle_vbox), toggle, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (toggle), "toggled", gtk_signal_connect (GTK_OBJECT (toggle), "toggled",
...@@ -747,9 +751,9 @@ alienmap_dialog(void) ...@@ -747,9 +751,9 @@ alienmap_dialog(void)
&do_redcosinus); &do_redcosinus);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), do_redcosinus); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), do_redcosinus);
gtk_widget_show (toggle); gtk_widget_show (toggle);
set_tooltip(tips,toggle,"Use cosine-function for red component"); set_tooltip(tips,toggle,_("Use cosine-function for red component"));
toggle = gtk_radio_button_new_with_label (redmode_group, "None"); toggle = gtk_radio_button_new_with_label (redmode_group, _("None"));
redmode_group = gtk_radio_button_group (GTK_RADIO_BUTTON (toggle)); redmode_group = gtk_radio_button_group (GTK_RADIO_BUTTON (toggle));
gtk_box_pack_start (GTK_BOX (toggle_vbox), toggle, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (toggle_vbox), toggle, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (toggle), "toggled", gtk_signal_connect (GTK_OBJECT (toggle), "toggled",
...@@ -757,21 +761,21 @@ alienmap_dialog(void) ...@@ -757,21 +761,21 @@ alienmap_dialog(void)
&do_rednone); &do_rednone);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), do_rednone); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), do_rednone);
gtk_widget_show (toggle); gtk_widget_show (toggle);
set_tooltip(tips,toggle,"Red channel: use linear mapping instead of any trigonometrical function"); set_tooltip(tips,toggle,_("Red channel: use linear mapping instead of any trigonometrical function"));
gtk_widget_show (toggle_vbox); gtk_widget_show (toggle_vbox);
gtk_widget_show (frame); gtk_widget_show (frame);
/* Greenmode toggle box */ /* Greenmode toggle box */
frame = gtk_frame_new ("Green:"); frame = gtk_frame_new (_("Green:"));
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN); gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN);
gtk_table_attach (GTK_TABLE (top_table), frame, 2, 3, 0, 1, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 5, 5); gtk_table_attach (GTK_TABLE (top_table), frame, 2, 3, 0, 1, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 5, 5);
toggle_vbox = gtk_vbox_new (FALSE, 5); toggle_vbox = gtk_vbox_new (FALSE, 5);
gtk_container_border_width (GTK_CONTAINER (toggle_vbox), 5); gtk_container_border_width (GTK_CONTAINER (toggle_vbox), 5);
gtk_container_add (GTK_CONTAINER (frame), toggle_vbox); gtk_container_add (GTK_CONTAINER (frame), toggle_vbox);
toggle = gtk_radio_button_new_with_label (greenmode_group, "Sine"); toggle = gtk_radio_button_new_with_label (greenmode_group, _("Sine"));
greenmode_group = gtk_radio_button_group (GTK_RADIO_BUTTON (toggle)); greenmode_group = gtk_radio_button_group (GTK_RADIO_BUTTON (toggle));
gtk_box_pack_start (GTK_BOX (toggle_vbox), toggle, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (toggle_vbox), toggle, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (toggle), "toggled", gtk_signal_connect (GTK_OBJECT (toggle), "toggled",
...@@ -779,9 +783,9 @@ alienmap_dialog(void) ...@@ -779,9 +783,9 @@ alienmap_dialog(void)
&do_greensinus); &do_greensinus);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), do_greensinus); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), do_greensinus);
gtk_widget_show (toggle); gtk_widget_show (toggle);
set_tooltip(tips,toggle,"Use sine-function for green component"); set_tooltip(tips,toggle,_("Use sine-function for green component"));
toggle = gtk_radio_button_new_with_label (greenmode_group, "Cosine"); toggle = gtk_radio_button_new_with_label (greenmode_group, _("Cosine"));
greenmode_group = gtk_radio_button_group (GTK_RADIO_BUTTON (toggle)); greenmode_group = gtk_radio_button_group (GTK_RADIO_BUTTON (toggle));
gtk_box_pack_start (GTK_BOX (toggle_vbox), toggle, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (toggle_vbox), toggle, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (toggle), "toggled", gtk_signal_connect (GTK_OBJECT (toggle), "toggled",
...@@ -789,9 +793,9 @@ alienmap_dialog(void) ...@@ -789,9 +793,9 @@ alienmap_dialog(void)
&do_greencosinus); &do_greencosinus);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), do_greencosinus); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), do_greencosinus);
gtk_widget_show (toggle); gtk_widget_show (toggle);
set_tooltip(tips,toggle,"Use cosine-function for green component"); set_tooltip(tips,toggle,_("Use cosine-function for green component"));
toggle = gtk_radio_button_new_with_label (greenmode_group, "None"); toggle = gtk_radio_button_new_with_label (greenmode_group, _("None"));
greenmode_group = gtk_radio_button_group (GTK_RADIO_BUTTON (toggle)); greenmode_group = gtk_radio_button_group (GTK_RADIO_BUTTON (toggle));
gtk_box_pack_start (GTK_BOX (toggle_vbox), toggle, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (toggle_vbox), toggle, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (toggle), "toggled", gtk_signal_connect (GTK_OBJECT (toggle), "toggled",
...@@ -799,21 +803,21 @@ alienmap_dialog(void) ...@@ -799,21 +803,21 @@ alienmap_dialog(void)
&do_greennone); &do_greennone);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), do_greennone); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), do_greennone);
gtk_widget_show (toggle); gtk_widget_show (toggle);
set_tooltip(tips,toggle,"Green channel: use linear mapping instead of any trigonometrical function"); set_tooltip(tips,toggle,_("Green channel: use linear mapping instead of any trigonometrical function"));
gtk_widget_show (toggle_vbox); gtk_widget_show (toggle_vbox);
gtk_widget_show (frame); gtk_widget_show (frame);
/* Bluemode toggle box */ /* Bluemode toggle box */
frame = gtk_frame_new ("Blue:"); frame = gtk_frame_new (_("Blue:"));
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN); gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN);
gtk_table_attach (GTK_TABLE (top_table), frame, 3, 4, 0, 1, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 5, 5); gtk_table_attach (GTK_TABLE (top_table), frame, 3, 4, 0, 1, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 5, 5);
toggle_vbox = gtk_vbox_new (FALSE, 5); toggle_vbox = gtk_vbox_new (FALSE, 5);
gtk_container_border_width (GTK_CONTAINER (toggle_vbox), 5); gtk_container_border_width (GTK_CONTAINER (toggle_vbox), 5);
gtk_container_add (GTK_CONTAINER (frame), toggle_vbox); gtk_container_add (GTK_CONTAINER (frame), toggle_vbox);
toggle = gtk_radio_button_new_with_label (bluemode_group, "Sine"); toggle = gtk_radio_button_new_with_label (bluemode_group, _("Sine"));
bluemode_group = gtk_radio_button_group (GTK_RADIO_BUTTON (toggle)); bluemode_group = gtk_radio_button_group (GTK_RADIO_BUTTON (toggle));
gtk_box_pack_start (GTK_BOX (toggle_vbox), toggle, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (toggle_vbox), toggle, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (toggle), "toggled", gtk_signal_connect (GTK_OBJECT (toggle), "toggled",
...@@ -821,9 +825,9 @@ alienmap_dialog(void) ...@@ -821,9 +825,9 @@ alienmap_dialog(void)
&do_bluesinus); &do_bluesinus);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), do_bluesinus); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), do_bluesinus);
gtk_widget_show (toggle); gtk_widget_show (toggle);
set_tooltip(tips,toggle,"Use sine-function for blue component"); set_tooltip(tips,toggle,_("Use sine-function for blue component"));
toggle = gtk_radio_button_new_with_label (bluemode_group, "Cosine"); toggle = gtk_radio_button_new_with_label (bluemode_group, _("Cosine"));
bluemode_group = gtk_radio_button_group (GTK_RADIO_BUTTON (toggle)); bluemode_group = gtk_radio_button_group (GTK_RADIO_BUTTON (toggle));
gtk_box_pack_start (GTK_BOX (toggle_vbox), toggle, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (toggle_vbox), toggle, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (toggle), "toggled", gtk_signal_connect (GTK_OBJECT (toggle), "toggled",
...@@ -831,9 +835,9 @@ alienmap_dialog(void) ...@@ -831,9 +835,9 @@ alienmap_dialog(void)
&do_bluecosinus); &do_bluecosinus);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), do_bluecosinus); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), do_bluecosinus);
gtk_widget_show (toggle); gtk_widget_show (toggle);
set_tooltip(tips,toggle,"Use cosine-function for blue component"); set_tooltip(tips,toggle,_("Use cosine-function for blue component"));
toggle = gtk_radio_button_new_with_label (bluemode_group, "None"); toggle = gtk_radio_button_new_with_label (bluemode_group, _("None"));
bluemode_group = gtk_radio_button_group (GTK_RADIO_BUTTON (toggle)); bluemode_group = gtk_radio_button_group (GTK_RADIO_BUTTON (toggle));
gtk_box_pack_start (GTK_BOX (toggle_vbox), toggle, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (toggle_vbox), toggle, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (toggle), "toggled", gtk_signal_connect (GTK_OBJECT (toggle), "toggled",
...@@ -841,7 +845,7 @@ alienmap_dialog(void) ...@@ -841,7 +845,7 @@ alienmap_dialog(void)
&do_bluenone); &do_bluenone);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), do_bluenone); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), do_bluenone);
gtk_widget_show (toggle); gtk_widget_show (toggle);
set_tooltip(tips,toggle,"Blue channel: use linear mapping instead of any trigonometrical function"); set_tooltip(tips,toggle,_("Blue channel: use linear mapping instead of any trigonometrical function"));
gtk_widget_show (toggle_vbox); gtk_widget_show (toggle_vbox);
gtk_widget_show (frame); gtk_widget_show (frame);
...@@ -853,7 +857,7 @@ alienmap_dialog(void) ...@@ -853,7 +857,7 @@ alienmap_dialog(void)
gtk_container_border_width(GTK_CONTAINER(GTK_DIALOG(dialog)->action_area), 6); gtk_container_border_width(GTK_CONTAINER(GTK_DIALOG(dialog)->action_area), 6);
button = gtk_button_new_with_label("OK"); button = gtk_button_new_with_label(_("OK"));
GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT);
gtk_signal_connect(GTK_OBJECT(button), "clicked", gtk_signal_connect(GTK_OBJECT(button), "clicked",
(GtkSignalFunc) dialog_ok_callback, (GtkSignalFunc) dialog_ok_callback,
...@@ -861,18 +865,18 @@ gtk_container_border_width(GTK_CONTAINER(GTK_DIALOG(dialog)->action_area), 6); ...@@ -861,18 +865,18 @@ gtk_container_border_width(GTK_CONTAINER(GTK_DIALOG(dialog)->action_area), 6);
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->action_area), button, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->action_area), button, TRUE, TRUE, 0);
gtk_widget_grab_default(button); gtk_widget_grab_default(button);
gtk_widget_show(button); gtk_widget_show(button);
set_tooltip(tips,button,"Accept settings and apply filter on image"); set_tooltip(tips,button,_("Accept settings and apply filter on image"));
button = gtk_button_new_with_label("Cancel"); button = gtk_button_new_with_label(_("Cancel"));
GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT);
gtk_signal_connect(GTK_OBJECT(button), "clicked", gtk_signal_connect(GTK_OBJECT(button), "clicked",
(GtkSignalFunc) dialog_cancel_callback, (GtkSignalFunc) dialog_cancel_callback,
dialog); dialog);
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->action_area), button, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->action_area), button, TRUE, TRUE, 0);
gtk_widget_show(button); gtk_widget_show(button);
set_tooltip(tips,button,"Reject any changes and close plug-in"); set_tooltip(tips,button,_("Reject any changes and close plug-in"));
button = gtk_button_new_with_label("About..."); button = gtk_button_new_with_label(_("About..."));
GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT);
gtk_signal_connect(GTK_OBJECT(button), "clicked", gtk_signal_connect(GTK_OBJECT(button), "clicked",
GTK_SIGNAL_FUNC (alienmap_logo_dialog), GTK_SIGNAL_FUNC (alienmap_logo_dialog),
...@@ -880,7 +884,7 @@ gtk_container_border_width(GTK_CONTAINER(GTK_DIALOG(dialog)->action_area), 6); ...@@ -880,7 +884,7 @@ gtk_container_border_width(GTK_CONTAINER(GTK_DIALOG(dialog)->action_area), 6);
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->action_area), gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->action_area),
button, TRUE, TRUE, 0); button, TRUE, TRUE, 0);
gtk_widget_show(button); gtk_widget_show(button);
set_tooltip(tips,button,"Show information about this plug-in and the author"); set_tooltip(tips,button,_("Show information about this plug-in and the author"));
/* Done */ /* Done */
...@@ -1143,7 +1147,7 @@ alienmap_logo_dialog() ...@@ -1143,7 +1147,7 @@ alienmap_logo_dialog()
if (!logodlg) if (!logodlg)
{ {
logodlg = gtk_dialog_new(); logodlg = gtk_dialog_new();
gtk_window_set_title(GTK_WINDOW(logodlg), "About Alien Map"); gtk_window_set_title(GTK_WINDOW(logodlg), _("About Alien Map"));
gtk_window_position(GTK_WINDOW(logodlg), GTK_WIN_POS_MOUSE); gtk_window_position(GTK_WINDOW(logodlg), GTK_WIN_POS_MOUSE);
gtk_signal_connect(GTK_OBJECT(logodlg), gtk_signal_connect(GTK_OBJECT(logodlg),
"destroy", "destroy",
...@@ -1155,7 +1159,7 @@ alienmap_logo_dialog() ...@@ -1155,7 +1159,7 @@ alienmap_logo_dialog()
GTK_SIGNAL_FUNC (gtk_widget_hide_on_delete), GTK_SIGNAL_FUNC (gtk_widget_hide_on_delete),
&logodlg); &logodlg);
xbutton = gtk_button_new_with_label("OK"); xbutton = gtk_button_new_with_label(_("OK"));
GTK_WIDGET_SET_FLAGS(xbutton, GTK_CAN_DEFAULT); GTK_WIDGET_SET_FLAGS(xbutton, GTK_CAN_DEFAULT);
gtk_signal_connect_object (GTK_OBJECT(xbutton), "clicked", gtk_signal_connect_object (GTK_OBJECT(xbutton), "clicked",
GTK_SIGNAL_FUNC (gtk_widget_hide), GTK_SIGNAL_FUNC (gtk_widget_hide),
...@@ -1164,7 +1168,7 @@ alienmap_logo_dialog() ...@@ -1164,7 +1168,7 @@ alienmap_logo_dialog()
xbutton, TRUE, TRUE, 0); xbutton, TRUE, TRUE, 0);
gtk_widget_grab_default(xbutton); gtk_widget_grab_default(xbutton);
gtk_widget_show(xbutton); gtk_widget_show(xbutton);
set_tooltip(tips,xbutton,"This closes the information box"); set_tooltip(tips,xbutton,_("This closes the information box"));
xframe = gtk_frame_new(NULL); xframe = gtk_frame_new(NULL);
gtk_frame_set_shadow_type(GTK_FRAME(xframe), GTK_SHADOW_ETCHED_IN); gtk_frame_set_shadow_type(GTK_FRAME(xframe), GTK_SHADOW_ETCHED_IN);
...@@ -1206,13 +1210,13 @@ alienmap_logo_dialog() ...@@ -1206,13 +1210,13 @@ alienmap_logo_dialog()
xhbox = gtk_hbox_new(FALSE, 5); xhbox = gtk_hbox_new(FALSE, 5);
gtk_box_pack_start(GTK_BOX(xvbox), xhbox, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(xvbox), xhbox, TRUE, TRUE, 0);
text = "\nCotting Software Productions\n" text = _("\nCotting Software Productions\n"
"Bahnhofstrasse 31\n" "Bahnhofstrasse 31\n"
"CH-3066 Stettlen (Switzerland)\n\n" "CH-3066 Stettlen (Switzerland)\n\n"
"cotting@mygale.org\n" "cotting@mygale.org\n"
"http://www.mygale.org/~cotting\n\n" "http://www.mygale.org/~cotting\n\n"
"AlienMap Plug-In for the GIMP\n" "AlienMap Plug-In for the GIMP\n"
"Version 1.01\n"; "Version 1.01\n");
xlabel = gtk_label_new(text); xlabel = gtk_label_new(text);
gtk_box_pack_start(GTK_BOX(xhbox), xlabel, TRUE, FALSE, 0); gtk_box_pack_start(GTK_BOX(xhbox), xlabel, TRUE, FALSE, 0);
gtk_widget_show(xlabel); gtk_widget_show(xlabel);
......
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include "gtk/gtk.h" #include "gtk/gtk.h"
#include "libgimp/gimp.h" #include "libgimp/gimp.h"
#include "logo.h" #include "logo.h"
#include "libgimp/stdplugins-intl.h"
/***** Macros *****/ /***** Macros *****/
...@@ -52,8 +53,8 @@ ...@@ -52,8 +53,8 @@
/***** Color model *****/ /***** Color model *****/
#define RGB 0 #define RGB_MODEL 0
#define HSL 1 #define HSL_MODEL 1
/***** Types *****/ /***** Types *****/
typedef struct { typedef struct {
...@@ -157,7 +158,7 @@ static alienmap2_vals_t wvals = { ...@@ -157,7 +158,7 @@ static alienmap2_vals_t wvals = {
0.0, 0.0,
1.0, 1.0,
0.0, 0.0,
RGB, RGB_MODEL,
TRUE, TRUE,
TRUE, TRUE,
TRUE, TRUE,
...@@ -195,7 +196,7 @@ query () ...@@ -195,7 +196,7 @@ query ()
{ PARAM_FLOAT, "greenangle", "Green/saturation component angle factor (0-360)" }, { PARAM_FLOAT, "greenangle", "Green/saturation component angle factor (0-360)" },
{ PARAM_FLOAT, "bluefrequency", "Blue/luminance component frequency factor" }, { PARAM_FLOAT, "bluefrequency", "Blue/luminance component frequency factor" },
{ PARAM_FLOAT, "blueangle", "Blue/luminance component angle factor (0-360)" }, { PARAM_FLOAT, "blueangle", "Blue/luminance component angle factor (0-360)" },
{ PARAM_INT8, "colormodel", "Color model (0: RGB, 1: HSL)" }, { PARAM_INT8, "colormodel", "Color model (0: RGB_MODEL, 1: HSL_MODEL)" },
{ PARAM_INT8, "redmode", "Red/hue application mode (TRUE, FALSE)" }, { PARAM_INT8, "redmode", "Red/hue application mode (TRUE, FALSE)" },
{ PARAM_INT8, "greenmode", "Green/saturation application mode (TRUE, FALSE)" }, { PARAM_INT8, "greenmode", "Green/saturation application mode (TRUE, FALSE)" },
{ PARAM_INT8, "bluemode", "Blue/luminance application mode (TRUE, FALSE)" }, { PARAM_INT8, "bluemode", "Blue/luminance application mode (TRUE, FALSE)" },
...@@ -204,14 +205,16 @@ query () ...@@ -204,14 +205,16 @@ query ()
static int nargs = sizeof (args) / sizeof (args[0]); static int nargs = sizeof (args) / sizeof (args[0]);