Handle item->translation_domain being NULL. (#166179, Diego Gonzalez)

2005-02-04  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkstock.c (gtk_stock_lookup): Handle item->translation_domain
	being NULL.  (#166179, Diego Gonzalez)
This commit is contained in:
Matthias Clasen 2005-02-04 18:13:05 +00:00 committed by Matthias Clasen
parent 46a5bd82ae
commit 8ccd6cba27
4 changed files with 21 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2005-02-04 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkstock.c (gtk_stock_lookup): Handle item->translation_domain
being NULL. (#166179, Diego Gonzalez)
2005-02-04 Owen Taylor <otaylor@redhat.com>
* configure.in: Revert gtk_binary_version to 2.4.0. Fix

View File

@ -1,3 +1,8 @@
2005-02-04 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkstock.c (gtk_stock_lookup): Handle item->translation_domain
being NULL. (#166179, Diego Gonzalez)
2005-02-04 Owen Taylor <otaylor@redhat.com>
* configure.in: Revert gtk_binary_version to 2.4.0. Fix

View File

@ -1,3 +1,8 @@
2005-02-04 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkstock.c (gtk_stock_lookup): Handle item->translation_domain
being NULL. (#166179, Diego Gonzalez)
2005-02-04 Owen Taylor <otaylor@redhat.com>
* configure.in: Revert gtk_binary_version to 2.4.0. Fix

View File

@ -166,9 +166,12 @@ gtk_stock_lookup (const gchar *stock_id,
if (item->label)
{
GtkStockTranslateFunc *translate;
translate = (GtkStockTranslateFunc *)
g_hash_table_lookup (translate_hash, item->translation_domain);
if (item->translation_domain)
translate = (GtkStockTranslateFunc *)
g_hash_table_lookup (translate_hash, item->translation_domain);
else
translate = NULL;
if (translate != NULL && translate->func != NULL)
item->label = (* translate->func) (item->label, translate->data);