Commit 305db405 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

added "gchar *stock_id" to the GimpViewable struct. It is used by the GUI

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

	* app/core/gimpviewable.[ch]: added "gchar *stock_id" to the
	GimpViewable struct. It is used by the GUI if the get_preview()
	functions return NULL. Default to GTK_STOCK_DIALOG_QUESTION.

	* app/core/gimptoolinfo.[ch]: set the tool's stock_id. Removed
	the cached GdkPixbuf. Don't implement any preview function
	so the GUI uses the stock_id.

	* app/tools/tool_manager.c: removed GdkPixbuf creation, removed
	the #warning about the buggy way we created the pixbuf.

	* app/gui/dialogs-constructors.c
	* app/gui/image-menu.c
	* app/tools/gimpcroptool.c
	* app/tools/gimphistogramtool.c
	* app/tools/gimpimagemaptool.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimptransformtool.c
	* app/widgets/gimptoolbox.c: use viewable->stock_id instead
	of tool_info->stock_id.

	* app/core/gimpbrush.c
	* app/core/gimpgradient.c
	* app/core/gimpimagefile.c
	* app/core/gimpundo.c: simplified get_preview() implementations:

	- never scale previews up, only down.
	- don't render white or checks backgrounds but simply return
	  TempBufs with alpha and let the preview system do its job.
	- don't add padding but simply return previews smaller than
	  requested.

	* app/display/gimpdisplayshell-render.[ch]: added
	"render_blend_white", a 2d lookup table for blending on white,
	just as the check lookup tables. Added "render_white_buf".

	* app/widgets/gimppreview.[ch]: changed a lot:

	- don't render the preview's border into the buffer.
	- added "GdkGC *border_gc" and draw the preview's border in expose()
	  using gdk_draw_rectangle().
	- added "GdkPixbuf *no_preview_pixbuf" and create it in
	  gimp_preview_real_render() if gimp_viewable_get_preview()
	  returned NULL.
	- factored the actual preview rendering out to
	  gimp_preview_render_to_buffer(). Added configurable background
	  rendering for the preview itself and it's padding area
	  (the area the preview is larger than the buffer returned
	  by gimp_viewable_get_preview()).
	- changed gimp_preview_render_and_flush() to
	  gimp_preview_render_preview() and added "inside_bg" and
	  "outside_bg" parameters.
	- use the new render buffers for blending on white.

	* app/widgets/gimpbrushpreview.c
	* app/widgets/gimpbufferpreview.c
	* app/widgets/gimpdrawablepreview.c
	* app/widgets/gimpgradientpreview.c
	* app/widgets/gimpimagepreview.c
	* app/widgets/gimppalettepreview.c
	* app/widgets/gimppatternpreview.c: don't create large white
	TempBufs to center the previews in but simply set the TempBuf's
	offsets to get them centered. Simplified & cleaned up many preview
	render functions. Pass the correct GimpPreviewBG modes to
	gimp_preview_render_preview().

	* app/widgets/gimpcellrendererviewable.[ch]: new GtkCellRenderer
	class derived from GtkCellRendererPixbuf which knows how
	to use gimp_viewable_get_preview_size() and renders the
	viewable's stock item if no preview can be created.

	* app/widgets/gimpcontainertreeview.c: added a GtkTreeCellDataFunc
	which creates the preview pixbuf if needed so we don't create it
	unconditionally upon item insertion. Fixed preview size assertion
	to use GIMP_PREVIEW_MAX_SIZE, not "64". Block "selection_changed"
	while reordering the selected item.

	* app/widgets/gimpcontainerview.c: cosmetic.

	* app/widgets/gimpimagefilepreview.[ch]
	* app/widgets/gimptoolinfopreview.[ch]
	* app/widgets/gimpundopreview.[ch]: removed because the default
	implementation is good enough.

	* app/widgets/Makefile.am
	* app/widgets/widgets-types.h
	* app/widgets/gimppreview-utils.c: changed accordingly.

	* app/gui/dialogs-constructors.[ch]
	* app/gui/dialogs-menu.c
	* app/gui/dialogs.c
	* app/gui/image-menu.c
	* app/gui/toolbox-menu.c: register grid and tree view variants
	of the document history.

	Unrelated:

	* app/gui/gui.c (gui_exit_finish_callback): disconnect from
	signals earlier.

	* app/gui/user-install-dialog.c: create the "tool-options" subdir
	of the user's ~/.gimp-1.3 directory.
