app/gui/edit-commands.c added "Fill with Pattern" menu entry as suggested

2003-07-02  Sven Neumann  <sven@gimp.org>

	* app/gui/edit-commands.c
	* app/gui/image-menu.c: added "Fill with Pattern" menu entry as
	suggested in bug #116365.

	* app/base/temp-buf.c
	* app/base/tile-swap.c
	* app/config/gimpbaseconfig.c
	* app/config/gimpconfig-types.c
	* app/display/gimpdisplayshell-filter-dialog.c
	* app/display/gimpdisplayshell.c
	* app/file/file-utils.c
	* app/paint-funcs/paint-funcs-types.h
	* app/tools/gimpdrawtool.c
	* app/tools/gimpinktool.c
	* app/tools/gimpiscissorstool.h
	* app/tools/gimptextoptions.c
	* app/paint-funcs/paint-funcs-types.h
	* app/vectors/gimpbezierstroke.c
	* app/vectors/gimpstroke.c
	* app/vectors/gimpvectors.c
	* app/vectors/vectors-types.h
	* libgimp/gimpbrushmenu.c
	* libgimp/gimpmisc.h
	* libgimpmodule/gimpmodule.c: fixed some minor issues found
	compiling with -pedantic.

	* app/pdb/misc_tools_cmds.c
	* tools/pdbgen/pdb/misc_tools.pdb: adapt to the changed order of
	arguments for gimp_image_pick_color().
This commit is contained in:
Sven Neumann 2003-07-02 18:01:19 +00:00 committed by Sven Neumann
parent 43ff579702
commit e78601452c
31 changed files with 141 additions and 84 deletions

View File

@ -1,3 +1,35 @@
2003-07-02 Sven Neumann <sven@gimp.org>
* app/gui/edit-commands.c
* app/gui/image-menu.c: added "Fill with Pattern" menu entry as
suggested in bug #116365.
* app/base/temp-buf.c
* app/base/tile-swap.c
* app/config/gimpbaseconfig.c
* app/config/gimpconfig-types.c
* app/display/gimpdisplayshell-filter-dialog.c
* app/display/gimpdisplayshell.c
* app/file/file-utils.c
* app/paint-funcs/paint-funcs-types.h
* app/tools/gimpdrawtool.c
* app/tools/gimpinktool.c
* app/tools/gimpiscissorstool.h
* app/tools/gimptextoptions.c
* app/paint-funcs/paint-funcs-types.h
* app/vectors/gimpbezierstroke.c
* app/vectors/gimpstroke.c
* app/vectors/gimpvectors.c
* app/vectors/vectors-types.h
* libgimp/gimpbrushmenu.c
* libgimp/gimpmisc.h
* libgimpmodule/gimpmodule.c: fixed some minor issues found
compiling with -pedantic.
* app/pdb/misc_tools_cmds.c
* tools/pdbgen/pdb/misc_tools.pdb: adapt to the changed order of
arguments for gimp_image_pick_color().
2003-07-02 Michael Natterer <mitch@gimp.org> 2003-07-02 Michael Natterer <mitch@gimp.org>
* libgimpbase/gimpbasetypes.h: changed GimpDatafileLoaderFunc to * libgimpbase/gimpbasetypes.h: changed GimpDatafileLoaderFunc to

View File

@ -31,6 +31,7 @@
#include "core/gimpcontainer.h" #include "core/gimpcontainer.h"
#include "core/gimpcontext.h" #include "core/gimpcontext.h"
#include "core/gimpdrawable.h" #include "core/gimpdrawable.h"
#include "core/gimpdrawable-bucket-fill.h"
#include "core/gimpedit.h" #include "core/gimpedit.h"
#include "core/gimpimage.h" #include "core/gimpimage.h"
#include "core/gimpimage-mask.h" #include "core/gimpimage-mask.h"
@ -241,14 +242,16 @@ edit_fill_cmd_callback (GtkWidget *widget,
guint action) guint action)
{ {
GimpImage *gimage; GimpImage *gimage;
GimpFillType fill_type; GimpBucketFillMode fill_mode;
return_if_no_image (gimage, data); return_if_no_image (gimage, data);
fill_type = (GimpFillType) action; fill_mode = (GimpBucketFillMode) action;
gimp_edit_fill (gimage, gimp_drawable_bucket_fill (gimp_image_active_drawable (gimage),
gimp_image_active_drawable (gimage), fill_mode,
fill_type); GIMP_NORMAL_MODE, 1.0,
FALSE /* no seed fill */,
FALSE, 0.0, FALSE, 0.0, 0.0);
gimp_image_flush (gimage); gimp_image_flush (gimage);
} }

