return the active display's shell instead of the toolbox when called from

2005-02-08  Michael Natterer  <mitch@gimp.org>

	* app/actions/actions.c (action_data_get_widget): return the
	active display's shell instead of the toolbox when called from the
	<Image> popup. Fall back to the toolbox if there is no active
	display. Fixes bug #166012.
This commit is contained in:
Michael Natterer 2005-02-08 21:19:57 +00:00 committed by Michael Natterer
parent c4847750dd
commit ac01f3b810
2 changed files with 15 additions and 3 deletions

View File

@ -1,3 +1,10 @@
2005-02-08 Michael Natterer <mitch@gimp.org>
* app/actions/actions.c (action_data_get_widget): return the
active display's shell instead of the toolbox when called from the
<Image> popup. Fall back to the toolbox if there is no active
display. Fixes bug #166012.
2005-02-08 Michael Natterer <mitch@gimp.org>
* HACKING: updated info about stable CVS branches of modules we

View File

@ -335,17 +335,22 @@ action_data_get_display (gpointer data)
GtkWidget *
action_data_get_widget (gpointer data)
{
GimpDisplay *display = NULL;
if (! data)
return NULL;
if (GIMP_IS_DISPLAY (data))
return ((GimpDisplay *) data)->shell;
display = data;
else if (GIMP_IS_GIMP (data))
return dialogs_get_toolbox ();
display = gimp_context_get_display (gimp_get_user_context (data));
else if (GTK_IS_WIDGET (data))
return data;
return NULL;
if (display)
return display->shell;
return dialogs_get_toolbox ();
}
gdouble