parent 2d5828ec
2003-02-25 Michael Natterer <mitch@gimp.org> 2003-02-26 Michael Natterer <mitch@gimp.org>
* app/core/gimpviewable.[ch]: added "gchar *stock_id" to the * app/core/gimpviewable.[ch]: added "gchar *stock_id" to the
GimpViewable struct. It is used by the GUI if the get_preview() GimpViewable struct. It is used by the GUI if the get_preview()
...@@ -957,9 +957,9 @@ dialogs_color_editor_new (GimpDialogFactory *factory, ...@@ -957,9 +957,9 @@ dialogs_color_editor_new (GimpDialogFactory *factory,
} }
GtkWidget * GtkWidget *
dialogs_document_history_new (GimpDialogFactory *factory, dialogs_document_list_new (GimpDialogFactory *factory,
GimpContext *context, GimpContext *context,
gint preview_size) gint preview_size)
{ {
GtkWidget *view; GtkWidget *view;
...@@ -972,7 +972,51 @@ dialogs_document_history_new (GimpDialogFactory *factory, ...@@ -972,7 +972,51 @@ dialogs_document_history_new (GimpDialogFactory *factory,
factory->menu_factory); factory->menu_factory);
return dialogs_dockable_new (view, return dialogs_dockable_new (view,
_("Document History"), _("History"), _("Document History List"), _("History"),
GTK_STOCK_OPEN,
dialogs_stock_text_tab_func,
dialogs_set_editor_context_func);
}
GtkWidget *
dialogs_document_grid_new (GimpDialogFactory *factory,
GimpContext *context,
gint preview_size)
{
GtkWidget *view;
view = gimp_document_view_new (GIMP_VIEW_TYPE_GRID,
context->gimp->documents,
context,
preview_size,
5, 3,
file_file_open_dialog,
factory->menu_factory);
return dialogs_dockable_new (view,
_("Document History Grid"), _("History"),
GTK_STOCK_OPEN,
dialogs_stock_text_tab_func,
dialogs_set_editor_context_func);
}
GtkWidget *
dialogs_document_tree_new (GimpDialogFactory *factory,
GimpContext *context,
gint preview_size)
{
GtkWidget *view;
view = gimp_document_view_new (GIMP_VIEW_TYPE_TREE,
context->gimp->documents,
context,
preview_size,
5, 3,
file_file_open_dialog,
factory->menu_factory);
return dialogs_dockable_new (view,
_("Document History Tree"), _("History"),
GTK_STOCK_OPEN, GTK_STOCK_OPEN,
dialogs_stock_text_tab_func, dialogs_stock_text_tab_func,
dialogs_set_editor_context_func); dialogs_set_editor_context_func);
...@@ -1236,7 +1280,9 @@ dialogs_tool_tab_tool_changed (GimpContext *context, ...@@ -1236,7 +1280,9 @@ dialogs_tool_tab_tool_changed (GimpContext *context,
GimpToolInfo *tool_info, GimpToolInfo *tool_info,
GtkImage *image) GtkImage *image)
{ {
gtk_image_set_from_stock (image, tool_info->stock_id, image->icon_size); gtk_image_set_from_stock (image,
GIMP_VIEWABLE (tool_info)->stock_id,
image->icon_size);
} }
static GtkWidget * static GtkWidget *
...@@ -1244,13 +1290,15 @@ dialogs_tool_tab_func (GimpDockable *dockable, ...@@ -1244,13 +1290,15 @@ dialogs_tool_tab_func (GimpDockable *dockable,
GimpDockbook *dockbook, GimpDockbook *dockbook,
GtkIconSize size) GtkIconSize size)
{ {
GimpContext *context; GimpContext *context;
GtkWidget *image; GimpViewable *viewable;
GtkWidget *image;
context = dockbook->dock->context; context = dockbook->dock->context;
image = gtk_image_new_from_stock (gimp_context_get_tool (context)->stock_id, viewable = GIMP_VIEWABLE (gimp_context_get_tool (context));
size);
image = gtk_image_new_from_stock (viewable->stock_id, size);
g_signal_connect_object (context, "tool_changed", g_signal_connect_object (context, "tool_changed",
G_CALLBACK (dialogs_tool_tab_tool_changed), G_CALLBACK (dialogs_tool_tab_tool_changed),
...@@ -1268,7 +1316,9 @@ dialogs_tool_options_tool_changed (GimpContext *context, ...@@ -1268,7 +1316,9 @@ dialogs_tool_options_tool_changed (GimpContext *context,
GtkImage *image; GtkImage *image;
if ((image = g_object_get_data (G_OBJECT (label), "tool-icon"))) if ((image = g_object_get_data (G_OBJECT (label), "tool-icon")))
gtk_image_set_from_stock (image, tool_info->stock_id, image->icon_size); gtk_image_set_from_stock (image,
GIMP_VIEWABLE (tool_info)->stock_id,
image->icon_size);
gtk_label_set_text (label, tool_info->blurb); gtk_label_set_text (label, tool_info->blurb);
...@@ -1298,7 +1348,7 @@ dialogs_tool_options_tab_func (GimpDockable *dockable, ...@@ -1298,7 +1348,7 @@ dialogs_tool_options_tab_func (GimpDockable *dockable,
hbox = gtk_hbox_new (FALSE, 2); hbox = gtk_hbox_new (FALSE, 2);
image = gtk_image_new_from_stock (gimp_context_get_tool (context)->stock_id, image = gtk_image_new_from_stock (GIMP_VIEWABLE (tool_info)->stock_id,
size); size);
gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
gtk_widget_show (image); gtk_widget_show (image);
......
...@@ -153,7 +153,13 @@ GtkWidget * dialogs_color_editor_new (GimpDialogFactory *factory, ...@@ -153,7 +153,13 @@ GtkWidget * dialogs_color_editor_new (GimpDialogFactory *factory,
GimpContext *context, GimpContext *context,
gint preview_size); gint preview_size);
GtkWidget * dialogs_document_history_new (GimpDialogFactory *factory, GtkWidget * dialogs_document_list_new (GimpDialogFactory *factory,
GimpContext *context,
gint preview_size);
GtkWidget * dialogs_document_grid_new (GimpDialogFactory *factory,
GimpContext *context,
gint preview_size);
GtkWidget * dialogs_document_tree_new (GimpDialogFactory *factory,
GimpContext *context, GimpContext *context,
gint preview_size); gint preview_size);
......
...@@ -87,7 +87,9 @@ static const GimpDialogFactoryEntry dock_entries[] = ...@@ -87,7 +87,9 @@ static const GimpDialogFactoryEntry dock_entries[] =
{ "gimp-color-editor", dialogs_color_editor_new, 0, FALSE, FALSE, FALSE, TRUE }, { "gimp-color-editor", dialogs_color_editor_new, 0, FALSE, FALSE, FALSE, TRUE },
{ "gimp-document-history", dialogs_document_history_new, 48, FALSE, FALSE, FALSE, TRUE }, { "gimp-document-list", dialogs_document_list_new, 48, FALSE, FALSE, FALSE, TRUE },
{ "gimp-document-grid", dialogs_document_grid_new, 48, FALSE, FALSE, FALSE, TRUE },
{ "gimp-document-tree", dialogs_document_tree_new, 48, FALSE, FALSE, FALSE, TRUE },
{ "gimp-brush-editor", dialogs_brush_editor_get, 0, TRUE, FALSE, FALSE, TRUE }, { "gimp-brush-editor", dialogs_brush_editor_get, 0, TRUE, FALSE, FALSE, TRUE },
{ "gimp-gradient-editor", dialogs_gradient_editor_get, 0, TRUE, FALSE, FALSE, TRUE }, { "gimp-gradient-editor", dialogs_gradient_editor_get, 0, TRUE, FALSE, FALSE, TRUE },
......
...@@ -265,6 +265,11 @@ tree_items[] = ...@@ -265,6 +265,11 @@ tree_items[] =
"sessions and can be destroyed with impunity."), "sessions and can be destroyed with impunity."),
TREE_ITEM_MKDIR_ONLY, NULL TREE_ITEM_MKDIR_ONLY, NULL
}, },
{
TRUE, "tool-options",
N_("This folder is used to store tool options."),
TREE_ITEM_MKDIR_ONLY, NULL
},
{ {
TRUE, "curves", TRUE, "curves",
N_("This folder is used to store parameter files for the\n" N_("This folder is used to store parameter files for the\n"
......
...@@ -73,9 +73,12 @@ static void render_setup_notify (gpointer config, ...@@ -73,9 +73,12 @@ static void render_setup_notify (gpointer config,
/* accelerate transparency of image scaling */ /* accelerate transparency of image scaling */
guchar *render_check_buf = NULL; guchar *render_check_buf = NULL;
guchar *render_empty_buf = NULL; guchar *render_empty_buf = NULL;
guchar *render_white_buf = NULL;
guchar *render_temp_buf = NULL; guchar *render_temp_buf = NULL;
guchar *render_blend_dark_check = NULL; guchar *render_blend_dark_check = NULL;
guchar *render_blend_light_check = NULL; guchar *render_blend_light_check = NULL;
guchar *render_blend_white = NULL;
static guchar *tile_buf = NULL; static guchar *tile_buf = NULL;
...@@ -135,6 +138,12 @@ render_exit (Gimp *gimp) ...@@ -135,6 +138,12 @@ render_exit (Gimp *gimp)
render_blend_light_check = NULL; render_blend_light_check = NULL;
} }
if (render_blend_white)
{
g_free (render_blend_white);
render_blend_white = NULL;
}
if (render_check_buf) if (render_check_buf)
{ {
g_free (render_check_buf); g_free (render_check_buf);
...@@ -147,6 +156,12 @@ render_exit (Gimp *gimp) ...@@ -147,6 +156,12 @@ render_exit (Gimp *gimp)
render_empty_buf = NULL; render_empty_buf = NULL;
} }
if (render_white_buf)
{
g_free (render_white_buf);
render_white_buf = NULL;
}
if (render_temp_buf) if (render_temp_buf)
{ {
g_free (render_temp_buf); g_free (render_temp_buf);
...@@ -185,6 +200,8 @@ render_setup_notify (gpointer config, ...@@ -185,6 +200,8 @@ render_setup_notify (gpointer config,
render_blend_dark_check = g_new (guchar, 65536); render_blend_dark_check = g_new (guchar, 65536);
if (! render_blend_light_check) if (! render_blend_light_check)
render_blend_light_check = g_new (guchar, 65536); render_blend_light_check = g_new (guchar, 65536);
if (! render_blend_white)
render_blend_white = g_new (guchar, 65536);
for (i = 0; i < 256; i++) for (i = 0; i < 256; i++)
for (j = 0; j < 256; j++) for (j = 0; j < 256; j++)
...@@ -193,6 +210,9 @@ render_setup_notify (gpointer config, ...@@ -193,6 +210,9 @@ render_setup_notify (gpointer config,
((j * i + check_combos[check_type][0] * (255 - i)) / 255); ((j * i + check_combos[check_type][0] * (255 - i)) / 255);
render_blend_light_check [(i << 8) + j] = (guchar) render_blend_light_check [(i << 8) + j] = (guchar)
((j * i + check_combos[check_type][1] * (255 - i)) / 255); ((j * i + check_combos[check_type][1] * (255 - i)) / 255);
render_blend_white [(i << 8) + j] = (guchar)
((j * i + 255 * (255 - i)) / 255);
} }
switch (check_size) switch (check_size)
...@@ -213,6 +233,7 @@ render_setup_notify (gpointer config, ...@@ -213,6 +233,7 @@ render_setup_notify (gpointer config,
g_free (render_check_buf); g_free (render_check_buf);
g_free (render_empty_buf); g_free (render_empty_buf);
g_free (render_white_buf);
g_free (render_temp_buf); g_free (render_temp_buf);
#ifdef __GNUC__ #ifdef __GNUC__
...@@ -242,12 +263,16 @@ render_setup_notify (gpointer config, ...@@ -242,12 +263,16 @@ render_setup_notify (gpointer config,
} }
render_empty_buf = g_new0 (guchar, (MAX_PREVIEW_SIZE + 4) * 3); render_empty_buf = g_new0 (guchar, (MAX_PREVIEW_SIZE + 4) * 3);
render_white_buf = g_new (guchar, (MAX_PREVIEW_SIZE + 4) * 3);
render_temp_buf = g_new (guchar, (MAX_PREVIEW_SIZE + 4) * 3); render_temp_buf = g_new (guchar, (MAX_PREVIEW_SIZE + 4) * 3);
memset (render_white_buf, 255, (MAX_PREVIEW_SIZE + 4) * 3);
} }
else else
{ {
render_check_buf = NULL; render_check_buf = NULL;
render_empty_buf = NULL; render_empty_buf = NULL;
render_white_buf = NULL;
render_temp_buf = NULL; render_temp_buf = NULL;
} }
} }
......
...@@ -38,9 +38,12 @@ void gimp_display_shell_render (GimpDisplayShell *shell, ...@@ -38,9 +38,12 @@ void gimp_display_shell_render (GimpDisplayShell *shell,
*/ */
extern guchar *render_check_buf; extern guchar *render_check_buf;
extern guchar *render_empty_buf; extern guchar *render_empty_buf;
extern guchar *render_white_buf;
extern guchar *render_temp_buf; extern guchar *render_temp_buf;
extern guchar *render_blend_dark_check; extern guchar *render_blend_dark_check;
extern guchar *render_blend_light_check; extern guchar *render_blend_light_check;
extern guchar *render_blend_white;
#endif /* __GIMP_DISPLAY_SHELL_RENDER_H__ */ #endif /* __GIMP_DISPLAY_SHELL_RENDER_H__ */
...@@ -957,9 +957,9 @@ dialogs_color_editor_new (GimpDialogFactory *factory, ...@@ -957,9 +957,9 @@ dialogs_color_editor_new (GimpDialogFactory *factory,
} }
GtkWidget * GtkWidget *
dialogs_document_history_new (GimpDialogFactory *factory, dialogs_document_list_new (GimpDialogFactory *factory,
GimpContext *context, GimpContext *context,
gint preview_size) gint preview_size)
{ {
GtkWidget *view; GtkWidget *view;
...@@ -972,7 +972,51 @@ dialogs_document_history_new (GimpDialogFactory *factory, ...@@ -972,7 +972,51 @@ dialogs_document_history_new (GimpDialogFactory *factory,
factory->menu_factory); factory->menu_factory);
return dialogs_dockable_new (view, return dialogs_dockable_new (view,
_("Document History"), _("History"), _("Document History List"), _("History"),
GTK_STOCK_OPEN,
dialogs_stock_text_tab_func,
dialogs_set_editor_context_func);
}
GtkWidget *
dialogs_document_grid_new (GimpDialogFactory *factory,
GimpContext *context,
gint preview_size)
{
GtkWidget *view;
view = gimp_document_view_new (GIMP_VIEW_TYPE_GRID,
context->gimp->documents,
context,
preview_size,
5, 3,
file_file_open_dialog,
factory->menu_factory);
return dialogs_dockable_new (view,
_("Document History Grid"), _("History"),
GTK_STOCK_OPEN,
dialogs_stock_text_tab_func,
dialogs_set_editor_context_func);
}
GtkWidget *
dialogs_document_tree_new (GimpDialogFactory *factory,
GimpContext *context,
gint preview_size)
{
GtkWidget *view;
view = gimp_document_view_new (GIMP_VIEW_TYPE_TREE,
context->gimp->documents,
context,
preview_size,
5, 3,
file_file_open_dialog,
factory->menu_factory);
return dialogs_dockable_new (view,
_("Document History Tree"), _("History"),
GTK_STOCK_OPEN, GTK_STOCK_OPEN,
dialogs_stock_text_tab_func, dialogs_stock_text_tab_func,
dialogs_set_editor_context_func); dialogs_set_editor_context_func);
...@@ -1236,7 +1280,9 @@ dialogs_tool_tab_tool_changed (GimpContext *context, ...@@ -1236,7 +1280,9 @@ dialogs_tool_tab_tool_changed (GimpContext *context,
GimpToolInfo *tool_info, GimpToolInfo *tool_info,
GtkImage *image) GtkImage *image)
{ {
gtk_image_set_from_stock (image, tool_info->stock_id, image->icon_size); gtk_image_set_from_stock (image,
GIMP_VIEWABLE (tool_info)->stock_id,
image->icon_size);
} }
static GtkWidget * static GtkWidget *
...@@ -1244,13 +1290,15 @@ dialogs_tool_tab_func (GimpDockable *dockable, ...@@ -1244,13 +1290,15 @@ dialogs_tool_tab_func (GimpDockable *dockable,
GimpDockbook *dockbook, GimpDockbook *dockbook,
GtkIconSize size) GtkIconSize size)
{ {
GimpContext *context; GimpContext *context;
GtkWidget *image; GimpViewable *viewable;
GtkWidget *image;
context = dockbook->dock->context; context = dockbook->dock->context;
image = gtk_image_new_from_stock (gimp_context_get_tool (context)->stock_id, viewable = GIMP_VIEWABLE (gimp_context_get_tool (context));
size);
image = gtk_image_new_from_stock (viewable->stock_id, size);
g_signal_connect_object (context, "tool_changed", g_signal_connect_object (context, "tool_changed",
G_CALLBACK (dialogs_tool_tab_tool_changed), G_CALLBACK (dialogs_tool_tab_tool_changed),
...@@ -1268,7 +1316,9 @@ dialogs_tool_options_tool_changed (GimpContext *context, ...@@ -1268,7 +1316,9 @@ dialogs_tool_options_tool_changed (GimpContext *context,
GtkImage *image; GtkImage *image;
if ((image = g_object_get_data (G_OBJECT (label), "tool-icon"))) if ((image = g_object_get_data (G_OBJECT (label), "tool-icon")))
gtk_image_set_from_stock (image, tool_info->stock_id, image->icon_size); gtk_image_set_from_stock (image,
GIMP_VIEWABLE (tool_info)->stock_id,
image->icon_size);
gtk_label_set_text (label, tool_info->blurb); gtk_label_set_text (label, tool_info->blurb);
...@@ -1298,7 +1348,7 @@ dialogs_tool_options_tab_func (GimpDockable *dockable, ...@@ -1298,7 +1348,7 @@ dialogs_tool_options_tab_func (GimpDockable *dockable,
hbox = gtk_hbox_new (FALSE, 2); hbox = gtk_hbox_new (FALSE, 2);
image = gtk_image_new_from_stock (gimp_context_get_tool (context)->stock_id, image = gtk_image_new_from_stock (GIMP_VIEWABLE (tool_info)->stock_id,
size); size);
gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
gtk_widget_show (image); gtk_widget_show (image);
......
...@@ -153,7 +153,13 @@ GtkWidget * dialogs_color_editor_new (GimpDialogFactory *factory, ...@@ -153,7 +153,13 @@ GtkWidget * dialogs_color_editor_new (GimpDialogFactory *factory,
GimpContext *context, GimpContext *context,
gint preview_size); gint preview_size);
GtkWidget * dialogs_document_history_new (GimpDialogFactory *factory, GtkWidget * dialogs_document_list_new (GimpDialogFactory *factory,
GimpContext *context,
gint preview_size);
GtkWidget * dialogs_document_grid_new (GimpDialogFactory *factory,
GimpContext *context,
gint preview_size);
GtkWidget * dialogs_document_tree_new (GimpDialogFactory *factory,
GimpContext *context, GimpContext *context,
gint preview_size); gint preview_size);
......
...@@ -88,7 +88,7 @@ GimpItemFactoryEntry dialogs_menu_entries[] = ...@@ -88,7 +88,7 @@ GimpItemFactoryEntry dialogs_menu_entries[] =
MENU_SEPARATOR ("/Add Tab/---"), MENU_SEPARATOR ("/Add Tab/---"),
ADD_TAB (N_("/Add Tab/Images..."), "gimp-image-list", NULL, NULL), ADD_TAB (N_("/Add Tab/Images..."), "gimp-image-list", NULL, NULL),
ADD_TAB (N_("/Add Tab/Document History..."), "gimp-document-history", ADD_TAB (N_("/Add Tab/Document History..."), "gimp-document-list",
"<StockItem>", GTK_STOCK_OPEN), "<StockItem>", GTK_STOCK_OPEN),
ADD_TAB (N_("/Add Tab/Error Console..."), "gimp-error-console", ADD_TAB (N_("/Add Tab/Error Console..."), "gimp-error-console",
"<StockItem>", GIMP_STOCK_WARNING), "<StockItem>", GIMP_STOCK_WARNING),
......
...@@ -87,7 +87,9 @@ static const GimpDialogFactoryEntry dock_entries[] = ...@@ -87,7 +87,9 @@ static const GimpDialogFactoryEntry dock_entries[] =
{ "gimp-color-editor", dialogs_color_editor_new, 0, FALSE, FALSE, FALSE, TRUE }, { "gimp-color-editor", dialogs_color_editor_new, 0, FALSE, FALSE, FALSE, TRUE },
{ "gimp-document-history", dialogs_document_history_new, 48, FALSE, FALSE, FALSE, TRUE }, { "gimp-document-list", dialogs_document_list_new, 48, FALSE, FALSE, FALSE, TRUE },
{ "gimp-document-grid", dialogs_document_grid_new, 48, FALSE, FALSE, FALSE, TRUE },
{ "gimp-document-tree", dialogs_document_tree_new, 48, FALSE, FALSE, FALSE, TRUE },
{ "gimp-brush-editor", dialogs_brush_editor_get, 0, TRUE, FALSE, FALSE, TRUE }, { "gimp-brush-editor", dialogs_brush_editor_get, 0, TRUE, FALSE, FALSE, TRUE },
{ "gimp-gradient-editor", dialogs_gradient_editor_get, 0, TRUE, FALSE, FALSE, TRUE }, { "gimp-gradient-editor", dialogs_gradient_editor_get, 0, TRUE, FALSE, FALSE, TRUE },
......
...@@ -572,6 +572,13 @@ static gboolean ...@@ -572,6 +572,13 @@ static gboolean
gui_exit_finish_callback (Gimp *gimp, gui_exit_finish_callback (Gimp *gimp,
gboolean kill_it) gboolean kill_it)
{ {
g_signal_handlers_disconnect_by_func (gimp->config,
gui_show_tooltips_notify,
gimp);
gimp_container_remove_handler (gimp->images, image_disconnect_handler_id);
image_disconnect_handler_id = 0;
g_object_unref (toolbox_item_factory); g_object_unref (toolbox_item_factory);
toolbox_item_factory = NULL; toolbox_item_factory = NULL;
...@@ -587,13 +594,6 @@ gui_exit_finish_callback (Gimp *gimp, ...@@ -587,13 +594,6 @@ gui_exit_finish_callback (Gimp *gimp,
dialogs_exit (gimp); dialogs_exit (gimp);
gimp_devices_exit (gimp); gimp_devices_exit (gimp);
g_signal_handlers_disconnect_by_func (gimp->config,
gui_show_tooltips_notify,
gimp);
gimp_container_remove_handler (gimp->images, image_disconnect_handler_id);
image_disconnect_handler_id = 0;
if (themes_hash) if (themes_hash)
{ {
g_hash_table_destroy (themes_hash); g_hash_table_destroy (themes_hash);
......
...@@ -762,7 +762,7 @@ GimpItemFactoryEntry image_menu_entries[] = ...@@ -762,7 +762,7 @@ GimpItemFactoryEntry image_menu_entries[] =
{ { N_("/Dialogs/Document History..."), "foo", { { N_("/Dialogs/Document History..."), "foo",
dialogs_create_dockable_cmd_callback, 0, dialogs_create_dockable_cmd_callback, 0,
"<StockItem>", GTK_STOCK_OPEN }, "<StockItem>", GTK_STOCK_OPEN },
"gimp-document-history", "gimp-document-list",
"dialogs/document_index.html", NULL }, "dialogs/document_index.html", NULL },
{ { N_("/Dialogs/Error Console..."), NULL, { { N_("/Dialogs/Error Console..."), NULL,
dialogs_create_dockable_cmd_callback, 0, dialogs_create_dockable_cmd_callback, 0,
...@@ -860,7 +860,7 @@ image_menu_setup (GimpItemFactory *factory) ...@@ -860,7 +860,7 @@ image_menu_setup (GimpItemFactory *factory)
entry.entry.callback = tools_select_cmd_callback; entry.entry.callback = tools_select_cmd_callback;
entry.entry.callback_action = 0; entry.entry.callback_action = 0;
entry.entry.item_type = "<StockItem>"; entry.entry.item_type = "<StockItem>";
entry.entry.extra_data = tool_info->stock_id; entry.entry.extra_data = GIMP_VIEWABLE (tool_info)->stock_id;
entry.quark_string = NULL; entry.quark_string = NULL;
entry.help_page = tool_info->help_data; entry.help_page = tool_info->help_data;
entry.description = NULL; entry.description = NULL;
......
...@@ -173,7 +173,7 @@ GimpItemFactoryEntry toolbox_menu_entries[] = ...@@ -173,7 +173,7 @@ GimpItemFactoryEntry toolbox_menu_entries[] =
{ { N_("/File/Dialogs/Document History..."), "foo", { { N_("/File/Dialogs/Document History..."), "foo",
dialogs_create_dockable_cmd_callback, 0, dialogs_create_dockable_cmd_callback, 0,
"<StockItem>", GTK_STOCK_OPEN }, "<StockItem>", GTK_STOCK_OPEN },
"gimp-document-history", "gimp-document-list",
"file/dialogs/document_index.html", NULL }, "file/dialogs/document_index.html", NULL },
{ { N_("/File/Dialogs/Error Console..."), NULL, { { N_("/File/Dialogs/Error Console..."), NULL,
dialogs_create_dockable_cmd_callback, 0, dialogs_create_dockable_cmd_callback, 0,
......
...@@ -265,6 +265,11 @@ tree_items[] = ...@@ -265,6 +265,11 @@ tree_items[] =
"sessions and can be destroyed with impunity."), "sessions and can be destroyed with impunity."),
TREE_ITEM_MKDIR_ONLY, NULL TREE_ITEM_MKDIR_ONLY, NULL
}, },
{
TRUE, "tool-options",
N_("This folder is used to store tool options."),
TREE_ITEM_MKDIR_ONLY, NULL
},
{ {
TRUE, "curves", TRUE, "curves",
N_("This folder is used to store parameter files for the\n" N_("This folder is used to store parameter files for the\n"
......
...@@ -762,7 +762,7 @@ GimpItemFactoryEntry image_menu_entries[] = ...@@ -762,7 +762,7 @@ GimpItemFactoryEntry image_menu_entries[] =
{ { N_("/Dialogs/Document History..."), "foo", { { N_("/Dialogs/Document History..."), "foo",
dialogs_create_dockable_cmd_callback, 0, dialogs_create_dockable_cmd_callback, 0,
"<StockItem>", GTK_STOCK_OPEN }, "<StockItem>", GTK_STOCK_OPEN },
"gimp-document-history", "gimp-document-list",
"dialogs/document_index.html", NULL }, "dialogs/document_index.html", NULL },
{ { N_("/Dialogs/Error Console..."), NULL, { { N_("/Dialogs/Error Console..."), NULL,
dialogs_create_dockable_cmd_callback, 0, dialogs_create_dockable_cmd_callback, 0,
...@@ -860,7 +860,7 @@ image_menu_setup (GimpItemFactory *factory) ...@@ -860,7 +860,7 @@ image_menu_setup (GimpItemFactory *factory)