diff --git a/ChangeLog b/ChangeLog index e984d74d7d..98991563b8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2005-04-13 Sven Neumann + + * app/app_procs.c: register handler for the "GimpPaint" log domain. + + * app/core/gimpdatafactory.c (gimp_data_factory_init): don't load + any data if TRUE is passed for no_data. + + * app/tools/gimppainttool.c (gimp_paint_tool_draw): handle a NULL + brush gracefully. + 2005-04-13 Sven Neumann * app/core/gimpimage-convert.c (gimp_image_convert): handle a NULL diff --git a/app/app_procs.c b/app/app_procs.c index 9f54f509b6..033eb5fed7 100644 --- a/app/app_procs.c +++ b/app/app_procs.c @@ -177,6 +177,7 @@ app_run (const gchar *full_prog_name, "Gimp-GUI", "Gimp-Menus", "Gimp-PDB", + "Gimp-Paint", "Gimp-Paint-Funcs", "Gimp-Plug-In", "Gimp-Text", diff --git a/app/core/gimpdatafactory.c b/app/core/gimpdatafactory.c index 895d422a1d..ec6b462a4a 100644 --- a/app/core/gimpdatafactory.c +++ b/app/core/gimpdatafactory.c @@ -197,20 +197,26 @@ gimp_data_factory_new (Gimp *gimp, void gimp_data_factory_data_init (GimpDataFactory *factory, - gboolean no_data /* FIXME */) + gboolean no_data) { g_return_if_fail (GIMP_IS_DATA_FACTORY (factory)); - if (factory->gimp->be_verbose) - { - const gchar *name = gimp_object_get_name (GIMP_OBJECT (factory)); - - g_print ("%s: loading data\n", name ? name : "???"); - } - + /* Freeze and thaw the container even if no_data, + * this creates the standard data that serves as fallback. + */ gimp_container_freeze (factory->container); - gimp_data_factory_data_load (factory); + if (! no_data) + { + if (factory->gimp->be_verbose) + { + const gchar *name = gimp_object_get_name (GIMP_OBJECT (factory)); + + g_print ("%s: loading data\n", name ? name : "???"); + } + + gimp_data_factory_data_load (factory); + } gimp_container_thaw (factory->container); } diff --git a/app/tools/gimpbrushtool.c b/app/tools/gimpbrushtool.c index fcae79bf2f..b9215e090d 100644 --- a/app/tools/gimpbrushtool.c +++ b/app/tools/gimpbrushtool.c @@ -816,12 +816,10 @@ gimp_paint_tool_draw (GimpDrawTool *draw_tool) { GimpBrushCore *brush_core = GIMP_BRUSH_CORE (core); - if (! brush_core->brush_bound_segs) + if (! brush_core->brush_bound_segs && brush_core->main_brush) { - TempBuf *mask; - PixelRegion PR = { 0, }; - - mask = gimp_brush_get_mask (brush_core->main_brush); + TempBuf *mask = gimp_brush_get_mask (brush_core->main_brush); + PixelRegion PR = { 0, }; PR.data = temp_buf_data (mask); PR.x = 0; @@ -915,9 +913,7 @@ gimp_paint_tool_color_picked (GimpColorTool *color_tool, if (tool->gdisp) { - GimpContext *context; - - context = gimp_get_user_context (tool->gdisp->gimage->gimp); + GimpContext *context = gimp_get_user_context (tool->gdisp->gimage->gimp); switch (color_tool->pick_mode) { diff --git a/app/tools/gimppainttool.c b/app/tools/gimppainttool.c index fcae79bf2f..b9215e090d 100644 --- a/app/tools/gimppainttool.c +++ b/app/tools/gimppainttool.c @@ -816,12 +816,10 @@ gimp_paint_tool_draw (GimpDrawTool *draw_tool) { GimpBrushCore *brush_core = GIMP_BRUSH_CORE (core); - if (! brush_core->brush_bound_segs) + if (! brush_core->brush_bound_segs && brush_core->main_brush) { - TempBuf *mask; - PixelRegion PR = { 0, }; - - mask = gimp_brush_get_mask (brush_core->main_brush); + TempBuf *mask = gimp_brush_get_mask (brush_core->main_brush); + PixelRegion PR = { 0, }; PR.data = temp_buf_data (mask); PR.x = 0; @@ -915,9 +913,7 @@ gimp_paint_tool_color_picked (GimpColorTool *color_tool, if (tool->gdisp) { - GimpContext *context; - - context = gimp_get_user_context (tool->gdisp->gimage->gimp); + GimpContext *context = gimp_get_user_context (tool->gdisp->gimage->gimp); switch (color_tool->pick_mode) {