a quick hack to work qround a gtk+ bug

--Sven
This commit is contained in:
Sven Neumann
2000-02-11 06:01:03 +00:00
parent 7213555631
commit 420aea17cb
5 changed files with 38 additions and 8 deletions

View File

@ -1,3 +1,9 @@
Fri Feb 11 01:40:22 CET 2000 Sven Neumann <sven@gimp.org>
* app/menus.c: This should guard us against unintentionally wrong
translations for menupaths until gtk+-1.2.7 is released and used by
everyone. (This is a quick fix which will not work in all cases.)
Thu Feb 10 22:05:42 CET 2000 Sven Neumann <sven@gimp.org> Thu Feb 10 22:05:42 CET 2000 Sven Neumann <sven@gimp.org>
* plug-ins/common/grid.c: use upper left corner as origin when * plug-ins/common/grid.c: use upper left corner as origin when

View File

@ -1764,7 +1764,12 @@ menu_translate (const gchar *path,
(strstr (path, "/MRU") != NULL)) (strstr (path, "/MRU") != NULL))
return menupath; return menupath;
retval = gettext (menupath); /*
* Work around a bug in GTK+ prior to 1.2.7 (similar workaround below)
*/
translation = gettext (menupath);
if (*translation == '/')
retval = translation;
i = 0; i = 0;
while (i < n_plugin_domains && !strcmp (path, retval) && factory) while (i < n_plugin_domains && !strcmp (path, retval) && factory)
@ -1776,7 +1781,8 @@ menu_translate (const gchar *path,
/* /*
* We compare the start of the translated string with the original menu * We compare the start of the translated string with the original menu
* entry. This is not really necessary, but it helps to suppress badly * entry. This is not really necessary, but it helps to suppress badly
* translated menu_entries which tend to crash the app * translated menu_entries which tend to crash the app due to bug in
* GTK+.
*/ */
translation = dgettext (plugin_domains[i++], menupath); translation = dgettext (plugin_domains[i++], menupath);

View File

@ -1764,7 +1764,12 @@ menu_translate (const gchar *path,
(strstr (path, "/MRU") != NULL)) (strstr (path, "/MRU") != NULL))
return menupath; return menupath;
retval = gettext (menupath); /*
* Work around a bug in GTK+ prior to 1.2.7 (similar workaround below)
*/
translation = gettext (menupath);
if (*translation == '/')
retval = translation;
i = 0; i = 0;
while (i < n_plugin_domains && !strcmp (path, retval) && factory) while (i < n_plugin_domains && !strcmp (path, retval) && factory)
@ -1776,7 +1781,8 @@ menu_translate (const gchar *path,
/* /*
* We compare the start of the translated string with the original menu * We compare the start of the translated string with the original menu
* entry. This is not really necessary, but it helps to suppress badly * entry. This is not really necessary, but it helps to suppress badly
* translated menu_entries which tend to crash the app * translated menu_entries which tend to crash the app due to bug in
* GTK+.
*/ */
translation = dgettext (plugin_domains[i++], menupath); translation = dgettext (plugin_domains[i++], menupath);

View File

@ -1764,7 +1764,12 @@ menu_translate (const gchar *path,
(strstr (path, "/MRU") != NULL)) (strstr (path, "/MRU") != NULL))
return menupath; return menupath;
retval = gettext (menupath); /*
* Work around a bug in GTK+ prior to 1.2.7 (similar workaround below)
*/
translation = gettext (menupath);
if (*translation == '/')
retval = translation;
i = 0; i = 0;
while (i < n_plugin_domains && !strcmp (path, retval) && factory) while (i < n_plugin_domains && !strcmp (path, retval) && factory)
@ -1776,7 +1781,8 @@ menu_translate (const gchar *path,
/* /*
* We compare the start of the translated string with the original menu * We compare the start of the translated string with the original menu
* entry. This is not really necessary, but it helps to suppress badly * entry. This is not really necessary, but it helps to suppress badly
* translated menu_entries which tend to crash the app * translated menu_entries which tend to crash the app due to bug in
* GTK+.
*/ */
translation = dgettext (plugin_domains[i++], menupath); translation = dgettext (plugin_domains[i++], menupath);

View File

@ -1764,7 +1764,12 @@ menu_translate (const gchar *path,
(strstr (path, "/MRU") != NULL)) (strstr (path, "/MRU") != NULL))
return menupath; return menupath;
retval = gettext (menupath); /*
* Work around a bug in GTK+ prior to 1.2.7 (similar workaround below)
*/
translation = gettext (menupath);
if (*translation == '/')
retval = translation;
i = 0; i = 0;
while (i < n_plugin_domains && !strcmp (path, retval) && factory) while (i < n_plugin_domains && !strcmp (path, retval) && factory)
@ -1776,7 +1781,8 @@ menu_translate (const gchar *path,
/* /*
* We compare the start of the translated string with the original menu * We compare the start of the translated string with the original menu
* entry. This is not really necessary, but it helps to suppress badly * entry. This is not really necessary, but it helps to suppress badly
* translated menu_entries which tend to crash the app * translated menu_entries which tend to crash the app due to bug in
* GTK+.
*/ */
translation = dgettext (plugin_domains[i++], menupath); translation = dgettext (plugin_domains[i++], menupath);