Commit 80a0b2dd authored by Sven Neumann's avatar Sven Neumann

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
parent d2446204
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>
* app/blend.c: implemented another way to restrict the angle
......
......@@ -205,23 +205,43 @@ convolve_modifier_key_func (Tool *tool,
{
switch (kevent->keyval)
{
case GDK_Alt_L: case GDK_Alt_R:
case GDK_Alt_L:
case GDK_Alt_R:
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 */
{
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;
case GDK_Control_L: case GDK_Control_R:
switch (convolve_options->type)
case GDK_Control_L:
case GDK_Control_R:
if ( !(kevent->state & GDK_SHIFT_MASK) ) /* shift enables line draw mode */
{
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;
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,21 +288,41 @@ dodgeburn_modifier_key_func (Tool *tool,
{
switch (kevent->keyval)
{
case GDK_Alt_L: case GDK_Alt_R:
case GDK_Alt_L:
case GDK_Alt_R:
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 */
{
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;
case GDK_Control_L: case GDK_Control_R:
switch (dodgeburn_options->type)
case GDK_Control_L:
case GDK_Control_R:
if ( !(kevent->state & GDK_SHIFT_MASK) ) /* shift enables line draw mode */
{
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;
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;
}
......
......@@ -133,12 +133,18 @@ eraser_modifier_key_func (Tool *tool,
{
switch (kevent->keyval)
{
case GDK_Alt_L: case GDK_Alt_R:
case GDK_Alt_L:
case GDK_Alt_R:
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;
case GDK_Control_L: case GDK_Control_R:
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (eraser_options->anti_erase_w), ! eraser_options->anti_erase);
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);
break;
}
}
......
......@@ -205,23 +205,43 @@ convolve_modifier_key_func (Tool *tool,
{
switch (kevent->keyval)
{
case GDK_Alt_L: case GDK_Alt_R:
case GDK_Alt_L:
case GDK_Alt_R:
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 */
{
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;
case GDK_Control_L: case GDK_Control_R:
switch (convolve_options->type)
case GDK_Control_L:
case GDK_Control_R:
if ( !(kevent->state & GDK_SHIFT_MASK) ) /* shift enables line draw mode */
{
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;
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,21 +288,41 @@ dodgeburn_modifier_key_func (Tool *tool,
{
switch (kevent->keyval)
{
case GDK_Alt_L: case GDK_Alt_R:
case GDK_Alt_L:
case GDK_Alt_R:
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 */
{
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;
case GDK_Control_L: case GDK_Control_R:
switch (dodgeburn_options->type)
case GDK_Control_L:
case GDK_Control_R:
if ( !(kevent->state & GDK_SHIFT_MASK) ) /* shift enables line draw mode */
{
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;
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;
}
......
......@@ -133,12 +133,18 @@ eraser_modifier_key_func (Tool *tool,
{
switch (kevent->keyval)
{
case GDK_Alt_L: case GDK_Alt_R:
case GDK_Alt_L:
case GDK_Alt_R:
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;
case GDK_Control_L: case GDK_Control_R:
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (eraser_options->anti_erase_w), ! eraser_options->anti_erase);
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);
break;
}
}
......
......@@ -205,23 +205,43 @@ convolve_modifier_key_func (Tool *tool,
{
switch (kevent->keyval)
{
case GDK_Alt_L: case GDK_Alt_R:
case GDK_Alt_L:
case GDK_Alt_R:
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 */
{
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;
case GDK_Control_L: case GDK_Control_R:
switch (convolve_options->type)
case GDK_Control_L:
case GDK_Control_R:
if ( !(kevent->state & GDK_SHIFT_MASK) ) /* shift enables line draw mode */
{
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;
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,21 +288,41 @@ dodgeburn_modifier_key_func (Tool *tool,
{
switch (kevent->keyval)
{
case GDK_Alt_L: case GDK_Alt_R:
case GDK_Alt_L:
case GDK_Alt_R:
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 */
{
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;
case GDK_Control_L: case GDK_Control_R:
switch (dodgeburn_options->type)
case GDK_Control_L:
case GDK_Control_R:
if ( !(kevent->state & GDK_SHIFT_MASK) ) /* shift enables line draw mode */
{
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;
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;
}
......
......@@ -133,12 +133,18 @@ eraser_modifier_key_func (Tool *tool,
{
switch (kevent->keyval)
{
case GDK_Alt_L: case GDK_Alt_R:
case GDK_Alt_L:
case GDK_Alt_R:
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;
case GDK_Control_L: case GDK_Control_R:
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (eraser_options->anti_erase_w), ! eraser_options->anti_erase);
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);
break;
}
}
......
......@@ -205,23 +205,43 @@ convolve_modifier_key_func (Tool *tool,
{
switch (kevent->keyval)
{
case GDK_Alt_L: case GDK_Alt_R:
case GDK_Alt_L:
case GDK_Alt_R:
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 */
{
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;
case GDK_Control_L: case GDK_Control_R:
switch (convolve_options->type)
case GDK_Control_L:
case GDK_Control_R:
if ( !(kevent->state & GDK_SHIFT_MASK) ) /* shift enables line draw mode */
{
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;
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,21 +288,41 @@ dodgeburn_modifier_key_func (Tool *tool,
{
switch (kevent->keyval)
{
case GDK_Alt_L: case GDK_Alt_R:
case GDK_Alt_L:
case GDK_Alt_R:
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 */
{
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;
case GDK_Control_L: case GDK_Control_R:
switch (dodgeburn_options->type)
case GDK_Control_L:
case GDK_Control_R:
if ( !(kevent->state & GDK_SHIFT_MASK) ) /* shift enables line draw mode */
{
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;
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;
}
......
......@@ -133,12 +133,18 @@ eraser_modifier_key_func (Tool *tool,
{
switch (kevent->keyval)
{
case GDK_Alt_L: case GDK_Alt_R:
case GDK_Alt_L:
case GDK_Alt_R:
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;
case GDK_Control_L: case GDK_Control_R:
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (eraser_options->anti_erase_w), ! eraser_options->anti_erase);
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);
break;
}
}
......
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