View File

@ -21,10 +21,11 @@
#include <errno.h> #include <errno.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <string.h>
#include <sys/types.h>
#ifdef HAVE_UNISTD_H #ifdef HAVE_UNISTD_H
#include <unistd.h> #include <unistd.h>
#endif #endif
#include <string.h>
#include <glib-object.h> #include <glib-object.h>

View File

@ -412,7 +412,7 @@ tile_swap_open (SwapFile *swap_file)
swap_file->fd = open (swap_file->filename, swap_file->fd = open (swap_file->filename,
O_CREAT | O_RDWR | _O_BINARY | _O_TEMPORARY, O_CREAT | O_RDWR | _O_BINARY | _O_TEMPORARY,
S_IREAD | S_IWRITE); S_IRUSR | S_IWUSR);
if (swap_file->fd == -1) if (swap_file->fd == -1)
{ {

View File

@ -55,7 +55,7 @@ enum
PROP_SWAP_PATH, PROP_SWAP_PATH,
PROP_STINGY_MEMORY_USE, PROP_STINGY_MEMORY_USE,
PROP_NUM_PROCESSORS, PROP_NUM_PROCESSORS,
PROP_TILE_CACHE_SIZE, PROP_TILE_CACHE_SIZE
}; };
static GObjectClass *parent_class = NULL; static GObjectClass *parent_class = NULL;

View File

