Commit 35b50986 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann
Browse files

refactoring.

2005-05-12  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpdialogfactory.c: refactoring.
parent 915ccae6
2005-05-12 Sven Neumann <sven@gimp.org>
* app/widgets/gimpdialogfactory.c: refactoring.
2005-05-12 Sven Neumann <sven@gimp.org>
* app/widgets/gimpimagedock.c: request notification about changes
......
......@@ -100,6 +100,9 @@ static void gimp_dialog_factories_unset_busy_foreach(gconstpointer key,
GimpDialogFactory *factory,
gpointer data);
static GtkWidget *
gimp_dialog_factory_get_toolbox (GimpDialogFactory *toolbox_factory);
static GimpObjectClass *parent_class = NULL;
......@@ -1085,13 +1088,10 @@ gimp_dialog_factories_toggle (GimpDialogFactory *toolbox_factory,
if (ensure_visibility && toggle_state != GIMP_DIALOG_HIDE_ALL)
{
GList *list;
GtkWidget *toolbox = gimp_dialog_factory_get_toolbox (toolbox_factory);
for (list = toolbox_factory->open_dialogs; list; list = list->next)
{
if (GTK_IS_WIDGET (list->data) && GTK_WIDGET_TOPLEVEL (list->data))
gtk_window_present (GTK_WINDOW (list->data));
}
if (toolbox)
gtk_window_present (GTK_WINDOW (toolbox));
return;
}
......@@ -1465,3 +1465,18 @@ gimp_dialog_factories_unset_busy_foreach (gconstpointer key,
}
}
}
/* The only toplevel widget in the toolbox factory is the toolbox */
static GtkWidget *
gimp_dialog_factory_get_toolbox (GimpDialogFactory *toolbox_factory)
{
GList *list;
for (list = toolbox_factory->open_dialogs; list; list = list->next)
{
if (GTK_IS_WIDGET (list->data) && GTK_WIDGET_TOPLEVEL (list->data))
return list->data;
}
return NULL;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment