convolve.c dodgeburn.c pressing Shift now disables (and resets) the tool
* convolve.c * dodgeburn.c * eraser.c: pressing Shift now disables (and resets) the tool toggle and switches to line mode so the Ctrl key is free for constraints. --Sven
This commit is contained in:
@ -1,3 +1,10 @@
|
|||||||
|
Sat Nov 20 01:27:12 MET 1999 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
|
* convolve.c
|
||||||
|
* dodgeburn.c
|
||||||
|
* eraser.c: pressing Shift now disables (and resets) the tool toggle
|
||||||
|
and switches to line mode so the Ctrl key is free for constraints.
|
||||||
|
|
||||||
Thu Nov 18 18:52:38 MET 1999 Sven Neumann <sven@gimp.org>
|
Thu Nov 18 18:52:38 MET 1999 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
* app/blend.c: implemented another way to restrict the angle
|
* app/blend.c: implemented another way to restrict the angle
|
||||||
|
@ -205,11 +205,13 @@ convolve_modifier_key_func (Tool *tool,
|
|||||||
{
|
{
|
||||||
switch (kevent->keyval)
|
switch (kevent->keyval)
|
||||||
{
|
{
|
||||||
case GDK_Alt_L: case GDK_Alt_R:
|
case GDK_Alt_L:
|
||||||
|
case GDK_Alt_R:
|
||||||
break;
|
break;
|
||||||
case GDK_Shift_L: case GDK_Shift_R:
|
case GDK_Shift_L:
|
||||||
break;
|
case GDK_Shift_R:
|
||||||
case GDK_Control_L: case GDK_Control_R:
|
if (kevent->state & GDK_CONTROL_MASK) /* reset tool toggle */
|
||||||
|
{
|
||||||
switch (convolve_options->type)
|
switch (convolve_options->type)
|
||||||
{
|
{
|
||||||
case BLUR_CONVOLVE:
|
case BLUR_CONVOLVE:
|
||||||
@ -221,6 +223,24 @@ convolve_modifier_key_func (Tool *tool,
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case GDK_Control_L:
|
||||||
|
case GDK_Control_R:
|
||||||
|
if ( !(kevent->state & GDK_SHIFT_MASK) ) /* shift enables line draw mode */
|
||||||
|
{
|
||||||
|
switch (convolve_options->type)
|
||||||
|
{
|
||||||
|
case BLUR_CONVOLVE:
|
||||||
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (convolve_options->type_w[SHARPEN_CONVOLVE]), TRUE);
|
||||||
|
break;
|
||||||
|
case SHARPEN_CONVOLVE:
|
||||||
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (convolve_options->type_w[BLUR_CONVOLVE]), TRUE);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -288,11 +288,13 @@ dodgeburn_modifier_key_func (Tool *tool,
|
|||||||
{
|
{
|
||||||
switch (kevent->keyval)
|
switch (kevent->keyval)
|
||||||
{
|
{
|
||||||
case GDK_Alt_L: case GDK_Alt_R:
|
case GDK_Alt_L:
|
||||||
|
case GDK_Alt_R:
|
||||||
break;
|
break;
|
||||||
case GDK_Shift_L: case GDK_Shift_R:
|
case GDK_Shift_L:
|
||||||
break;
|
case GDK_Shift_R:
|
||||||
case GDK_Control_L: case GDK_Control_R:
|
if (kevent->state & GDK_CONTROL_MASK) /* reset tool toggle */
|
||||||
|
{
|
||||||
switch (dodgeburn_options->type)
|
switch (dodgeburn_options->type)
|
||||||
{
|
{
|
||||||
case BURN:
|
case BURN:
|
||||||
@ -304,6 +306,24 @@ dodgeburn_modifier_key_func (Tool *tool,
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case GDK_Control_L:
|
||||||
|
case GDK_Control_R:
|
||||||
|
if ( !(kevent->state & GDK_SHIFT_MASK) ) /* shift enables line draw mode */
|
||||||
|
{
|
||||||
|
switch (dodgeburn_options->type)
|
||||||
|
{
|
||||||
|
case BURN:
|
||||||
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dodgeburn_options->type_w[DODGE]), TRUE);
|
||||||
|
break;
|
||||||
|
case DODGE:
|
||||||
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dodgeburn_options->type_w[BURN]), TRUE);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
12
app/eraser.c
12
app/eraser.c
@ -133,11 +133,17 @@ eraser_modifier_key_func (Tool *tool,
|
|||||||
{
|
{
|
||||||
switch (kevent->keyval)
|
switch (kevent->keyval)
|
||||||
{
|
{
|
||||||
case GDK_Alt_L: case GDK_Alt_R:
|
case GDK_Alt_L:
|
||||||
|
case GDK_Alt_R:
|
||||||
break;
|
break;
|
||||||
case GDK_Shift_L: case GDK_Shift_R:
|
case GDK_Shift_L:
|
||||||
|
case GDK_Shift_R:
|
||||||
|
if (kevent->state & GDK_CONTROL_MASK) /* reset tool toggle */
|
||||||
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (eraser_options->anti_erase_w), ! eraser_options->anti_erase);
|
||||||
break;
|
break;
|
||||||
case GDK_Control_L: case GDK_Control_R:
|
case GDK_Control_L:
|
||||||
|
case GDK_Control_R:
|
||||||
|
if ( !(kevent->state & GDK_SHIFT_MASK) ) /* shift enables line draw mode */
|
||||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (eraser_options->anti_erase_w), ! eraser_options->anti_erase);
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (eraser_options->anti_erase_w), ! eraser_options->anti_erase);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -205,11 +205,13 @@ convolve_modifier_key_func (Tool *tool,
|
|||||||
{
|
{
|
||||||
switch (kevent->keyval)
|
switch (kevent->keyval)
|
||||||
{
|
{
|
||||||
case GDK_Alt_L: case GDK_Alt_R:
|
case GDK_Alt_L:
|
||||||
|
case GDK_Alt_R:
|
||||||
break;
|
break;
|
||||||
case GDK_Shift_L: case GDK_Shift_R:
|
case GDK_Shift_L:
|
||||||
break;
|
case GDK_Shift_R:
|
||||||
case GDK_Control_L: case GDK_Control_R:
|
if (kevent->state & GDK_CONTROL_MASK) /* reset tool toggle */
|
||||||
|
{
|
||||||
switch (convolve_options->type)
|
switch (convolve_options->type)
|
||||||
{
|
{
|
||||||
case BLUR_CONVOLVE:
|
case BLUR_CONVOLVE:
|
||||||
@ -221,6 +223,24 @@ convolve_modifier_key_func (Tool *tool,
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case GDK_Control_L:
|
||||||
|
case GDK_Control_R:
|
||||||
|
if ( !(kevent->state & GDK_SHIFT_MASK) ) /* shift enables line draw mode */
|
||||||
|
{
|
||||||
|
switch (convolve_options->type)
|
||||||
|
{
|
||||||
|
case BLUR_CONVOLVE:
|
||||||
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (convolve_options->type_w[SHARPEN_CONVOLVE]), TRUE);
|
||||||
|
break;
|
||||||
|
case SHARPEN_CONVOLVE:
|
||||||
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (convolve_options->type_w[BLUR_CONVOLVE]), TRUE);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -288,11 +288,13 @@ dodgeburn_modifier_key_func (Tool *tool,
|
|||||||
{
|
{
|
||||||
switch (kevent->keyval)
|
switch (kevent->keyval)
|
||||||
{
|
{
|
||||||
case GDK_Alt_L: case GDK_Alt_R:
|
case GDK_Alt_L:
|
||||||
|
case GDK_Alt_R:
|
||||||
break;
|
break;
|
||||||
case GDK_Shift_L: case GDK_Shift_R:
|
case GDK_Shift_L:
|
||||||
break;
|
case GDK_Shift_R:
|
||||||
case GDK_Control_L: case GDK_Control_R:
|
if (kevent->state & GDK_CONTROL_MASK) /* reset tool toggle */
|
||||||
|
{
|
||||||
switch (dodgeburn_options->type)
|
switch (dodgeburn_options->type)
|
||||||
{
|
{
|
||||||
case BURN:
|
case BURN:
|
||||||
@ -304,6 +306,24 @@ dodgeburn_modifier_key_func (Tool *tool,
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case GDK_Control_L:
|
||||||
|
case GDK_Control_R:
|
||||||
|
if ( !(kevent->state & GDK_SHIFT_MASK) ) /* shift enables line draw mode */
|
||||||
|
{
|
||||||
|
switch (dodgeburn_options->type)
|
||||||
|
{
|
||||||
|
case BURN:
|
||||||
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dodgeburn_options->type_w[DODGE]), TRUE);
|
||||||
|
break;
|
||||||
|
case DODGE:
|
||||||
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dodgeburn_options->type_w[BURN]), TRUE);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -133,11 +133,17 @@ eraser_modifier_key_func (Tool *tool,
|
|||||||
{
|
{
|
||||||
switch (kevent->keyval)
|
switch (kevent->keyval)
|
||||||
{
|
{
|
||||||
case GDK_Alt_L: case GDK_Alt_R:
|
case GDK_Alt_L:
|
||||||
|
case GDK_Alt_R:
|
||||||
break;
|
break;
|
||||||
case GDK_Shift_L: case GDK_Shift_R:
|
case GDK_Shift_L:
|
||||||
|
case GDK_Shift_R:
|
||||||
|
if (kevent->state & GDK_CONTROL_MASK) /* reset tool toggle */
|
||||||
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (eraser_options->anti_erase_w), ! eraser_options->anti_erase);
|
||||||
break;
|
break;
|
||||||
case GDK_Control_L: case GDK_Control_R:
|
case GDK_Control_L:
|
||||||
|
case GDK_Control_R:
|
||||||
|
if ( !(kevent->state & GDK_SHIFT_MASK) ) /* shift enables line draw mode */
|
||||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (eraser_options->anti_erase_w), ! eraser_options->anti_erase);
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (eraser_options->anti_erase_w), ! eraser_options->anti_erase);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -205,11 +205,13 @@ convolve_modifier_key_func (Tool *tool,
|
|||||||
{
|
{
|
||||||
switch (kevent->keyval)
|
switch (kevent->keyval)
|
||||||
{
|
{
|
||||||
case GDK_Alt_L: case GDK_Alt_R:
|
case GDK_Alt_L:
|
||||||
|
case GDK_Alt_R:
|
||||||
break;
|
break;
|
||||||
case GDK_Shift_L: case GDK_Shift_R:
|
case GDK_Shift_L:
|
||||||
break;
|
case GDK_Shift_R:
|
||||||
case GDK_Control_L: case GDK_Control_R:
|
if (kevent->state & GDK_CONTROL_MASK) /* reset tool toggle */
|
||||||
|
{
|
||||||
switch (convolve_options->type)
|
switch (convolve_options->type)
|
||||||
{
|
{
|
||||||
case BLUR_CONVOLVE:
|
case BLUR_CONVOLVE:
|
||||||
@ -221,6 +223,24 @@ convolve_modifier_key_func (Tool *tool,
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case GDK_Control_L:
|
||||||
|
case GDK_Control_R:
|
||||||
|
if ( !(kevent->state & GDK_SHIFT_MASK) ) /* shift enables line draw mode */
|
||||||
|
{
|
||||||
|
switch (convolve_options->type)
|
||||||
|
{
|
||||||
|
case BLUR_CONVOLVE:
|
||||||
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (convolve_options->type_w[SHARPEN_CONVOLVE]), TRUE);
|
||||||
|
break;
|
||||||
|
case SHARPEN_CONVOLVE:
|
||||||
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (convolve_options->type_w[BLUR_CONVOLVE]), TRUE);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -288,11 +288,13 @@ dodgeburn_modifier_key_func (Tool *tool,
|
|||||||
{
|
{
|
||||||
switch (kevent->keyval)
|
switch (kevent->keyval)
|
||||||
{
|
{
|
||||||
case GDK_Alt_L: case GDK_Alt_R:
|
case GDK_Alt_L:
|
||||||
|
case GDK_Alt_R:
|
||||||
break;
|
break;
|
||||||
case GDK_Shift_L: case GDK_Shift_R:
|
case GDK_Shift_L:
|
||||||
break;
|
case GDK_Shift_R:
|
||||||
case GDK_Control_L: case GDK_Control_R:
|
if (kevent->state & GDK_CONTROL_MASK) /* reset tool toggle */
|
||||||
|
{
|
||||||
switch (dodgeburn_options->type)
|
switch (dodgeburn_options->type)
|
||||||
{
|
{
|
||||||
case BURN:
|
case BURN:
|
||||||
@ -304,6 +306,24 @@ dodgeburn_modifier_key_func (Tool *tool,
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case GDK_Control_L:
|
||||||
|
case GDK_Control_R:
|
||||||
|
if ( !(kevent->state & GDK_SHIFT_MASK) ) /* shift enables line draw mode */
|
||||||
|
{
|
||||||
|
switch (dodgeburn_options->type)
|
||||||
|
{
|
||||||
|
case BURN:
|
||||||
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dodgeburn_options->type_w[DODGE]), TRUE);
|
||||||
|
break;
|
||||||
|
case DODGE:
|
||||||
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dodgeburn_options->type_w[BURN]), TRUE);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -133,11 +133,17 @@ eraser_modifier_key_func (Tool *tool,
|
|||||||
{
|
{
|
||||||
switch (kevent->keyval)
|
switch (kevent->keyval)
|
||||||
{
|
{
|
||||||
case GDK_Alt_L: case GDK_Alt_R:
|
case GDK_Alt_L:
|
||||||
|
case GDK_Alt_R:
|
||||||
break;
|
break;
|
||||||
case GDK_Shift_L: case GDK_Shift_R:
|
case GDK_Shift_L:
|
||||||
|
case GDK_Shift_R:
|
||||||
|
if (kevent->state & GDK_CONTROL_MASK) /* reset tool toggle */
|
||||||
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (eraser_options->anti_erase_w), ! eraser_options->anti_erase);
|
||||||
break;
|
break;
|
||||||
case GDK_Control_L: case GDK_Control_R:
|
case GDK_Control_L:
|
||||||
|
case GDK_Control_R:
|
||||||
|
if ( !(kevent->state & GDK_SHIFT_MASK) ) /* shift enables line draw mode */
|
||||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (eraser_options->anti_erase_w), ! eraser_options->anti_erase);
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (eraser_options->anti_erase_w), ! eraser_options->anti_erase);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -205,11 +205,13 @@ convolve_modifier_key_func (Tool *tool,
|
|||||||
{
|
{
|
||||||
switch (kevent->keyval)
|
switch (kevent->keyval)
|
||||||
{
|
{
|
||||||
case GDK_Alt_L: case GDK_Alt_R:
|
case GDK_Alt_L:
|
||||||
|
case GDK_Alt_R:
|
||||||
break;
|
break;
|
||||||
case GDK_Shift_L: case GDK_Shift_R:
|
case GDK_Shift_L:
|
||||||
break;
|
case GDK_Shift_R:
|
||||||
case GDK_Control_L: case GDK_Control_R:
|
if (kevent->state & GDK_CONTROL_MASK) /* reset tool toggle */
|
||||||
|
{
|
||||||
switch (convolve_options->type)
|
switch (convolve_options->type)
|
||||||
{
|
{
|
||||||
case BLUR_CONVOLVE:
|
case BLUR_CONVOLVE:
|
||||||
@ -221,6 +223,24 @@ convolve_modifier_key_func (Tool *tool,
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case GDK_Control_L:
|
||||||
|
case GDK_Control_R:
|
||||||
|
if ( !(kevent->state & GDK_SHIFT_MASK) ) /* shift enables line draw mode */
|
||||||
|
{
|
||||||
|
switch (convolve_options->type)
|
||||||
|
{
|
||||||
|
case BLUR_CONVOLVE:
|
||||||
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (convolve_options->type_w[SHARPEN_CONVOLVE]), TRUE);
|
||||||
|
break;
|
||||||
|
case SHARPEN_CONVOLVE:
|
||||||
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (convolve_options->type_w[BLUR_CONVOLVE]), TRUE);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -288,11 +288,13 @@ dodgeburn_modifier_key_func (Tool *tool,
|
|||||||
{
|
{
|
||||||
switch (kevent->keyval)
|
switch (kevent->keyval)
|
||||||
{
|
{
|
||||||
case GDK_Alt_L: case GDK_Alt_R:
|
case GDK_Alt_L:
|
||||||
|
case GDK_Alt_R:
|
||||||
break;
|
break;
|
||||||
case GDK_Shift_L: case GDK_Shift_R:
|
case GDK_Shift_L:
|
||||||
break;
|
case GDK_Shift_R:
|
||||||
case GDK_Control_L: case GDK_Control_R:
|
if (kevent->state & GDK_CONTROL_MASK) /* reset tool toggle */
|
||||||
|
{
|
||||||
switch (dodgeburn_options->type)
|
switch (dodgeburn_options->type)
|
||||||
{
|
{
|
||||||
case BURN:
|
case BURN:
|
||||||
@ -304,6 +306,24 @@ dodgeburn_modifier_key_func (Tool *tool,
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case GDK_Control_L:
|
||||||
|
case GDK_Control_R:
|
||||||
|
if ( !(kevent->state & GDK_SHIFT_MASK) ) /* shift enables line draw mode */
|
||||||
|
{
|
||||||
|
switch (dodgeburn_options->type)
|
||||||
|
{
|
||||||
|
case BURN:
|
||||||
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dodgeburn_options->type_w[DODGE]), TRUE);
|
||||||
|
break;
|
||||||
|
case DODGE:
|
||||||
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dodgeburn_options->type_w[BURN]), TRUE);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -133,11 +133,17 @@ eraser_modifier_key_func (Tool *tool,
|
|||||||
{
|
{
|
||||||
switch (kevent->keyval)
|
switch (kevent->keyval)
|
||||||
{
|
{
|
||||||
case GDK_Alt_L: case GDK_Alt_R:
|
case GDK_Alt_L:
|
||||||
|
case GDK_Alt_R:
|
||||||
break;
|
break;
|
||||||
case GDK_Shift_L: case GDK_Shift_R:
|
case GDK_Shift_L:
|
||||||
|
case GDK_Shift_R:
|
||||||
|
if (kevent->state & GDK_CONTROL_MASK) /* reset tool toggle */
|
||||||
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (eraser_options->anti_erase_w), ! eraser_options->anti_erase);
|
||||||
break;
|
break;
|
||||||
case GDK_Control_L: case GDK_Control_R:
|
case GDK_Control_L:
|
||||||
|
case GDK_Control_R:
|
||||||
|
if ( !(kevent->state & GDK_SHIFT_MASK) ) /* shift enables line draw mode */
|
||||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (eraser_options->anti_erase_w), ! eraser_options->anti_erase);
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (eraser_options->anti_erase_w), ! eraser_options->anti_erase);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user