mirror of https://github.com/GNOME/gimp.git
added "update_guide" signal.
2001-11-14 Michael Natterer <mitch@gimp.org> * app/core/gimpimage.[ch]: added "update_guide" signal. * app/display/gimpdisplay-foreach.[ch]: removed gdisplays_expose_guide(). * app/display/gimpdisplayshell-handlers.c: added a handler for "update_guide" and expose the guide there. * app/undo.c * app/tools/gimpmeasuretool.c * app/tools/gimpmovetool.c: call gimp_image_update_guide() instead of gdisplays_expose_guide().
This commit is contained in:
parent
58ea764172
commit
3c8b37f18c
15
ChangeLog
15
ChangeLog
|
@ -1,3 +1,18 @@
|
||||||
|
2001-11-14 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
|
* app/core/gimpimage.[ch]: added "update_guide" signal.
|
||||||
|
|
||||||
|
* app/display/gimpdisplay-foreach.[ch]: removed
|
||||||
|
gdisplays_expose_guide().
|
||||||
|
|
||||||
|
* app/display/gimpdisplayshell-handlers.c: added a handler for
|
||||||
|
"update_guide" and expose the guide there.
|
||||||
|
|
||||||
|
* app/undo.c
|
||||||
|
* app/tools/gimpmeasuretool.c
|
||||||
|
* app/tools/gimpmovetool.c: call gimp_image_update_guide() instead
|
||||||
|
of gdisplays_expose_guide().
|
||||||
|
|
||||||
2001-11-14 Abel Cheung <maddog@linux.org.hk>
|
2001-11-14 Abel Cheung <maddog@linux.org.hk>
|
||||||
|
|
||||||
* configure.in (ALL_LINGUAS): Rename zh_TW.Big5 -> zh_TW to
|
* configure.in (ALL_LINGUAS): Rename zh_TW.Big5 -> zh_TW to
|
||||||
|
|
|
@ -181,6 +181,7 @@ enum
|
||||||
CLEAN,
|
CLEAN,
|
||||||
DIRTY,
|
DIRTY,
|
||||||
UPDATE,
|
UPDATE,
|
||||||
|
UPDATE_GUIDE,
|
||||||
COLORMAP_CHANGED,
|
COLORMAP_CHANGED,
|
||||||
UNDO_EVENT,
|
UNDO_EVENT,
|
||||||
LAST_SIGNAL
|
LAST_SIGNAL
|
||||||
|
@ -375,6 +376,16 @@ gimp_image_class_init (GimpImageClass *klass)
|
||||||
G_TYPE_INT,
|
G_TYPE_INT,
|
||||||
G_TYPE_INT);
|
G_TYPE_INT);
|
||||||
|
|
||||||
|
gimp_image_signals[UPDATE_GUIDE] =
|
||||||
|
g_signal_new ("update_guide",
|
||||||
|
G_TYPE_FROM_CLASS (klass),
|
||||||
|
G_SIGNAL_RUN_FIRST,
|
||||||
|
G_STRUCT_OFFSET (GimpImageClass, update_guide),
|
||||||
|
NULL, NULL,
|
||||||
|
g_cclosure_marshal_VOID__POINTER,
|
||||||
|
G_TYPE_NONE, 1,
|
||||||
|
G_TYPE_POINTER);
|
||||||
|
|
||||||
gimp_image_signals[COLORMAP_CHANGED] =
|
gimp_image_signals[COLORMAP_CHANGED] =
|
||||||
g_signal_new ("colormap_changed",
|
g_signal_new ("colormap_changed",
|
||||||
G_TYPE_FROM_CLASS (klass),
|
G_TYPE_FROM_CLASS (klass),
|
||||||
|
@ -417,6 +428,7 @@ gimp_image_class_init (GimpImageClass *klass)
|
||||||
klass->clean = NULL;
|
klass->clean = NULL;
|
||||||
klass->dirty = NULL;
|
klass->dirty = NULL;
|
||||||
klass->update = NULL;
|
klass->update = NULL;
|
||||||
|
klass->update_guide = NULL;
|
||||||
klass->colormap_changed = gimp_image_real_colormap_changed;
|
klass->colormap_changed = gimp_image_real_colormap_changed;
|
||||||
klass->undo_event = NULL;
|
klass->undo_event = NULL;
|
||||||
klass->undo = gimp_image_undo;
|
klass->undo = gimp_image_undo;
|
||||||
|
@ -2094,6 +2106,17 @@ gimp_image_update (GimpImage *gimage,
|
||||||
x, y, width, height);
|
x, y, width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gimp_image_update_guide (GimpImage *gimage,
|
||||||
|
GimpGuide *guide)
|
||||||
|
{
|
||||||
|
g_return_if_fail (GIMP_IS_IMAGE (gimage));
|
||||||
|
g_return_if_fail (guide != NULL);
|
||||||
|
|
||||||
|
g_signal_emit (G_OBJECT (gimage), gimp_image_signals[UPDATE_GUIDE], 0,
|
||||||
|
guide);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gimp_image_selection_control (GimpImage *gimage,
|
gimp_image_selection_control (GimpImage *gimage,
|
||||||
GimpSelectionControl control)
|
GimpSelectionControl control)
|
||||||
|
|
|
@ -152,6 +152,8 @@ struct _GimpImageClass
|
||||||
gint y,
|
gint y,
|
||||||
gint width,
|
gint width,
|
||||||
gint height);
|
gint height);
|
||||||
|
void (* update_guide) (GimpImage *gimage,
|
||||||
|
GimpGuide *guide);
|
||||||
void (* colormap_changed) (GimpImage *gimage,
|
void (* colormap_changed) (GimpImage *gimage,
|
||||||
gint color_index);
|
gint color_index);
|
||||||
void (* undo_event) (GimpImage *gimage,
|
void (* undo_event) (GimpImage *gimage,
|
||||||
|
@ -316,6 +318,8 @@ void gimp_image_update (GimpImage *gimage,
|
||||||
gint y,
|
gint y,
|
||||||
gint width,
|
gint width,
|
||||||
gint height);
|
gint height);
|
||||||
|
void gimp_image_update_guide (GimpImage *gimage,
|
||||||
|
GimpGuide *guide);
|
||||||
void gimp_image_selection_control (GimpImage *gimage,
|
void gimp_image_selection_control (GimpImage *gimage,
|
||||||
GimpSelectionControl control);
|
GimpSelectionControl control);
|
||||||
|
|
||||||
|
|
|
@ -181,6 +181,7 @@ enum
|
||||||
CLEAN,
|
CLEAN,
|
||||||
DIRTY,
|
DIRTY,
|
||||||
UPDATE,
|
UPDATE,
|
||||||
|
UPDATE_GUIDE,
|
||||||
COLORMAP_CHANGED,
|
COLORMAP_CHANGED,
|
||||||
UNDO_EVENT,
|
UNDO_EVENT,
|
||||||
LAST_SIGNAL
|
LAST_SIGNAL
|
||||||
|
@ -375,6 +376,16 @@ gimp_image_class_init (GimpImageClass *klass)
|
||||||
G_TYPE_INT,
|
G_TYPE_INT,
|
||||||
G_TYPE_INT);
|
G_TYPE_INT);
|
||||||
|
|
||||||
|
gimp_image_signals[UPDATE_GUIDE] =
|
||||||
|
g_signal_new ("update_guide",
|
||||||
|
G_TYPE_FROM_CLASS (klass),
|
||||||
|
G_SIGNAL_RUN_FIRST,
|
||||||
|
G_STRUCT_OFFSET (GimpImageClass, update_guide),
|
||||||
|
NULL, NULL,
|
||||||
|
g_cclosure_marshal_VOID__POINTER,
|
||||||
|
G_TYPE_NONE, 1,
|
||||||
|
G_TYPE_POINTER);
|
||||||
|
|
||||||
gimp_image_signals[COLORMAP_CHANGED] =
|
gimp_image_signals[COLORMAP_CHANGED] =
|
||||||
g_signal_new ("colormap_changed",
|
g_signal_new ("colormap_changed",
|
||||||
G_TYPE_FROM_CLASS (klass),
|
G_TYPE_FROM_CLASS (klass),
|
||||||
|
@ -417,6 +428,7 @@ gimp_image_class_init (GimpImageClass *klass)
|
||||||
klass->clean = NULL;
|
klass->clean = NULL;
|
||||||
klass->dirty = NULL;
|
klass->dirty = NULL;
|
||||||
klass->update = NULL;
|
klass->update = NULL;
|
||||||
|
klass->update_guide = NULL;
|
||||||
klass->colormap_changed = gimp_image_real_colormap_changed;
|
klass->colormap_changed = gimp_image_real_colormap_changed;
|
||||||
klass->undo_event = NULL;
|
klass->undo_event = NULL;
|
||||||
klass->undo = gimp_image_undo;
|
klass->undo = gimp_image_undo;
|
||||||
|
@ -2094,6 +2106,17 @@ gimp_image_update (GimpImage *gimage,
|
||||||
x, y, width, height);
|
x, y, width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gimp_image_update_guide (GimpImage *gimage,
|
||||||
|
GimpGuide *guide)
|
||||||
|
{
|
||||||
|
g_return_if_fail (GIMP_IS_IMAGE (gimage));
|
||||||
|
g_return_if_fail (guide != NULL);
|
||||||
|
|
||||||
|
g_signal_emit (G_OBJECT (gimage), gimp_image_signals[UPDATE_GUIDE], 0,
|
||||||
|
guide);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gimp_image_selection_control (GimpImage *gimage,
|
gimp_image_selection_control (GimpImage *gimage,
|
||||||
GimpSelectionControl control)
|
GimpSelectionControl control)
|
||||||
|
|
|
@ -152,6 +152,8 @@ struct _GimpImageClass
|
||||||
gint y,
|
gint y,
|
||||||
gint width,
|
gint width,
|
||||||
gint height);
|
gint height);
|
||||||
|
void (* update_guide) (GimpImage *gimage,
|
||||||
|
GimpGuide *guide);
|
||||||
void (* colormap_changed) (GimpImage *gimage,
|
void (* colormap_changed) (GimpImage *gimage,
|
||||||
gint color_index);
|
gint color_index);
|
||||||
void (* undo_event) (GimpImage *gimage,
|
void (* undo_event) (GimpImage *gimage,
|
||||||
|
@ -316,6 +318,8 @@ void gimp_image_update (GimpImage *gimage,
|
||||||
gint y,
|
gint y,
|
||||||
gint width,
|
gint width,
|
||||||
gint height);
|
gint height);
|
||||||
|
void gimp_image_update_guide (GimpImage *gimage,
|
||||||
|
GimpGuide *guide);
|
||||||
void gimp_image_selection_control (GimpImage *gimage,
|
void gimp_image_selection_control (GimpImage *gimage,
|
||||||
GimpSelectionControl control);
|
GimpSelectionControl control);
|
||||||
|
|
||||||
|
|
|
@ -181,6 +181,7 @@ enum
|
||||||
CLEAN,
|
CLEAN,
|
||||||
DIRTY,
|
DIRTY,
|
||||||
UPDATE,
|
UPDATE,
|
||||||
|
UPDATE_GUIDE,
|
||||||
COLORMAP_CHANGED,
|
COLORMAP_CHANGED,
|
||||||
UNDO_EVENT,
|
UNDO_EVENT,
|
||||||
LAST_SIGNAL
|
LAST_SIGNAL
|
||||||
|
@ -375,6 +376,16 @@ gimp_image_class_init (GimpImageClass *klass)
|
||||||
G_TYPE_INT,
|
G_TYPE_INT,
|
||||||
G_TYPE_INT);
|
G_TYPE_INT);
|
||||||
|
|
||||||
|
gimp_image_signals[UPDATE_GUIDE] =
|
||||||
|
g_signal_new ("update_guide",
|
||||||
|
G_TYPE_FROM_CLASS (klass),
|
||||||
|
G_SIGNAL_RUN_FIRST,
|
||||||
|
G_STRUCT_OFFSET (GimpImageClass, update_guide),
|
||||||
|
NULL, NULL,
|
||||||
|
g_cclosure_marshal_VOID__POINTER,
|
||||||
|
G_TYPE_NONE, 1,
|
||||||
|
G_TYPE_POINTER);
|
||||||
|
|
||||||
gimp_image_signals[COLORMAP_CHANGED] =
|
gimp_image_signals[COLORMAP_CHANGED] =
|
||||||
g_signal_new ("colormap_changed",
|
g_signal_new ("colormap_changed",
|
||||||
G_TYPE_FROM_CLASS (klass),
|
G_TYPE_FROM_CLASS (klass),
|
||||||
|
@ -417,6 +428,7 @@ gimp_image_class_init (GimpImageClass *klass)
|
||||||
klass->clean = NULL;
|
klass->clean = NULL;
|
||||||
klass->dirty = NULL;
|
klass->dirty = NULL;
|
||||||
klass->update = NULL;
|
klass->update = NULL;
|
||||||
|
klass->update_guide = NULL;
|
||||||
klass->colormap_changed = gimp_image_real_colormap_changed;
|
klass->colormap_changed = gimp_image_real_colormap_changed;
|
||||||
klass->undo_event = NULL;
|
klass->undo_event = NULL;
|
||||||
klass->undo = gimp_image_undo;
|
klass->undo = gimp_image_undo;
|
||||||
|
@ -2094,6 +2106,17 @@ gimp_image_update (GimpImage *gimage,
|
||||||
x, y, width, height);
|
x, y, width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gimp_image_update_guide (GimpImage *gimage,
|
||||||
|
GimpGuide *guide)
|
||||||
|
{
|
||||||
|
g_return_if_fail (GIMP_IS_IMAGE (gimage));
|
||||||
|
g_return_if_fail (guide != NULL);
|
||||||
|
|
||||||
|
g_signal_emit (G_OBJECT (gimage), gimp_image_signals[UPDATE_GUIDE], 0,
|
||||||
|
guide);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gimp_image_selection_control (GimpImage *gimage,
|
gimp_image_selection_control (GimpImage *gimage,
|
||||||
GimpSelectionControl control)
|
GimpSelectionControl control)
|
||||||
|
|
|
@ -152,6 +152,8 @@ struct _GimpImageClass
|
||||||
gint y,
|
gint y,
|
||||||
gint width,
|
gint width,
|
||||||
gint height);
|
gint height);
|
||||||
|
void (* update_guide) (GimpImage *gimage,
|
||||||
|
GimpGuide *guide);
|
||||||
void (* colormap_changed) (GimpImage *gimage,
|
void (* colormap_changed) (GimpImage *gimage,
|
||||||
gint color_index);
|
gint color_index);
|
||||||
void (* undo_event) (GimpImage *gimage,
|
void (* undo_event) (GimpImage *gimage,
|
||||||
|
@ -316,6 +318,8 @@ void gimp_image_update (GimpImage *gimage,
|
||||||
gint y,
|
gint y,
|
||||||
gint width,
|
gint width,
|
||||||
gint height);
|
gint height);
|
||||||
|
void gimp_image_update_guide (GimpImage *gimage,
|
||||||
|
GimpGuide *guide);
|
||||||
void gimp_image_selection_control (GimpImage *gimage,
|
void gimp_image_selection_control (GimpImage *gimage,
|
||||||
GimpSelectionControl control);
|
GimpSelectionControl control);
|
||||||
|
|
||||||
|
|
|
@ -181,6 +181,7 @@ enum
|
||||||
CLEAN,
|
CLEAN,
|
||||||
DIRTY,
|
DIRTY,
|
||||||
UPDATE,
|
UPDATE,
|
||||||
|
UPDATE_GUIDE,
|
||||||
COLORMAP_CHANGED,
|
COLORMAP_CHANGED,
|
||||||
UNDO_EVENT,
|
UNDO_EVENT,
|
||||||
LAST_SIGNAL
|
LAST_SIGNAL
|
||||||
|
@ -375,6 +376,16 @@ gimp_image_class_init (GimpImageClass *klass)
|
||||||
G_TYPE_INT,
|
G_TYPE_INT,
|
||||||
G_TYPE_INT);
|
G_TYPE_INT);
|
||||||
|
|
||||||
|
gimp_image_signals[UPDATE_GUIDE] =
|
||||||
|
g_signal_new ("update_guide",
|
||||||
|
G_TYPE_FROM_CLASS (klass),
|
||||||
|
G_SIGNAL_RUN_FIRST,
|
||||||
|
G_STRUCT_OFFSET (GimpImageClass, update_guide),
|
||||||
|
NULL, NULL,
|
||||||
|
g_cclosure_marshal_VOID__POINTER,
|
||||||
|
G_TYPE_NONE, 1,
|
||||||
|
G_TYPE_POINTER);
|
||||||
|
|
||||||
gimp_image_signals[COLORMAP_CHANGED] =
|
gimp_image_signals[COLORMAP_CHANGED] =
|
||||||
g_signal_new ("colormap_changed",
|
g_signal_new ("colormap_changed",
|
||||||
G_TYPE_FROM_CLASS (klass),
|
G_TYPE_FROM_CLASS (klass),
|
||||||
|
@ -417,6 +428,7 @@ gimp_image_class_init (GimpImageClass *klass)
|
||||||
klass->clean = NULL;
|
klass->clean = NULL;
|
||||||
klass->dirty = NULL;
|
klass->dirty = NULL;
|
||||||
klass->update = NULL;
|
klass->update = NULL;
|
||||||
|
klass->update_guide = NULL;
|
||||||
klass->colormap_changed = gimp_image_real_colormap_changed;
|
klass->colormap_changed = gimp_image_real_colormap_changed;
|
||||||
klass->undo_event = NULL;
|
klass->undo_event = NULL;
|
||||||
klass->undo = gimp_image_undo;
|
klass->undo = gimp_image_undo;
|
||||||
|
@ -2094,6 +2106,17 @@ gimp_image_update (GimpImage *gimage,
|
||||||
x, y, width, height);
|
x, y, width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gimp_image_update_guide (GimpImage *gimage,
|
||||||
|
GimpGuide *guide)
|
||||||
|
{
|
||||||
|
g_return_if_fail (GIMP_IS_IMAGE (gimage));
|
||||||
|
g_return_if_fail (guide != NULL);
|
||||||
|
|
||||||
|
g_signal_emit (G_OBJECT (gimage), gimp_image_signals[UPDATE_GUIDE], 0,
|
||||||
|
guide);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gimp_image_selection_control (GimpImage *gimage,
|
gimp_image_selection_control (GimpImage *gimage,
|
||||||
GimpSelectionControl control)
|
GimpSelectionControl control)
|
||||||
|
|
|
@ -152,6 +152,8 @@ struct _GimpImageClass
|
||||||
gint y,
|
gint y,
|
||||||
gint width,
|
gint width,
|
||||||
gint height);
|
gint height);
|
||||||
|
void (* update_guide) (GimpImage *gimage,
|
||||||
|
GimpGuide *guide);
|
||||||
void (* colormap_changed) (GimpImage *gimage,
|
void (* colormap_changed) (GimpImage *gimage,
|
||||||
gint color_index);
|
gint color_index);
|
||||||
void (* undo_event) (GimpImage *gimage,
|
void (* undo_event) (GimpImage *gimage,
|
||||||
|
@ -316,6 +318,8 @@ void gimp_image_update (GimpImage *gimage,
|
||||||
gint y,
|
gint y,
|
||||||
gint width,
|
gint width,
|
||||||
gint height);
|
gint height);
|
||||||
|
void gimp_image_update_guide (GimpImage *gimage,
|
||||||
|
GimpGuide *guide);
|
||||||
void gimp_image_selection_control (GimpImage *gimage,
|
void gimp_image_selection_control (GimpImage *gimage,
|
||||||
GimpSelectionControl control);
|
GimpSelectionControl control);
|
||||||
|
|
||||||
|
|
|
@ -181,6 +181,7 @@ enum
|
||||||
CLEAN,
|
CLEAN,
|
||||||
DIRTY,
|
DIRTY,
|
||||||
UPDATE,
|
UPDATE,
|
||||||
|
UPDATE_GUIDE,
|
||||||
COLORMAP_CHANGED,
|
COLORMAP_CHANGED,
|
||||||
UNDO_EVENT,
|
UNDO_EVENT,
|
||||||
LAST_SIGNAL
|
LAST_SIGNAL
|
||||||
|
@ -375,6 +376,16 @@ gimp_image_class_init (GimpImageClass *klass)
|
||||||
G_TYPE_INT,
|
G_TYPE_INT,
|
||||||
G_TYPE_INT);
|
G_TYPE_INT);
|
||||||
|
|
||||||
|
gimp_image_signals[UPDATE_GUIDE] =
|
||||||
|
g_signal_new ("update_guide",
|
||||||
|
G_TYPE_FROM_CLASS (klass),
|
||||||
|
G_SIGNAL_RUN_FIRST,
|
||||||
|
G_STRUCT_OFFSET (GimpImageClass, update_guide),
|
||||||
|
NULL, NULL,
|
||||||
|
g_cclosure_marshal_VOID__POINTER,
|
||||||
|
G_TYPE_NONE, 1,
|
||||||
|
G_TYPE_POINTER);
|
||||||
|
|
||||||
gimp_image_signals[COLORMAP_CHANGED] =
|
gimp_image_signals[COLORMAP_CHANGED] =
|
||||||
g_signal_new ("colormap_changed",
|
g_signal_new ("colormap_changed",
|
||||||
G_TYPE_FROM_CLASS (klass),
|
G_TYPE_FROM_CLASS (klass),
|
||||||
|
@ -417,6 +428,7 @@ gimp_image_class_init (GimpImageClass *klass)
|
||||||
klass->clean = NULL;
|
klass->clean = NULL;
|
||||||
klass->dirty = NULL;
|
klass->dirty = NULL;
|
||||||
klass->update = NULL;
|
klass->update = NULL;
|
||||||
|
klass->update_guide = NULL;
|
||||||
klass->colormap_changed = gimp_image_real_colormap_changed;
|
klass->colormap_changed = gimp_image_real_colormap_changed;
|
||||||
klass->undo_event = NULL;
|
klass->undo_event = NULL;
|
||||||
klass->undo = gimp_image_undo;
|
klass->undo = gimp_image_undo;
|
||||||
|
@ -2094,6 +2106,17 @@ gimp_image_update (GimpImage *gimage,
|
||||||
x, y, width, height);
|
x, y, width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gimp_image_update_guide (GimpImage *gimage,
|
||||||
|
GimpGuide *guide)
|
||||||
|
{
|
||||||
|
g_return_if_fail (GIMP_IS_IMAGE (gimage));
|
||||||
|
g_return_if_fail (guide != NULL);
|
||||||
|
|
||||||
|
g_signal_emit (G_OBJECT (gimage), gimp_image_signals[UPDATE_GUIDE], 0,
|
||||||
|
guide);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gimp_image_selection_control (GimpImage *gimage,
|
gimp_image_selection_control (GimpImage *gimage,
|
||||||
GimpSelectionControl control)
|
GimpSelectionControl control)
|
||||||
|
|
|
@ -152,6 +152,8 @@ struct _GimpImageClass
|
||||||
gint y,
|
gint y,
|
||||||
gint width,
|
gint width,
|
||||||
gint height);
|
gint height);
|
||||||
|
void (* update_guide) (GimpImage *gimage,
|
||||||
|
GimpGuide *guide);
|
||||||
void (* colormap_changed) (GimpImage *gimage,
|
void (* colormap_changed) (GimpImage *gimage,
|
||||||
gint color_index);
|
gint color_index);
|
||||||
void (* undo_event) (GimpImage *gimage,
|
void (* undo_event) (GimpImage *gimage,
|
||||||
|
@ -316,6 +318,8 @@ void gimp_image_update (GimpImage *gimage,
|
||||||
gint y,
|
gint y,
|
||||||
gint width,
|
gint width,
|
||||||
gint height);
|
gint height);
|
||||||
|
void gimp_image_update_guide (GimpImage *gimage,
|
||||||
|
GimpGuide *guide);
|
||||||
void gimp_image_selection_control (GimpImage *gimage,
|
void gimp_image_selection_control (GimpImage *gimage,
|
||||||
GimpSelectionControl control);
|
GimpSelectionControl control);
|
||||||
|
|
||||||
|
|
|
@ -898,9 +898,9 @@ undo_push_image_mod (GimpImage *gimage,
|
||||||
gpointer tiles_ptr,
|
gpointer tiles_ptr,
|
||||||
gboolean sparse)
|
gboolean sparse)
|
||||||
{
|
{
|
||||||
glong size;
|
glong size;
|
||||||
gint dwidth, dheight;
|
gint dwidth, dheight;
|
||||||
Undo *new;
|
Undo *new;
|
||||||
ImageUndo *image_undo;
|
ImageUndo *image_undo;
|
||||||
TileManager *tiles;
|
TileManager *tiles;
|
||||||
|
|
||||||
|
@ -1175,9 +1175,9 @@ undo_free_mask (UndoState state,
|
||||||
/***************************************/
|
/***************************************/
|
||||||
/* Layer displacement Undo functions */
|
/* Layer displacement Undo functions */
|
||||||
|
|
||||||
typedef struct _LayerDisplayUndo LayerDisplaceUndo;
|
typedef struct _LayerDisplaceUndo LayerDisplaceUndo;
|
||||||
|
|
||||||
struct _LayerDisplayUndo
|
struct _LayerDisplaceUndo
|
||||||
{
|
{
|
||||||
gint info[3];
|
gint info[3];
|
||||||
PathUndo *path_undo;
|
PathUndo *path_undo;
|
||||||
|
@ -2387,14 +2387,12 @@ undo_pop_qmask (GimpImage *gimage,
|
||||||
tmp = gimage->qmask_state;
|
tmp = gimage->qmask_state;
|
||||||
gimage->qmask_state = data->qmask;
|
gimage->qmask_state = data->qmask;
|
||||||
data->qmask = tmp;
|
data->qmask = tmp;
|
||||||
|
|
||||||
/* make sure the buttons on all displays are updated */
|
gimp_image_qmask_changed (gimage);
|
||||||
gdisplays_flush ();
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
undo_free_qmask (UndoState state,
|
undo_free_qmask (UndoState state,
|
||||||
UndoType type,
|
UndoType type,
|
||||||
|
@ -2455,7 +2453,7 @@ undo_pop_guide (GimpImage *gimage,
|
||||||
|
|
||||||
data = data_ptr;
|
data = data_ptr;
|
||||||
|
|
||||||
gdisplays_expose_guide (gimage, data->guide);
|
gimp_image_update_guide (gimage, data->guide);
|
||||||
|
|
||||||
tmp_ref = data->guide->ref_count;
|
tmp_ref = data->guide->ref_count;
|
||||||
tmp = *(data->guide);
|
tmp = *(data->guide);
|
||||||
|
@ -2463,7 +2461,7 @@ undo_pop_guide (GimpImage *gimage,
|
||||||
data->guide->ref_count = tmp_ref;
|
data->guide->ref_count = tmp_ref;
|
||||||
data->orig = tmp;
|
data->orig = tmp;
|
||||||
|
|
||||||
gdisplays_expose_guide (gimage, data->guide);
|
gimp_image_update_guide (gimage, data->guide);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -181,6 +181,7 @@ enum
|
||||||
CLEAN,
|
CLEAN,
|
||||||
DIRTY,
|
DIRTY,
|
||||||
UPDATE,
|
UPDATE,
|
||||||
|
UPDATE_GUIDE,
|
||||||
COLORMAP_CHANGED,
|
COLORMAP_CHANGED,
|
||||||
UNDO_EVENT,
|
UNDO_EVENT,
|
||||||
LAST_SIGNAL
|
LAST_SIGNAL
|
||||||
|
@ -375,6 +376,16 @@ gimp_image_class_init (GimpImageClass *klass)
|
||||||
G_TYPE_INT,
|
G_TYPE_INT,
|
||||||
G_TYPE_INT);
|
G_TYPE_INT);
|
||||||
|
|
||||||
|
gimp_image_signals[UPDATE_GUIDE] =
|
||||||
|
g_signal_new ("update_guide",
|
||||||
|
G_TYPE_FROM_CLASS (klass),
|
||||||
|
G_SIGNAL_RUN_FIRST,
|
||||||
|
G_STRUCT_OFFSET (GimpImageClass, update_guide),
|
||||||
|
NULL, NULL,
|
||||||
|
g_cclosure_marshal_VOID__POINTER,
|
||||||
|
G_TYPE_NONE, 1,
|
||||||
|
G_TYPE_POINTER);
|
||||||
|
|
||||||
gimp_image_signals[COLORMAP_CHANGED] =
|
gimp_image_signals[COLORMAP_CHANGED] =
|
||||||
g_signal_new ("colormap_changed",
|
g_signal_new ("colormap_changed",
|
||||||
G_TYPE_FROM_CLASS (klass),
|
G_TYPE_FROM_CLASS (klass),
|
||||||
|
@ -417,6 +428,7 @@ gimp_image_class_init (GimpImageClass *klass)
|
||||||
klass->clean = NULL;
|
klass->clean = NULL;
|
||||||
klass->dirty = NULL;
|
klass->dirty = NULL;
|
||||||
klass->update = NULL;
|
klass->update = NULL;
|
||||||
|
klass->update_guide = NULL;
|
||||||
klass->colormap_changed = gimp_image_real_colormap_changed;
|
klass->colormap_changed = gimp_image_real_colormap_changed;
|
||||||
klass->undo_event = NULL;
|
klass->undo_event = NULL;
|
||||||
klass->undo = gimp_image_undo;
|
klass->undo = gimp_image_undo;
|
||||||
|
@ -2094,6 +2106,17 @@ gimp_image_update (GimpImage *gimage,
|
||||||
x, y, width, height);
|
x, y, width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gimp_image_update_guide (GimpImage *gimage,
|
||||||
|
GimpGuide *guide)
|
||||||
|
{
|
||||||
|
g_return_if_fail (GIMP_IS_IMAGE (gimage));
|
||||||
|
g_return_if_fail (guide != NULL);
|
||||||
|
|
||||||
|
g_signal_emit (G_OBJECT (gimage), gimp_image_signals[UPDATE_GUIDE], 0,
|
||||||
|
guide);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gimp_image_selection_control (GimpImage *gimage,
|
gimp_image_selection_control (GimpImage *gimage,
|
||||||
GimpSelectionControl control)
|
GimpSelectionControl control)
|
||||||
|
|
|
@ -152,6 +152,8 @@ struct _GimpImageClass
|
||||||
gint y,
|
gint y,
|
||||||
gint width,
|
gint width,
|
||||||
gint height);
|
gint height);
|
||||||
|
void (* update_guide) (GimpImage *gimage,
|
||||||
|
GimpGuide *guide);
|
||||||
void (* colormap_changed) (GimpImage *gimage,
|
void (* colormap_changed) (GimpImage *gimage,
|
||||||
gint color_index);
|
gint color_index);
|
||||||
void (* undo_event) (GimpImage *gimage,
|
void (* undo_event) (GimpImage *gimage,
|
||||||
|
@ -316,6 +318,8 @@ void gimp_image_update (GimpImage *gimage,
|
||||||
gint y,
|
gint y,
|
||||||
gint width,
|
gint width,
|
||||||
gint height);
|
gint height);
|
||||||
|
void gimp_image_update_guide (GimpImage *gimage,
|
||||||
|
GimpGuide *guide);
|
||||||
void gimp_image_selection_control (GimpImage *gimage,
|
void gimp_image_selection_control (GimpImage *gimage,
|
||||||
GimpSelectionControl control);
|
GimpSelectionControl control);
|
||||||
|
|
||||||
|
|
|
@ -181,6 +181,7 @@ enum
|
||||||
CLEAN,
|
CLEAN,
|
||||||
DIRTY,
|
DIRTY,
|
||||||
UPDATE,
|
UPDATE,
|
||||||
|
UPDATE_GUIDE,
|
||||||
COLORMAP_CHANGED,
|
COLORMAP_CHANGED,
|
||||||
UNDO_EVENT,
|
UNDO_EVENT,
|
||||||
LAST_SIGNAL
|
LAST_SIGNAL
|
||||||
|
@ -375,6 +376,16 @@ gimp_image_class_init (GimpImageClass *klass)
|
||||||
G_TYPE_INT,
|
G_TYPE_INT,
|
||||||
G_TYPE_INT);
|
G_TYPE_INT);
|
||||||
|
|
||||||
|
gimp_image_signals[UPDATE_GUIDE] =
|
||||||
|
g_signal_new ("update_guide",
|
||||||
|
G_TYPE_FROM_CLASS (klass),
|
||||||
|
G_SIGNAL_RUN_FIRST,
|
||||||
|
G_STRUCT_OFFSET (GimpImageClass, update_guide),
|
||||||
|
NULL, NULL,
|
||||||
|
g_cclosure_marshal_VOID__POINTER,
|
||||||
|
G_TYPE_NONE, 1,
|
||||||
|
G_TYPE_POINTER);
|
||||||
|
|
||||||
gimp_image_signals[COLORMAP_CHANGED] =
|
gimp_image_signals[COLORMAP_CHANGED] =
|
||||||
g_signal_new ("colormap_changed",
|
g_signal_new ("colormap_changed",
|
||||||
G_TYPE_FROM_CLASS (klass),
|
G_TYPE_FROM_CLASS (klass),
|
||||||
|
@ -417,6 +428,7 @@ gimp_image_class_init (GimpImageClass *klass)
|
||||||
klass->clean = NULL;
|
klass->clean = NULL;
|
||||||
klass->dirty = NULL;
|
klass->dirty = NULL;
|
||||||
klass->update = NULL;
|
klass->update = NULL;
|
||||||
|
klass->update_guide = NULL;
|
||||||
klass->colormap_changed = gimp_image_real_colormap_changed;
|
klass->colormap_changed = gimp_image_real_colormap_changed;
|
||||||
klass->undo_event = NULL;
|
klass->undo_event = NULL;
|
||||||
klass->undo = gimp_image_undo;
|
klass->undo = gimp_image_undo;
|
||||||
|
@ -2094,6 +2106,17 @@ gimp_image_update (GimpImage *gimage,
|
||||||
x, y, width, height);
|
x, y, width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gimp_image_update_guide (GimpImage *gimage,
|
||||||
|
GimpGuide *guide)
|
||||||
|
{
|
||||||
|
g_return_if_fail (GIMP_IS_IMAGE (gimage));
|
||||||
|
g_return_if_fail (guide != NULL);
|
||||||
|
|
||||||
|
g_signal_emit (G_OBJECT (gimage), gimp_image_signals[UPDATE_GUIDE], 0,
|
||||||
|
guide);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gimp_image_selection_control (GimpImage *gimage,
|
gimp_image_selection_control (GimpImage *gimage,
|
||||||
GimpSelectionControl control)
|
GimpSelectionControl control)
|
||||||
|
|
|
@ -152,6 +152,8 @@ struct _GimpImageClass
|
||||||
gint y,
|
gint y,
|
||||||
gint width,
|
gint width,
|
||||||
gint height);
|
gint height);
|
||||||
|
void (* update_guide) (GimpImage *gimage,
|
||||||
|
GimpGuide *guide);
|
||||||
void (* colormap_changed) (GimpImage *gimage,
|
void (* colormap_changed) (GimpImage *gimage,
|
||||||
gint color_index);
|
gint color_index);
|
||||||
void (* undo_event) (GimpImage *gimage,
|
void (* undo_event) (GimpImage *gimage,
|
||||||
|
@ -316,6 +318,8 @@ void gimp_image_update (GimpImage *gimage,
|
||||||
gint y,
|
gint y,
|
||||||
gint width,
|
gint width,
|
||||||
gint height);
|
gint height);
|
||||||
|
void gimp_image_update_guide (GimpImage *gimage,
|
||||||
|
GimpGuide *guide);
|
||||||
void gimp_image_selection_control (GimpImage *gimage,
|
void gimp_image_selection_control (GimpImage *gimage,
|
||||||
GimpSelectionControl control);
|
GimpSelectionControl control);
|
||||||
|
|
||||||
|
|
|
@ -38,26 +38,6 @@ gdisplays_foreach (GFunc func,
|
||||||
g_slist_foreach (display_list, func, user_data);
|
g_slist_foreach (display_list, func, user_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
gdisplays_expose_guide (GimpImage *gimage,
|
|
||||||
GimpGuide *guide)
|
|
||||||
{
|
|
||||||
GimpDisplay *gdisp;
|
|
||||||
GSList *list;
|
|
||||||
|
|
||||||
g_return_if_fail (GIMP_IS_IMAGE (gimage));
|
|
||||||
g_return_if_fail (guide != NULL);
|
|
||||||
|
|
||||||
for (list = display_list; list; list = g_slist_next (list))
|
|
||||||
{
|
|
||||||
gdisp = (GimpDisplay *) list->data;
|
|
||||||
|
|
||||||
if (gdisp->gimage == gimage)
|
|
||||||
gimp_display_shell_expose_guide (GIMP_DISPLAY_SHELL (gdisp->shell),
|
|
||||||
guide);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
gdisplays_expose_full (void)
|
gdisplays_expose_full (void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -26,8 +26,6 @@ GimpDisplay * gdisplays_check_valid (GimpDisplay *gdisp,
|
||||||
GimpImage *gimage);
|
GimpImage *gimage);
|
||||||
void gdisplays_reconnect (GimpImage *old,
|
void gdisplays_reconnect (GimpImage *old,
|
||||||
GimpImage *new);
|
GimpImage *new);
|
||||||
void gdisplays_expose_guide (GimpImage *gimage,
|
|
||||||
GimpGuide *guide);
|
|
||||||
void gdisplays_expose_full (void);
|
void gdisplays_expose_full (void);
|
||||||
gboolean gdisplays_dirty (void);
|
gboolean gdisplays_dirty (void);
|
||||||
void gdisplays_delete (void);
|
void gdisplays_delete (void);
|
||||||
|
|
|
@ -48,6 +48,9 @@ static void gimp_display_shell_unit_changed_handler (GimpImage *g
|
||||||
GimpDisplayShell *shell);
|
GimpDisplayShell *shell);
|
||||||
static void gimp_display_shell_qmask_changed_handler (GimpImage *gimage,
|
static void gimp_display_shell_qmask_changed_handler (GimpImage *gimage,
|
||||||
GimpDisplayShell *shell);
|
GimpDisplayShell *shell);
|
||||||
|
static void gimp_display_shell_update_guide_handler (GimpImage *gimage,
|
||||||
|
GimpGuide *guide,
|
||||||
|
GimpDisplayShell *shell);
|
||||||
|
|
||||||
|
|
||||||
/* public functions */
|
/* public functions */
|
||||||
|
@ -88,6 +91,9 @@ gimp_display_shell_connect (GimpDisplayShell *shell)
|
||||||
g_signal_connect (G_OBJECT (gimage), "qmask_changed",
|
g_signal_connect (G_OBJECT (gimage), "qmask_changed",
|
||||||
G_CALLBACK (gimp_display_shell_qmask_changed_handler),
|
G_CALLBACK (gimp_display_shell_qmask_changed_handler),
|
||||||
shell);
|
shell);
|
||||||
|
g_signal_connect (G_OBJECT (gimage), "update_guide",
|
||||||
|
G_CALLBACK (gimp_display_shell_update_guide_handler),
|
||||||
|
shell);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -101,6 +107,9 @@ gimp_display_shell_disconnect (GimpDisplayShell *shell)
|
||||||
|
|
||||||
gimage = shell->gdisp->gimage;
|
gimage = shell->gdisp->gimage;
|
||||||
|
|
||||||
|
g_signal_handlers_disconnect_by_func (G_OBJECT (gimage),
|
||||||
|
gimp_display_shell_update_guide_handler,
|
||||||
|
shell);
|
||||||
g_signal_handlers_disconnect_by_func (G_OBJECT (gimage),
|
g_signal_handlers_disconnect_by_func (G_OBJECT (gimage),
|
||||||
gimp_display_shell_qmask_changed_handler,
|
gimp_display_shell_qmask_changed_handler,
|
||||||
shell);
|
shell);
|
||||||
|
@ -191,3 +200,11 @@ gimp_display_shell_qmask_changed_handler (GimpImage *gimage,
|
||||||
shell);
|
shell);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gimp_display_shell_update_guide_handler (GimpImage *gimage,
|
||||||
|
GimpGuide *guide,
|
||||||
|
GimpDisplayShell *shell)
|
||||||
|
{
|
||||||
|
gimp_display_shell_expose_guide (shell, guide);
|
||||||
|
}
|
||||||
|
|
|
@ -309,7 +309,8 @@ gimp_measure_tool_button_press (GimpTool *tool,
|
||||||
guide = gimp_image_add_hguide (gdisp->gimage);
|
guide = gimp_image_add_hguide (gdisp->gimage);
|
||||||
undo_push_guide (gdisp->gimage, guide);
|
undo_push_guide (gdisp->gimage, guide);
|
||||||
guide->position = measure_tool->y[i];
|
guide->position = measure_tool->y[i];
|
||||||
gdisplays_expose_guide (gdisp->gimage, guide);
|
|
||||||
|
gimp_image_update_guide (gdisp->gimage, guide);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (create_vguide)
|
if (create_vguide)
|
||||||
|
@ -317,7 +318,8 @@ gimp_measure_tool_button_press (GimpTool *tool,
|
||||||
guide = gimp_image_add_vguide (gdisp->gimage);
|
guide = gimp_image_add_vguide (gdisp->gimage);
|
||||||
undo_push_guide (gdisp->gimage, guide);
|
undo_push_guide (gdisp->gimage, guide);
|
||||||
guide->position = measure_tool->x[i];
|
guide->position = measure_tool->x[i];
|
||||||
gdisplays_expose_guide (gdisp->gimage, guide);
|
|
||||||
|
gimp_image_update_guide (gdisp->gimage, guide);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (create_hguide && create_vguide)
|
if (create_hguide && create_vguide)
|
||||||
|
|
|
@ -239,7 +239,7 @@ gimp_move_tool_button_press (GimpTool *tool,
|
||||||
{
|
{
|
||||||
undo_push_guide (gdisp->gimage, guide);
|
undo_push_guide (gdisp->gimage, guide);
|
||||||
|
|
||||||
gdisplays_expose_guide (gdisp->gimage, guide);
|
gimp_image_update_guide (gdisp->gimage, guide);
|
||||||
gimp_image_remove_guide (gdisp->gimage, guide);
|
gimp_image_remove_guide (gdisp->gimage, guide);
|
||||||
gimp_display_flush (gdisp);
|
gimp_display_flush (gdisp);
|
||||||
gimp_image_add_guide (gdisp->gimage, guide);
|
gimp_image_add_guide (gdisp->gimage, guide);
|
||||||
|
@ -344,7 +344,7 @@ gimp_move_tool_button_release (GimpTool *tool,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
gdisplays_expose_guide (gdisp->gimage, move->guide);
|
gimp_image_update_guide (gdisp->gimage, move->guide);
|
||||||
|
|
||||||
gimp_draw_tool_stop (GIMP_DRAW_TOOL (tool));
|
gimp_draw_tool_stop (GIMP_DRAW_TOOL (tool));
|
||||||
|
|
||||||
|
|
20
app/undo.c
20
app/undo.c
|
@ -898,9 +898,9 @@ undo_push_image_mod (GimpImage *gimage,
|
||||||
gpointer tiles_ptr,
|
gpointer tiles_ptr,
|
||||||
gboolean sparse)
|
gboolean sparse)
|
||||||
{
|
{
|
||||||
glong size;
|
glong size;
|
||||||
gint dwidth, dheight;
|
gint dwidth, dheight;
|
||||||
Undo *new;
|
Undo *new;
|
||||||
ImageUndo *image_undo;
|
ImageUndo *image_undo;
|
||||||
TileManager *tiles;
|
TileManager *tiles;
|
||||||
|
|
||||||
|
@ -1175,9 +1175,9 @@ undo_free_mask (UndoState state,
|
||||||
/***************************************/
|
/***************************************/
|
||||||
/* Layer displacement Undo functions */
|
/* Layer displacement Undo functions */
|
||||||
|
|
||||||
typedef struct _LayerDisplayUndo LayerDisplaceUndo;
|
typedef struct _LayerDisplaceUndo LayerDisplaceUndo;
|
||||||
|
|
||||||
struct _LayerDisplayUndo
|
struct _LayerDisplaceUndo
|
||||||
{
|
{
|
||||||
gint info[3];
|
gint info[3];
|
||||||
PathUndo *path_undo;
|
PathUndo *path_undo;
|
||||||
|
@ -2387,14 +2387,12 @@ undo_pop_qmask (GimpImage *gimage,
|
||||||
tmp = gimage->qmask_state;
|
tmp = gimage->qmask_state;
|
||||||
gimage->qmask_state = data->qmask;
|
gimage->qmask_state = data->qmask;
|
||||||
data->qmask = tmp;
|
data->qmask = tmp;
|
||||||
|
|
||||||
/* make sure the buttons on all displays are updated */
|
gimp_image_qmask_changed (gimage);
|
||||||
gdisplays_flush ();
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
undo_free_qmask (UndoState state,
|
undo_free_qmask (UndoState state,
|
||||||
UndoType type,
|
UndoType type,
|
||||||
|
@ -2455,7 +2453,7 @@ undo_pop_guide (GimpImage *gimage,
|
||||||
|
|
||||||
data = data_ptr;
|
data = data_ptr;
|
||||||
|
|
||||||
gdisplays_expose_guide (gimage, data->guide);
|
gimp_image_update_guide (gimage, data->guide);
|
||||||
|
|
||||||
tmp_ref = data->guide->ref_count;
|
tmp_ref = data->guide->ref_count;
|
||||||
tmp = *(data->guide);
|
tmp = *(data->guide);
|
||||||
|
@ -2463,7 +2461,7 @@ undo_pop_guide (GimpImage *gimage,
|
||||||
data->guide->ref_count = tmp_ref;
|
data->guide->ref_count = tmp_ref;
|
||||||
data->orig = tmp;
|
data->orig = tmp;
|
||||||
|
|
||||||
gdisplays_expose_guide (gimage, data->guide);
|
gimp_image_update_guide (gimage, data->guide);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue