mirror of https://github.com/GNOME/gimp.git
Thu Apr 2 23:52:54 EST 1998 Matthew Wilson <msw@gimp.org
* app/gimage.c * app/tools.c: Made changes to restart tools properly when the current drawable changes. --Matt
This commit is contained in:
parent
a2d5605a25
commit
0fee9209e3
|
@ -1,3 +1,9 @@
|
|||
Thu Apr 2 23:52:54 EST 1998 Matthew Wilson <msw@gimp.org
|
||||
|
||||
* app/gimage.c
|
||||
* app/tools.c: Made changes to restart tools properly when
|
||||
the current drawable changes.
|
||||
|
||||
Thu Apr 2 20:09:06 MEST 1998 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/channels_dialog.c: the impossibility of duplicating a
|
||||
|
|
|
@ -2636,9 +2636,9 @@ gimage_dirty (GImage *gimage)
|
|||
if (gdisp->gimage->ID == gimage->ID)
|
||||
tools_initialize (active_tool->type, gdisp);
|
||||
else
|
||||
active_tool_control(DESTROY, gdisp);
|
||||
tools_initialize (active_tool->type, NULL);
|
||||
else
|
||||
active_tool_control(DESTROY, gdisp);
|
||||
tools_initialize (active_tool->type, NULL);
|
||||
}
|
||||
return gimage->dirty;
|
||||
}
|
||||
|
|
84
app/tools.c
84
app/tools.c
|
@ -457,40 +457,85 @@ tools_initialize (ToolType type, GDisplay *gdisp_ptr)
|
|||
active_tool = tools_new_convolve ();
|
||||
break;
|
||||
case BY_COLOR_SELECT:
|
||||
active_tool = tools_new_by_color_select ();
|
||||
by_color_select_initialize (gdisp);
|
||||
if (gdisp) {
|
||||
active_tool = tools_new_by_color_select ();
|
||||
by_color_select_initialize (gdisp);
|
||||
} else {
|
||||
active_tool_free();
|
||||
gtk_widget_hide (options_shell);
|
||||
}
|
||||
break;
|
||||
case COLOR_BALANCE:
|
||||
active_tool = tools_new_color_balance ();
|
||||
color_balance_initialize (gdisp);
|
||||
if (gdisp) {
|
||||
active_tool = tools_new_color_balance ();
|
||||
color_balance_initialize (gdisp);
|
||||
} else {
|
||||
active_tool_free();
|
||||
gtk_widget_hide (options_shell);
|
||||
}
|
||||
break;
|
||||
case BRIGHTNESS_CONTRAST:
|
||||
active_tool = tools_new_brightness_contrast ();
|
||||
brightness_contrast_initialize (gdisp);
|
||||
if (gdisp) {
|
||||
active_tool = tools_new_brightness_contrast ();
|
||||
brightness_contrast_initialize (gdisp);
|
||||
} else {
|
||||
active_tool_free();
|
||||
gtk_widget_hide (options_shell);
|
||||
}
|
||||
break;
|
||||
case HUE_SATURATION:
|
||||
active_tool = tools_new_hue_saturation ();
|
||||
hue_saturation_initialize (gdisp);
|
||||
if (gdisp) {
|
||||
active_tool = tools_new_hue_saturation ();
|
||||
hue_saturation_initialize (gdisp);
|
||||
} else {
|
||||
active_tool_free();
|
||||
gtk_widget_hide (options_shell);
|
||||
}
|
||||
break;
|
||||
case POSTERIZE:
|
||||
active_tool = tools_new_posterize ();
|
||||
posterize_initialize (gdisp);
|
||||
if (gdisp) {
|
||||
active_tool = tools_new_posterize ();
|
||||
posterize_initialize (gdisp);
|
||||
} else {
|
||||
active_tool_free();
|
||||
gtk_widget_hide (options_shell);
|
||||
}
|
||||
break;
|
||||
case THRESHOLD:
|
||||
active_tool = tools_new_threshold ();
|
||||
threshold_initialize (gdisp);
|
||||
if (gdisp) {
|
||||
active_tool = tools_new_threshold ();
|
||||
threshold_initialize (gdisp);
|
||||
} else {
|
||||
active_tool_free();
|
||||
gtk_widget_hide (options_shell);
|
||||
}
|
||||
break;
|
||||
case CURVES:
|
||||
active_tool = tools_new_curves ();
|
||||
curves_initialize (gdisp);
|
||||
if (gdisp) {
|
||||
active_tool = tools_new_curves ();
|
||||
curves_initialize (gdisp);
|
||||
} else {
|
||||
active_tool_free();
|
||||
gtk_widget_hide (options_shell);
|
||||
}
|
||||
break;
|
||||
case LEVELS:
|
||||
active_tool = tools_new_levels ();
|
||||
levels_initialize (gdisp);
|
||||
if (gdisp) {
|
||||
active_tool = tools_new_levels ();
|
||||
levels_initialize (gdisp);
|
||||
} else {
|
||||
active_tool_free();
|
||||
gtk_widget_hide (options_shell);
|
||||
}
|
||||
break;
|
||||
case HISTOGRAM:
|
||||
active_tool = tools_new_histogram_tool ();
|
||||
histogram_tool_initialize (gdisp);
|
||||
if (gdisp) {
|
||||
active_tool = tools_new_histogram_tool ();
|
||||
histogram_tool_initialize (gdisp);
|
||||
} else {
|
||||
active_tool_free();
|
||||
gtk_widget_hide (options_shell);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
|
@ -505,7 +550,8 @@ tools_initialize (ToolType type, GDisplay *gdisp_ptr)
|
|||
|
||||
/* Set the paused count variable to 0
|
||||
*/
|
||||
active_tool->drawable = gimage_active_drawable (gdisp->gimage);
|
||||
if (gdisp)
|
||||
active_tool->drawable = gimage_active_drawable (gdisp->gimage);
|
||||
active_tool->gdisp_ptr = NULL;
|
||||
active_tool->ID = global_tool_ID++;
|
||||
active_tool_type = active_tool->type;
|
||||
|
|
|
@ -457,40 +457,85 @@ tools_initialize (ToolType type, GDisplay *gdisp_ptr)
|
|||
active_tool = tools_new_convolve ();
|
||||
break;
|
||||
case BY_COLOR_SELECT:
|
||||
active_tool = tools_new_by_color_select ();
|
||||
by_color_select_initialize (gdisp);
|
||||
if (gdisp) {
|
||||
active_tool = tools_new_by_color_select ();
|
||||
by_color_select_initialize (gdisp);
|
||||
} else {
|
||||
active_tool_free();
|
||||
gtk_widget_hide (options_shell);
|
||||
}
|
||||
break;
|
||||
case COLOR_BALANCE:
|
||||
active_tool = tools_new_color_balance ();
|
||||
color_balance_initialize (gdisp);
|
||||
if (gdisp) {
|
||||
active_tool = tools_new_color_balance ();
|
||||
color_balance_initialize (gdisp);
|
||||
} else {
|
||||
active_tool_free();
|
||||
gtk_widget_hide (options_shell);
|
||||
}
|
||||
break;
|
||||
case BRIGHTNESS_CONTRAST:
|
||||
active_tool = tools_new_brightness_contrast ();
|
||||
brightness_contrast_initialize (gdisp);
|
||||
if (gdisp) {
|
||||
active_tool = tools_new_brightness_contrast ();
|
||||
brightness_contrast_initialize (gdisp);
|
||||
} else {
|
||||
active_tool_free();
|
||||
gtk_widget_hide (options_shell);
|
||||
}
|
||||
break;
|
||||
case HUE_SATURATION:
|
||||
active_tool = tools_new_hue_saturation ();
|
||||
hue_saturation_initialize (gdisp);
|
||||
if (gdisp) {
|
||||
active_tool = tools_new_hue_saturation ();
|
||||
hue_saturation_initialize (gdisp);
|
||||
} else {
|
||||
active_tool_free();
|
||||
gtk_widget_hide (options_shell);
|
||||
}
|
||||
break;
|
||||
case POSTERIZE:
|
||||
active_tool = tools_new_posterize ();
|
||||
posterize_initialize (gdisp);
|
||||
if (gdisp) {
|
||||
active_tool = tools_new_posterize ();
|
||||
posterize_initialize (gdisp);
|
||||
} else {
|
||||
active_tool_free();
|
||||
gtk_widget_hide (options_shell);
|
||||
}
|
||||
break;
|
||||
case THRESHOLD:
|
||||
active_tool = tools_new_threshold ();
|
||||
threshold_initialize (gdisp);
|
||||
if (gdisp) {
|
||||
active_tool = tools_new_threshold ();
|
||||
threshold_initialize (gdisp);
|
||||
} else {
|
||||
active_tool_free();
|
||||
gtk_widget_hide (options_shell);
|
||||
}
|
||||
break;
|
||||
case CURVES:
|
||||
active_tool = tools_new_curves ();
|
||||
curves_initialize (gdisp);
|
||||
if (gdisp) {
|
||||
active_tool = tools_new_curves ();
|
||||
curves_initialize (gdisp);
|
||||
} else {
|
||||
active_tool_free();
|
||||
gtk_widget_hide (options_shell);
|
||||
}
|
||||
break;
|
||||
case LEVELS:
|
||||
active_tool = tools_new_levels ();
|
||||
levels_initialize (gdisp);
|
||||
if (gdisp) {
|
||||
active_tool = tools_new_levels ();
|
||||
levels_initialize (gdisp);
|
||||
} else {
|
||||
active_tool_free();
|
||||
gtk_widget_hide (options_shell);
|
||||
}
|
||||
break;
|
||||
case HISTOGRAM:
|
||||
active_tool = tools_new_histogram_tool ();
|
||||
histogram_tool_initialize (gdisp);
|
||||
if (gdisp) {
|
||||
active_tool = tools_new_histogram_tool ();
|
||||
histogram_tool_initialize (gdisp);
|
||||
} else {
|
||||
active_tool_free();
|
||||
gtk_widget_hide (options_shell);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
|
@ -505,7 +550,8 @@ tools_initialize (ToolType type, GDisplay *gdisp_ptr)
|
|||
|
||||
/* Set the paused count variable to 0
|
||||
*/
|
||||
active_tool->drawable = gimage_active_drawable (gdisp->gimage);
|
||||
if (gdisp)
|
||||
active_tool->drawable = gimage_active_drawable (gdisp->gimage);
|
||||
active_tool->gdisp_ptr = NULL;
|
||||
active_tool->ID = global_tool_ID++;
|
||||
active_tool_type = active_tool->type;
|
||||
|
|
Loading…
Reference in New Issue