Commit 3f1c39c1 authored by Michael Natterer's avatar Michael Natterer 😴

app: rename gimp_selection_push,pop_stroking() to selection_suspend,resume()

parent f2a98566
......@@ -191,7 +191,6 @@ gimp_selection_class_init (GimpSelectionClass *klass)
static void
gimp_selection_init (GimpSelection *selection)
{
selection->stroking_count = 0;
}
static gboolean
......@@ -296,13 +295,13 @@ gimp_selection_stroke (GimpItem *item,
return FALSE;
}
gimp_selection_push_stroking (selection);
gimp_selection_suspend (selection);
retval = GIMP_ITEM_CLASS (parent_class)->stroke (item, drawable,
stroke_options,
push_undo, progress, error);
gimp_selection_pop_stroking (selection);
gimp_selection_resume (selection);
return retval;
}
......@@ -455,7 +454,7 @@ gimp_selection_is_empty (GimpChannel *channel)
* that the selection mask is empty so that it doesn't mask the paint
* during the stroke operation.
*/
if (selection->stroking_count > 0)
if (selection->suspend_count > 0)
return TRUE;
return GIMP_CHANNEL_CLASS (parent_class)->is_empty (channel);
......@@ -573,24 +572,24 @@ gimp_selection_new (GimpImage *image,
}
gint
gimp_selection_push_stroking (GimpSelection *selection)
gimp_selection_suspend (GimpSelection *selection)
{
g_return_val_if_fail (GIMP_IS_SELECTION (selection), 0);
selection->stroking_count++;
selection->suspend_count++;
return selection->stroking_count;
return selection->suspend_count;
}
gint
gimp_selection_pop_stroking (GimpSelection *selection)
gimp_selection_resume (GimpSelection *selection)
{
g_return_val_if_fail (GIMP_IS_SELECTION (selection), 0);
g_return_val_if_fail (selection->stroking_count > 0, 0);
g_return_val_if_fail (selection->suspend_count > 0, 0);
selection->stroking_count--;
selection->suspend_count--;
return selection->stroking_count;
return selection->suspend_count;
}
void
......
......@@ -36,7 +36,7 @@ struct _GimpSelection
{
GimpChannel parent_instance;
gint stroking_count;
gint suspend_count;
};
struct _GimpSelectionClass
......@@ -45,36 +45,36 @@ struct _GimpSelectionClass
};
GType gimp_selection_get_type (void) G_GNUC_CONST;
GimpChannel * gimp_selection_new (GimpImage *image,
gint width,
gint height);
gint gimp_selection_push_stroking (GimpSelection *selection);
gint gimp_selection_pop_stroking (GimpSelection *selection);
void gimp_selection_load (GimpSelection *selection,
GimpChannel *channel);
GimpChannel * gimp_selection_save (GimpSelection *selection);
GeglBuffer * gimp_selection_extract (GimpSelection *selection,
GimpPickable *pickable,
GimpContext *context,
gboolean cut_image,
gboolean keep_indexed,
gboolean add_alpha,
gint *offset_x,
gint *offset_y,
GError **error);
GimpLayer * gimp_selection_float (GimpSelection *selection,
GimpDrawable *drawable,
GimpContext *context,
gboolean cut_image,
gint off_x,
gint off_y,
GError **error);
GType gimp_selection_get_type (void) G_GNUC_CONST;
GimpChannel * gimp_selection_new (GimpImage *image,
gint width,
gint height);
gint gimp_selection_suspend (GimpSelection *selection);
gint gimp_selection_resume (GimpSelection *selection);
void gimp_selection_load (GimpSelection *selection,
GimpChannel *channel);
GimpChannel * gimp_selection_save (GimpSelection *selection);
GeglBuffer * gimp_selection_extract (GimpSelection *selection,
GimpPickable *pickable,
GimpContext *context,
gboolean cut_image,
gboolean keep_indexed,
gboolean add_alpha,
gint *offset_x,
gint *offset_y,
GError **error);
GimpLayer * gimp_selection_float (GimpSelection *selection,
GimpDrawable *drawable,
GimpContext *context,
gboolean cut_image,
gint off_x,
gint off_y,
GError **error);
#endif /* __GIMP_SELECTION_H__ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment