Commit 5e32e298 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann
Browse files

added VOID: OBJECT, OBJECT.

2005-03-25  Sven Neumann  <sven@gimp.org>

	* app/core/gimpmarshal.list: added VOID: OBJECT, OBJECT.

	* app/widgets/gimpview.[ch]: pass old and new viewable in the
	"set-viewable" signal.

	* app/widgets/gimptoolbox-image-area.c: don't add the XDS drag source
	more than once.
parent 8eefacf5
2005-03-25 Sven Neumann <sven@gimp.org>
* app/core/gimpmarshal.list: added VOID: OBJECT, OBJECT.
* app/widgets/gimpview.[ch]: pass old and new viewable in the
"set-viewable" signal.
* app/widgets/gimptoolbox-image-area.c: don't add the XDS drag source
more than once.
2005-03-25 Sven Neumann <sven@gimp.org>
* app/widgets/gimpdnd-xds.c (gimp_dnd_xds_save_image): in case of
......
......@@ -42,6 +42,7 @@ VOID: INT, INT
VOID: INT, INT, INT, INT
VOID: OBJECT
VOID: OBJECT, INT
VOID: OBJECT, OBJECT
VOID: OBJECT, POINTER
VOID: POINTER
VOID: STRING
......
......@@ -67,12 +67,19 @@ image_preview_drop_image (GtkWidget *widget,
static void
image_preview_set_viewable (GimpView *view,
GimpViewable *viewable)
GimpViewable *old_viewable,
GimpViewable *new_viewable)
{
if (viewable)
gimp_dnd_xds_source_add (GTK_WIDGET (view),
(GimpDndDragViewableFunc) gimp_view_get_viewable,
NULL);
if (! old_viewable && new_viewable)
{
gimp_dnd_xds_source_add (GTK_WIDGET (view),
(GimpDndDragViewableFunc) gimp_view_get_viewable,
NULL);
}
else if (old_viewable && ! new_viewable)
{
gimp_dnd_xds_source_remove (GTK_WIDGET (view));
}
}
/* public functions */
......
......@@ -82,6 +82,7 @@ static gboolean gimp_view_leave_notify_event (GtkWidget *widget,
GdkEventCrossing *event);
static void gimp_view_real_set_viewable (GimpView *view,
GimpViewable *old,
GimpViewable *viewable);
static void gimp_view_update_callback (GimpViewRenderer *renderer,
......@@ -139,9 +140,9 @@ gimp_view_class_init (GimpViewClass *klass)
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GimpViewClass, set_viewable),
NULL, NULL,
gimp_marshal_VOID__OBJECT,
G_TYPE_NONE, 1,
GIMP_TYPE_VIEWABLE);
gimp_marshal_VOID__OBJECT_OBJECT,
G_TYPE_NONE, 2,
GIMP_TYPE_VIEWABLE, GIMP_TYPE_VIEWABLE);
view_signals[CLICKED] =
g_signal_new ("clicked",
......@@ -560,6 +561,7 @@ gimp_view_leave_notify_event (GtkWidget *widget,
static void
gimp_view_real_set_viewable (GimpView *view,
GimpViewable *old,
GimpViewable *viewable)
{
GType viewable_type = G_TYPE_NONE;
......@@ -754,7 +756,7 @@ gimp_view_set_viewable (GimpView *view,
if (viewable == view->viewable)
return;
g_signal_emit (view, view_signals[SET_VIEWABLE], 0, viewable);
g_signal_emit (view, view_signals[SET_VIEWABLE], 0, view->viewable, viewable);
}
void
......
......@@ -59,7 +59,8 @@ struct _GimpViewClass
/* signals */
void (* set_viewable) (GimpView *view,
GimpViewable *viewable);
GimpViewable *old_viewable,
GimpViewable *new_viewable);
void (* clicked) (GimpView *view,
GdkModifierType modifier_state);
void (* double_clicked) (GimpView *view);
......
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