--Sven
This commit is contained in:
Sven Neumann 2000-02-13 14:23:47 +00:00
parent f0ae0dccd4
commit 3cabc8b4d8
5 changed files with 31 additions and 12 deletions

View File

@ -1,3 +1,8 @@
Sun Feb 13 15:23:03 CET 2000 Sven Neumann <sven@gimp.org>
* app/channel_dialog.c
* app/layers_dialog.c: provided a proper fix for bug #2518
2000-02-13 Michael Natterer <mitch@gimp.org> 2000-02-13 Michael Natterer <mitch@gimp.org>
* app/brush_select.c * app/brush_select.c

View File

@ -1608,16 +1608,15 @@ channel_widget_drag_drop_callback (GtkWidget *widget,
gint src_index; gint src_index;
gint difference; gint difference;
GimpDropType drop_type = GIMP_DROP_NONE; GimpDropType drop_type = GIMP_DROP_NONE;
gboolean return_val = FALSE; gboolean return_val = FALSE;
dest = (ChannelWidget *) gtk_object_get_user_data (GTK_OBJECT (widget)); dest = (ChannelWidget *) gtk_object_get_user_data (GTK_OBJECT (widget));
if (dest && if (dest &&
(src_widget = gtk_drag_get_source_widget (context))) (src_widget = gtk_drag_get_source_widget (context)))
{ {
src src = (ChannelWidget *) gtk_object_get_user_data (GTK_OBJECT (src_widget));
= (ChannelWidget *) gtk_object_get_user_data (GTK_OBJECT (src_widget));
if (src && if (src &&
src->channel == channelsD->active_channel) src->channel == channelsD->active_channel)
@ -1903,6 +1902,10 @@ channel_widget_button_events (GtkWidget *widget,
if (button_down && (event_widget == click_widget)) if (button_down && (event_widget == click_widget))
{ {
/* the user moved the cursor out of the widget before
releasing the button -> cancel the button_press */
button_down = FALSE;
if (widget == channel_widget->eye_widget) if (widget == channel_widget->eye_widget)
{ {
if (exclusive) if (exclusive)

View File

@ -1608,16 +1608,15 @@ channel_widget_drag_drop_callback (GtkWidget *widget,
gint src_index; gint src_index;
gint difference; gint difference;
GimpDropType drop_type = GIMP_DROP_NONE; GimpDropType drop_type = GIMP_DROP_NONE;
gboolean return_val = FALSE; gboolean return_val = FALSE;
dest = (ChannelWidget *) gtk_object_get_user_data (GTK_OBJECT (widget)); dest = (ChannelWidget *) gtk_object_get_user_data (GTK_OBJECT (widget));
if (dest && if (dest &&
(src_widget = gtk_drag_get_source_widget (context))) (src_widget = gtk_drag_get_source_widget (context)))
{ {
src src = (ChannelWidget *) gtk_object_get_user_data (GTK_OBJECT (src_widget));
= (ChannelWidget *) gtk_object_get_user_data (GTK_OBJECT (src_widget));
if (src && if (src &&
src->channel == channelsD->active_channel) src->channel == channelsD->active_channel)
@ -1903,6 +1902,10 @@ channel_widget_button_events (GtkWidget *widget,
if (button_down && (event_widget == click_widget)) if (button_down && (event_widget == click_widget))
{ {
/* the user moved the cursor out of the widget before
releasing the button -> cancel the button_press */
button_down = FALSE;
if (widget == channel_widget->eye_widget) if (widget == channel_widget->eye_widget)
{ {
if (exclusive) if (exclusive)

View File

@ -2104,7 +2104,6 @@ layer_widget_create (GImage *gimage,
GTK_DEST_DEFAULT_ALL, GTK_DEST_DEFAULT_ALL,
layer_target_table, n_layer_targets, layer_target_table, n_layer_targets,
GDK_ACTION_MOVE); GDK_ACTION_MOVE);
gtk_signal_connect (GTK_OBJECT (list_item), "drag_leave", gtk_signal_connect (GTK_OBJECT (list_item), "drag_leave",
GTK_SIGNAL_FUNC (layer_widget_drag_leave_callback), GTK_SIGNAL_FUNC (layer_widget_drag_leave_callback),
NULL); NULL);
@ -2513,14 +2512,19 @@ layer_widget_button_events (GtkWidget *widget,
case GDK_LEAVE_NOTIFY: case GDK_LEAVE_NOTIFY:
event_widget = gtk_get_event_widget (event); event_widget = gtk_get_event_widget (event);
if (button_down && (event_widget == click_widget)) if (button_down && (event_widget == click_widget))
{ {
/* the user moved the cursor out of the widget before
releasing the button -> cancel the button_press */
button_down = FALSE;
if (widget == layer_widget->eye_widget) if (widget == layer_widget->eye_widget)
{ {
if (exclusive) if (exclusive)
{ {
layer_widget_exclusive_visible (layer_widget); layer_widget_exclusive_visible (layer_widget);
} }
else else
{ {
GIMP_DRAWABLE (layer_widget->layer)->visible = GIMP_DRAWABLE (layer_widget->layer)->visible =

View File

@ -2104,7 +2104,6 @@ layer_widget_create (GImage *gimage,
GTK_DEST_DEFAULT_ALL, GTK_DEST_DEFAULT_ALL,
layer_target_table, n_layer_targets, layer_target_table, n_layer_targets,
GDK_ACTION_MOVE); GDK_ACTION_MOVE);
gtk_signal_connect (GTK_OBJECT (list_item), "drag_leave", gtk_signal_connect (GTK_OBJECT (list_item), "drag_leave",
GTK_SIGNAL_FUNC (layer_widget_drag_leave_callback), GTK_SIGNAL_FUNC (layer_widget_drag_leave_callback),
NULL); NULL);
@ -2513,14 +2512,19 @@ layer_widget_button_events (GtkWidget *widget,
case GDK_LEAVE_NOTIFY: case GDK_LEAVE_NOTIFY:
event_widget = gtk_get_event_widget (event); event_widget = gtk_get_event_widget (event);
if (button_down && (event_widget == click_widget)) if (button_down && (event_widget == click_widget))
{ {
/* the user moved the cursor out of the widget before
releasing the button -> cancel the button_press */
button_down = FALSE;
if (widget == layer_widget->eye_widget) if (widget == layer_widget->eye_widget)
{ {
if (exclusive) if (exclusive)
{ {
layer_widget_exclusive_visible (layer_widget); layer_widget_exclusive_visible (layer_widget);
} }
else else
{ {
GIMP_DRAWABLE (layer_widget->layer)->visible = GIMP_DRAWABLE (layer_widget->layer)->visible =