@ -205,7 +205,7 @@ memsize_to_string (const GValue *src_value,
str = g_strdup_printf ("%lu", size); str = g_strdup_printf ("%lu", size);
g_value_set_string_take_ownership (dest_value, str); g_value_set_string_take_ownership (dest_value, str);
}; }
static void static void
string_to_memsize (const GValue *src_value, string_to_memsize (const GValue *src_value,
@ -215,7 +215,7 @@ string_to_memsize (const GValue *src_value,
if (!str || !gimp_memsize_set_from_string (dest_value, str)) if (!str || !gimp_memsize_set_from_string (dest_value, str))
g_warning ("Can't convert string to GimpMemsize."); g_warning ("Can't convert string to GimpMemsize.");
}; }
static void static void
@ -225,7 +225,7 @@ unit_to_string (const GValue *src_value,
GimpUnit unit = (GimpUnit) g_value_get_int (src_value); GimpUnit unit = (GimpUnit) g_value_get_int (src_value);
g_value_set_string (dest_value, gimp_unit_get_identifier (unit)); g_value_set_string (dest_value, gimp_unit_get_identifier (unit));
}; }
static void static void
string_to_unit (const GValue *src_value, string_to_unit (const GValue *src_value,
@ -254,4 +254,4 @@ string_to_unit (const GValue *src_value,
error: error:
g_warning ("Can't convert string to GimpUnit."); g_warning ("Can't convert string to GimpUnit.");
}; }

View File

@ -1230,7 +1230,7 @@ gimp_display_shell_draw_guide (GimpDisplayShell *shell,
GdkColor fg; GdkColor fg;
GdkColor bg; GdkColor bg;
const gchar stipple[] = const guchar stipple[] =
{ {
0xF0, /* ####---- */ 0xF0, /* ####---- */
0xE1, /* ###----# */ 0xE1, /* ###----# */
@ -1255,7 +1255,8 @@ gimp_display_shell_draw_guide (GimpDisplayShell *shell,
values.fill = GDK_OPAQUE_STIPPLED; values.fill = GDK_OPAQUE_STIPPLED;
values.stipple = gdk_bitmap_create_from_data (shell->canvas->window, values.stipple = gdk_bitmap_create_from_data (shell->canvas->window,
(gchar *) stipple, 8, 1); (const gchar *) stipple,
8, 1);
normal_hgc = gdk_gc_new_with_values (shell->canvas->window, &values, normal_hgc = gdk_gc_new_with_values (shell->canvas->window, &values,
GDK_GC_FILL | GDK_GC_FILL |
GDK_GC_STIPPLE); GDK_GC_STIPPLE);
@ -1265,7 +1266,8 @@ gimp_display_shell_draw_guide (GimpDisplayShell *shell,
values.fill = GDK_OPAQUE_STIPPLED; values.fill = GDK_OPAQUE_STIPPLED;
values.stipple = gdk_bitmap_create_from_data (shell->canvas->window, values.stipple = gdk_bitmap_create_from_data (shell->canvas->window,
(gchar *) stipple, 1, 8); (const gchar *) stipple,
1, 8);
normal_vgc = gdk_gc_new_with_values (shell->canvas->window, &values, normal_vgc = gdk_gc_new_with_values (shell->canvas->window, &values,
GDK_GC_FILL | GDK_GC_FILL |
GDK_GC_STIPPLE); GDK_GC_STIPPLE);
@ -1285,7 +1287,8 @@ gimp_display_shell_draw_guide (GimpDisplayShell *shell,
values.fill = GDK_OPAQUE_STIPPLED; values.fill = GDK_OPAQUE_STIPPLED;
values.stipple = gdk_bitmap_create_from_data (shell->canvas->window, values.stipple = gdk_bitmap_create_from_data (shell->canvas->window,
(gchar *) stipple, 8, 1); (const gchar *) stipple,
8, 1);
active_hgc = gdk_gc_new_with_values (shell->canvas->window, &values, active_hgc = gdk_gc_new_with_values (shell->canvas->window, &values,
GDK_GC_FILL | GDK_GC_FILL |
GDK_GC_STIPPLE); GDK_GC_STIPPLE);
@ -1295,7 +1298,8 @@ gimp_display_shell_draw_guide (GimpDisplayShell *shell,
values.fill = GDK_OPAQUE_STIPPLED; values.fill = GDK_OPAQUE_STIPPLED;
values.stipple = gdk_bitmap_create_from_data (shell->canvas->window, values.stipple = gdk_bitmap_create_from_data (shell->canvas->window,
(gchar *) stipple, 1, 8); (const gchar *) stipple,
1, 8);
active_vgc = gdk_gc_new_with_values (shell->canvas->window, &values, active_vgc = gdk_gc_new_with_values (shell->canvas->window, &values,
GDK_GC_FILL | GDK_GC_FILL |
GDK_GC_STIPPLE); GDK_GC_STIPPLE);
@ -1349,7 +1353,7 @@ gimp_display_shell_draw_guides (GimpDisplayShell *shell)
GList *list; GList *list;
GimpGuide *guide; GimpGuide *guide;
for (list = shell->gdisp->gimage->guides; list; list = g_list_next (list)) for (list = shell->gdisp->gimage->guides; list; list = list->next)
{ {
guide = (GimpGuide *) list->data; guide = (GimpGuide *) list->data;

View File

@ -529,7 +529,7 @@ gimp_display_shell_filter_dialog_new (GimpDisplayShell *shell)
{ {
ColorDisplayDialog *cdd; ColorDisplayDialog *cdd;
GType *filter_types; GType *filter_types;
gint n_filter_types; guint n_filter_types;
gint i; gint i;
cdd = g_new0 (ColorDisplayDialog, 1); cdd = g_new0 (ColorDisplayDialog, 1);

View File

@ -1230,7 +1230,7 @@ gimp_display_shell_draw_guide (GimpDisplayShell *shell,
GdkColor fg; GdkColor fg;
GdkColor bg; GdkColor bg;
const gchar stipple[] = const guchar stipple[] =
{ {
0xF0, /* ####---- */ 0xF0, /* ####---- */
0xE1, /* ###----# */ 0xE1, /* ###----# */
@ -1255,7 +1255,8 @@ gimp_display_shell_draw_guide (GimpDisplayShell *shell,
values.fill = GDK_OPAQUE_STIPPLED; values.fill = GDK_OPAQUE_STIPPLED;
values.stipple = gdk_bitmap_create_from_data (shell->canvas->window, values.stipple = gdk_bitmap_create_from_data (shell->canvas->window,
(gchar *) stipple, 8, 1); (const gchar *) stipple,
8, 1);
normal_hgc = gdk_gc_new_with_values (shell->canvas->window, &values, normal_hgc = gdk_gc_new_with_values (shell->canvas->window, &values,
GDK_GC_FILL | GDK_GC_FILL |
GDK_GC_STIPPLE); GDK_GC_STIPPLE);
@ -1265,7 +1266,8 @@ gimp_display_shell_draw_guide (GimpDisplayShell *shell,
values.fill = GDK_OPAQUE_STIPPLED; values.fill = GDK_OPAQUE_STIPPLED;
values.stipple = gdk_bitmap_create_from_data (shell->canvas->window, values.stipple = gdk_bitmap_create_from_data (shell->canvas->window,
(gchar *) stipple, 1, 8); (const gchar *) stipple,
1, 8);
normal_vgc = gdk_gc_new_with_values (shell->canvas->window, &values, normal_vgc = gdk_gc_new_with_values (shell->canvas->window, &values,
GDK_GC_FILL | GDK_GC_FILL |
GDK_GC_STIPPLE); GDK_GC_STIPPLE);
@ -1285,7 +1287,8 @@ gimp_display_shell_draw_guide (GimpDisplayShell *shell,
values.fill = GDK_OPAQUE_STIPPLED; values.fill = GDK_OPAQUE_STIPPLED;
values.stipple = gdk_bitmap_create_from_data (shell->canvas->window, values.stipple = gdk_bitmap_create_from_data (shell->canvas->window,
(gchar *) stipple, 8, 1); (const gchar *) stipple,
8, 1);
active_hgc = gdk_gc_new_with_values (shell->canvas->window, &values, active_hgc = gdk_gc_new_with_values (shell->canvas->window, &values,
GDK_GC_FILL | GDK_GC_FILL |
GDK_GC_STIPPLE); GDK_GC_STIPPLE);
@ -1295,7 +1298,8 @@ gimp_display_shell_draw_guide (GimpDisplayShell *shell,
values.fill = GDK_OPAQUE_STIPPLED; values.fill = GDK_OPAQUE_STIPPLED;
values.stipple = gdk_bitmap_create_from_data (shell->canvas->window, values.stipple = gdk_bitmap_create_from_data (shell->canvas->window,
(gchar *) stipple, 1, 8); (const gchar *) stipple,
1, 8);
active_vgc = gdk_gc_new_with_values (shell->canvas->window, &values, active_vgc = gdk_gc_new_with_values (shell->canvas->window, &values,
GDK_GC_FILL | GDK_GC_FILL |
GDK_GC_STIPPLE); GDK_GC_STIPPLE);
@ -1349,7 +1353,7 @@ gimp_display_shell_draw_guides (GimpDisplayShell *shell)
GList *list; GList *list;
GimpGuide *guide; GimpGuide *guide;
for (list = shell->gdisp->gimage->guides; list; list = g_list_next (list)) for (list = shell->gdisp->gimage->guides; list; list = list->next)
{ {
guide = (GimpGuide *) list->data; guide = (GimpGuide *) list->data;

View File

@ -363,9 +363,9 @@ file_convert_string (gchar *instr,
guchar *uin = (guchar *) instr; guchar *uin = (guchar *) instr;
guchar *uout = (guchar *) outmem; guchar *uout = (guchar *) outmem;
guchar tmp[5], *tmpptr; guchar tmp[5], *tmpptr;
gint k; guint k;
while ((*uin != '\0') && ((((char *)uout) - outmem) < maxmem)) while ((*uin != '\0') && ((((gchar *) uout) - outmem) < maxmem))
{ {
if (*uin != '\\') /* Not an escaped character ? */ if (*uin != '\\') /* Not an escaped character ? */
{ {
@ -388,7 +388,7 @@ file_convert_string (gchar *instr,
break; break;
} }
*tmpptr = '\0'; *tmpptr = '\0';
sscanf ((char *)tmp, "%o", &k); sscanf ((gchar *) tmp, "%o", &k);
*(uout++) = k; *(uout++) = k;
break; break;
@ -462,7 +462,7 @@ file_check_single_magic (gchar *offset,
if (g_ascii_isdigit (num_operator_ptr[1])) if (g_ascii_isdigit (num_operator_ptr[1]))
{ {
if (num_operator_ptr[1] != '0') /* decimal */ if (num_operator_ptr[1] != '0') /* decimal */
sscanf (num_operator_ptr+1, "%ld", &num_operatorval); sscanf (num_operator_ptr+1, "%lu", &num_operatorval);
else if (num_operator_ptr[2] == 'x') /* hexadecimal */ else if (num_operator_ptr[2] == 'x') /* hexadecimal */
sscanf (num_operator_ptr+3, "%lx", &num_operatorval); sscanf (num_operator_ptr+3, "%lx", &num_operatorval);
else /* octal */ else /* octal */

View File

@ -31,6 +31,7 @@
#include "core/gimpcontainer.h" #include "core/gimpcontainer.h"
#include "core/gimpcontext.h" #include "core/gimpcontext.h"
#include "core/gimpdrawable.h" #include "core/gimpdrawable.h"
#include "core/gimpdrawable-bucket-fill.h"
#include "core/gimpedit.h" #include "core/gimpedit.h"
#include "core/gimpimage.h" #include "core/gimpimage.h"
#include "core/gimpimage-mask.h" #include "core/gimpimage-mask.h"
@ -241,14 +242,16 @@ edit_fill_cmd_callback (GtkWidget *widget,
guint action) guint action)
{ {
GimpImage *gimage; GimpImage *gimage;
GimpFillType fill_type; GimpBucketFillMode fill_mode;
return_if_no_image (gimage, data); return_if_no_image (gimage, data);
fill_type = (GimpFillType) action; fill_mode = (GimpBucketFillMode) action;
gimp_edit_fill (gimage, gimp_drawable_bucket_fill (gimp_image_active_drawable (gimage),
gimp_image_active_drawable (gimage), fill_mode,
fill_type); GIMP_NORMAL_MODE, 1.0,
FALSE /* no seed fill */,
FALSE, 0.0, FALSE, 0.0, 0.0);
gimp_image_flush (gimage); gimp_image_flush (gimage);
} }

View File

@ -220,12 +220,17 @@ GimpItemFactoryEntry image_menu_entries[] =
NULL, NULL,
"edit/clear.html", NULL }, "edit/clear.html", NULL },
{ { N_("/Edit/Fill with _FG Color"), "<control>comma", { { N_("/Edit/Fill with _FG Color"), "<control>comma",
edit_fill_cmd_callback, (guint) GIMP_FOREGROUND_FILL, edit_fill_cmd_callback, (guint) GIMP_FG_BUCKET_FILL,
"<StockItem>", GIMP_STOCK_TOOL_BUCKET_FILL }, "<StockItem>", GIMP_STOCK_TOOL_BUCKET_FILL },
NULL, NULL,
"edit/fill.html", NULL }, "edit/fill.html", NULL },
{ { N_("/Edit/Fill with B_G Color"), "<control>period", { { N_("/Edit/Fill with B_G Color"), "<control>period",
edit_fill_cmd_callback, (guint) GIMP_BACKGROUND_FILL, edit_fill_cmd_callback, (guint) GIMP_BG_BUCKET_FILL,
"<StockItem>", GIMP_STOCK_TOOL_BUCKET_FILL },
NULL,
"edit/fill.html", NULL },
{ { N_("/Edit/Fill with Pattern"), NULL,
edit_fill_cmd_callback, (guint) GIMP_PATTERN_BUCKET_FILL,
"<StockItem>", GIMP_STOCK_TOOL_BUCKET_FILL }, "<StockItem>", GIMP_STOCK_TOOL_BUCKET_FILL },
NULL, NULL,
"edit/fill.html", NULL }, "edit/fill.html", NULL },

View File

@ -220,12 +220,17 @@ GimpItemFactoryEntry image_menu_entries[] =
NULL, NULL,
"edit/clear.html", NULL }, "edit/clear.html", NULL },
{ { N_("/Edit/Fill with _FG Color"), "<control>comma", { { N_("/Edit/Fill with _FG Color"), "<control>comma",
edit_fill_cmd_callback, (guint) GIMP_FOREGROUND_FILL, edit_fill_cmd_callback, (guint) GIMP_FG_BUCKET_FILL,
"<StockItem>", GIMP_STOCK_TOOL_BUCKET_FILL }, "<StockItem>", GIMP_STOCK_TOOL_BUCKET_FILL },
NULL, NULL,
"edit/fill.html", NULL }, "edit/fill.html", NULL },
{ { N_("/Edit/Fill with B_G Color"), "<control>period", { { N_("/Edit/Fill with B_G Color"), "<control>period",
edit_fill_cmd_callback, (guint) GIMP_BACKGROUND_FILL, edit_fill_cmd_callback, (guint) GIMP_BG_BUCKET_FILL,
"<StockItem>", GIMP_STOCK_TOOL_BUCKET_FILL },
NULL,
"edit/fill.html", NULL },
{ { N_("/Edit/Fill with Pattern"), NULL,
edit_fill_cmd_callback, (guint) GIMP_PATTERN_BUCKET_FILL,
"<StockItem>", GIMP_STOCK_TOOL_BUCKET_FILL }, "<StockItem>", GIMP_STOCK_TOOL_BUCKET_FILL },
NULL, NULL,
"edit/fill.html", NULL }, "edit/fill.html", NULL },

View File

@ -40,7 +40,7 @@ typedef enum /*< pdb-skip >*/
INITIAL_INDEXED, INITIAL_INDEXED,
INITIAL_INDEXED_ALPHA, INITIAL_INDEXED_ALPHA,
INITIAL_INTENSITY, INITIAL_INTENSITY,
INITIAL_INTENSITY_ALPHA, INITIAL_INTENSITY_ALPHA
} InitialMode; } InitialMode;
/* Combine two source regions with the help of an optional mask /* Combine two source regions with the help of an optional mask
@ -70,7 +70,7 @@ typedef enum /*< pdb-skip >*/
ERASE_INDEXED, ERASE_INDEXED,
ANTI_ERASE_INTEN, ANTI_ERASE_INTEN,
ANTI_ERASE_INDEXED, ANTI_ERASE_INDEXED,
COLOR_ERASE_INTEN, COLOR_ERASE_INTEN
} CombinationMode; } CombinationMode;

View File

@ -970,7 +970,7 @@ ink_paste (GimpInkTool *ink_tool,
GimpContext *context; GimpContext *context;
PixelRegion srcPR; PixelRegion srcPR;
gint offx, offy; gint offx, offy;
gchar col[MAX_CHANNELS]; guchar col[MAX_CHANNELS];
if (! (gimage = gimp_item_get_image (GIMP_ITEM (drawable)))) if (! (gimage = gimp_item_get_image (GIMP_ITEM (drawable))))
return; return;

View File

@ -395,12 +395,12 @@ color_picker_invoker (Gimp *gimp,
if (success) if (success)
success = gimp_image_pick_color (gimage, success = gimp_image_pick_color (gimage,
drawable, drawable,
sample_merged,
(gint) x, (gint) y, (gint) x, (gint) y,
sample_merged,
sample_average, sample_average,
average_radius, average_radius,
&color,
NULL, NULL,
&color,
NULL); NULL);
} }

View File

@ -174,6 +174,11 @@ gimp_draw_tool_control (GimpTool *tool,
static void static void
gimp_draw_tool_draw (GimpDrawTool *draw_tool) gimp_draw_tool_draw (GimpDrawTool *draw_tool)
{ {
if (draw_tool->draw_state == GIMP_DRAW_TOOL_STATE_VISIBLE)
draw_tool->draw_state = GIMP_DRAW_TOOL_STATE_INVISIBLE;
else
draw_tool->draw_state = GIMP_DRAW_TOOL_STATE_VISIBLE;
if (draw_tool->gdisp) if (draw_tool->gdisp)
{ {
GIMP_DRAW_TOOL_GET_CLASS (draw_tool)->draw (draw_tool); GIMP_DRAW_TOOL_GET_CLASS (draw_tool)->draw (draw_tool);
@ -210,8 +215,6 @@ gimp_draw_tool_start (GimpDrawTool *draw_tool,
draw_tool->join_style); draw_tool->join_style);
gimp_draw_tool_draw (draw_tool); gimp_draw_tool_draw (draw_tool);
draw_tool->draw_state = GIMP_DRAW_TOOL_STATE_VISIBLE;
} }
void void
@ -224,7 +227,6 @@ gimp_draw_tool_stop (GimpDrawTool *draw_tool)
gimp_draw_tool_draw (draw_tool); gimp_draw_tool_draw (draw_tool);
} }
draw_tool->draw_state = GIMP_DRAW_TOOL_STATE_INVISIBLE;
draw_tool->paused_count = 0; draw_tool->paused_count = 0;
draw_tool->gdisp = NULL; draw_tool->gdisp = NULL;
@ -252,8 +254,6 @@ gimp_draw_tool_pause (GimpDrawTool *draw_tool)
if (draw_tool->paused_count == 0) if (draw_tool->paused_count == 0)
{ {
draw_tool->draw_state = GIMP_DRAW_TOOL_STATE_INVISIBLE;
gimp_draw_tool_draw (draw_tool); gimp_draw_tool_draw (draw_tool);
} }
@ -271,8 +271,6 @@ gimp_draw_tool_resume (GimpDrawTool *draw_tool)
if (draw_tool->paused_count == 0) if (draw_tool->paused_count == 0)
{ {
draw_tool->draw_state = GIMP_DRAW_TOOL_STATE_VISIBLE;
gimp_draw_tool_draw (draw_tool); gimp_draw_tool_draw (draw_tool);
} }
} }

View File

@ -970,7 +970,7 @@ ink_paste (GimpInkTool *ink_tool,
GimpContext *context; GimpContext *context;
PixelRegion srcPR; PixelRegion srcPR;
gint offx, offy; gint offx, offy;
gchar col[MAX_CHANNELS]; guchar col[MAX_CHANNELS];
if (! (gimage = gimp_item_get_image (GIMP_ITEM (drawable)))) if (! (gimage = gimp_item_get_image (GIMP_ITEM (drawable))))
return; return;

View File

@ -49,7 +49,7 @@ typedef enum
ISCISSORS_OP_SELECT, ISCISSORS_OP_SELECT,
ISCISSORS_OP_MOVE_POINT, ISCISSORS_OP_MOVE_POINT,
ISCISSORS_OP_ADD_POINT, ISCISSORS_OP_ADD_POINT,
ISCISSORS_OP_IMPOSSIBLE, ISCISSORS_OP_IMPOSSIBLE
} IscissorsOps; } IscissorsOps;
typedef struct _ICurve ICurve; typedef struct _ICurve ICurve;

View File

@ -52,7 +52,7 @@
enum enum
{ {
PROP_0, PROP_0,
PROP_TEXT, PROP_TEXT
}; };

View File

@ -143,7 +143,7 @@ static void
gimp_bezier_stroke_init (GimpBezierStroke *bezier_stroke) gimp_bezier_stroke_init (GimpBezierStroke *bezier_stroke)
{ {
/* pass */ /* pass */
}; }
static void static void
gimp_bezier_stroke_finalize (GObject *object) gimp_bezier_stroke_finalize (GObject *object)

View File

@ -156,7 +156,7 @@ gimp_stroke_init (GimpStroke *stroke)
stroke->anchors = NULL; stroke->anchors = NULL;
stroke->temp_anchor = NULL; stroke->temp_anchor = NULL;
stroke->closed = FALSE; stroke->closed = FALSE;
}; }
static void static void
gimp_stroke_finalize (GObject *object) gimp_stroke_finalize (GObject *object)

View File

@ -221,7 +221,7 @@ gimp_vectors_init (GimpVectors *vectors)
{ {
vectors->strokes = NULL; vectors->strokes = NULL;
vectors->freeze_count = 0; vectors->freeze_count = 0;
}; }
static void static void
gimp_vectors_finalize (GObject *object) gimp_vectors_finalize (GObject *object)
@ -807,7 +807,7 @@ gimp_vectors_anchor_delete (GimpVectors *vectors,
g_return_if_fail (GIMP_IS_VECTORS (vectors)); g_return_if_fail (GIMP_IS_VECTORS (vectors));
g_return_if_fail (anchor != NULL); g_return_if_fail (anchor != NULL);
return GIMP_VECTORS_GET_CLASS (vectors)->anchor_delete (vectors, anchor); GIMP_VECTORS_GET_CLASS (vectors)->anchor_delete (vectors, anchor);
} }
static void static void

View File

@ -30,7 +30,7 @@ typedef struct _GimpAnchor GimpAnchor;
typedef enum typedef enum
{ {
GIMP_ANCHOR_ANCHOR, GIMP_ANCHOR_ANCHOR,
GIMP_ANCHOR_CONTROL, GIMP_ANCHOR_CONTROL
} GimpAnchorType; } GimpAnchorType;
typedef enum typedef enum
@ -38,13 +38,13 @@ typedef enum
GIMP_ANCHOR_FEATURE_NONE, GIMP_ANCHOR_FEATURE_NONE,
GIMP_ANCHOR_FEATURE_EDGE, GIMP_ANCHOR_FEATURE_EDGE,
GIMP_ANCHOR_FEATURE_ALIGNED, GIMP_ANCHOR_FEATURE_ALIGNED,
GIMP_ANCHOR_FEATURE_SYMMETRIC, GIMP_ANCHOR_FEATURE_SYMMETRIC
} GimpAnchorFeatureType; } GimpAnchorFeatureType;
typedef enum typedef enum
{ {
EXTEND_SIMPLE, EXTEND_SIMPLE,
EXTEND_EDITABLE, EXTEND_EDITABLE
} GimpVectorExtendMode; } GimpVectorExtendMode;
typedef struct _GimpStroke GimpStroke; typedef struct _GimpStroke GimpStroke;

View File

@ -529,7 +529,7 @@ gimp_display_shell_filter_dialog_new (GimpDisplayShell *shell)
{ {
ColorDisplayDialog *cdd; ColorDisplayDialog *cdd;
GType *filter_types; GType *filter_types;
gint n_filter_types; guint n_filter_types;
gint i; gint i;
cdd = g_new0 (ColorDisplayDialog, 1); cdd = g_new0 (ColorDisplayDialog, 1);

View File

@ -85,7 +85,7 @@ static gboolean gimp_brush_select_preview_events (GtkWidget *widget,
static void gimp_brush_select_preview_update (GtkWidget *preview, static void gimp_brush_select_preview_update (GtkWidget *preview,
gint brush_width, gint brush_width,
gint brush_height, gint brush_height,
const gchar *mask_data); const guchar *mask_data);
static void gimp_brush_select_popup_open (BrushSelect *brush_sel, static void gimp_brush_select_popup_open (BrushSelect *brush_sel,
gint x, gint x,
gint y); gint y);
@ -408,7 +408,7 @@ static void
gimp_brush_select_preview_update (GtkWidget *preview, gimp_brush_select_preview_update (GtkWidget *preview,
gint brush_width, gint brush_width,
gint brush_height, gint brush_height,
const gchar *mask_data) const guchar *mask_data)
{ {
guchar *buf; guchar *buf;
guchar *b; guchar *b;

View File

@ -35,7 +35,7 @@ enum
{ {
PIXEL_WRAP, PIXEL_WRAP,
PIXEL_SMEAR, PIXEL_SMEAR,
PIXEL_BLACK, PIXEL_BLACK
}; };
typedef struct _GimpPixelFetcher GimpPixelFetcher; typedef struct _GimpPixelFetcher GimpPixelFetcher;

View File

@ -35,7 +35,7 @@ enum
{ {
PIXEL_WRAP, PIXEL_WRAP,
PIXEL_SMEAR, PIXEL_SMEAR,
PIXEL_BLACK, PIXEL_BLACK
}; };
typedef struct _GimpPixelFetcher GimpPixelFetcher; typedef struct _GimpPixelFetcher GimpPixelFetcher;

View File

@ -35,7 +35,7 @@ enum
{ {
PIXEL_WRAP, PIXEL_WRAP,
PIXEL_SMEAR, PIXEL_SMEAR,
PIXEL_BLACK, PIXEL_BLACK
}; };
typedef struct _GimpPixelFetcher GimpPixelFetcher; typedef struct _GimpPixelFetcher GimpPixelFetcher;

View File

@ -161,7 +161,7 @@ static gboolean
gimp_module_load (GTypeModule *module) gimp_module_load (GTypeModule *module)
{ {
GimpModule *gimp_module; GimpModule *gimp_module;
gpointer symbol; GimpModuleRegisterFunc func;
g_return_val_if_fail (GIMP_IS_MODULE (module), FALSE); g_return_val_if_fail (GIMP_IS_MODULE (module), FALSE);
@ -180,7 +180,8 @@ gimp_module_load (GTypeModule *module)
return FALSE; return FALSE;
/* find the gimp_module_register symbol */ /* find the gimp_module_register symbol */
if (! g_module_symbol (gimp_module->module, "gimp_module_register", &symbol)) if (! g_module_symbol (gimp_module->module, "gimp_module_register",
(gpointer *) &func))
{ {
gimp_module_set_last_error (gimp_module, gimp_module_set_last_error (gimp_module,
"Missing gimp_module_register() symbol"); "Missing gimp_module_register() symbol");
@ -195,7 +196,7 @@ gimp_module_load (GTypeModule *module)
return FALSE; return FALSE;
} }
gimp_module->register_module = symbol; gimp_module->register_module = func;
if (! gimp_module->register_module (module)) if (! gimp_module->register_module (module))
{ {
@ -290,7 +291,7 @@ gimp_module_query_module (GimpModule *module)
{ {
const GimpModuleInfo *info; const GimpModuleInfo *info;
gboolean close_module = FALSE; gboolean close_module = FALSE;
gpointer symbol; GimpModuleQueryFunc func;
g_return_val_if_fail (GIMP_IS_MODULE (module), FALSE); g_return_val_if_fail (GIMP_IS_MODULE (module), FALSE);
@ -303,7 +304,8 @@ gimp_module_query_module (GimpModule *module)
} }
/* find the gimp_module_query symbol */ /* find the gimp_module_query symbol */
if (! g_module_symbol (module->module, "gimp_module_query", &symbol)) if (! g_module_symbol (module->module, "gimp_module_query",
(gpointer *) &func))
{ {
gimp_module_set_last_error (module, gimp_module_set_last_error (module,
"Missing gimp_module_query() symbol"); "Missing gimp_module_query() symbol");
@ -318,7 +320,7 @@ gimp_module_query_module (GimpModule *module)
return FALSE; return FALSE;
} }
module->query_module = symbol; module->query_module = func;
if (module->info) if (module->info)
{ {

View File

@ -249,12 +249,12 @@ HELP
if (success) if (success)
success = gimp_image_pick_color (gimage, success = gimp_image_pick_color (gimage,
drawable, drawable,
sample_merged,
(gint) x, (gint) y, (gint) x, (gint) y,
sample_merged,
sample_average, sample_average,
average_radius, average_radius,
&color,
NULL, NULL,
&color,
NULL); NULL);
} }
CODE CODE