Commit f20ea3af authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

default to GIMP_TAB_STYLE_PREVIEW. (gimp_dockable_new): fall back to _ICON

2003-09-02  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpdockable.c (gimp_dockable_init): default to
	GIMP_TAB_STYLE_PREVIEW.
	(gimp_dockable_new): fall back to _ICON if
	dockable->get_preview_func is NULL.

	* app/widgets/gimpdialogfactory.c
	(gimp_dialog_factories_restore_foreach): ditto.
parent bbfc737e
2003-09-02 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpdockable.c (gimp_dockable_init): default to
GIMP_TAB_STYLE_PREVIEW.
(gimp_dockable_new): fall back to _ICON if
dockable->get_preview_func is NULL.
* app/widgets/gimpdialogfactory.c
(gimp_dialog_factories_restore_foreach): ditto.
2003-09-02 Sven Neumann <sven@gimp.org>
* app/tools/gimpeditselectiontool.c (init_edit_selection): removed
......@@ -1370,7 +1370,7 @@ gimp_dialog_factories_restore_foreach (gconstpointer key,
gchar *identifier;
gchar *substring;
gint preview_size = -1;
GimpTabStyle tab_style = GIMP_TAB_STYLE_ICON;
GimpTabStyle tab_style = GIMP_TAB_STYLE_PREVIEW;
identifier = (gchar *) pages->data;
......@@ -1421,6 +1421,24 @@ gimp_dialog_factories_restore_foreach (gconstpointer key,
identifier,
preview_size);
if (! GIMP_DOCKABLE (dockable)->get_preview_func)
{
switch (tab_style)
{
case GIMP_TAB_STYLE_PREVIEW:
tab_style = GIMP_TAB_STYLE_ICON;
break;
case GIMP_TAB_STYLE_PREVIEW_NAME:
tab_style = GIMP_TAB_STYLE_ICON_BLURB;
break;
case GIMP_TAB_STYLE_PREVIEW_BLURB:
tab_style = GIMP_TAB_STYLE_ICON_BLURB;
break;
default:
break;
}
}
GIMP_DOCKABLE (dockable)->tab_style = tab_style;
if (dockable)
......
......@@ -119,7 +119,7 @@ gimp_dockable_init (GimpDockable *dockable)
dockable->blurb = NULL;
dockable->stock_id = NULL;
dockable->help_id = NULL;
dockable->tab_style = GIMP_TAB_STYLE_ICON;
dockable->tab_style = GIMP_TAB_STYLE_PREVIEW;
dockable->dockbook = NULL;
dockable->context = NULL;
dockable->get_preview_func = NULL;
......@@ -252,6 +252,24 @@ gimp_dockable_new (const gchar *name,
dockable->get_preview_data = get_preview_data;
dockable->set_context_func = set_context_func;
if (! get_preview_func)
{
switch (dockable->tab_style)
{
case GIMP_TAB_STYLE_PREVIEW:
dockable->tab_style = GIMP_TAB_STYLE_ICON;
break;
case GIMP_TAB_STYLE_PREVIEW_NAME:
dockable->tab_style = GIMP_TAB_STYLE_ICON_BLURB;
break;
case GIMP_TAB_STYLE_PREVIEW_BLURB:
dockable->tab_style = GIMP_TAB_STYLE_ICON_BLURB;
break;
default:
break;
}
}
gimp_help_set_help_data (GTK_WIDGET (dockable), NULL, help_id);
return GTK_WIDGET (dockable);
......
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