code cleanup; only call gtk_window_present() if called with present ==

2006-05-29  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpdialogfactory.c
	(gimp_dialog_factory_dialog_new_internal): code cleanup; only call
	gtk_window_present() if called with present == TRUE.
This commit is contained in:
Sven Neumann 2006-05-29 16:41:18 +00:00 committed by Sven Neumann
parent 6ce6160966
commit 80bddf14a9
2 changed files with 34 additions and 32 deletions

View File

@ -1,3 +1,9 @@
2006-05-29 Sven Neumann <sven@gimp.org>
* app/widgets/gimpdialogfactory.c
(gimp_dialog_factory_dialog_new_internal): code cleanup; only call
gtk_window_present() if called with present == TRUE.
2006-05-29 Sven Neumann <sven@gimp.org>
* app/core/gimpbrushgenerated.c (gimp_brush_generated_load): don't

View File

@ -494,46 +494,42 @@ gimp_dialog_factory_dialog_new_internal (GimpDialogFactory *factory,
gimp_dialog_factory_add_dialog (factory, dialog);
}
/* finally, if we found an existing dialog or created a new one,
* raise it
/* Finally, if we found an existing dialog or created a new one, raise it.
*/
if (dialog)
if (! dialog)
return NULL;
if (GTK_WIDGET_TOPLEVEL (dialog))
{
if (GTK_WIDGET_TOPLEVEL (dialog))
gtk_window_set_screen (GTK_WINDOW (dialog), screen);
if (present)
gtk_window_present (GTK_WINDOW (dialog));
}
else if (GIMP_IS_DOCKABLE (dialog))
{
GimpDockable *dockable = GIMP_DOCKABLE (dialog);
if (dockable->dockbook && dockable->dockbook->dock)
{
gtk_window_set_screen (GTK_WINDOW (dialog), screen);
GtkNotebook *notebook = GTK_NOTEBOOK (dockable->dockbook);
gint num = gtk_notebook_page_num (notebook, dialog);
if (present)
gtk_window_present (GTK_WINDOW (dialog));
}
else if (GIMP_IS_DOCKABLE (dialog))
{
GimpDockable *dockable;
gint page_num;
dockable = GIMP_DOCKABLE (dialog);
if (dockable->dockbook && dockable->dockbook->dock)
if (num != -1)
{
page_num =
gtk_notebook_page_num (GTK_NOTEBOOK (dockable->dockbook),
dialog);
gtk_notebook_set_current_page (notebook, num);
if (page_num != -1)
{
GtkWidget *toplevel;
gtk_notebook_set_current_page (GTK_NOTEBOOK (dockable->dockbook),
page_num);
toplevel = gtk_widget_get_toplevel (dialog);
gtk_window_present (GTK_WINDOW (toplevel));
gimp_dockable_blink (GIMP_DOCKABLE (dialog));
}
gimp_dockable_blink (dockable);
}
}
if (present)
{
GtkWidget *toplevel = gtk_widget_get_toplevel (dialog);
if (GTK_IS_WINDOW (toplevel))
gtk_window_present (GTK_WINDOW (toplevel));
}
}
return dialog;