Merged from trunk:

2007-11-10  Sven Neumann  <sven@gimp.org>

	Merged from trunk:

	* plug-ins/helpbrowser/dialog.c 
(browser_dialog_make_index_foreach):
	deal gracefully with NULL titles.


svn path=/branches/gimp-2-4/; revision=24108
This commit is contained in:
Sven Neumann 2007-11-09 23:57:24 +00:00 committed by Sven Neumann
parent 4f023c013b
commit 7540b5a30d
2 changed files with 24 additions and 16 deletions

View File

@ -1,3 +1,10 @@
2007-11-10 Sven Neumann <sven@gimp.org>
Merged from trunk:
* plug-ins/helpbrowser/dialog.c (browser_dialog_make_index_foreach):
deal gracefully with NULL titles.
2007-11-08 Sven Neumann <sven@gimp.org>
Merged from trunk:

View File

@ -525,32 +525,35 @@ browser_dialog_make_index_foreach (const gchar *help_id,
GimpHelpItem *item,
GimpHelpLocale *locale)
{
gchar **indices;
gint i;
#if 0
g_printerr ("%s: processing %s (parent %s)\n",
G_STRFUNC, item->title, item->parent ? item->parent : "NULL");
G_STRFUNC,
item->title ? item->title : "NULL",
item->parent ? item->parent : "NULL");
#endif
indices = g_strsplit (item->title, ".", -1);
for (i = 0; i < 5; i++)
if (item->title)
{
if (! indices[i])
break;
gchar **indices = g_strsplit (item->title, ".", -1);
gint i;
item->index += atoi (indices[i]) << (8 * (5 - i));
for (i = 0; i < 5; i++)
{
if (! indices[i])
break;
item->index += atoi (indices[i]) << (8 * (5 - i));
}
g_strfreev (indices);
}
g_strfreev (indices);
if (item->parent && strlen (item->parent))
{
GimpHelpItem *parent;
parent = g_hash_table_lookup (locale->help_id_mapping,
item->parent);
parent = g_hash_table_lookup (locale->help_id_mapping, item->parent);
if (parent)
parent->children = g_list_prepend (parent->children, item);
@ -660,9 +663,7 @@ browser_dialog_make_index (GimpHelpDomain *domain,
void
browser_dialog_goto_index (const gchar *ref)
{
GtkTreeIter *iter;
iter = g_hash_table_lookup (uri_hash_table, ref);
GtkTreeIter *iter = g_hash_table_lookup (uri_hash_table, ref);
if (iter)
{