Bug 664885 - Open 'Document History' --> always a additional history tab appears

Really find a *widget* in gimp_dialog_factory_find_widget(), don't
just return the first found session info's widget. It's perfectly fine
for a session info to have a NULL widget, if that dialog is not
currently open.
This commit is contained in:
Michael Natterer
2012-01-31 22:00:17 +01:00
parent 9a4abedb98
commit d11f9d7dbf

View File

@ -352,8 +352,9 @@ GtkWidget *
gimp_dialog_factory_find_widget (GimpDialogFactory *factory,
const gchar *identifiers)
{
gchar **ids;
gint i;
GtkWidget *widget = NULL;
gchar **ids;
gint i;
g_return_val_if_fail (GIMP_IS_DIALOG_FACTORY (factory), NULL);
g_return_val_if_fail (identifiers != NULL, NULL);
@ -368,15 +369,16 @@ gimp_dialog_factory_find_widget (GimpDialogFactory *factory,
if (info)
{
g_strfreev (ids);
widget = gimp_session_info_get_widget (info);
return gimp_session_info_get_widget (info);
if (widget)
break;
}
}
g_strfreev (ids);
return NULL;
return widget;
}
/**