[gimp] plug-ins, libgimp: override set_i18n() for all our core plug-ins.
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] plug-ins, libgimp: override set_i18n() for all our core plug-ins.
- Date: Sun, 5 Jun 2022 00:00:08 +0000 (UTC)
commit 18c37f7084fbeb3537d14a0c7e2f94ae031a529d
Author: Jehan <jehan girinstud io>
Date: Thu May 26 00:59:36 2022 +0200
plug-ins, libgimp: override set_i18n() for all our core plug-ins.
Hence avoiding the stderr messages. These are going to be localized with
centrally installed catalogs "gimp*-std-plugins", "gimp*-script-fu" and
"gimp*-python".
We now handle core plug-in localizations differently and in particular,
with kind of a reverse logic:
- We don't consider "gimp*-std-plugins" to be the default catalog
anymore. It made sense in the old world where we would consider the
core plug-ins to be the most important and numerous ones. But we want
to push a world where people are even more encouraged to develop their
own plug-ins. These won't use the standard catalog anymore (because
there are nearly no reasons that the strings are the same, it's only a
confusing logic). So let's explicitly set the standard catalogs with
DEFINE_STD_SET_I18N macro (which maps to a different catalog for
script-fu plug-ins).
- Doing something similar for Python plug-ins which have again their own
catalog.
- Getting rid of the INIT_I18N macro since now all the locale domain
binding is done automatically by libgimp when using the set_i18n()
method infrastructure.
libgimp/stdplugins-intl.h | 21 ++++++++++++---------
plug-ins/common/align-layers.c | 5 +++--
plug-ins/common/animation-optimize.c | 3 ++-
plug-ins/common/animation-play.c | 3 ++-
plug-ins/common/blinds.c | 3 ++-
plug-ins/common/border-average.c | 3 ++-
plug-ins/common/busy-dialog.c | 4 ++--
plug-ins/common/checkerboard.c | 3 ++-
plug-ins/common/cml-explorer.c | 4 ++--
plug-ins/common/colormap-remap.c | 3 ++-
plug-ins/common/compose.c | 3 ++-
plug-ins/common/contrast-retinex.c | 3 ++-
plug-ins/common/crop-zealous.c | 3 ++-
plug-ins/common/curve-bend.c | 3 ++-
plug-ins/common/decompose.c | 3 ++-
plug-ins/common/depth-merge.c | 3 ++-
plug-ins/common/despeckle.c | 3 ++-
plug-ins/common/destripe.c | 3 ++-
plug-ins/common/file-aa.c | 3 ++-
plug-ins/common/file-cel.c | 4 ++--
plug-ins/common/file-compressor.c | 2 ++
plug-ins/common/file-csource.c | 3 ++-
plug-ins/common/file-desktop-link.c | 2 ++
plug-ins/common/file-dicom.c | 4 ++--
plug-ins/common/file-gbr.c | 4 ++--
plug-ins/common/file-gegl.c | 4 ++--
plug-ins/common/file-gif-load.c | 4 ++--
plug-ins/common/file-gif-save.c | 3 ++-
plug-ins/common/file-gih.c | 4 ++--
plug-ins/common/file-header.c | 3 ++-
plug-ins/common/file-heif.c | 5 ++---
plug-ins/common/file-html-table.c | 3 ++-
plug-ins/common/file-jp2-load.c | 2 +-
plug-ins/common/file-jpegxl.c | 4 ++--
plug-ins/common/file-mng.c | 3 ++-
plug-ins/common/file-pat.c | 4 ++--
plug-ins/common/file-pcx.c | 4 ++--
plug-ins/common/file-pdf-load.c | 4 ++--
plug-ins/common/file-pdf-save.c | 4 ++--
plug-ins/common/file-pix.c | 4 ++--
plug-ins/common/file-png.c | 5 ++---
plug-ins/common/file-pnm.c | 4 ++--
plug-ins/common/file-ps.c | 5 ++---
plug-ins/common/file-psp.c | 4 ++--
plug-ins/common/file-raw-data.c | 4 ++--
plug-ins/common/file-sunras.c | 4 ++--
plug-ins/common/file-svg.c | 4 ++--
plug-ins/common/file-tga.c | 4 ++--
plug-ins/common/file-wmf.c | 4 ++--
plug-ins/common/file-xbm.c | 4 ++--
plug-ins/common/file-xmc.c | 5 ++---
plug-ins/common/file-xpm.c | 4 ++--
plug-ins/common/file-xwd.c | 4 ++--
plug-ins/common/film.c | 3 ++-
plug-ins/common/gradient-map.c | 3 ++-
plug-ins/common/grid.c | 3 ++-
plug-ins/common/guillotine.c | 4 ++--
plug-ins/common/hot.c | 3 ++-
plug-ins/common/jigsaw.c | 3 ++-
plug-ins/common/mail.c | 4 ++--
plug-ins/common/nl-filter.c | 3 ++-
plug-ins/common/plugin-browser.c | 4 ++--
plug-ins/common/procedure-browser.c | 4 ++--
plug-ins/common/qbist.c | 3 ++-
plug-ins/common/sample-colorize.c | 3 ++-
plug-ins/common/smooth-palette.c | 3 ++-
plug-ins/common/sparkle.c | 3 ++-
plug-ins/common/sphere-designer.c | 3 ++-
plug-ins/common/tile-small.c | 3 ++-
plug-ins/common/tile.c | 3 ++-
plug-ins/common/unit-editor.c | 4 ++--
plug-ins/common/van-gogh-lic.c | 3 ++-
plug-ins/common/warp.c | 3 ++-
plug-ins/common/wavelet-decompose.c | 3 ++-
plug-ins/common/web-browser.c | 4 ++--
plug-ins/common/web-page.c | 4 ++--
plug-ins/file-bmp/bmp.c | 4 ++--
plug-ins/file-dds/dds.c | 4 ++--
plug-ins/file-exr/file-exr.c | 3 ++-
plug-ins/file-faxg3/faxg3.c | 3 ++-
plug-ins/file-fits/fits.c | 4 ++--
plug-ins/file-fli/fli-gimp.c | 4 ++--
plug-ins/file-ico/ico.c | 6 ++----
plug-ins/file-jpeg/jpeg.c | 5 ++---
plug-ins/file-psd/psd.c | 5 ++---
plug-ins/file-raw/file-darktable.c | 6 ++----
plug-ins/file-raw/file-raw-placeholder.c | 4 ++--
plug-ins/file-raw/file-rawtherapee.c | 6 ++----
plug-ins/file-sgi/sgi.c | 4 ++--
plug-ins/file-tiff/file-tiff.c | 4 ++--
plug-ins/file-webp/file-webp.c | 4 ++--
plug-ins/flame/flame.c | 3 ++-
plug-ins/fractal-explorer/fractal-explorer.c | 3 ++-
plug-ins/gfig/gfig.c | 4 ++--
plug-ins/gimpressionist/gimp.c | 3 ++-
plug-ins/gradient-flare/gradient-flare.c | 3 ++-
plug-ins/help-browser/help-browser.c | 4 ++--
plug-ins/help/help.c | 4 ++--
plug-ins/ifs-compose/ifs-compose.c | 3 ++-
plug-ins/imagemap/imap_main.c | 3 ++-
plug-ins/lighting/lighting-main.c | 3 ++-
plug-ins/map-object/map-object-main.c | 3 ++-
plug-ins/metadata/metadata-editor.c | 4 ++--
plug-ins/metadata/metadata-viewer.c | 4 ++--
plug-ins/pagecurl/pagecurl.c | 3 ++-
plug-ins/print/print.c | 3 ++-
plug-ins/python/colorxhtml.py | 11 ++++++-----
plug-ins/python/file-openraster.py | 3 +++
plug-ins/python/foggify.py | 11 ++++++-----
plug-ins/python/gradients-save-as-css.py | 11 ++++++-----
plug-ins/python/histogram-export.py | 14 +++++++-------
plug-ins/python/palette-offset.py | 11 ++++++-----
plug-ins/python/palette-sort.py | 11 ++++++-----
plug-ins/python/palette-to-gradient.py | 11 ++++++-----
plug-ins/python/python-console/python-console.py | 3 +++
plug-ins/python/python-eval.py | 3 +++
plug-ins/python/spyro-plus.py | 12 ++++++------
plug-ins/screenshot/screenshot.c | 3 ++-
plug-ins/script-fu/script-fu-interface.c | 2 --
plug-ins/script-fu/script-fu-intl.h | 22 ++++++++++++----------
plug-ins/script-fu/script-fu-server.c | 2 --
plug-ins/script-fu/script-fu.c | 7 ++-----
plug-ins/selection-to-path/selection-to-path.c | 3 ++-
plug-ins/twain/twain.c | 5 +++--
124 files changed, 301 insertions(+), 244 deletions(-)
---
diff --git a/libgimp/stdplugins-intl.h b/libgimp/stdplugins-intl.h
index 6aad80e44c..4a2d7be6de 100644
--- a/libgimp/stdplugins-intl.h
+++ b/libgimp/stdplugins-intl.h
@@ -27,16 +27,19 @@
#include <glib/gi18n.h>
-#ifndef HAVE_BIND_TEXTDOMAIN_CODESET
-# define bind_textdomain_codeset(Domain, Codeset) (Domain)
-#endif
-#define INIT_I18N() G_STMT_START{ \
- bindtextdomain (GETTEXT_PACKAGE"-std-plug-ins", \
- gimp_locale_directory ()); \
- bind_textdomain_codeset (GETTEXT_PACKAGE"-std-plug-ins", "UTF-8"); \
- textdomain (GETTEXT_PACKAGE"-std-plug-ins"); \
-}G_STMT_END
+#define DEFINE_STD_SET_I18N \
+static gboolean \
+set_i18n (GimpPlugIn *plug_in, \
+ const gchar *procedure_name, \
+ gchar **gettext_domain, \
+ gchar **catalog_dir) \
+{ \
+ *gettext_domain = g_strdup (GETTEXT_PACKAGE"-std-plug-ins"); \
+ return TRUE; \
+};
+
+#define STD_SET_I18N set_i18n
#endif /* __STDPLUGINS_INTL_H__ */
diff --git a/plug-ins/common/align-layers.c b/plug-ins/common/align-layers.c
index 2e9961c28c..6eb8a7ec3c 100644
--- a/plug-ins/common/align-layers.c
+++ b/plug-ins/common/align-layers.c
@@ -131,6 +131,8 @@ static void align_layers_scale_entry_update_int (GimpLabelSpin
G_DEFINE_TYPE (AlignLayers, align_layers, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (ALIGN_LAYERS_TYPE)
+DEFINE_STD_SET_I18N
+
/* dialog variables */
typedef struct
@@ -162,6 +164,7 @@ align_layers_class_init (AlignLayersClass *klass)
plug_in_class->query_procedures = align_layers_query_procedures;
plug_in_class->create_procedure = align_layers_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -242,8 +245,6 @@ align_layers_run (GimpProcedure *procedure,
GList *layers;
gint layer_num;
- INIT_I18N ();
-
switch ( run_mode )
{
case GIMP_RUN_INTERACTIVE:
diff --git a/plug-ins/common/animation-optimize.c b/plug-ins/common/animation-optimize.c
index f30b3cf3ee..6e13ee94a7 100644
--- a/plug-ins/common/animation-optimize.c
+++ b/plug-ins/common/animation-optimize.c
@@ -115,6 +115,7 @@ static gboolean is_ms_tag (const gchar *str,
G_DEFINE_TYPE (Optimize, optimize, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (OPTIMIZE_TYPE)
+DEFINE_STD_SET_I18N
/* Global widgets'n'stuff */
@@ -134,6 +135,7 @@ optimize_class_init (OptimizeClass *klass)
plug_in_class->query_procedures = optimize_query_procedures;
plug_in_class->create_procedure = optimize_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -316,7 +318,6 @@ optimize_run (GimpProcedure *procedure,
const gchar *name = gimp_procedure_get_name (procedure);
gboolean diff_only = FALSE;
- INIT_I18N ();
gegl_init (NULL, NULL);
if (! strcmp (name, OPTIMIZE_PROC))
diff --git a/plug-ins/common/animation-play.c b/plug-ins/common/animation-play.c
index 70381e1470..6edd169775 100644
--- a/plug-ins/common/animation-play.c
+++ b/plug-ins/common/animation-play.c
@@ -162,6 +162,7 @@ static gboolean is_ms_tag (const gchar *str,
G_DEFINE_TYPE (Play, play, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (PLAY_TYPE)
+DEFINE_STD_SET_I18N
/* Global widgets'n'stuff */
@@ -217,6 +218,7 @@ play_class_init (PlayClass *klass)
plug_in_class->query_procedures = play_query_procedures;
plug_in_class->create_procedure = play_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -275,7 +277,6 @@ play_run (GimpProcedure *procedure,
const GimpValueArray *args,
gpointer run_data)
{
- INIT_I18N ();
gegl_init (NULL, NULL);
image = _image;
diff --git a/plug-ins/common/blinds.c b/plug-ins/common/blinds.c
index f86410372d..11c5f10885 100644
--- a/plug-ins/common/blinds.c
+++ b/plug-ins/common/blinds.c
@@ -99,6 +99,7 @@ static void apply_blinds (GimpDrawable *drawable)
G_DEFINE_TYPE (Blinds, blinds, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (BLINDS_TYPE)
+DEFINE_STD_SET_I18N
/* Array to hold each size of fans. And no there are not each the
@@ -124,6 +125,7 @@ blinds_class_init (BlindsClass *klass)
plug_in_class->query_procedures = blinds_query_procedures;
plug_in_class->create_procedure = blinds_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -206,7 +208,6 @@ blinds_run (GimpProcedure *procedure,
{
GimpDrawable *drawable;
- INIT_I18N ();
gegl_init (NULL, NULL);
if (n_drawables != 1)
diff --git a/plug-ins/common/border-average.c b/plug-ins/common/border-average.c
index 95871d6542..c10cef1bf6 100644
--- a/plug-ins/common/border-average.c
+++ b/plug-ins/common/border-average.c
@@ -81,6 +81,7 @@ static void thickness_callback (GtkWidget *widget,
G_DEFINE_TYPE (BorderAverage, border_average, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (BORDER_AVERAGE_TYPE)
+DEFINE_STD_SET_I18N
static gint borderaverage_thickness = 3;
@@ -105,6 +106,7 @@ border_average_class_init (BorderAverageClass *klass)
plug_in_class->query_procedures = border_average_query_procedures;
plug_in_class->create_procedure = border_average_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -183,7 +185,6 @@ border_average_run (GimpProcedure *procedure,
GimpRGB result_color = { 0.0, };
GeglBuffer *buffer;
- INIT_I18N ();
gegl_init (NULL, NULL);
if (n_drawables != 1)
diff --git a/plug-ins/common/busy-dialog.c b/plug-ins/common/busy-dialog.c
index 6b09fe6a0e..bf21d3bec5 100644
--- a/plug-ins/common/busy-dialog.c
+++ b/plug-ins/common/busy-dialog.c
@@ -85,6 +85,7 @@ static void busy_dialog_response (GtkDialog *di
G_DEFINE_TYPE (BusyDialog, busy_dialog, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (BUSY_DIALOG_TYPE)
+DEFINE_STD_SET_I18N
static void
busy_dialog_class_init (BusyDialogClass *klass)
@@ -93,6 +94,7 @@ busy_dialog_class_init (BusyDialogClass *klass)
plug_in_class->query_procedures = busy_dialog_query_procedures;
plug_in_class->create_procedure = busy_dialog_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -178,8 +180,6 @@ busy_dialog_run (GimpProcedure *procedure,
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
GimpRunMode run_mode;
- INIT_I18N ();
-
run_mode = GIMP_VALUES_GET_ENUM (args, 0);
switch (run_mode)
{
diff --git a/plug-ins/common/checkerboard.c b/plug-ins/common/checkerboard.c
index a7286f63cb..9866cbd9be 100644
--- a/plug-ins/common/checkerboard.c
+++ b/plug-ins/common/checkerboard.c
@@ -86,6 +86,7 @@ static void check_size_update_callback (GtkWidget *widget);
G_DEFINE_TYPE (Checkerboard, checkerboard, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (CHECKERBOARD_TYPE)
+DEFINE_STD_SET_I18N
static CheckVals cvals =
@@ -102,6 +103,7 @@ checkerboard_class_init (CheckerboardClass *klass)
plug_in_class->query_procedures = checkerboard_query_procedures;
plug_in_class->create_procedure = checkerboard_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -172,7 +174,6 @@ checkerboard_run (GimpProcedure *procedure,
{
GimpDrawable *drawable;
- INIT_I18N ();
gegl_init (NULL, NULL);
if (n_drawables != 1)
diff --git a/plug-ins/common/cml-explorer.c b/plug-ins/common/cml-explorer.c
index 7ea796b14c..4cc835ab6a 100644
--- a/plug-ins/common/cml-explorer.c
+++ b/plug-ins/common/cml-explorer.c
@@ -424,6 +424,7 @@ static gdouble parse_line_to_gdouble (FILE *file,
G_DEFINE_TYPE (Explorer, explorer, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (EXPLORER_TYPE)
+DEFINE_STD_SET_I18N
static GtkWidget *preview;
@@ -474,6 +475,7 @@ explorer_class_init (ExplorerClass *klass)
plug_in_class->query_procedures = explorer_query_procedures;
plug_in_class->create_procedure = explorer_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -548,8 +550,6 @@ explorer_run (GimpProcedure *procedure,
const GimpValueArray *args,
gpointer run_data)
{
- INIT_I18N ();
-
if (n_drawables != 1)
{
GError *error = NULL;
diff --git a/plug-ins/common/colormap-remap.c b/plug-ins/common/colormap-remap.c
index 7affd67b8c..1909714168 100644
--- a/plug-ins/common/colormap-remap.c
+++ b/plug-ins/common/colormap-remap.c
@@ -85,6 +85,7 @@ static gboolean remap_dialog (GimpImage *image,
G_DEFINE_TYPE (Remap, remap, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (REMAP_TYPE)
+DEFINE_STD_SET_I18N
static void
@@ -94,6 +95,7 @@ remap_class_init (RemapClass *klass)
plug_in_class->query_procedures = remap_query_procedures;
plug_in_class->create_procedure = remap_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -214,7 +216,6 @@ remap_run (GimpProcedure *procedure,
guchar map[256];
gint i;
- INIT_I18N ();
gegl_init (NULL, NULL);
/* Make sure that the image is indexed */
diff --git a/plug-ins/common/compose.c b/plug-ins/common/compose.c
index 7856a7055c..8c65ff9c31 100644
--- a/plug-ins/common/compose.c
+++ b/plug-ins/common/compose.c
@@ -194,6 +194,7 @@ static void type_combo_callback (GimpIntComboBox *combo,
G_DEFINE_TYPE (Compose, compose, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (COMPOSE_TYPE)
+DEFINE_STD_SET_I18N
/* Decompositions availables.
@@ -344,6 +345,7 @@ compose_class_init (ComposeClass *klass)
plug_in_class->query_procedures = compose_query_procedures;
plug_in_class->create_procedure = compose_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -541,7 +543,6 @@ compose_run (GimpProcedure *procedure,
gint compose_by_drawable;
gint i;
- INIT_I18N ();
gegl_init (NULL, NULL);
compose_by_drawable = ! strcmp (name, DRAWABLE_COMPOSE_PROC);
diff --git a/plug-ins/common/contrast-retinex.c b/plug-ins/common/contrast-retinex.c
index 7081796a7a..2d05ce4481 100644
--- a/plug-ins/common/contrast-retinex.c
+++ b/plug-ins/common/contrast-retinex.c
@@ -143,6 +143,7 @@ static void MSRCR (guchar *src,
G_DEFINE_TYPE (Retinex, retinex, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (RETINEX_TYPE)
+DEFINE_STD_SET_I18N
static RetinexParams rvals =
@@ -161,6 +162,7 @@ retinex_class_init (RetinexClass *klass)
plug_in_class->query_procedures = retinex_query_procedures;
plug_in_class->create_procedure = retinex_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -250,7 +252,6 @@ retinex_run (GimpProcedure *procedure,
GimpDrawable *drawable;
gint x, y, width, height;
- INIT_I18N ();
gegl_init (NULL, NULL);
if (n_drawables != 1)
diff --git a/plug-ins/common/crop-zealous.c b/plug-ins/common/crop-zealous.c
index 0cdeb37681..3c4d27d014 100644
--- a/plug-ins/common/crop-zealous.c
+++ b/plug-ins/common/crop-zealous.c
@@ -71,6 +71,7 @@ static void do_zcrop (GimpDrawable *drawable,
G_DEFINE_TYPE (Crop, crop, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (CROP_TYPE)
+DEFINE_STD_SET_I18N
static void
@@ -80,6 +81,7 @@ crop_class_init (CropClass *klass)
plug_in_class->query_procedures = crop_query_procedures;
plug_in_class->create_procedure = crop_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -137,7 +139,6 @@ crop_run (GimpProcedure *procedure,
{
GimpDrawable *drawable;
- INIT_I18N ();
gegl_init (NULL, NULL);
gimp_progress_init (_("Zealous cropping"));
diff --git a/plug-ins/common/curve-bend.c b/plug-ins/common/curve-bend.c
index 0796168720..fd44e903ff 100644
--- a/plug-ins/common/curve-bend.c
+++ b/plug-ins/common/curve-bend.c
@@ -377,6 +377,7 @@ static int p_save_pointfile (BenderDialog *cd,
G_DEFINE_TYPE (Bender, bender, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (BENDER_TYPE)
+DEFINE_STD_SET_I18N
static CRMatrix CR_basis =
@@ -397,6 +398,7 @@ bender_class_init (BenderClass *klass)
plug_in_class->query_procedures = bender_query_procedures;
plug_in_class->create_procedure = bender_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -666,7 +668,6 @@ bender_run (GimpProcedure *procedure,
GimpLayer *bent_layer = NULL;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
if (n_drawables != 1)
diff --git a/plug-ins/common/decompose.c b/plug-ins/common/decompose.c
index 27882d31c2..3d83b8c288 100644
--- a/plug-ins/common/decompose.c
+++ b/plug-ins/common/decompose.c
@@ -150,6 +150,7 @@ static gchar * generate_filename (GimpImage *image,
G_DEFINE_TYPE (Decompose, decompose, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (DECOMPOSE_TYPE)
+DEFINE_STD_SET_I18N
#define CPN_RGBA_R { "R", N_("red"), 0.0, 1.0, FALSE }
@@ -232,6 +233,7 @@ decompose_class_init (DecomposeClass *klass)
plug_in_class->query_procedures = decompose_query_procedures;
plug_in_class->create_procedure = decompose_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -364,7 +366,6 @@ decompose_run (GimpProcedure *procedure,
gchar *tmp;
gint j;
- INIT_I18N ();
gegl_init (NULL, NULL);
if (n_drawables != 1)
diff --git a/plug-ins/common/depth-merge.c b/plug-ins/common/depth-merge.c
index d45693b93c..013330eff9 100644
--- a/plug-ins/common/depth-merge.c
+++ b/plug-ins/common/depth-merge.c
@@ -175,6 +175,7 @@ static void util_fillReducedBuffer (guchar *dest,
G_DEFINE_TYPE (Merge, merge, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (MERGE_TYPE)
+DEFINE_STD_SET_I18N
static void
@@ -184,6 +185,7 @@ merge_class_init (MergeClass *klass)
plug_in_class->query_procedures = merge_query_procedures;
plug_in_class->create_procedure = merge_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -295,7 +297,6 @@ merge_run (GimpProcedure *procedure,
GimpDrawable *drawable;
DepthMerge dm;
- INIT_I18N ();
gegl_init (NULL, NULL);
if (n_drawables != 1)
diff --git a/plug-ins/common/despeckle.c b/plug-ins/common/despeckle.c
index f0554cf7fd..dddb0c4d4a 100644
--- a/plug-ins/common/despeckle.c
+++ b/plug-ins/common/despeckle.c
@@ -129,6 +129,7 @@ static void preview_update (GtkWidget *previe
G_DEFINE_TYPE (Despeckle, despeckle, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (DESPECKLE_TYPE)
+DEFINE_STD_SET_I18N
/* Number of pixels in actual histogram falling into each category */
@@ -146,6 +147,7 @@ despeckle_class_init (DespeckleClass *klass)
plug_in_class->query_procedures = despeckle_query_procedures;
plug_in_class->create_procedure = despeckle_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -231,7 +233,6 @@ despeckle_run (GimpProcedure *procedure,
GimpProcedureConfig *config;
GimpDrawable *drawable;
- INIT_I18N ();
gegl_init (NULL, NULL);
if (n_drawables != 1)
diff --git a/plug-ins/common/destripe.c b/plug-ins/common/destripe.c
index 3a0217e445..2cc5fb2f3b 100644
--- a/plug-ins/common/destripe.c
+++ b/plug-ins/common/destripe.c
@@ -90,6 +90,7 @@ static void destripe_scale_entry_update_int (GimpLabelSpin *entry,
G_DEFINE_TYPE (Destripe, destripe, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (DESTRIPE_TYPE)
+DEFINE_STD_SET_I18N
static DestripeValues vals =
@@ -107,6 +108,7 @@ destripe_class_init (DestripeClass *klass)
plug_in_class->query_procedures = destripe_query_procedures;
plug_in_class->create_procedure = destripe_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -171,7 +173,6 @@ destripe_run (GimpProcedure *procedure,
{
GimpDrawable *drawable;
- INIT_I18N ();
gegl_init (NULL, NULL);
if (n_drawables != 1)
diff --git a/plug-ins/common/file-aa.c b/plug-ins/common/file-aa.c
index 065e9c1c03..007707e0a0 100644
--- a/plug-ins/common/file-aa.c
+++ b/plug-ins/common/file-aa.c
@@ -87,6 +87,7 @@ static gboolean save_dialog (GimpProcedure *procedure,
G_DEFINE_TYPE (Ascii, ascii, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (ASCII_TYPE)
+DEFINE_STD_SET_I18N
static void
@@ -96,6 +97,7 @@ ascii_class_init (AsciiClass *klass)
plug_in_class->query_procedures = ascii_query_procedures;
plug_in_class->create_procedure = ascii_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -171,7 +173,6 @@ ascii_save (GimpProcedure *procedure,
GimpExportReturn export = GIMP_EXPORT_CANCEL;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
config = gimp_procedure_create_config (procedure);
diff --git a/plug-ins/common/file-cel.c b/plug-ins/common/file-cel.c
index f959190a0e..3138dc7668 100644
--- a/plug-ins/common/file-cel.c
+++ b/plug-ins/common/file-cel.c
@@ -92,6 +92,7 @@ static gboolean need_palette (GFile *file,
G_DEFINE_TYPE (Cel, cel, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (CEL_TYPE)
+DEFINE_STD_SET_I18N
static gchar *palette_file = NULL;
@@ -105,6 +106,7 @@ cel_class_init (CelClass *klass)
plug_in_class->query_procedures = cel_query_procedures;
plug_in_class->create_procedure = cel_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -207,7 +209,6 @@ cel_load (GimpProcedure *procedure,
gboolean needs_palette = FALSE;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
if (run_mode != GIMP_RUN_NONINTERACTIVE)
@@ -280,7 +281,6 @@ cel_save (GimpProcedure *procedure,
GimpExportReturn export = GIMP_EXPORT_CANCEL;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
switch (run_mode)
diff --git a/plug-ins/common/file-compressor.c b/plug-ins/common/file-compressor.c
index 1e59f6ada2..54fa2bd12c 100644
--- a/plug-ins/common/file-compressor.c
+++ b/plug-ins/common/file-compressor.c
@@ -204,6 +204,7 @@ static goffset get_file_info (GFile *file);
G_DEFINE_TYPE (Compressor, compressor, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (COMPRESSOR_TYPE)
+DEFINE_STD_SET_I18N
static const CompressorEntry compressors[] =
@@ -274,6 +275,7 @@ compressor_class_init (CompressorClass *klass)
plug_in_class->query_procedures = compressor_query_procedures;
plug_in_class->create_procedure = compressor_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
diff --git a/plug-ins/common/file-csource.c b/plug-ins/common/file-csource.c
index 078f92219d..57bac6839c 100644
--- a/plug-ins/common/file-csource.c
+++ b/plug-ins/common/file-csource.c
@@ -80,6 +80,7 @@ static gboolean save_dialog (GimpProcedure *procedur
G_DEFINE_TYPE (Csource, csource, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (CSOURCE_TYPE)
+DEFINE_STD_SET_I18N
static void
@@ -89,6 +90,7 @@ csource_class_init (CsourceClass *klass)
plug_in_class->query_procedures = csource_query_procedures;
plug_in_class->create_procedure = csource_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -213,7 +215,6 @@ csource_save (GimpProcedure *procedure,
gchar *comment;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
if (run_mode != GIMP_RUN_INTERACTIVE)
diff --git a/plug-ins/common/file-desktop-link.c b/plug-ins/common/file-desktop-link.c
index 73f041c2f1..4a21288364 100644
--- a/plug-ins/common/file-desktop-link.c
+++ b/plug-ins/common/file-desktop-link.c
@@ -73,6 +73,7 @@ static GimpImage * load_image (GFile *file,
G_DEFINE_TYPE (Desktop, desktop, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (DESKTOP_TYPE)
+DEFINE_STD_SET_I18N
static void
@@ -82,6 +83,7 @@ desktop_class_init (DesktopClass *klass)
plug_in_class->query_procedures = desktop_query_procedures;
plug_in_class->create_procedure = desktop_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
diff --git a/plug-ins/common/file-dicom.c b/plug-ins/common/file-dicom.c
index 75ac7e6ec4..38234b50b2 100644
--- a/plug-ins/common/file-dicom.c
+++ b/plug-ins/common/file-dicom.c
@@ -129,6 +129,7 @@ static gboolean write_group_to_file (FILE *dicom,
G_DEFINE_TYPE (Dicom, dicom, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (DICOM_TYPE)
+DEFINE_STD_SET_I18N
static void
@@ -138,6 +139,7 @@ dicom_class_init (DicomClass *klass)
plug_in_class->query_procedures = dicom_query_procedures;
plug_in_class->create_procedure = dicom_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -240,7 +242,6 @@ dicom_load (GimpProcedure *procedure,
GimpImage *image;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
image = load_image (file, &error);
@@ -273,7 +274,6 @@ dicom_save (GimpProcedure *procedure,
GimpExportReturn export = GIMP_EXPORT_CANCEL;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
switch (run_mode)
diff --git a/plug-ins/common/file-gbr.c b/plug-ins/common/file-gbr.c
index 01b3b2d0f9..4a670e2c62 100644
--- a/plug-ins/common/file-gbr.c
+++ b/plug-ins/common/file-gbr.c
@@ -83,6 +83,7 @@ static gboolean save_dialog (GimpProcedure *procedure,
G_DEFINE_TYPE (Gbr, gbr, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (GBR_TYPE)
+DEFINE_STD_SET_I18N
static void
@@ -92,6 +93,7 @@ gbr_class_init (GbrClass *klass)
plug_in_class->query_procedures = gbr_query_procedures;
plug_in_class->create_procedure = gbr_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -174,8 +176,6 @@ gbr_save (GimpProcedure *procedure,
gchar *description;
GError *error = NULL;
- INIT_I18N ();
-
config = gimp_procedure_create_config (procedure);
gimp_procedure_config_begin_run (config, image, run_mode, args);
diff --git a/plug-ins/common/file-gegl.c b/plug-ins/common/file-gegl.c
index a4643dc27e..2dbdbbff03 100644
--- a/plug-ins/common/file-gegl.c
+++ b/plug-ins/common/file-gegl.c
@@ -105,6 +105,7 @@ static gboolean save_image (GFile *file,
G_DEFINE_TYPE (Goat, goat, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (GOAT_TYPE)
+DEFINE_STD_SET_I18N
static const FileFormat file_formats[] =
@@ -149,6 +150,7 @@ goat_class_init (GoatClass *klass)
plug_in_class->query_procedures = goat_query_procedures;
plug_in_class->create_procedure = goat_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -246,7 +248,6 @@ goat_load (GimpProcedure *procedure,
GimpImage *image;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
image = load_image (file, format->load_op, &error);
@@ -280,7 +281,6 @@ goat_save (GimpProcedure *procedure,
GimpExportReturn export = GIMP_EXPORT_CANCEL;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
switch (run_mode)
diff --git a/plug-ins/common/file-gif-load.c b/plug-ins/common/file-gif-load.c
index 300a9bd063..aeb28a88e9 100644
--- a/plug-ins/common/file-gif-load.c
+++ b/plug-ins/common/file-gif-load.c
@@ -125,6 +125,7 @@ static GimpImage * load_image (GFile *file,
G_DEFINE_TYPE (Gif, gif, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (GIF_TYPE)
+DEFINE_STD_SET_I18N
static guchar used_cmap[3][256];
@@ -141,6 +142,7 @@ gif_class_init (GifClass *klass)
plug_in_class->query_procedures = gif_query_procedures;
plug_in_class->create_procedure = gif_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -228,7 +230,6 @@ gif_load (GimpProcedure *procedure,
GimpImage *image;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
image = load_image (file, FALSE, &error);
@@ -276,7 +277,6 @@ gif_load_thumb (GimpProcedure *procedure,
GimpImage *image;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
image = load_image (file, TRUE, &error);
diff --git a/plug-ins/common/file-gif-save.c b/plug-ins/common/file-gif-save.c
index d5fc738bb9..a580f38c04 100644
--- a/plug-ins/common/file-gif-save.c
+++ b/plug-ins/common/file-gif-save.c
@@ -105,6 +105,7 @@ static gboolean save_dialog (GimpImage *image,
G_DEFINE_TYPE (Gif, gif, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (GIF_TYPE)
+DEFINE_STD_SET_I18N
static gint Interlace; /* For compression code */
@@ -117,6 +118,7 @@ gif_class_init (GifClass *klass)
plug_in_class->query_procedures = gif_query_procedures;
plug_in_class->create_procedure = gif_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -263,7 +265,6 @@ gif_save (GimpProcedure *procedure,
GimpImage *sanitized_image = NULL;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
config = gimp_procedure_create_config (procedure);
diff --git a/plug-ins/common/file-gih.c b/plug-ins/common/file-gih.c
index 5d91ce6d56..0d242a7789 100644
--- a/plug-ins/common/file-gih.c
+++ b/plug-ins/common/file-gih.c
@@ -119,6 +119,7 @@ static gboolean gih_save_dialog (GimpImage *image);
G_DEFINE_TYPE (Gih, gih, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (GIH_TYPE)
+DEFINE_STD_SET_I18N
static BrushInfo info =
@@ -146,6 +147,7 @@ gih_class_init (GihClass *klass)
plug_in_class->query_procedures = gih_query_procedures;
plug_in_class->create_procedure = gih_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -279,8 +281,6 @@ gih_save (GimpProcedure *procedure,
GError *error = NULL;
gint i;
- INIT_I18N();
-
orig_image = image;
switch (run_mode)
diff --git a/plug-ins/common/file-header.c b/plug-ins/common/file-header.c
index 37e8f8d2b0..143e8cf192 100644
--- a/plug-ins/common/file-header.c
+++ b/plug-ins/common/file-header.c
@@ -76,6 +76,7 @@ static gboolean print (GOutputStream *output,
G_DEFINE_TYPE (Header, header, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (HEADER_TYPE)
+DEFINE_STD_SET_I18N
static void
@@ -85,6 +86,7 @@ header_class_init (HeaderClass *klass)
plug_in_class->query_procedures = header_query_procedures;
plug_in_class->create_procedure = header_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -149,7 +151,6 @@ header_save (GimpProcedure *procedure,
GimpExportReturn export = GIMP_EXPORT_CANCEL;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
switch (run_mode)
diff --git a/plug-ins/common/file-heif.c b/plug-ins/common/file-heif.c
index 649b20dbb0..84b37dcaa0 100644
--- a/plug-ins/common/file-heif.c
+++ b/plug-ins/common/file-heif.c
@@ -126,6 +126,7 @@ static gboolean save_dialog (GimpProcedure *procedure,
G_DEFINE_TYPE (Heif, heif, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (HEIF_TYPE)
+DEFINE_STD_SET_I18N
static void
@@ -135,6 +136,7 @@ heif_class_init (HeifClass *klass)
plug_in_class->init_procedures = heif_init_procedures;
plug_in_class->create_procedure = heif_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -416,7 +418,6 @@ heif_load (GimpProcedure *procedure,
gboolean interactive;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
interactive = (run_mode == GIMP_RUN_INTERACTIVE);
@@ -454,7 +455,6 @@ heif_save (GimpProcedure *procedure,
GimpMetadata *metadata;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
config = gimp_procedure_create_config (procedure);
@@ -543,7 +543,6 @@ heif_av1_save (GimpProcedure *procedure,
GimpMetadata *metadata;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
config = gimp_procedure_create_config (procedure);
diff --git a/plug-ins/common/file-html-table.c b/plug-ins/common/file-html-table.c
index 4aab0072bc..b338dd39b4 100644
--- a/plug-ins/common/file-html-table.c
+++ b/plug-ins/common/file-html-table.c
@@ -112,6 +112,7 @@ static gboolean color_comp (guchar *buffer,
G_DEFINE_TYPE (Html, html, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (HTML_TYPE)
+DEFINE_STD_SET_I18N
static void
@@ -121,6 +122,7 @@ html_class_init (HtmlClass *klass)
plug_in_class->query_procedures = html_query_procedures;
plug_in_class->create_procedure = html_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -264,7 +266,6 @@ html_save (GimpProcedure *procedure,
GeglBuffer *buffer;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
if (run_mode != GIMP_RUN_INTERACTIVE)
diff --git a/plug-ins/common/file-jp2-load.c b/plug-ins/common/file-jp2-load.c
index 0e27100588..e6b8035492 100644
--- a/plug-ins/common/file-jp2-load.c
+++ b/plug-ins/common/file-jp2-load.c
@@ -148,6 +148,7 @@ jp2_class_init (Jp2Class *klass)
plug_in_class->query_procedures = jp2_query_procedures;
plug_in_class->create_procedure = jp2_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -259,7 +260,6 @@ jp2_load (GimpProcedure *procedure,
gboolean profile_loaded = FALSE;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
switch (run_mode)
diff --git a/plug-ins/common/file-jpegxl.c b/plug-ins/common/file-jpegxl.c
index 07c8de5505..5cf49ff995 100644
--- a/plug-ins/common/file-jpegxl.c
+++ b/plug-ins/common/file-jpegxl.c
@@ -76,6 +76,7 @@ static GimpValueArray *jpegxl_save (GimpProcedure *procedure,
G_DEFINE_TYPE (JpegXL, jpegxl, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (JPEGXL_TYPE)
+DEFINE_STD_SET_I18N
static void
jpegxl_class_init (JpegXLClass *klass)
@@ -84,6 +85,7 @@ jpegxl_class_init (JpegXLClass *klass)
plug_in_class->query_procedures = jpegxl_query_procedures;
plug_in_class->create_procedure = jpegxl_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -642,7 +644,6 @@ jpegxl_load (GimpProcedure *procedure,
GimpImage *image;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
switch (run_mode)
@@ -1165,7 +1166,6 @@ jpegxl_save (GimpProcedure *procedure,
GimpExportReturn export = GIMP_EXPORT_CANCEL;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
config = gimp_procedure_create_config (procedure);
diff --git a/plug-ins/common/file-mng.c b/plug-ins/common/file-mng.c
index e052b47ef8..0954c9c427 100644
--- a/plug-ins/common/file-mng.c
+++ b/plug-ins/common/file-mng.c
@@ -210,6 +210,7 @@ static gboolean mng_save_dialog (GimpImage *image,
G_DEFINE_TYPE (Mng, mng, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (MNG_TYPE)
+DEFINE_STD_SET_I18N
static struct mng_globals_t mngg;
@@ -222,6 +223,7 @@ mng_class_init (MngClass *klass)
plug_in_class->query_procedures = mng_query_procedures;
plug_in_class->create_procedure = mng_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -365,7 +367,6 @@ mng_save (GimpProcedure *procedure,
GimpExportReturn export = GIMP_EXPORT_IGNORE;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
config = gimp_procedure_create_config (procedure);
diff --git a/plug-ins/common/file-pat.c b/plug-ins/common/file-pat.c
index 53f26ddcb1..7a27f0d388 100644
--- a/plug-ins/common/file-pat.c
+++ b/plug-ins/common/file-pat.c
@@ -70,6 +70,7 @@ static gboolean save_dialog (GimpProcedure *procedure,
G_DEFINE_TYPE (Pat, pat, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (PAT_TYPE)
+DEFINE_STD_SET_I18N
static void
@@ -79,6 +80,7 @@ pat_class_init (PatClass *klass)
plug_in_class->query_procedures = pat_query_procedures;
plug_in_class->create_procedure = pat_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -153,8 +155,6 @@ pat_save (GimpProcedure *procedure,
gchar *description;
GError *error = NULL;
- INIT_I18N ();
-
config = gimp_procedure_create_config (procedure);
gimp_procedure_config_begin_run (config, image, run_mode, args);
diff --git a/plug-ins/common/file-pcx.c b/plug-ins/common/file-pcx.c
index 59ad737b0a..02b97878a8 100644
--- a/plug-ins/common/file-pcx.c
+++ b/plug-ins/common/file-pcx.c
@@ -137,6 +137,7 @@ static void writeline (FILE *fp,
G_DEFINE_TYPE (Pcx, pcx, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (PCX_TYPE)
+DEFINE_STD_SET_I18N
static void
@@ -146,6 +147,7 @@ pcx_class_init (PcxClass *klass)
plug_in_class->query_procedures = pcx_query_procedures;
plug_in_class->create_procedure = pcx_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -233,7 +235,6 @@ pcx_load (GimpProcedure *procedure,
GimpImage *image;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
image = load_image (file, &error);
@@ -266,7 +267,6 @@ pcx_save (GimpProcedure *procedure,
GimpExportReturn export = GIMP_EXPORT_CANCEL;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
switch (run_mode)
diff --git a/plug-ins/common/file-pdf-load.c b/plug-ins/common/file-pdf-load.c
index 1ce8e5453c..44d84c9c88 100644
--- a/plug-ins/common/file-pdf-load.c
+++ b/plug-ins/common/file-pdf-load.c
@@ -287,6 +287,7 @@ static GimpLayer * layer_from_surface (GimpImage *image,
G_DEFINE_TYPE (Pdf, pdf, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (PDF_TYPE)
+DEFINE_STD_SET_I18N
static void
@@ -296,6 +297,7 @@ pdf_class_init (PdfClass *klass)
plug_in_class->query_procedures = pdf_query_procedures;
plug_in_class->create_procedure = pdf_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -409,7 +411,6 @@ pdf_load (GimpProcedure *procedure,
PdfSelectedPages pages = { 0, NULL };
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
switch (run_mode)
@@ -560,7 +561,6 @@ pdf_load_thumb (GimpProcedure *procedure,
cairo_surface_t *surface = NULL;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
doc = open_document (file,
diff --git a/plug-ins/common/file-pdf-save.c b/plug-ins/common/file-pdf-save.c
index 5890a8c909..320985bcfb 100644
--- a/plug-ins/common/file-pdf-save.c
+++ b/plug-ins/common/file-pdf-save.c
@@ -293,6 +293,7 @@ static gboolean draw_layer (GimpLayer **layers,
G_DEFINE_TYPE (Pdf, pdf, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (PDF_TYPE)
+DEFINE_STD_SET_I18N
static gboolean dnd_remove = TRUE;
@@ -322,6 +323,7 @@ pdf_class_init (PdfClass *klass)
plug_in_class->query_procedures = pdf_query_procedures;
plug_in_class->create_procedure = pdf_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -499,7 +501,6 @@ pdf_save (GimpProcedure *procedure,
gboolean had_saved_list = FALSE;
gboolean defaults = FALSE;
- INIT_I18N ();
gegl_init (NULL, NULL);
/* Initializing all the settings */
@@ -571,7 +572,6 @@ pdf_save_multi (GimpProcedure *procedure,
GFile *file;
gboolean had_saved_list = FALSE;
- INIT_I18N ();
gegl_init (NULL, NULL);
run_mode = GIMP_VALUES_GET_ENUM (args, 0);
diff --git a/plug-ins/common/file-pix.c b/plug-ins/common/file-pix.c
index 84826e4118..f6bd19fb80 100644
--- a/plug-ins/common/file-pix.c
+++ b/plug-ins/common/file-pix.c
@@ -122,6 +122,7 @@ static gboolean put_short (GOutputStream *output,
G_DEFINE_TYPE (Pix, pix, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (PIX_TYPE)
+DEFINE_STD_SET_I18N
static void
@@ -131,6 +132,7 @@ pix_class_init (PixClass *klass)
plug_in_class->query_procedures = pix_query_procedures;
plug_in_class->create_procedure = pix_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -222,7 +224,6 @@ pix_load (GimpProcedure *procedure,
GimpImage *image;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
image = load_image (file, &error);
@@ -255,7 +256,6 @@ pix_save (GimpProcedure *procedure,
GimpExportReturn export = GIMP_EXPORT_CANCEL;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
switch (run_mode)
diff --git a/plug-ins/common/file-png.c b/plug-ins/common/file-png.c
index 2616f0628a..4e9e043470 100644
--- a/plug-ins/common/file-png.c
+++ b/plug-ins/common/file-png.c
@@ -136,6 +136,7 @@ static gint find_unused_ia_color (GeglBuffer *buffer,
G_DEFINE_TYPE (Png, png, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (PNG_TYPE)
+DEFINE_STD_SET_I18N
static void
@@ -145,6 +146,7 @@ png_class_init (PngClass *klass)
plug_in_class->query_procedures = png_query_procedures;
plug_in_class->create_procedure = png_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -169,7 +171,6 @@ png_create_procedure (GimpPlugIn *plug_in,
{
GimpProcedure *procedure = NULL;
- INIT_I18N ();
if (! strcmp (name, LOAD_PROC))
{
procedure = gimp_load_procedure_new (plug_in, name,
@@ -305,7 +306,6 @@ png_load (GimpProcedure *procedure,
GimpMetadata *metadata;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
switch (run_mode)
@@ -377,7 +377,6 @@ png_save (GimpProcedure *procedure,
gboolean alpha;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
config = gimp_procedure_create_config (procedure);
diff --git a/plug-ins/common/file-pnm.c b/plug-ins/common/file-pnm.c
index 2dddf0faf6..bc7409e856 100644
--- a/plug-ins/common/file-pnm.c
+++ b/plug-ins/common/file-pnm.c
@@ -223,6 +223,7 @@ static void pnmscanner_getsmalltoken (PNMScanner *s,
G_DEFINE_TYPE (Pnm, pnm, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (PNM_TYPE)
+DEFINE_STD_SET_I18N
static const struct
@@ -253,6 +254,7 @@ pnm_class_init (PnmClass *klass)
plug_in_class->query_procedures = pnm_query_procedures;
plug_in_class->create_procedure = pnm_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -494,7 +496,6 @@ pnm_load (GimpProcedure *procedure,
GimpImage *image;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
image = load_image (file, &error);
@@ -530,7 +531,6 @@ pnm_save (GimpProcedure *procedure,
const gchar *format_name = NULL;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
config = gimp_procedure_create_config (procedure);
diff --git a/plug-ins/common/file-ps.c b/plug-ins/common/file-ps.c
index 068be8949c..b3634487a3 100644
--- a/plug-ins/common/file-ps.c
+++ b/plug-ins/common/file-ps.c
@@ -294,6 +294,7 @@ static void save_unit_toggle_update (GtkWidget *widget,
G_DEFINE_TYPE (PostScript, ps, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (PS_TYPE)
+DEFINE_STD_SET_I18N
static PSLoadVals plvals =
@@ -340,6 +341,7 @@ ps_class_init (PostScriptClass *klass)
plug_in_class->query_procedures = ps_query_procedures;
plug_in_class->create_procedure = ps_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -610,7 +612,6 @@ ps_load (GimpProcedure *procedure,
GimpImage *image;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
l_run_mode = run_mode;
@@ -681,7 +682,6 @@ ps_load_thumb (GimpProcedure *procedure,
GimpImage *image;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
/* We should look for an embedded preview but for now we
@@ -728,7 +728,6 @@ ps_save (GimpProcedure *procedure,
GimpImage *orig_image;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
psvals.eps = strcmp (gimp_procedure_get_name (procedure), SAVE_PS_PROC);
diff --git a/plug-ins/common/file-psp.c b/plug-ins/common/file-psp.c
index f891ca1856..58b44a0c89 100644
--- a/plug-ins/common/file-psp.c
+++ b/plug-ins/common/file-psp.c
@@ -613,6 +613,7 @@ static gboolean save_dialog (GimpProcedure *procedure,
G_DEFINE_TYPE (Psp, psp, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (PSP_TYPE)
+DEFINE_STD_SET_I18N
static guint16 psp_ver_major;
@@ -626,6 +627,7 @@ psp_class_init (PspClass *klass)
plug_in_class->query_procedures = psp_query_procedures;
plug_in_class->create_procedure = psp_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -730,7 +732,6 @@ psp_load (GimpProcedure *procedure,
GimpImage *image;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
image = load_image (file, &error);
@@ -764,7 +765,6 @@ psp_save (GimpProcedure *procedure,
GimpExportReturn export = GIMP_EXPORT_CANCEL;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
config = gimp_procedure_create_config (procedure);
diff --git a/plug-ins/common/file-raw-data.c b/plug-ins/common/file-raw-data.c
index 1b3643b355..49c721315c 100644
--- a/plug-ins/common/file-raw-data.c
+++ b/plug-ins/common/file-raw-data.c
@@ -205,6 +205,7 @@ static void file_raw_scale_entry_update_int (GimpLabelSpin *entry,
G_DEFINE_TYPE (Raw, raw, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (RAW_TYPE)
+DEFINE_STD_SET_I18N
static RawConfig *runtime = NULL;
@@ -221,6 +222,7 @@ raw_class_init (RawClass *klass)
plug_in_class->query_procedures = raw_query_procedures;
plug_in_class->create_procedure = raw_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -357,7 +359,6 @@ raw_load (GimpProcedure *procedure,
GimpImage *image = NULL;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
is_hgt = (! strcmp (gimp_procedure_get_name (procedure), LOAD_HGT_PROC));
@@ -561,7 +562,6 @@ raw_save (GimpProcedure *procedure,
RawType image_type;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
config = gimp_procedure_create_config (procedure);
diff --git a/plug-ins/common/file-sunras.c b/plug-ins/common/file-sunras.c
index ffcd0c4c44..bd4827d215 100644
--- a/plug-ins/common/file-sunras.c
+++ b/plug-ins/common/file-sunras.c
@@ -225,6 +225,7 @@ static int my_fwrite (void *ptr,
G_DEFINE_TYPE (Sunras, sunras, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (SUNRAS_TYPE)
+DEFINE_STD_SET_I18N
static int read_msb_first = 1;
@@ -238,6 +239,7 @@ sunras_class_init (SunrasClass *klass)
plug_in_class->query_procedures = sunras_query_procedures;
plug_in_class->create_procedure = sunras_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -334,7 +336,6 @@ sunras_load (GimpProcedure *procedure,
GimpImage *image;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
image = load_image (file, &error);
@@ -368,7 +369,6 @@ sunras_save (GimpProcedure *procedure,
GimpExportReturn export = GIMP_EXPORT_CANCEL;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
config = gimp_procedure_create_config (procedure);
diff --git a/plug-ins/common/file-svg.c b/plug-ins/common/file-svg.c
index c9868d37b9..080548d257 100644
--- a/plug-ins/common/file-svg.c
+++ b/plug-ins/common/file-svg.c
@@ -104,6 +104,7 @@ static gboolean load_dialog (GFile *file,
G_DEFINE_TYPE (Svg, svg, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (SVG_TYPE)
+DEFINE_STD_SET_I18N
static SvgLoadVals load_vals =
@@ -123,6 +124,7 @@ svg_class_init (SvgClass *klass)
plug_in_class->query_procedures = svg_query_procedures;
plug_in_class->create_procedure = svg_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -235,7 +237,6 @@ svg_load (GimpProcedure *procedure,
GimpImage *image;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
switch (run_mode)
@@ -304,7 +305,6 @@ svg_load_thumb (GimpProcedure *procedure,
GimpImage *image;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
if (load_rsvg_size (file, &load_vals, NULL))
diff --git a/plug-ins/common/file-tga.c b/plug-ins/common/file-tga.c
index 7c2e7e1a7b..85c74306b8 100644
--- a/plug-ins/common/file-tga.c
+++ b/plug-ins/common/file-tga.c
@@ -207,6 +207,7 @@ static GimpImage * ReadImage (FILE *fp,
G_DEFINE_TYPE (Tga, tga, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (TGA_TYPE)
+DEFINE_STD_SET_I18N
/* TRUEVISION-XFILE magic signature string */
@@ -224,6 +225,7 @@ tga_class_init (TgaClass *klass)
plug_in_class->query_procedures = tga_query_procedures;
plug_in_class->create_procedure = tga_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -323,7 +325,6 @@ tga_load (GimpProcedure *procedure,
GimpImage *image;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
image = load_image (file, &error);
@@ -357,7 +358,6 @@ tga_save (GimpProcedure *procedure,
GimpExportReturn export = GIMP_EXPORT_CANCEL;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
config = gimp_procedure_create_config (procedure);
diff --git a/plug-ins/common/file-wmf.c b/plug-ins/common/file-wmf.c
index 0670cdc8cb..c80a4f3935 100644
--- a/plug-ins/common/file-wmf.c
+++ b/plug-ins/common/file-wmf.c
@@ -101,6 +101,7 @@ static guchar * wmf_load_file (GFile *file,
G_DEFINE_TYPE (Wmf, wmf, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (WMF_TYPE)
+DEFINE_STD_SET_I18N
static WmfLoadVals load_vals =
@@ -118,6 +119,7 @@ wmf_class_init (WmfClass *klass)
plug_in_class->query_procedures = wmf_query_procedures;
plug_in_class->create_procedure = wmf_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -220,7 +222,6 @@ wmf_load (GimpProcedure *procedure,
GimpImage *image;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
switch (run_mode)
@@ -273,7 +274,6 @@ wmf_load_thumb (GimpProcedure *procedure,
gint height;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
if (load_wmf_size (file, &load_vals) &&
diff --git a/plug-ins/common/file-xbm.c b/plug-ins/common/file-xbm.c
index 2b3d62e70b..cf4b0c8cd8 100644
--- a/plug-ins/common/file-xbm.c
+++ b/plug-ins/common/file-xbm.c
@@ -114,6 +114,7 @@ static gboolean print (GOutputStream *output,
G_DEFINE_TYPE (Xbm, xbm, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (XBM_TYPE)
+DEFINE_STD_SET_I18N
static void
@@ -123,6 +124,7 @@ xbm_class_init (XbmClass *klass)
plug_in_class->query_procedures = xbm_query_procedures;
plug_in_class->create_procedure = xbm_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -276,7 +278,6 @@ xbm_load (GimpProcedure *procedure,
GimpImage *image;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
image = load_image (file, &error);
@@ -341,7 +342,6 @@ xbm_save (GimpProcedure *procedure,
gchar *mask_basename = NULL;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
config = gimp_procedure_create_config (procedure);
diff --git a/plug-ins/common/file-xmc.c b/plug-ins/common/file-xmc.c
index 97fc49505e..7ac70f980d 100644
--- a/plug-ins/common/file-xmc.c
+++ b/plug-ins/common/file-xmc.c
@@ -254,6 +254,7 @@ static void find_hotspots_and_dimensions
G_DEFINE_TYPE (Xmc, xmc, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (XMC_TYPE)
+DEFINE_STD_SET_I18N
static void
@@ -263,6 +264,7 @@ xmc_class_init (XmcClass *klass)
plug_in_class->query_procedures = xmc_query_procedures;
plug_in_class->create_procedure = xmc_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -446,7 +448,6 @@ xmc_load (GimpProcedure *procedure,
GimpImage *image;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
image = load_image (file, &error);
@@ -479,7 +480,6 @@ xmc_load_thumb (GimpProcedure *procedure,
GimpImage *image;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
image = load_thumbnail (file, size,
@@ -525,7 +525,6 @@ xmc_save (GimpProcedure *procedure,
gint hot_spot_y;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
orig_image = image;
diff --git a/plug-ins/common/file-xpm.c b/plug-ins/common/file-xpm.c
index 5f64661130..708935add2 100644
--- a/plug-ins/common/file-xpm.c
+++ b/plug-ins/common/file-xpm.c
@@ -136,6 +136,7 @@ static gboolean save_dialog (GimpProcedure *procedure,
G_DEFINE_TYPE (Xpm, xpm, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (XPM_TYPE)
+DEFINE_STD_SET_I18N
static const gchar linenoise [] =
@@ -160,6 +161,7 @@ xpm_class_init (XpmClass *klass)
plug_in_class->query_procedures = xpm_query_procedures;
plug_in_class->create_procedure = xpm_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -271,7 +273,6 @@ xpm_load (GimpProcedure *procedure,
GimpImage *image;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
image = load_image (file, &error);
@@ -305,7 +306,6 @@ xpm_save (GimpProcedure *procedure,
GimpExportReturn export = GIMP_EXPORT_CANCEL;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
config = gimp_procedure_create_config (procedure);
diff --git a/plug-ins/common/file-xwd.c b/plug-ins/common/file-xwd.c
index 9056e0f937..c163d49bb6 100644
--- a/plug-ins/common/file-xwd.c
+++ b/plug-ins/common/file-xwd.c
@@ -275,6 +275,7 @@ static gint save_rgb (GOutputStream *output,
G_DEFINE_TYPE (Xwd, xwd, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (XWD_TYPE)
+DEFINE_STD_SET_I18N
static void
@@ -284,6 +285,7 @@ xwd_class_init (XwdClass *klass)
plug_in_class->query_procedures = xwd_query_procedures;
plug_in_class->create_procedure = xwd_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -379,7 +381,6 @@ xwd_load (GimpProcedure *procedure,
GimpImage *image;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
image = load_image (file, &error);
@@ -412,7 +413,6 @@ xwd_save (GimpProcedure *procedure,
GimpExportReturn export = GIMP_EXPORT_CANCEL;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
switch (run_mode)
diff --git a/plug-ins/common/film.c b/plug-ins/common/film.c
index ff2ede167b..2caaa92a7a 100644
--- a/plug-ins/common/film.c
+++ b/plug-ins/common/film.c
@@ -152,6 +152,7 @@ static void film_scale_entry_update_double (GimpLabelSpin *entry,
G_DEFINE_TYPE (Film, film, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (FILM_TYPE)
+DEFINE_STD_SET_I18N
static gdouble advanced_defaults[] =
@@ -199,6 +200,7 @@ film_class_init (FilmClass *klass)
plug_in_class->query_procedures = film_query_procedures;
plug_in_class->create_procedure = film_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -321,7 +323,6 @@ film_run (GimpProcedure *procedure,
GimpImage **images;
gint i;
- INIT_I18N ();
gegl_init (NULL, NULL);
switch (run_mode)
diff --git a/plug-ins/common/gradient-map.c b/plug-ins/common/gradient-map.c
index c9ea61013b..654a490dfe 100644
--- a/plug-ins/common/gradient-map.c
+++ b/plug-ins/common/gradient-map.c
@@ -82,6 +82,7 @@ static gdouble * get_samples_palette (GimpDrawable *drawable);
G_DEFINE_TYPE (Map, map, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (MAP_TYPE)
+DEFINE_STD_SET_I18N
static void
@@ -91,6 +92,7 @@ map_class_init (MapClass *klass)
plug_in_class->query_procedures = map_query_procedures;
plug_in_class->create_procedure = map_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -204,7 +206,6 @@ map_run (GimpProcedure *procedure,
GeglBuffer *buffer;
GimpDrawable *drawable;
- INIT_I18N ();
gegl_init (NULL, NULL);
if (n_drawables != 1)
diff --git a/plug-ins/common/grid.c b/plug-ins/common/grid.c
index 1539283779..066826a0fe 100644
--- a/plug-ins/common/grid.c
+++ b/plug-ins/common/grid.c
@@ -114,6 +114,7 @@ static gint dialog (GimpImage *image,
G_DEFINE_TYPE (Grid, grid, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (GRID_TYPE)
+DEFINE_STD_SET_I18N
static gint sx1, sy1, sx2, sy2;
@@ -137,6 +138,7 @@ grid_class_init (GridClass *klass)
plug_in_class->query_procedures = grid_query_procedures;
plug_in_class->create_procedure = grid_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -271,7 +273,6 @@ grid_run (GimpProcedure *procedure,
{
GimpDrawable *drawable;
- INIT_I18N ();
gegl_init (NULL, NULL);
if (n_drawables != 1)
diff --git a/plug-ins/common/guillotine.c b/plug-ins/common/guillotine.c
index 033de7ff6d..7fe6ff02d1 100644
--- a/plug-ins/common/guillotine.c
+++ b/plug-ins/common/guillotine.c
@@ -68,6 +68,7 @@ static GList * guillotine (GimpImage *image
G_DEFINE_TYPE (Guillotine, guillotine, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (GUILLOTINE_TYPE)
+DEFINE_STD_SET_I18N
static void
guillotine_class_init (GuillotineClass *klass)
@@ -76,6 +77,7 @@ guillotine_class_init (GuillotineClass *klass)
plug_in_class->query_procedures = guillotine_query_procedures;
plug_in_class->create_procedure = guillotine_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -151,8 +153,6 @@ guillotine_run (GimpProcedure *procedure,
GimpValueArray *return_vals = NULL;
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
- INIT_I18N();
-
return_vals = gimp_procedure_new_return_values (procedure, status,
NULL);
if (status == GIMP_PDB_SUCCESS)
diff --git a/plug-ins/common/hot.c b/plug-ins/common/hot.c
index 3cc4444cb3..715f0cba4f 100644
--- a/plug-ins/common/hot.c
+++ b/plug-ins/common/hot.c
@@ -205,6 +205,7 @@ static void build_tab (gint m);
G_DEFINE_TYPE (Hot, hot, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (HOT_TYPE)
+DEFINE_STD_SET_I18N
static gint tab[3][3][MAXPIX+1]; /* multiply lookup table */
@@ -221,6 +222,7 @@ hot_class_init (HotClass *klass)
plug_in_class->query_procedures = hot_query_procedures;
plug_in_class->create_procedure = hot_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -305,7 +307,6 @@ hot_run (GimpProcedure *procedure,
GimpDrawable *drawable;
piArgs pi_args;
- INIT_I18N ();
gegl_init (NULL, NULL);
if (n_drawables != 1)
diff --git a/plug-ins/common/jigsaw.c b/plug-ins/common/jigsaw.c
index 0ac444af46..35d87d4550 100644
--- a/plug-ins/common/jigsaw.c
+++ b/plug-ins/common/jigsaw.c
@@ -346,6 +346,7 @@ static void check_config (gint width, gint height);
G_DEFINE_TYPE (Jigsaw, jigsaw, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (JIGSAW_TYPE)
+DEFINE_STD_SET_I18N
static config_t config =
@@ -367,6 +368,7 @@ jigsaw_class_init (JigsawClass *klass)
plug_in_class->query_procedures = jigsaw_query_procedures;
plug_in_class->create_procedure = jigsaw_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -455,7 +457,6 @@ jigsaw_run (GimpProcedure *procedure,
{
GimpDrawable *drawable;
- INIT_I18N ();
gegl_init (NULL, NULL);
if (n_drawables != 1)
diff --git a/plug-ins/common/mail.c b/plug-ins/common/mail.c
index 690e8f8ead..ce95a7fdf1 100644
--- a/plug-ins/common/mail.c
+++ b/plug-ins/common/mail.c
@@ -122,6 +122,7 @@ static FILE * sendmail_pipe (gchar **cmd,
G_DEFINE_TYPE (Mail, mail, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (MAIL_TYPE)
+DEFINE_STD_SET_I18N
static m_info mail_info =
@@ -139,6 +140,7 @@ mail_class_init (MailClass *klass)
plug_in_class->init_procedures = mail_init_procedures;
plug_in_class->create_procedure = mail_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -266,8 +268,6 @@ mail_run (GimpProcedure *procedure,
{
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
- INIT_I18N ();
-
switch (run_mode)
{
case GIMP_RUN_INTERACTIVE:
diff --git a/plug-ins/common/nl-filter.c b/plug-ins/common/nl-filter.c
index 7336134afd..3644659e28 100644
--- a/plug-ins/common/nl-filter.c
+++ b/plug-ins/common/nl-filter.c
@@ -115,6 +115,7 @@ static void nlfilter_scale_entry_update_double (GimpLabelSpin *entry,
G_DEFINE_TYPE (Nlfilter, nlfilter, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (NLFILTER_TYPE)
+DEFINE_STD_SET_I18N
static NLFilterValues nlfvals =
@@ -132,6 +133,7 @@ nlfilter_class_init (NlfilterClass *klass)
plug_in_class->query_procedures = nlfilter_query_procedures;
plug_in_class->create_procedure = nlfilter_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -212,7 +214,6 @@ nlfilter_run (GimpProcedure *procedure,
{
GimpDrawable *drawable;
- INIT_I18N ();
gegl_init (NULL, NULL);
if (n_drawables != 1)
diff --git a/plug-ins/common/plugin-browser.c b/plug-ins/common/plugin-browser.c
index f93aa05d95..ad76eaef5b 100644
--- a/plug-ins/common/plugin-browser.c
+++ b/plug-ins/common/plugin-browser.c
@@ -130,6 +130,7 @@ static gboolean find_existing_mpath (GtkTreeModel *model,
G_DEFINE_TYPE (Browser, browser, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (BROWSER_TYPE)
+DEFINE_STD_SET_I18N
static void
@@ -139,6 +140,7 @@ browser_class_init (BrowserClass *klass)
plug_in_class->query_procedures = browser_query_procedures;
plug_in_class->create_procedure = browser_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -200,8 +202,6 @@ browser_run (GimpProcedure *procedure,
const GimpValueArray *args,
gpointer run_data)
{
- INIT_I18N ();
-
browser_dialog_new ();
gtk_main ();
diff --git a/plug-ins/common/procedure-browser.c b/plug-ins/common/procedure-browser.c
index e25646343b..7ac9e74758 100644
--- a/plug-ins/common/procedure-browser.c
+++ b/plug-ins/common/procedure-browser.c
@@ -87,6 +87,7 @@ static GimpValueArray * browser_run (GimpProcedure *procedur
G_DEFINE_TYPE (Browser, browser, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (BROWSER_TYPE)
+DEFINE_STD_SET_I18N
static void
@@ -96,6 +97,7 @@ browser_class_init (BrowserClass *klass)
plug_in_class->query_procedures = browser_query_procedures;
plug_in_class->create_procedure = browser_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -151,8 +153,6 @@ browser_run (GimpProcedure *procedure,
{
GimpRunMode run_mode = GIMP_VALUES_GET_ENUM (args, 0);
- INIT_I18N ();
-
switch (run_mode)
{
case GIMP_RUN_INTERACTIVE:
diff --git a/plug-ins/common/qbist.c b/plug-ins/common/qbist.c
index c279980945..6b194065bb 100644
--- a/plug-ins/common/qbist.c
+++ b/plug-ins/common/qbist.c
@@ -138,6 +138,7 @@ static void qbist (ExpInfo *info,
G_DEFINE_TYPE (Qbist, qbist, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (QBIST_TYPE)
+DEFINE_STD_SET_I18N
static QbistInfo qbist_info;
@@ -151,6 +152,7 @@ qbist_class_init (QbistClass *klass)
plug_in_class->query_procedures = qbist_query_procedures;
plug_in_class->create_procedure = qbist_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -241,7 +243,6 @@ qbist_run (GimpProcedure *procedure,
gint total_pixels;
gint done_pixels;
- INIT_I18N ();
gegl_init (NULL, NULL);
if (n_drawables != 1)
diff --git a/plug-ins/common/sample-colorize.c b/plug-ins/common/sample-colorize.c
index 1449e51f66..d9d2898987 100644
--- a/plug-ins/common/sample-colorize.c
+++ b/plug-ins/common/sample-colorize.c
@@ -239,6 +239,7 @@ static void clear_preview (GtkWidget *preview);
G_DEFINE_TYPE (Colorize, colorize, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (COLORIZE_TYPE)
+DEFINE_STD_SET_I18N
static t_samp_interface g_di; /* global dialog interface variables */
@@ -262,6 +263,7 @@ colorize_class_init (ColorizeClass *klass)
plug_in_class->query_procedures = colorize_query_procedures;
plug_in_class->create_procedure = colorize_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -419,7 +421,6 @@ colorize_run (GimpProcedure *procedure,
const gchar *env;
GimpDrawable *drawable;
- INIT_I18N ();
gegl_init (NULL, NULL);
if (n_drawables != 1)
diff --git a/plug-ins/common/smooth-palette.c b/plug-ins/common/smooth-palette.c
index 3265542127..623f94cadc 100644
--- a/plug-ins/common/smooth-palette.c
+++ b/plug-ins/common/smooth-palette.c
@@ -74,6 +74,7 @@ static GimpImage * smooth_palette (GimpDrawable *drawable
G_DEFINE_TYPE (Palette, palette, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (PALETTE_TYPE)
+DEFINE_STD_SET_I18N
static struct
@@ -100,6 +101,7 @@ palette_class_init (PaletteClass *klass)
plug_in_class->query_procedures = palette_query_procedures;
plug_in_class->create_procedure = palette_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -196,7 +198,6 @@ palette_run (GimpProcedure *procedure,
GimpLayer *new_layer;
GimpDrawable *drawable;
- INIT_I18N ();
gegl_init (NULL, NULL);
if (n_drawables != 1)
diff --git a/plug-ins/common/sparkle.c b/plug-ins/common/sparkle.c
index 0dc036434e..93d665c638 100644
--- a/plug-ins/common/sparkle.c
+++ b/plug-ins/common/sparkle.c
@@ -145,6 +145,7 @@ static void rpnt (GeglBuffer *dest_buf
G_DEFINE_TYPE (Sparkle, sparkle, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (SPARKLE_TYPE)
+DEFINE_STD_SET_I18N
static SparkleVals svals =
@@ -174,6 +175,7 @@ sparkle_class_init (SparkleClass *klass)
plug_in_class->query_procedures = sparkle_query_procedures;
plug_in_class->create_procedure = sparkle_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -316,7 +318,6 @@ sparkle_run (GimpProcedure *procedure,
GimpDrawable *drawable;
gint x, y, w, h;
- INIT_I18N ();
gegl_init (NULL, NULL);
if (n_drawables != 1)
diff --git a/plug-ins/common/sphere-designer.c b/plug-ins/common/sphere-designer.c
index 530bb96795..51dfa7cdbc 100644
--- a/plug-ins/common/sphere-designer.c
+++ b/plug-ins/common/sphere-designer.c
@@ -311,6 +311,7 @@ static gdouble turbulence (gdouble *point,
G_DEFINE_TYPE (Designer, designer, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (DESIGNER_TYPE)
+DEFINE_STD_SET_I18N
static GtkWidget *drawarea = NULL;
@@ -376,6 +377,7 @@ designer_class_init (DesignerClass *klass)
plug_in_class->query_procedures = designer_query_procedures;
plug_in_class->create_procedure = designer_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -3167,7 +3169,6 @@ designer_run (GimpProcedure *procedure,
GimpDrawable *drawable;
gint x, y, w, h;
- INIT_I18N ();
gegl_init (NULL, NULL);
if (n_drawables != 1)
diff --git a/plug-ins/common/tile-small.c b/plug-ins/common/tile-small.c
index 91ae180a95..3a363f144c 100644
--- a/plug-ins/common/tile-small.c
+++ b/plug-ins/common/tile-small.c
@@ -153,6 +153,7 @@ static gboolean tileit_preview_events (GtkWidget *widget,
G_DEFINE_TYPE (Tile, tile, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (TILE_TYPE)
+DEFINE_STD_SET_I18N
/* Values when first invoked */
@@ -231,6 +232,7 @@ tile_class_init (TileClass *klass)
plug_in_class->query_procedures = tile_query_procedures;
plug_in_class->create_procedure = tile_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -296,7 +298,6 @@ tile_run (GimpProcedure *procedure,
gint pwidth;
gint pheight;
- INIT_I18N ();
gegl_init (NULL, NULL);
if (n_drawables != 1)
diff --git a/plug-ins/common/tile.c b/plug-ins/common/tile.c
index 8ad2c98d9a..342e44e730 100644
--- a/plug-ins/common/tile.c
+++ b/plug-ins/common/tile.c
@@ -92,6 +92,7 @@ static gboolean tile_dialog (GimpImage *image,
G_DEFINE_TYPE (Tile, tile, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (TILE_TYPE)
+DEFINE_STD_SET_I18N
static TileVals tvals =
@@ -110,6 +111,7 @@ tile_class_init (TileClass *klass)
plug_in_class->query_procedures = tile_query_procedures;
plug_in_class->create_procedure = tile_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -208,7 +210,6 @@ tile_run (GimpProcedure *procedure,
GimpImage *new_image;
GimpDrawable *drawable;
- INIT_I18N ();
gegl_init (NULL, NULL);
if (n_drawables != 1)
diff --git a/plug-ins/common/unit-editor.c b/plug-ins/common/unit-editor.c
index e40f6ea876..33ecaefe6d 100644
--- a/plug-ins/common/unit-editor.c
+++ b/plug-ins/common/unit-editor.c
@@ -104,6 +104,7 @@ static void unit_list_init (GtkTreeView *tv);
G_DEFINE_TYPE (Editor, editor, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (EDITOR_TYPE)
+DEFINE_STD_SET_I18N
static const UnitColumn columns[] =
@@ -154,6 +155,7 @@ editor_class_init (EditorClass *klass)
plug_in_class->query_procedures = editor_query_procedures;
plug_in_class->create_procedure = editor_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -208,8 +210,6 @@ editor_run (GimpProcedure *procedure,
const GimpValueArray *args,
gpointer run_data)
{
- INIT_I18N ();
-
unit_editor_dialog ();
return gimp_procedure_new_return_values (procedure, GIMP_PDB_SUCCESS, NULL);
diff --git a/plug-ins/common/van-gogh-lic.c b/plug-ins/common/van-gogh-lic.c
index 9a6cfecd78..21be5f1c05 100644
--- a/plug-ins/common/van-gogh-lic.c
+++ b/plug-ins/common/van-gogh-lic.c
@@ -99,6 +99,7 @@ static void lic_scale_entry_update (GimpLabelSpin *entry,
G_DEFINE_TYPE (Lic, lic, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (LIC_TYPE)
+DEFINE_STD_SET_I18N
static void
@@ -108,6 +109,7 @@ lic_class_init (LicClass *klass)
plug_in_class->query_procedures = lic_query_procedures;
plug_in_class->create_procedure = lic_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -901,7 +903,6 @@ lic_run (GimpProcedure *procedure,
{
GimpDrawable *drawable;
- INIT_I18N ();
gegl_init (NULL, NULL);
if (n_drawables != 1)
diff --git a/plug-ins/common/warp.c b/plug-ins/common/warp.c
index 238b3bf4aa..eb8934725e 100644
--- a/plug-ins/common/warp.c
+++ b/plug-ins/common/warp.c
@@ -184,6 +184,7 @@ static gdouble warp_map_mag_give_value (guchar *pt,
G_DEFINE_TYPE (Warp, warp, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (WARP_TYPE)
+DEFINE_STD_SET_I18N
static WarpVals dvals =
@@ -216,6 +217,7 @@ warp_class_init (WarpClass *klass)
plug_in_class->query_procedures = warp_query_procedures;
plug_in_class->create_procedure = warp_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -363,7 +365,6 @@ warp_run (GimpProcedure *procedure,
GimpDrawable *drawable;
GimpRGB color;
- INIT_I18N ();
gegl_init (NULL, NULL);
if (n_drawables != 1)
diff --git a/plug-ins/common/wavelet-decompose.c b/plug-ins/common/wavelet-decompose.c
index 7b9b1003da..c016e82f7a 100644
--- a/plug-ins/common/wavelet-decompose.c
+++ b/plug-ins/common/wavelet-decompose.c
@@ -80,6 +80,7 @@ static void wavelet_scale_entry_update_int (GimpLabelSpin *entry,
G_DEFINE_TYPE (Wavelet, wavelet, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (WAVELET_TYPE)
+DEFINE_STD_SET_I18N
static WaveletDecomposeParams wavelet_params =
@@ -97,6 +98,7 @@ wavelet_class_init (WaveletClass *klass)
plug_in_class->query_procedures = wavelet_query_procedures;
plug_in_class->create_procedure = wavelet_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -178,7 +180,6 @@ wavelet_run (GimpProcedure *procedure,
GimpLayerMode grain_merge_mode = GIMP_LAYER_MODE_GRAIN_MERGE;
gint id;
- INIT_I18N();
gegl_init (NULL, NULL);
if (n_drawables != 1)
diff --git a/plug-ins/common/web-browser.c b/plug-ins/common/web-browser.c
index d37f0773f3..d34873ea36 100644
--- a/plug-ins/common/web-browser.c
+++ b/plug-ins/common/web-browser.c
@@ -78,6 +78,7 @@ static gboolean browser_open_url (GtkWindow *window,
G_DEFINE_TYPE (Browser, browser, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (BROWSER_TYPE)
+DEFINE_STD_SET_I18N
static void
@@ -87,6 +88,7 @@ browser_class_init (BrowserClass *klass)
plug_in_class->query_procedures = browser_query_procedures;
plug_in_class->create_procedure = browser_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -140,8 +142,6 @@ browser_run (GimpProcedure *procedure,
{
GError *error = NULL;
- INIT_I18N ();
-
if (! browser_open_url (NULL, GIMP_VALUES_GET_STRING (args, 0),
&error))
{
diff --git a/plug-ins/common/web-page.c b/plug-ins/common/web-page.c
index 315459841b..3fffffafda 100644
--- a/plug-ins/common/web-page.c
+++ b/plug-ins/common/web-page.c
@@ -88,6 +88,7 @@ static GimpImage * webpage_capture (void);
G_DEFINE_TYPE (Webpage, webpage, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (WEBPAGE_TYPE)
+DEFINE_STD_SET_I18N
static WebpageVals webpagevals;
@@ -100,6 +101,7 @@ webpage_class_init (WebpageClass *klass)
plug_in_class->query_procedures = webpage_query_procedures;
plug_in_class->create_procedure = webpage_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -183,8 +185,6 @@ webpage_run (GimpProcedure *procedure,
GimpImage *image;
WebpageSaveVals save = { "https://www.gimp.org/", 1024, 12 };
- INIT_I18N ();
-
gimp_get_data (PLUG_IN_PROC, &save);
run_mode = GIMP_VALUES_GET_ENUM (args, 0);
diff --git a/plug-ins/file-bmp/bmp.c b/plug-ins/file-bmp/bmp.c
index 56687aba11..afc982bc5e 100644
--- a/plug-ins/file-bmp/bmp.c
+++ b/plug-ins/file-bmp/bmp.c
@@ -108,6 +108,7 @@ static GimpValueArray * bmp_save (GimpProcedure *procedure,
G_DEFINE_TYPE (Bmp, bmp, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (BMP_TYPE)
+DEFINE_STD_SET_I18N
static void
@@ -117,6 +118,7 @@ bmp_class_init (BmpClass *klass)
plug_in_class->query_procedures = bmp_query_procedures;
plug_in_class->create_procedure = bmp_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -226,7 +228,6 @@ bmp_load (GimpProcedure *procedure,
GimpImage *image;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
image = load_image (file, &error);
@@ -260,7 +261,6 @@ bmp_save (GimpProcedure *procedure,
GimpExportReturn export = GIMP_EXPORT_CANCEL;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
config = gimp_procedure_create_config (procedure);
diff --git a/plug-ins/file-dds/dds.c b/plug-ins/file-dds/dds.c
index 13d5751d88..7436e7aa96 100644
--- a/plug-ins/file-dds/dds.c
+++ b/plug-ins/file-dds/dds.c
@@ -97,6 +97,7 @@ static GimpValueArray * dds_decode (GimpProcedure *procedure,
G_DEFINE_TYPE (Dds, dds, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (DDS_TYPE)
+DEFINE_STD_SET_I18N
static void
@@ -106,6 +107,7 @@ dds_class_init (DdsClass *klass)
plug_in_class->query_procedures = dds_query_procedures;
plug_in_class->create_procedure = dds_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -396,7 +398,6 @@ dds_load (GimpProcedure *procedure,
GimpImage *image;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
config = gimp_procedure_create_config (procedure);
@@ -436,7 +437,6 @@ dds_save (GimpProcedure *procedure,
GError *error = NULL;
gdouble gamma;
- INIT_I18N ();
gegl_init (NULL, NULL);
config = gimp_procedure_create_config (procedure);
diff --git a/plug-ins/file-exr/file-exr.c b/plug-ins/file-exr/file-exr.c
index ee06d0b547..f1e286811a 100644
--- a/plug-ins/file-exr/file-exr.c
+++ b/plug-ins/file-exr/file-exr.c
@@ -67,6 +67,7 @@ static void sanitize_comment (gchar *comment);
G_DEFINE_TYPE (Exr, exr, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (EXR_TYPE)
+DEFINE_STD_SET_I18N
static void
@@ -76,6 +77,7 @@ exr_class_init (ExrClass *klass)
plug_in_class->query_procedures = exr_query_procedures;
plug_in_class->create_procedure = exr_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -136,7 +138,6 @@ exr_load (GimpProcedure *procedure,
GimpImage *image;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
image = load_image (file, run_mode == GIMP_RUN_INTERACTIVE,
diff --git a/plug-ins/file-faxg3/faxg3.c b/plug-ins/file-faxg3/faxg3.c
index 44b0eff464..559515c81a 100644
--- a/plug-ins/file-faxg3/faxg3.c
+++ b/plug-ins/file-faxg3/faxg3.c
@@ -95,6 +95,7 @@ static GimpImage * emitgimp (gint hcol,
G_DEFINE_TYPE (Faxg3, faxg3, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (FAXG3_TYPE)
+DEFINE_STD_SET_I18N
static void
@@ -104,6 +105,7 @@ faxg3_class_init (Faxg3Class *klass)
plug_in_class->query_procedures = faxg3_query_procedures;
plug_in_class->create_procedure = faxg3_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -163,7 +165,6 @@ faxg3_load (GimpProcedure *procedure,
GimpImage *image;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
image = load_image (file, &error);
diff --git a/plug-ins/file-fits/fits.c b/plug-ins/file-fits/fits.c
index 4e7218af02..7278a7ae1b 100644
--- a/plug-ins/file-fits/fits.c
+++ b/plug-ins/file-fits/fits.c
@@ -135,6 +135,7 @@ static void show_fits_errors (void);
G_DEFINE_TYPE (Fits, fits, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (FITS_TYPE)
+DEFINE_STD_SET_I18N
static void
@@ -144,6 +145,7 @@ fits_class_init (FitsClass *klass)
plug_in_class->query_procedures = fits_query_procedures;
plug_in_class->create_procedure = fits_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -254,7 +256,6 @@ fits_load (GimpProcedure *procedure,
GimpImage *image;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
config = gimp_procedure_create_config (procedure);
@@ -304,7 +305,6 @@ fits_save (GimpProcedure *procedure,
GimpExportReturn export = GIMP_EXPORT_CANCEL;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
switch (run_mode)
diff --git a/plug-ins/file-fli/fli-gimp.c b/plug-ins/file-fli/fli-gimp.c
index 9e06808c28..99b00f06ca 100644
--- a/plug-ins/file-fli/fli-gimp.c
+++ b/plug-ins/file-fli/fli-gimp.c
@@ -136,6 +136,7 @@ static gboolean get_info (GFile *file,
G_DEFINE_TYPE (Fli, fli, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (FLI_TYPE)
+DEFINE_STD_SET_I18N
static void
@@ -145,6 +146,7 @@ fli_class_init (FliClass *klass)
plug_in_class->query_procedures = fli_query_procedures;
plug_in_class->create_procedure = fli_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -298,7 +300,6 @@ fli_load (GimpProcedure *procedure,
GimpImage *image;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
config = gimp_procedure_create_config (procedure);
@@ -347,7 +348,6 @@ fli_save (GimpProcedure *procedure,
GimpExportReturn export = GIMP_EXPORT_CANCEL;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
config = gimp_procedure_create_config (procedure);
diff --git a/plug-ins/file-ico/ico.c b/plug-ins/file-ico/ico.c
index 4a63aedad7..a5d3a3c885 100644
--- a/plug-ins/file-ico/ico.c
+++ b/plug-ins/file-ico/ico.c
@@ -94,6 +94,7 @@ static GimpValueArray * cur_save (GimpProcedure *procedure,
G_DEFINE_TYPE (Ico, ico, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (ICO_TYPE)
+DEFINE_STD_SET_I18N
static void
@@ -103,6 +104,7 @@ ico_class_init (IcoClass *klass)
plug_in_class->query_procedures = ico_query_procedures;
plug_in_class->create_procedure = ico_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -290,7 +292,6 @@ ico_load (GimpProcedure *procedure,
GimpImage *image;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
image = ico_load_image (file, &error);
@@ -322,7 +323,6 @@ ico_load_thumb (GimpProcedure *procedure,
GimpImage *image;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
width = size;
@@ -362,7 +362,6 @@ ico_save (GimpProcedure *procedure,
GimpPDBStatusType status;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
status = ico_save_image (file, image, run_mode, &error);
@@ -388,7 +387,6 @@ cur_save (GimpProcedure *procedure,
gint n_hot_spot_x = 0;
gint n_hot_spot_y = 0;
- INIT_I18N ();
gegl_init (NULL, NULL);
config = gimp_procedure_create_config (procedure);
diff --git a/plug-ins/file-jpeg/jpeg.c b/plug-ins/file-jpeg/jpeg.c
index 8ed0adebbc..11d122372e 100644
--- a/plug-ins/file-jpeg/jpeg.c
+++ b/plug-ins/file-jpeg/jpeg.c
@@ -81,6 +81,7 @@ static GimpValueArray * jpeg_save (GimpProcedure *procedure,
G_DEFINE_TYPE (Jpeg, jpeg, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (JPEG_TYPE)
+DEFINE_STD_SET_I18N
gboolean undo_touched = FALSE;
@@ -97,6 +98,7 @@ jpeg_class_init (JpegClass *klass)
plug_in_class->query_procedures = jpeg_query_procedures;
plug_in_class->create_procedure = jpeg_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -323,7 +325,6 @@ jpeg_load (GimpProcedure *procedure,
gboolean resolution_loaded = FALSE;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
preview_image = NULL;
@@ -392,7 +393,6 @@ jpeg_load_thumb (GimpProcedure *procedure,
GimpImageType type = -1;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
preview_image = NULL;
@@ -441,7 +441,6 @@ jpeg_save (GimpProcedure *procedure,
gint orig_quality = -1;
JpegSubsampling orig_subsmp = JPEG_SUBSAMPLING_2x2_1x1_1x1;
- INIT_I18N ();
gegl_init (NULL, NULL);
config = gimp_procedure_create_config (procedure);
diff --git a/plug-ins/file-psd/psd.c b/plug-ins/file-psd/psd.c
index 0781a437ee..2f7b121ad0 100644
--- a/plug-ins/file-psd/psd.c
+++ b/plug-ins/file-psd/psd.c
@@ -79,6 +79,7 @@ static GimpValueArray * psd_save (GimpProcedure *procedure,
G_DEFINE_TYPE (Psd, psd, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (PSD_TYPE)
+DEFINE_STD_SET_I18N
static void
@@ -88,6 +89,7 @@ psd_class_init (PsdClass *klass)
plug_in_class->query_procedures = psd_query_procedures;
plug_in_class->create_procedure = psd_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -240,7 +242,6 @@ psd_load (GimpProcedure *procedure,
GimpMetadata *metadata;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
switch (run_mode)
@@ -305,7 +306,6 @@ psd_load_thumb (GimpProcedure *procedure,
GimpImage *image;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
image = load_thumbnail_image (file, &width, &height, &error);
@@ -344,7 +344,6 @@ psd_save (GimpProcedure *procedure,
GimpExportReturn export = GIMP_EXPORT_IGNORE;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
switch (run_mode)
diff --git a/plug-ins/file-raw/file-darktable.c b/plug-ins/file-raw/file-darktable.c
index dfa18ea3b1..b498b810a9 100644
--- a/plug-ins/file-raw/file-darktable.c
+++ b/plug-ins/file-raw/file-darktable.c
@@ -82,6 +82,7 @@ static GimpImage * load_thumbnail_image (GFile *file,
G_DEFINE_TYPE (Darktable, darktable, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (DARKTABLE_TYPE)
+DEFINE_STD_SET_I18N
static void
@@ -91,6 +92,7 @@ darktable_class_init (DarktableClass *klass)
plug_in_class->init_procedures = darktable_init_procedures;
plug_in_class->create_procedure = darktable_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -310,8 +312,6 @@ darktable_load (GimpProcedure *procedure,
GimpImage *image;
GError *error = NULL;
- INIT_I18N ();
-
image = load_image (file, run_mode, &error);
if (! image)
@@ -341,8 +341,6 @@ darktable_load_thumb (GimpProcedure *procedure,
GimpImage *image = NULL;
GError *error = NULL;
- INIT_I18N ();
-
width = size;
height = size;
diff --git a/plug-ins/file-raw/file-raw-placeholder.c b/plug-ins/file-raw/file-raw-placeholder.c
index 0a893289ac..693d7b18b0 100644
--- a/plug-ins/file-raw/file-raw-placeholder.c
+++ b/plug-ins/file-raw/file-raw-placeholder.c
@@ -62,6 +62,7 @@ static GimpValueArray * placeholder_load (GimpProcedure *proc
G_DEFINE_TYPE (Placeholder, placeholder, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (PLACEHOLDER_TYPE)
+DEFINE_STD_SET_I18N
static void
@@ -71,6 +72,7 @@ placeholder_class_init (PlaceholderClass *klass)
plug_in_class->query_procedures = placeholder_query_procedures;
plug_in_class->create_procedure = placeholder_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -166,8 +168,6 @@ placeholder_load (GimpProcedure *procedure,
const FileFormat *format = run_data;
GError *error = NULL;
- INIT_I18N ();
-
g_set_error (&error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
_("There is no RAW loader installed to open '%s' files.\n"
"\n"
diff --git a/plug-ins/file-raw/file-rawtherapee.c b/plug-ins/file-raw/file-rawtherapee.c
index e11fcc38c8..a9db068051 100644
--- a/plug-ins/file-raw/file-rawtherapee.c
+++ b/plug-ins/file-raw/file-rawtherapee.c
@@ -81,6 +81,7 @@ static GimpImage * load_thumbnail_image (GFile *file
G_DEFINE_TYPE (Rawtherapee, rawtherapee, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (RAWTHERAPEE_TYPE)
+DEFINE_STD_SET_I18N
static void
@@ -90,6 +91,7 @@ rawtherapee_class_init (RawtherapeeClass *klass)
plug_in_class->init_procedures = rawtherapee_init_procedures;
plug_in_class->create_procedure = rawtherapee_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -261,8 +263,6 @@ rawtherapee_load (GimpProcedure *procedure,
GimpImage *image;
GError *error = NULL;
- INIT_I18N ();
-
image = load_image (file, run_mode, &error);
if (! image)
@@ -290,8 +290,6 @@ rawtherapee_load_thumb (GimpProcedure *procedure,
GimpImage *image;
GError *error = NULL;
- INIT_I18N ();
-
image = load_thumbnail_image (file, size, &error);
if (! image)
diff --git a/plug-ins/file-sgi/sgi.c b/plug-ins/file-sgi/sgi.c
index 2c5f96f25a..b699954dac 100644
--- a/plug-ins/file-sgi/sgi.c
+++ b/plug-ins/file-sgi/sgi.c
@@ -98,6 +98,7 @@ static gboolean save_dialog (GimpProcedure *procedure,
G_DEFINE_TYPE (Sgi, sgi, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (SGI_TYPE)
+DEFINE_STD_SET_I18N
static void
@@ -107,6 +108,7 @@ sgi_class_init (SgiClass *klass)
plug_in_class->query_procedures = sgi_query_procedures;
plug_in_class->create_procedure = sgi_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -203,7 +205,6 @@ sgi_load (GimpProcedure *procedure,
GimpImage *image;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
image = load_image (file, &error);
@@ -237,7 +238,6 @@ sgi_save (GimpProcedure *procedure,
GimpExportReturn export = GIMP_EXPORT_CANCEL;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
config = gimp_procedure_create_config (procedure);
diff --git a/plug-ins/file-tiff/file-tiff.c b/plug-ins/file-tiff/file-tiff.c
index 77577aee66..2e7020c234 100644
--- a/plug-ins/file-tiff/file-tiff.c
+++ b/plug-ins/file-tiff/file-tiff.c
@@ -115,6 +115,7 @@ static gboolean image_is_multi_layer (GimpImage *image);
G_DEFINE_TYPE (Tiff, tiff, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (TIFF_TYPE)
+DEFINE_STD_SET_I18N
static void
@@ -124,6 +125,7 @@ tiff_class_init (TiffClass *klass)
plug_in_class->query_procedures = tiff_query_procedures;
plug_in_class->create_procedure = tiff_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -273,7 +275,6 @@ tiff_load (GimpProcedure *procedure,
GimpMetadata *metadata;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
if (run_mode == GIMP_RUN_INTERACTIVE)
@@ -331,7 +332,6 @@ tiff_save (GimpProcedure *procedure,
GError *error = NULL;
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
- INIT_I18N ();
gegl_init (NULL, NULL);
config = gimp_procedure_create_config (procedure);
diff --git a/plug-ins/file-webp/file-webp.c b/plug-ins/file-webp/file-webp.c
index 6e712018b0..444c840896 100644
--- a/plug-ins/file-webp/file-webp.c
+++ b/plug-ins/file-webp/file-webp.c
@@ -77,6 +77,7 @@ static GimpValueArray * webp_save (GimpProcedure *procedure,
G_DEFINE_TYPE (Webp, webp, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (WEBP_TYPE)
+DEFINE_STD_SET_I18N
static void
@@ -86,6 +87,7 @@ webp_class_init (WebpClass *klass)
plug_in_class->query_procedures = webp_query_procedures;
plug_in_class->create_procedure = webp_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -254,7 +256,6 @@ webp_load (GimpProcedure *procedure,
GimpImage *image;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
image = load_image (file, FALSE, &error);
@@ -290,7 +291,6 @@ webp_save (GimpProcedure *procedure,
gboolean animation;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
config = gimp_procedure_create_config (procedure);
diff --git a/plug-ins/flame/flame.c b/plug-ins/flame/flame.c
index 1a15a7a6a2..d6d3ae0dee 100644
--- a/plug-ins/flame/flame.c
+++ b/plug-ins/flame/flame.c
@@ -112,6 +112,7 @@ static void flame_scale_entry_update_double (GimpLabelSpin *entry,
G_DEFINE_TYPE (Flame, flame, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (FLAME_TYPE)
+DEFINE_STD_SET_I18N
static gchar buffer[BUFFER_SIZE];
@@ -141,6 +142,7 @@ flame_class_init (FlameClass *klass)
plug_in_class->query_procedures = flame_query_procedures;
plug_in_class->create_procedure = flame_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -229,7 +231,6 @@ flame_run (GimpProcedure *procedure,
{
GimpDrawable *drawable;
- INIT_I18N ();
gegl_init (NULL, NULL);
if (n_drawables != 1)
diff --git a/plug-ins/fractal-explorer/fractal-explorer.c b/plug-ins/fractal-explorer/fractal-explorer.c
index 866addb0ce..9b8791258d 100644
--- a/plug-ins/fractal-explorer/fractal-explorer.c
+++ b/plug-ins/fractal-explorer/fractal-explorer.c
@@ -134,6 +134,7 @@ static void fractalexplorer_rescan_list (GtkWidget *widget,
G_DEFINE_TYPE (Explorer, explorer, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (EXPLORER_TYPE)
+DEFINE_STD_SET_I18N
/**********************************************************************
@@ -207,6 +208,7 @@ explorer_class_init (ExplorerClass *klass)
plug_in_class->query_procedures = explorer_query_procedures;
plug_in_class->create_procedure = explorer_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -387,7 +389,6 @@ explorer_run (GimpProcedure *procedure,
gint sel_width;
gint sel_height;
- INIT_I18N ();
gegl_init (NULL, NULL);
if (n_drawables != 1)
diff --git a/plug-ins/gfig/gfig.c b/plug-ins/gfig/gfig.c
index f564533930..29d9f2b096 100644
--- a/plug-ins/gfig/gfig.c
+++ b/plug-ins/gfig/gfig.c
@@ -96,6 +96,7 @@ static gint load_options (GFigObj *gfig,
G_DEFINE_TYPE (Gfig, gfig, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (GFIG_TYPE)
+DEFINE_STD_SET_I18N
gint line_no;
@@ -134,6 +135,7 @@ gfig_class_init (GfigClass *klass)
plug_in_class->query_procedures = gfig_query_procedures;
plug_in_class->create_procedure = gfig_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -202,8 +204,6 @@ gfig_run (GimpProcedure *procedure,
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
gint pwidth, pheight;
- INIT_I18N ();
-
if (n_drawables != 1)
{
GError *error = NULL;
diff --git a/plug-ins/gimpressionist/gimp.c b/plug-ins/gimpressionist/gimp.c
index f15cd56455..1cc90e8fe5 100644
--- a/plug-ins/gimpressionist/gimp.c
+++ b/plug-ins/gimpressionist/gimp.c
@@ -73,6 +73,7 @@ static void gimpressionist_main (void);
G_DEFINE_TYPE (Gimpressionist, gimpressionist, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (GIMPRESSIONIST_TYPE)
+DEFINE_STD_SET_I18N
static GimpDrawable *drawable;
@@ -87,6 +88,7 @@ gimpressionist_class_init (GimpressionistClass *klass)
plug_in_class->query_procedures = gimpressionist_query_procedures;
plug_in_class->create_procedure = gimpressionist_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -166,7 +168,6 @@ gimpressionist_run (GimpProcedure *procedure,
{
const gchar *preset_name;
- INIT_I18N ();
gegl_init (NULL, NULL);
if (n_drawables != 1)
diff --git a/plug-ins/gradient-flare/gradient-flare.c b/plug-ins/gradient-flare/gradient-flare.c
index 75159528d7..f61c84c070 100644
--- a/plug-ins/gradient-flare/gradient-flare.c
+++ b/plug-ins/gradient-flare/gradient-flare.c
@@ -672,6 +672,7 @@ static void gradient_scale_entry_update_int (GimpLabelSpin *entry,
G_DEFINE_TYPE (Gflare, gflare, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (GFLARE_TYPE)
+DEFINE_STD_SET_I18N
PluginValues pvals =
@@ -785,6 +786,7 @@ gflare_class_init (GflareClass *klass)
plug_in_class->query_procedures = gflare_query_procedures;
plug_in_class->create_procedure = gflare_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -921,7 +923,6 @@ gflare_run (GimpProcedure *procedure,
{
gchar *path;
- INIT_I18N ();
gegl_init (NULL, NULL);
image = _image;
diff --git a/plug-ins/help-browser/help-browser.c b/plug-ins/help-browser/help-browser.c
index d926da0ef9..cf67cc33fa 100644
--- a/plug-ins/help-browser/help-browser.c
+++ b/plug-ins/help-browser/help-browser.c
@@ -69,6 +69,7 @@ struct _GimpHelpBrowser
G_DEFINE_TYPE (GimpHelpBrowser, gimp_help_browser, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (GIMP_TYPE_HELP_BROWSER)
+DEFINE_STD_SET_I18N
static GList *
help_browser_query_procedures (GimpPlugIn *plug_in)
@@ -152,8 +153,6 @@ help_browser_run (GimpProcedure *procedure,
{
GimpHelpBrowser *browser = GIMP_HELP_BROWSER (user_data);
- INIT_I18N ();
-
if (! gimp_help_init (GIMP_VALUES_GET_STRV (args, 1),
GIMP_VALUES_GET_STRV (args, 2)))
{
@@ -352,6 +351,7 @@ gimp_help_browser_class_init (GimpHelpBrowserClass *klass)
plug_in_class->query_procedures = help_browser_query_procedures;
plug_in_class->create_procedure = help_browser_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
diff --git a/plug-ins/help/help.c b/plug-ins/help/help.c
index 6404362eca..43e647452d 100644
--- a/plug-ins/help/help.c
+++ b/plug-ins/help/help.c
@@ -94,6 +94,7 @@ static GMainLoop *main_loop = NULL;
G_DEFINE_TYPE (Help, help, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (HELP_TYPE)
+DEFINE_STD_SET_I18N
static void
@@ -103,6 +104,7 @@ help_class_init (HelpClass *klass)
plug_in_class->query_procedures = help_query_procedures;
plug_in_class->create_procedure = help_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -156,8 +158,6 @@ help_run (GimpProcedure *procedure,
{
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
- INIT_I18N ();
-
if (! gimp_help_init (GIMP_VALUES_GET_STRV (args, 0),
GIMP_VALUES_GET_STRV (args, 1)))
{
diff --git a/plug-ins/ifs-compose/ifs-compose.c b/plug-ins/ifs-compose/ifs-compose.c
index 8ef353a9a8..e0a78799f6 100644
--- a/plug-ins/ifs-compose/ifs-compose.c
+++ b/plug-ins/ifs-compose/ifs-compose.c
@@ -294,6 +294,7 @@ static void ifs_compose_response (GtkWidget *widget,
G_DEFINE_TYPE (Ifs, ifs, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (IFS_TYPE)
+DEFINE_STD_SET_I18N
static IfsDialog *ifsD = NULL;
@@ -338,6 +339,7 @@ ifs_class_init (IfsClass *klass)
plug_in_class->query_procedures = ifs_query_procedures;
plug_in_class->create_procedure = ifs_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -405,7 +407,6 @@ ifs_run (GimpProcedure *procedure,
GimpParasite *parasite = NULL;
gboolean found_parasite = FALSE;
- INIT_I18N ();
gegl_init (NULL, NULL);
if (n_drawables != 1)
diff --git a/plug-ins/imagemap/imap_main.c b/plug-ins/imagemap/imap_main.c
index c49e973b1f..0e920df88f 100644
--- a/plug-ins/imagemap/imap_main.c
+++ b/plug-ins/imagemap/imap_main.c
@@ -100,6 +100,7 @@ static gint zoom_out (void);
G_DEFINE_TYPE (Imap, imap, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (IMAP_TYPE)
+DEFINE_STD_SET_I18N
/* Global variables */
@@ -134,6 +135,7 @@ imap_class_init (ImapClass *klass)
plug_in_class->query_procedures = imap_query_procedures;
plug_in_class->create_procedure = imap_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -188,7 +190,6 @@ imap_run (GimpProcedure *procedure,
const GimpValueArray *args,
gpointer run_data)
{
- INIT_I18N ();
gegl_init (NULL, NULL);
if (n_drawables != 1)
diff --git a/plug-ins/lighting/lighting-main.c b/plug-ins/lighting/lighting-main.c
index 4e079c0baf..f5438f6452 100644
--- a/plug-ins/lighting/lighting-main.c
+++ b/plug-ins/lighting/lighting-main.c
@@ -76,6 +76,7 @@ static void check_drawables (void);
G_DEFINE_TYPE (Lighting, lighting, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (LIGHTING_TYPE)
+DEFINE_STD_SET_I18N
static void
@@ -85,6 +86,7 @@ lighting_class_init (LightingClass *klass)
plug_in_class->query_procedures = lighting_query_procedures;
plug_in_class->create_procedure = lighting_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -392,7 +394,6 @@ lighting_run (GimpProcedure *procedure,
{
GimpDrawable *drawable;
- INIT_I18N ();
gegl_init (NULL, NULL);
if (n_drawables != 1)
diff --git a/plug-ins/map-object/map-object-main.c b/plug-ins/map-object/map-object-main.c
index 78315ff715..8b35be4d63 100644
--- a/plug-ins/map-object/map-object-main.c
+++ b/plug-ins/map-object/map-object-main.c
@@ -76,6 +76,7 @@ static void check_drawables (GimpDrawable *drawable);
G_DEFINE_TYPE (Map, map, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (MAP_TYPE)
+DEFINE_STD_SET_I18N
static void
@@ -85,6 +86,7 @@ map_class_init (MapClass *klass)
plug_in_class->query_procedures = map_query_procedures;
plug_in_class->create_procedure = map_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -482,7 +484,6 @@ map_run (GimpProcedure *procedure,
GimpDrawable *drawable;
gint i;
- INIT_I18N ();
gegl_init (NULL, NULL);
image = _image;
diff --git a/plug-ins/metadata/metadata-editor.c b/plug-ins/metadata/metadata-editor.c
index 964f1b211a..e750da6f34 100644
--- a/plug-ins/metadata/metadata-editor.c
+++ b/plug-ins/metadata/metadata-editor.c
@@ -410,6 +410,7 @@ cell_edited_callback_combo (GtkCellRendererCombo *cell,
G_DEFINE_TYPE (Metadata, metadata, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (METADATA_TYPE)
+DEFINE_STD_SET_I18N
static int last_gpsaltsys_sel;
@@ -433,6 +434,7 @@ metadata_class_init (MetadataClass *klass)
plug_in_class->query_procedures = metadata_query_procedures;
plug_in_class->create_procedure = metadata_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -502,8 +504,6 @@ metadata_run (GimpProcedure *procedure,
GimpMetadata *metadata;
GError *error = NULL;
- INIT_I18N ();
-
gimp_ui_init (PLUG_IN_BINARY);
image = GIMP_VALUES_GET_IMAGE (args, 1);
diff --git a/plug-ins/metadata/metadata-viewer.c b/plug-ins/metadata/metadata-viewer.c
index 7ea0c0e08b..811e104799 100644
--- a/plug-ins/metadata/metadata-viewer.c
+++ b/plug-ins/metadata/metadata-viewer.c
@@ -136,6 +136,7 @@ static inline gboolean metadata_tag_is_string (const gchar *tag);
G_DEFINE_TYPE (Metadata, metadata, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (METADATA_TYPE)
+DEFINE_STD_SET_I18N
static void
@@ -145,6 +146,7 @@ metadata_class_init (MetadataClass *klass)
plug_in_class->query_procedures = metadata_query_procedures;
plug_in_class->create_procedure = metadata_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -215,8 +217,6 @@ metadata_run (GimpProcedure *procedure,
GimpMetadata *metadata;
GError *error = NULL;
- INIT_I18N ();
-
gimp_ui_init (PLUG_IN_BINARY);
image = GIMP_VALUES_GET_IMAGE (args, 1);
diff --git a/plug-ins/pagecurl/pagecurl.c b/plug-ins/pagecurl/pagecurl.c
index 0c63ef82f5..ddc59ce657 100644
--- a/plug-ins/pagecurl/pagecurl.c
+++ b/plug-ins/pagecurl/pagecurl.c
@@ -150,6 +150,7 @@ static GimpRGB * get_gradient_samples (GimpDrawable *drawable,
G_DEFINE_TYPE (Pagecurl, pagecurl, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (PAGECURL_TYPE)
+DEFINE_STD_SET_I18N
/***** Variables *****/
@@ -197,6 +198,7 @@ pagecurl_class_init (PagecurlClass *klass)
plug_in_class->query_procedures = pagecurl_query_procedures;
plug_in_class->create_procedure = pagecurl_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -288,7 +290,6 @@ pagecurl_run (GimpProcedure *procedure,
GimpDrawable *drawable;
GimpValueArray *return_vals = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
image = _image;
diff --git a/plug-ins/print/print.c b/plug-ins/print/print.c
index ef0ab133b8..a4f92e8395 100644
--- a/plug-ins/print/print.c
+++ b/plug-ins/print/print.c
@@ -114,6 +114,7 @@ static GtkPrintOperation *print_operation = NULL;
G_DEFINE_TYPE (Print, print, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (PRINT_TYPE)
+DEFINE_STD_SET_I18N
static void
@@ -123,6 +124,7 @@ print_class_init (PrintClass *klass)
plug_in_class->query_procedures = print_query_procedures;
plug_in_class->create_procedure = print_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -219,7 +221,6 @@ print_run (GimpProcedure *procedure,
GimpPDBStatusType status;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
if (strcmp (gimp_procedure_get_name (procedure),
diff --git a/plug-ins/python/colorxhtml.py b/plug-ins/python/colorxhtml.py
index 2564bfe613..cb45b107ba 100755
--- a/plug-ins/python/colorxhtml.py
+++ b/plug-ins/python/colorxhtml.py
@@ -28,11 +28,9 @@ from gi.repository import GObject
from gi.repository import GLib
from gi.repository import Gio
-import gettext
-textdomain = "gimp30-python"
-gettext.bindtextdomain(textdomain, Gimp.locale_directory())
-gettext.textdomain(textdomain)
-_ = gettext.gettext
+def N_(message): return message
+def _(message): return GLib.dgettext(None, message)
+
escape_table = {
'&': '&',
@@ -300,6 +298,9 @@ class ColorXhtml(Gimp.PlugIn):
}
## GimpPlugIn virtual methods ##
+ def do_set_i18n(self, procname):
+ return True, 'gimp30-python', None
+
def do_query_procedures(self):
return [ 'file-colorxhtml-save' ]
diff --git a/plug-ins/python/file-openraster.py b/plug-ins/python/file-openraster.py
index cffb53b29c..20e0bbe83c 100755
--- a/plug-ins/python/file-openraster.py
+++ b/plug-ins/python/file-openraster.py
@@ -453,6 +453,9 @@ def load_ora(procedure, run_mode, file, args, data):
class FileOpenRaster (Gimp.PlugIn):
## GimpPlugIn virtual methods ##
+ def do_set_i18n(self, procname):
+ return True, 'gimp30-python', None
+
def do_query_procedures(self):
return [ 'file-openraster-load-thumb',
'file-openraster-load',
diff --git a/plug-ins/python/foggify.py b/plug-ins/python/foggify.py
index 57339b4073..f1ee3c3724 100755
--- a/plug-ins/python/foggify.py
+++ b/plug-ins/python/foggify.py
@@ -25,11 +25,9 @@ from gi.repository import Gio
import time
import sys
-import gettext
-textdomain = "gimp30-python"
-gettext.bindtextdomain(textdomain, Gimp.locale_directory())
-gettext.textdomain(textdomain)
-_ = gettext.gettext
+def N_(message): return message
+def _(message): return GLib.dgettext(None, message)
+
def foggify(procedure, run_mode, image, n_drawables, drawables, args, data):
config = procedure.create_config()
@@ -127,6 +125,9 @@ class Foggify (Gimp.PlugIn):
blurb=_("Fog color"))
## GimpPlugIn virtual methods ##
+ def do_set_i18n(self, procname):
+ return True, 'gimp30-python', None
+
def do_query_procedures(self):
return [ 'python-fu-foggify' ]
diff --git a/plug-ins/python/gradients-save-as-css.py b/plug-ins/python/gradients-save-as-css.py
index f562df1872..29aa4eb014 100755
--- a/plug-ins/python/gradients-save-as-css.py
+++ b/plug-ins/python/gradients-save-as-css.py
@@ -31,11 +31,9 @@ from gi.repository import Gio
import time
import sys
-import gettext
-textdomain = "gimp30-python"
-gettext.bindtextdomain(textdomain, Gimp.locale_directory())
-gettext.textdomain(textdomain)
-_ = gettext.gettext
+def N_(message): return message
+def _(message): return GLib.dgettext(None, message)
+
w3c_template = """background-image: linear-gradient(top, %s);\n"""
moz_template = """background-image: -moz-linear-gradient(center top, %s);\n"""
@@ -151,6 +149,9 @@ class GradientsSaveAsCSS (Gimp.PlugIn):
}
## GimpPlugIn virtual methods ##
+ def do_set_i18n(self, procname):
+ return True, 'gimp30-python', None
+
def do_query_procedures(self):
return [ 'gradient-save-as-css' ]
diff --git a/plug-ins/python/histogram-export.py b/plug-ins/python/histogram-export.py
index 4f27cd6685..5658cb44a2 100644
--- a/plug-ins/python/histogram-export.py
+++ b/plug-ins/python/histogram-export.py
@@ -50,11 +50,8 @@ from gi.repository import Gio
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
-import gettext
-textdomain = "gimp30-python"
-gettext.bindtextdomain(textdomain, Gimp.locale_directory())
-gettext.textdomain(textdomain)
-_ = gettext.gettext
+def N_(message): return message
+def _(message): return GLib.dgettext(None, message)
class StringEnum:
"""
@@ -335,6 +332,9 @@ class HistogramExport(Gimp.PlugIn):
}
## GimpPlugIn virtual methods ##
+ def do_set_i18n(self, procname):
+ return True, 'gimp30-python', None
+
def do_query_procedures(self):
return ['histogram-export']
@@ -347,10 +347,10 @@ class HistogramExport(Gimp.PlugIn):
procedure.set_image_types("*")
procedure.set_documentation (
- _("Exports the image histogram to a text file (CSV)"),
+ N_("Exports the image histogram to a text file (CSV)"),
globals()["__doc__"], # This includes the docstring, on the top of the file
name)
- procedure.set_menu_label(_("_Export histogram..."))
+ procedure.set_menu_label(N_("_Export histogram..."))
procedure.set_attribution("João S. O. Bueno",
"(c) GPL V3.0 or later",
"2014")
diff --git a/plug-ins/python/palette-offset.py b/plug-ins/python/palette-offset.py
index e38b7de338..6e3a5fd19b 100644
--- a/plug-ins/python/palette-offset.py
+++ b/plug-ins/python/palette-offset.py
@@ -23,11 +23,9 @@ from gi.repository import GLib
from gi.repository import Gio
import sys
-import gettext
-textdomain = "gimp30-python"
-gettext.bindtextdomain(textdomain, Gimp.locale_directory())
-gettext.textdomain(textdomain)
-_ = gettext.gettext
+def N_(message): return message
+def _(message): return GLib.dgettext(None, message)
+
class PaletteOffset (Gimp.PlugIn):
## Parameter: run-mode ##
@@ -79,6 +77,9 @@ class PaletteOffset (Gimp.PlugIn):
self.new_palette = new_palette
## GimpPlugIn virtual methods ##
+ def do_set_i18n(self, procname):
+ return True, 'gimp30-python', None
+
def do_query_procedures(self):
return [ "python-fu-palette-offset" ]
diff --git a/plug-ins/python/palette-sort.py b/plug-ins/python/palette-sort.py
index 162ee6c8dd..c01d9b76af 100755
--- a/plug-ins/python/palette-sort.py
+++ b/plug-ins/python/palette-sort.py
@@ -33,11 +33,9 @@ gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
import sys
-import gettext
-textdomain = "gimp30-python"
-gettext.bindtextdomain(textdomain, Gimp.locale_directory())
-gettext.textdomain(textdomain)
-_ = gettext.gettext
+def N_(message): return message
+def _(message): return GLib.dgettext(None, message)
+
AVAILABLE_CHANNELS = (_("Red"), _("Green"), _("Blue"),
_("Luma (Y)"),
@@ -404,6 +402,9 @@ class PaletteSort (Gimp.PlugIn):
}
## GimpPlugIn virtual methods ##
+ def do_set_i18n(self, procname):
+ return True, 'gimp30-python', None
+
def do_query_procedures(self):
return ["python-fu-palette-sort"]
diff --git a/plug-ins/python/palette-to-gradient.py b/plug-ins/python/palette-to-gradient.py
index d4af909338..8be3c9060c 100644
--- a/plug-ins/python/palette-to-gradient.py
+++ b/plug-ins/python/palette-to-gradient.py
@@ -21,11 +21,9 @@ from gi.repository import GLib
from gi.repository import Gio
import sys
-import gettext
-textdomain = "gimp30-python"
-gettext.bindtextdomain(textdomain, Gimp.locale_directory())
-gettext.textdomain(textdomain)
-_ = gettext.gettext
+def N_(message): return message
+def _(message): return GLib.dgettext(None, message)
+
def make_gradient(palette, num_segments, num_colors):
gradient = Gimp.gradient_new(palette)
@@ -125,6 +123,9 @@ class PaletteToGradient (Gimp.PlugIn):
self.new_gradient = new_gradient
## GimpPlugIn virtual methods ##
+ def do_set_i18n(self, procname):
+ return True, 'gimp30-python', None
+
def do_query_procedures(self):
return ['python-fu-palette-to-gradient',
'python-fu-palette-to-gradient-repeating']
diff --git a/plug-ins/python/python-console/python-console.py
b/plug-ins/python/python-console/python-console.py
index b49dbc9317..6746c39d6d 100755
--- a/plug-ins/python/python-console/python-console.py
+++ b/plug-ins/python/python-console/python-console.py
@@ -343,6 +343,9 @@ class PythonConsole (Gimp.PlugIn):
self.runmode = runmode
## GimpPlugIn virtual methods ##
+ def do_set_i18n(self, name):
+ return True, 'gimp30-python', None
+
def do_query_procedures(self):
return [ PROC_NAME ]
diff --git a/plug-ins/python/python-eval.py b/plug-ins/python/python-eval.py
index b058b122f1..e601437710 100644
--- a/plug-ins/python/python-eval.py
+++ b/plug-ins/python/python-eval.py
@@ -35,6 +35,9 @@ def code_eval(procedure, run_mode, code, args, data):
class PythonEval (Gimp.PlugIn):
## GimpPlugIn virtual methods ##
+ def do_set_i18n(self, procname):
+ return True, 'gimp30-python', None
+
def do_query_procedures(self):
return ['python-fu-eval']
diff --git a/plug-ins/python/spyro-plus.py b/plug-ins/python/spyro-plus.py
index 495b2b56b6..3f1b8a1c25 100755
--- a/plug-ins/python/spyro-plus.py
+++ b/plug-ins/python/spyro-plus.py
@@ -30,14 +30,11 @@ from gi.repository import Gdk
import time
import sys
-import gettext
-textdomain = "gimp30-python"
-gettext.bindtextdomain(textdomain, Gimp.locale_directory())
-gettext.textdomain(textdomain)
-_ = gettext.gettext
+def N_(message): return message
+def _(message): return GLib.dgettext(None, message)
+
from math import pi, sin, cos, atan, atan2, fmod, radians, sqrt
-import gettext
import math
import time
@@ -2282,6 +2279,9 @@ class SpyrogimpPlusPlugin(Gimp.PlugIn):
}
## GimpPlugIn virtual methods ##
+ def do_set_i18n(self, procname):
+ return True, 'gimp30-python', None
+
def do_query_procedures(self):
return [PROC_NAME]
diff --git a/plug-ins/screenshot/screenshot.c b/plug-ins/screenshot/screenshot.c
index 2e40af977c..61641a3ae3 100644
--- a/plug-ins/screenshot/screenshot.c
+++ b/plug-ins/screenshot/screenshot.c
@@ -80,6 +80,7 @@ static gboolean shoot_delay_timeout (gpointer data);
G_DEFINE_TYPE (Screenshot, screenshot, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (SCREENSHOT_TYPE)
+DEFINE_STD_SET_I18N
static ScreenshotBackend backend = SCREENSHOT_BACKEND_NONE;
@@ -110,6 +111,7 @@ screenshot_class_init (ScreenshotClass *klass)
plug_in_class->query_procedures = screenshot_query_procedures;
plug_in_class->create_procedure = screenshot_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -229,7 +231,6 @@ screenshot_run (GimpProcedure *procedure,
GimpImage *image = NULL;
GError *error = NULL;
- INIT_I18N ();
gegl_init (NULL, NULL);
run_mode = GIMP_VALUES_GET_ENUM (args, 0);
diff --git a/plug-ins/script-fu/script-fu-interface.c b/plug-ins/script-fu/script-fu-interface.c
index 47dfafc9c7..4bfa3a7803 100644
--- a/plug-ins/script-fu/script-fu-interface.c
+++ b/plug-ins/script-fu/script-fu-interface.c
@@ -214,8 +214,6 @@ script_fu_interface (SFScript *script,
if (!gtk_initted)
{
- INIT_I18N();
-
gimp_ui_init ("script-fu");
gtk_initted = TRUE;
diff --git a/plug-ins/script-fu/script-fu-intl.h b/plug-ins/script-fu/script-fu-intl.h
index 462582c5c7..477d0f3757 100644
--- a/plug-ins/script-fu/script-fu-intl.h
+++ b/plug-ins/script-fu/script-fu-intl.h
@@ -28,16 +28,18 @@
#include <glib/gi18n.h>
-#ifndef HAVE_BIND_TEXTDOMAIN_CODESET
-# define bind_textdomain_codeset(Domain, Codeset) (Domain)
-#endif
-
-#define INIT_I18N() G_STMT_START{ \
- bindtextdomain (GETTEXT_PACKAGE"-script-fu", \
- gimp_locale_directory ()); \
- bind_textdomain_codeset (GETTEXT_PACKAGE"-script-fu", "UTF-8"); \
- textdomain (GETTEXT_PACKAGE"-script-fu"); \
-}G_STMT_END
+#define DEFINE_STD_SET_I18N \
+static gboolean \
+set_i18n (GimpPlugIn *plug_in, \
+ const gchar *procedure_name, \
+ gchar **gettext_domain, \
+ gchar **catalog_dir) \
+{ \
+ *gettext_domain = g_strdup (GETTEXT_PACKAGE"-script-fu"); \
+ return TRUE; \
+};
+
+#define STD_SET_I18N set_i18n
#endif /* __SCRIPT_FU_INTL_H__ */
diff --git a/plug-ins/script-fu/script-fu-server.c b/plug-ins/script-fu/script-fu-server.c
index f774488c36..8ae9397cf7 100644
--- a/plug-ins/script-fu/script-fu-server.c
+++ b/plug-ins/script-fu/script-fu-server.c
@@ -875,8 +875,6 @@ server_interface (void)
GtkWidget *image;
GtkWidget *label;
- INIT_I18N();
-
gimp_ui_init ("script-fu");
dlg = gimp_dialog_new (_("Script-Fu Server Options"), "gimp-script-fu",
diff --git a/plug-ins/script-fu/script-fu.c b/plug-ins/script-fu/script-fu.c
index 2405e5b7d8..795700cc22 100644
--- a/plug-ins/script-fu/script-fu.c
+++ b/plug-ins/script-fu/script-fu.c
@@ -81,6 +81,7 @@ static GimpValueArray * script_fu_refresh_proc (GimpProcedure *proced
G_DEFINE_TYPE (ScriptFu, script_fu, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (SCRIPT_FU_TYPE)
+DEFINE_STD_SET_I18N
static void
@@ -90,6 +91,7 @@ script_fu_class_init (ScriptFuClass *klass)
plug_in_class->query_procedures = script_fu_query_procedures;
plug_in_class->create_procedure = script_fu_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -102,9 +104,6 @@ script_fu_query_procedures (GimpPlugIn *plug_in)
{
GList *list = NULL;
- gimp_plug_in_set_translation_domain (plug_in,
- GETTEXT_PACKAGE "-script-fu", NULL);
-
list = g_list_append (list, g_strdup ("extension-script-fu"));
list = g_list_append (list, g_strdup ("plug-in-script-fu-console"));
list = g_list_append (list, g_strdup ("plug-in-script-fu-text-console"));
@@ -362,8 +361,6 @@ script_fu_run_init (GimpProcedure *procedure,
const gchar *name = gimp_procedure_get_name (procedure);
GList *path;
- INIT_I18N();
-
path = script_fu_search_path ();
/* Determine before we allow scripts to register themselves
diff --git a/plug-ins/selection-to-path/selection-to-path.c b/plug-ins/selection-to-path/selection-to-path.c
index 08815224d6..d5a9403edd 100644
--- a/plug-ins/selection-to-path/selection-to-path.c
+++ b/plug-ins/selection-to-path/selection-to-path.c
@@ -95,6 +95,7 @@ static gboolean sel2path (GimpImage *image);
G_DEFINE_TYPE (Sel2path, sel2path, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (SEL2PATH_TYPE)
+DEFINE_STD_SET_I18N
static gint sel_x1, sel_y1, sel_x2, sel_y2;
@@ -111,6 +112,7 @@ sel2path_class_init (Sel2pathClass *klass)
plug_in_class->query_procedures = sel2path_query_procedures;
plug_in_class->create_procedure = sel2path_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -284,7 +286,6 @@ sel2path_run (GimpProcedure *procedure,
const GimpValueArray *args,
gpointer run_data)
{
- INIT_I18N ();
gegl_init (NULL, NULL);
if (gimp_selection_is_empty (image))
diff --git a/plug-ins/twain/twain.c b/plug-ins/twain/twain.c
index 9dd51e5047..96360815e8 100644
--- a/plug-ins/twain/twain.c
+++ b/plug-ins/twain/twain.c
@@ -161,6 +161,8 @@ static GimpValueArray * twain_run (GimpProcedure *procedure,
G_DEFINE_TYPE (Twain, twain, GIMP_TYPE_PLUG_IN)
GIMP_MAIN (TWAIN_TYPE)
+DEFINE_STD_SET_I18N
+
static void
twain_class_init (TwainClass *klass)
@@ -169,6 +171,7 @@ twain_class_init (TwainClass *klass)
plug_in_class->query_procedures = twain_query_procedures;
plug_in_class->create_procedure = twain_create_procedure;
+ plug_in_class->set_i18n = STD_SET_I18N;
}
static void
@@ -401,8 +404,6 @@ twain_run (GimpProcedure *procedure,
gint num_images;
gint i;
-
- INIT_I18N ();
gegl_init (NULL, NULL);
/* Before we get any further, verify that we have
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]