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.
This commit is contained in:
Michael Natterer 2003-09-02 14:15:39 +00:00 committed by Michael Natterer
parent bbfc737efa
commit f20ea3af76
3 changed files with 48 additions and 2 deletions

View File

@ -1,3 +1,13 @@
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

View File

@ -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)

View File

@ -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);