From 2e9aa8bb9c8c31417d7031eb763ca41c9e304434 Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Sat, 4 Dec 1999 13:46:25 +0000 Subject: [PATCH] app/main.c Define the "plugin_domains" array of strings in main.c and use 1999-12-04 Michael Natterer * app/main.c * app/menus.c: Define the "plugin_domains" array of strings in main.c and use it as external variable from menus.c What's missing now is a proper way to let gimp know which additional catalogs (perl, python, ...) are actually installed. --- ChangeLog | 9 +++++++++ app/gui/menus.c | 10 +++++----- app/main.c | 10 ++++++++-- app/menus.c | 10 +++++----- app/menus/menus.c | 10 +++++----- app/widgets/gimpitemfactory.c | 10 +++++----- 6 files changed, 37 insertions(+), 22 deletions(-) diff --git a/ChangeLog b/ChangeLog index 84f41c6ced..5acb59bb6e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +1999-12-04 Michael Natterer + + * app/main.c + * app/menus.c: Define the "plugin_domains" array of strings in + main.c and use it as external variable from menus.c + + What's missing now is a proper way to let gimp know which + additional catalogs (perl, python, ...) are actually installed. + 1999-12-04 Michael Natterer * app/menus.c: Reorder all menu items under /Filters which diff --git a/app/gui/menus.c b/app/gui/menus.c index 239476532f..d388d6f941 100644 --- a/app/gui/menus.c +++ b/app/gui/menus.c @@ -64,6 +64,11 @@ static void help_debug_cmd_callback (GtkWidget *widget, gpointer callback_data, guint callback_action); +/* from main.c */ +extern gchar *plugin_domains[]; +extern gint n_plugin_domains; + +/* for i18n */ static gchar G_GNUC_UNUSED *dummy_entries[] = { /* */ @@ -1706,11 +1711,6 @@ static gchar * menu_translate (const gchar *path, gpointer data) { - static gchar *plugin_domains[] = { "gimp-std-plugins", - "gimp-perl" }; - static gint n_plugin_domains = (sizeof (plugin_domains) / - sizeof (plugin_domains[0])); - static gchar *menupath = NULL; gchar *retval; diff --git a/app/main.c b/app/main.c index 57f403056c..ad0b5f5157 100644 --- a/app/main.c +++ b/app/main.c @@ -78,6 +78,11 @@ gchar *alternate_gimprc; gchar *alternate_system_gimprc; gchar **batch_cmds; +gchar *plugin_domains[] = { "gimp-std-plugins", + "gimp-perl" }; +gint n_plugin_domains = (sizeof (plugin_domains) / + sizeof (plugin_domains[0])); + /* LOCAL data */ static gint gimp_argc; static gchar **gimp_argv; @@ -121,8 +126,9 @@ main (int argc, char **argv) /* Initialize i18n support */ INIT_LOCALE ("gimp"); - bindtextdomain ("gimp-std-plugins", LOCALEDIR); - bindtextdomain ("gimp-perl", LOCALEDIR); + + for (i = 0; i < n_plugin_domains; i++) + bindtextdomain (plugin_domains[i], LOCALEDIR); gtk_init (&argc, &argv); diff --git a/app/menus.c b/app/menus.c index 239476532f..d388d6f941 100644 --- a/app/menus.c +++ b/app/menus.c @@ -64,6 +64,11 @@ static void help_debug_cmd_callback (GtkWidget *widget, gpointer callback_data, guint callback_action); +/* from main.c */ +extern gchar *plugin_domains[]; +extern gint n_plugin_domains; + +/* for i18n */ static gchar G_GNUC_UNUSED *dummy_entries[] = { /* */ @@ -1706,11 +1711,6 @@ static gchar * menu_translate (const gchar *path, gpointer data) { - static gchar *plugin_domains[] = { "gimp-std-plugins", - "gimp-perl" }; - static gint n_plugin_domains = (sizeof (plugin_domains) / - sizeof (plugin_domains[0])); - static gchar *menupath = NULL; gchar *retval; diff --git a/app/menus/menus.c b/app/menus/menus.c index 239476532f..d388d6f941 100644 --- a/app/menus/menus.c +++ b/app/menus/menus.c @@ -64,6 +64,11 @@ static void help_debug_cmd_callback (GtkWidget *widget, gpointer callback_data, guint callback_action); +/* from main.c */ +extern gchar *plugin_domains[]; +extern gint n_plugin_domains; + +/* for i18n */ static gchar G_GNUC_UNUSED *dummy_entries[] = { /* */ @@ -1706,11 +1711,6 @@ static gchar * menu_translate (const gchar *path, gpointer data) { - static gchar *plugin_domains[] = { "gimp-std-plugins", - "gimp-perl" }; - static gint n_plugin_domains = (sizeof (plugin_domains) / - sizeof (plugin_domains[0])); - static gchar *menupath = NULL; gchar *retval; diff --git a/app/widgets/gimpitemfactory.c b/app/widgets/gimpitemfactory.c index 239476532f..d388d6f941 100644 --- a/app/widgets/gimpitemfactory.c +++ b/app/widgets/gimpitemfactory.c @@ -64,6 +64,11 @@ static void help_debug_cmd_callback (GtkWidget *widget, gpointer callback_data, guint callback_action); +/* from main.c */ +extern gchar *plugin_domains[]; +extern gint n_plugin_domains; + +/* for i18n */ static gchar G_GNUC_UNUSED *dummy_entries[] = { /* */ @@ -1706,11 +1711,6 @@ static gchar * menu_translate (const gchar *path, gpointer data) { - static gchar *plugin_domains[] = { "gimp-std-plugins", - "gimp-perl" }; - static gint n_plugin_domains = (sizeof (plugin_domains) / - sizeof (plugin_domains[0])); - static gchar *menupath = NULL; gchar *retval;