mirror of https://github.com/GNOME/gimp.git
app: change parameters of gimp_fill_options_new()
to be the same as of gimp_stroke_options_new() because it's about to be needed for the same purposes.
This commit is contained in:
parent
7ce7ff16bb
commit
c09a724bda
|
@ -505,7 +505,7 @@ edit_fill_cmd_callback (GtkAction *action,
|
|||
|
||||
fill_type = (GimpFillType) value;
|
||||
|
||||
options = gimp_fill_options_new (action_data_get_gimp (data));
|
||||
options = gimp_fill_options_new (action_data_get_gimp (data), NULL, FALSE);
|
||||
|
||||
if (gimp_fill_options_set_by_fill_type (options,
|
||||
action_data_get_context (data),
|
||||
|
|
|
@ -407,7 +407,7 @@ gimp_edit_clear (GimpImage *image,
|
|||
g_return_if_fail (gimp_item_is_attached (GIMP_ITEM (drawable)));
|
||||
g_return_if_fail (GIMP_IS_CONTEXT (context));
|
||||
|
||||
options = gimp_fill_options_new (context->gimp);
|
||||
options = gimp_fill_options_new (context->gimp, NULL, FALSE);
|
||||
|
||||
if (gimp_drawable_has_alpha (drawable))
|
||||
gimp_fill_options_set_by_fill_type (options, context,
|
||||
|
|
|
@ -193,13 +193,31 @@ gimp_fill_options_get_property (GObject *object,
|
|||
/* public functions */
|
||||
|
||||
GimpFillOptions *
|
||||
gimp_fill_options_new (Gimp *gimp)
|
||||
gimp_fill_options_new (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
gboolean use_context_color)
|
||||
{
|
||||
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
|
||||
GimpFillOptions *options;
|
||||
|
||||
return g_object_new (GIMP_TYPE_FILL_OPTIONS,
|
||||
"gimp", gimp,
|
||||
NULL);
|
||||
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
|
||||
g_return_val_if_fail (context == NULL || GIMP_IS_CONTEXT (context), NULL);
|
||||
g_return_val_if_fail (use_context_color == FALSE || context != NULL, NULL);
|
||||
|
||||
options = g_object_new (GIMP_TYPE_FILL_OPTIONS,
|
||||
"gimp", gimp,
|
||||
NULL);
|
||||
|
||||
if (use_context_color)
|
||||
{
|
||||
gimp_context_define_properties (GIMP_CONTEXT (options),
|
||||
GIMP_CONTEXT_PROP_MASK_FOREGROUND |
|
||||
GIMP_CONTEXT_PROP_MASK_PATTERN,
|
||||
FALSE);
|
||||
|
||||
gimp_context_set_parent (GIMP_CONTEXT (options), context);
|
||||
}
|
||||
|
||||
return options;
|
||||
}
|
||||
|
||||
GimpFillStyle
|
||||
|
|
|
@ -48,7 +48,9 @@ struct _GimpFillOptionsClass
|
|||
|
||||
GType gimp_fill_options_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GimpFillOptions * gimp_fill_options_new (Gimp *gimp);
|
||||
GimpFillOptions * gimp_fill_options_new (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
gboolean use_context_color);
|
||||
|
||||
GimpFillStyle gimp_fill_options_get_style (GimpFillOptions *options);
|
||||
void gimp_fill_options_set_style (GimpFillOptions *options,
|
||||
|
|
|
@ -401,7 +401,8 @@ gimp_display_shell_drop_pattern (GtkWidget *widget,
|
|||
gpointer data)
|
||||
{
|
||||
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (data);
|
||||
GimpFillOptions *options = gimp_fill_options_new (shell->display->gimp);
|
||||
GimpFillOptions *options = gimp_fill_options_new (shell->display->gimp,
|
||||
NULL, FALSE);
|
||||
|
||||
GIMP_LOG (DND, NULL);
|
||||
|
||||
|
@ -422,7 +423,8 @@ gimp_display_shell_drop_color (GtkWidget *widget,
|
|||
gpointer data)
|
||||
{
|
||||
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (data);
|
||||
GimpFillOptions *options = gimp_fill_options_new (shell->display->gimp);
|
||||
GimpFillOptions *options = gimp_fill_options_new (shell->display->gimp,
|
||||
NULL, FALSE);
|
||||
|
||||
GIMP_LOG (DND, NULL);
|
||||
|
||||
|
|
|
@ -552,7 +552,7 @@ edit_fill_invoker (GimpProcedure *procedure,
|
|||
gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
|
||||
{
|
||||
GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
|
||||
GimpFillOptions *options = gimp_fill_options_new (gimp);
|
||||
GimpFillOptions *options = gimp_fill_options_new (gimp, NULL, FALSE);
|
||||
|
||||
if (gimp_fill_options_set_by_fill_type (options, context,
|
||||
fill_type, error))
|
||||
|
@ -606,7 +606,7 @@ edit_bucket_fill_invoker (GimpProcedure *procedure,
|
|||
gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
|
||||
{
|
||||
GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
|
||||
GimpFillOptions *options = gimp_fill_options_new (gimp);
|
||||
GimpFillOptions *options = gimp_fill_options_new (gimp, NULL, FALSE);
|
||||
|
||||
if (gimp_fill_options_set_by_fill_mode (options, context,
|
||||
fill_mode, error))
|
||||
|
@ -683,7 +683,7 @@ edit_bucket_fill_full_invoker (GimpProcedure *procedure,
|
|||
gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
|
||||
{
|
||||
GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
|
||||
GimpFillOptions *options = gimp_fill_options_new (gimp);
|
||||
GimpFillOptions *options = gimp_fill_options_new (gimp, NULL, FALSE);
|
||||
|
||||
if (gimp_fill_options_set_by_fill_mode (options, context,
|
||||
fill_mode, error))
|
||||
|
|
|
@ -176,7 +176,7 @@ gimp_bucket_fill_tool_button_release (GimpTool *tool,
|
|||
GimpFillOptions *fill_options;
|
||||
GError *error = NULL;
|
||||
|
||||
fill_options = gimp_fill_options_new (image->gimp);
|
||||
fill_options = gimp_fill_options_new (image->gimp, NULL, FALSE);
|
||||
|
||||
if (gimp_fill_options_set_by_fill_mode (fill_options, context,
|
||||
options->fill_mode,
|
||||
|
|
|
@ -236,7 +236,7 @@ gimp_drawable_tree_view_drop_viewable (GimpContainerTreeView *view,
|
|||
if (dest_viewable && GIMP_IS_PATTERN (src_viewable))
|
||||
{
|
||||
GimpImage *image = gimp_item_get_image (GIMP_ITEM (dest_viewable));
|
||||
GimpFillOptions *options = gimp_fill_options_new (image->gimp);
|
||||
GimpFillOptions *options = gimp_fill_options_new (image->gimp, NULL, FALSE);
|
||||
|
||||
gimp_fill_options_set_style (options, GIMP_FILL_STYLE_PATTERN);
|
||||
gimp_context_set_pattern (GIMP_CONTEXT (options),
|
||||
|
@ -267,7 +267,7 @@ gimp_drawable_tree_view_drop_color (GimpContainerTreeView *view,
|
|||
if (dest_viewable)
|
||||
{
|
||||
GimpImage *image = gimp_item_get_image (GIMP_ITEM (dest_viewable));
|
||||
GimpFillOptions *options = gimp_fill_options_new (image->gimp);
|
||||
GimpFillOptions *options = gimp_fill_options_new (image->gimp, NULL, FALSE);
|
||||
|
||||
gimp_fill_options_set_style (options, GIMP_FILL_STYLE_SOLID);
|
||||
gimp_context_set_foreground (GIMP_CONTEXT (options), color);
|
||||
|
@ -349,7 +349,7 @@ gimp_drawable_tree_view_new_pattern_dropped (GtkWidget *widget,
|
|||
{
|
||||
GimpItemTreeView *view = GIMP_ITEM_TREE_VIEW (data);
|
||||
GimpImage *image = gimp_item_tree_view_get_image (view);
|
||||
GimpFillOptions *options = gimp_fill_options_new (image->gimp);
|
||||
GimpFillOptions *options = gimp_fill_options_new (image->gimp, NULL, FALSE);
|
||||
|
||||
gimp_fill_options_set_style (options, GIMP_FILL_STYLE_PATTERN);
|
||||
gimp_context_set_pattern (GIMP_CONTEXT (options), GIMP_PATTERN (viewable));
|
||||
|
@ -369,7 +369,7 @@ gimp_drawable_tree_view_new_color_dropped (GtkWidget *widget,
|
|||
{
|
||||
GimpItemTreeView *view = GIMP_ITEM_TREE_VIEW (data);
|
||||
GimpImage *image = gimp_item_tree_view_get_image (view);
|
||||
GimpFillOptions *options = gimp_fill_options_new (image->gimp);
|
||||
GimpFillOptions *options = gimp_fill_options_new (image->gimp, NULL, FALSE);
|
||||
|
||||
gimp_fill_options_set_style (options, GIMP_FILL_STYLE_SOLID);
|
||||
gimp_context_set_foreground (GIMP_CONTEXT (options), color);
|
||||
|
|
|
@ -566,7 +566,7 @@ HELP
|
|||
gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
|
||||
{
|
||||
GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
|
||||
GimpFillOptions *options = gimp_fill_options_new (gimp);
|
||||
GimpFillOptions *options = gimp_fill_options_new (gimp, NULL, FALSE);
|
||||
|
||||
if (gimp_fill_options_set_by_fill_type (options, context,
|
||||
fill_type, error))
|
||||
|
@ -644,7 +644,7 @@ HELP
|
|||
gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
|
||||
{
|
||||
GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
|
||||
GimpFillOptions *options = gimp_fill_options_new (gimp);
|
||||
GimpFillOptions *options = gimp_fill_options_new (gimp, NULL, FALSE);
|
||||
|
||||
if (gimp_fill_options_set_by_fill_mode (options, context,
|
||||
fill_mode, error))
|
||||
|
@ -749,7 +749,7 @@ HELP
|
|||
gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
|
||||
{
|
||||
GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
|
||||
GimpFillOptions *options = gimp_fill_options_new (gimp);
|
||||
GimpFillOptions *options = gimp_fill_options_new (gimp, NULL, FALSE);
|
||||
|
||||
if (gimp_fill_options_set_by_fill_mode (options, context,
|
||||
fill_mode, error))
|
||||
|
|
Loading…
Reference in New Issue