Commit 4d50fdb9 authored by Adam D. Moss's avatar Adam D. Moss

app/gimprc.c app/gimprc.h app/ink.c app/paint_core.c Now the


	* app/gimprc.c
	* app/gimprc.h
	* app/ink.c
	* app/paint_core.c
	* app/preferences_dialog.c: Now the perfect-mouse-tracking
	normally enabled by pressing MOD1 is a preferences option,
	and MOD1 inverts the affect.

	* app/ink.c: Mildly tweaked the default brush size/range for
	my own twisted sense of esthetics.  Forgive me.
parent 707a0c00
Sat Jul 18 18:23:28 BST 1998 Adam D. Moss <adam@gimp.org>
* app/gimprc.c
* app/gimprc.h
* app/ink.c
* app/paint_core.c
* app/preferences_dialog.c: Now the perfect-mouse-tracking
normally enabled by pressing MOD1 is a preferences option,
and MOD1 inverts the affect.
* app/ink.c: Mildly tweaked the default brush size/range for
my own twisted sense of esthetics. Forgive me.
Sat Jul 18 19:28:53 MEST 1998 Sven Neumann <sven@gimp.org>
* plug-ins/script-fu/script-fu-scripts.c: cosmetic change
......
......@@ -72,6 +72,7 @@ static void file_prefs_clear_session_info_callback (GtkWidget *, gpointer);
static int last_type = RGB;
static GtkWidget *prefs_dlg = NULL;
static int old_perfectmouse;
static int old_transparency_type;
static int old_transparency_size;
static int old_levels_of_undo;
......@@ -316,6 +317,8 @@ file_prefs_save_callback (GtkWidget *widget,
update = g_list_append (update, "default-image-type");
if (preview_size != old_preview_size)
update = g_list_append (update, "preview-size");
if (perfectmouse != old_perfectmouse)
update = g_list_append (update, "perfect-mouse");
if (transparency_type != old_transparency_type)
update = g_list_append (update, "transparency-type");
if (transparency_size != old_transparency_size)
......@@ -438,6 +441,7 @@ file_prefs_cancel_callback (GtkWidget *widget,
allow_resize_windows = old_allow_resize_windows;
auto_save = old_auto_save;
no_cursor_updating = old_no_cursor_updating;
perfectmouse = old_perfectmouse;
show_tool_tips = old_show_tool_tips;
cubic_interpolation = old_cubic_interpolation;
confirm_on_close = old_confirm_on_close;
......@@ -445,6 +449,7 @@ file_prefs_cancel_callback (GtkWidget *widget,
default_width = old_default_width;
default_height = old_default_height;
default_type = old_default_type;
if (preview_size != old_preview_size)
{
lc_dialog_rebuild (old_preview_size);
......@@ -490,6 +495,8 @@ file_prefs_toggle_callback (GtkWidget *widget,
auto_save = GTK_TOGGLE_BUTTON (widget)->active;
else if (data == &no_cursor_updating)
no_cursor_updating = GTK_TOGGLE_BUTTON (widget)->active;
else if (data == &perfectmouse)
perfectmouse = GTK_TOGGLE_BUTTON (widget)->active;
else if (data == &show_tool_tips)
show_tool_tips = GTK_TOGGLE_BUTTON (widget)->active;
else if (data == &cubic_interpolation)
......@@ -696,6 +703,7 @@ file_pref_cmd_callback (GtkWidget *widget,
edit_cycled_marching_ants = cycled_marching_ants;
edit_last_opened_size = last_opened_size;
}
old_perfectmouse = perfectmouse;
old_transparency_type = transparency_type;
old_transparency_size = transparency_size;
old_levels_of_undo = levels_of_undo;
......@@ -973,26 +981,6 @@ file_pref_cmd_callback (GtkWidget *widget,
gtk_container_add (GTK_CONTAINER (out_frame), vbox);
gtk_widget_show (vbox);
hbox = gtk_hbox_new (FALSE, 2);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);
label = gtk_label_new ("Levels of undo:");
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
gtk_widget_show (label);
adj = (GtkAdjustment *) gtk_adjustment_new (levels_of_undo, 0.0,
255.0, 1.0, 5.0, 0.0);
spinbutton = gtk_spin_button_new (adj, 1.0, 0.0);
gtk_spin_button_set_shadow_type (GTK_SPIN_BUTTON(spinbutton), GTK_SHADOW_NONE);
gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(spinbutton), TRUE);
gtk_widget_set_usize (spinbutton, 75, 0);
gtk_box_pack_start (GTK_BOX (hbox), spinbutton, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (spinbutton), "changed",
(GtkSignalFunc) file_prefs_spinbutton_callback,
&levels_of_undo);
gtk_widget_show (spinbutton);
button = gtk_check_button_new_with_label("Resize window on zoom");
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (button),
allow_resize_windows);
......@@ -1002,6 +990,15 @@ file_pref_cmd_callback (GtkWidget *widget,
&allow_resize_windows);
gtk_widget_show (button);
button = gtk_check_button_new_with_label("Perfect-but-slow pointer tracking");
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (button),
perfectmouse);
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
(GtkSignalFunc) file_prefs_toggle_callback,
&perfectmouse);
gtk_widget_show (button);
/* Don't show the Auto-save button until we really
have auto-saving in the gimp.
......@@ -1037,6 +1034,26 @@ file_pref_cmd_callback (GtkWidget *widget,
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);
label = gtk_label_new ("Levels of undo:");
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
gtk_widget_show (label);
adj = (GtkAdjustment *) gtk_adjustment_new (levels_of_undo, 0.0,
255.0, 1.0, 5.0, 0.0);
spinbutton = gtk_spin_button_new (adj, 1.0, 0.0);
gtk_spin_button_set_shadow_type (GTK_SPIN_BUTTON(spinbutton), GTK_SHADOW_NONE);
gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(spinbutton), TRUE);
gtk_widget_set_usize (spinbutton, 75, 0);
gtk_box_pack_start (GTK_BOX (hbox), spinbutton, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (spinbutton), "changed",
(GtkSignalFunc) file_prefs_spinbutton_callback,
&levels_of_undo);
gtk_widget_show (spinbutton);
hbox = gtk_hbox_new (FALSE, 2);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);
label = gtk_label_new ("Marching ants speed:");
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
gtk_widget_show (label);
......
......@@ -94,8 +94,9 @@ int tile_cache_size = 4194304; /* 4 MB */
int marching_speed = 150; /* 150 ms */
double gamma_val = 1.0;
int transparency_type = 1; /* Mid-Tone Checks */
int perfectmouse = 0; /* off (fast and sloppy) */
int transparency_size = 1; /* Medium sized */
int levels_of_undo = 1; /* 1 level of undo default */
int levels_of_undo = 2; /* 2 levels of undo default */
int last_opened_size = 4; /* 4 documents in the MRU list */
int color_cube_shades[4] = {6, 7, 4, 24};
int install_cmap = 0;
......@@ -198,6 +199,7 @@ static ParseFunc funcs[] =
{ "last-opened-size", TT_INT, &last_opened_size, NULL },
{ "undo-levels", TT_INT, &levels_of_undo, NULL },
{ "transparency-type", TT_INT, &transparency_type, NULL },
{ "perfect-mouse", TT_BOOLEAN, &perfectmouse, NULL },
{ "transparency-size", TT_INT, &transparency_size, NULL },
{ "install-colormap", TT_BOOLEAN, &install_cmap, NULL },
{ "colormap-cycling", TT_BOOLEAN, &cycled_marching_ants, NULL },
......
......@@ -39,6 +39,7 @@ extern int marching_speed;
extern int last_opened_size;
extern double gamma_val;
extern int transparency_type;
extern int perfectmouse;
extern int transparency_size;
extern int levels_of_undo;
extern int color_cube_shades[];
......
......@@ -72,6 +72,7 @@ static void file_prefs_clear_session_info_callback (GtkWidget *, gpointer);
static int last_type = RGB;
static GtkWidget *prefs_dlg = NULL;
static int old_perfectmouse;
static int old_transparency_type;
static int old_transparency_size;
static int old_levels_of_undo;
......@@ -316,6 +317,8 @@ file_prefs_save_callback (GtkWidget *widget,
update = g_list_append (update, "default-image-type");
if (preview_size != old_preview_size)
update = g_list_append (update, "preview-size");
if (perfectmouse != old_perfectmouse)
update = g_list_append (update, "perfect-mouse");
if (transparency_type != old_transparency_type)
update = g_list_append (update, "transparency-type");
if (transparency_size != old_transparency_size)
......@@ -438,6 +441,7 @@ file_prefs_cancel_callback (GtkWidget *widget,
allow_resize_windows = old_allow_resize_windows;
auto_save = old_auto_save;
no_cursor_updating = old_no_cursor_updating;
perfectmouse = old_perfectmouse;
show_tool_tips = old_show_tool_tips;
cubic_interpolation = old_cubic_interpolation;
confirm_on_close = old_confirm_on_close;
......@@ -445,6 +449,7 @@ file_prefs_cancel_callback (GtkWidget *widget,
default_width = old_default_width;
default_height = old_default_height;
default_type = old_default_type;
if (preview_size != old_preview_size)
{
lc_dialog_rebuild (old_preview_size);
......@@ -490,6 +495,8 @@ file_prefs_toggle_callback (GtkWidget *widget,
auto_save = GTK_TOGGLE_BUTTON (widget)->active;
else if (data == &no_cursor_updating)
no_cursor_updating = GTK_TOGGLE_BUTTON (widget)->active;
else if (data == &perfectmouse)
perfectmouse = GTK_TOGGLE_BUTTON (widget)->active;
else if (data == &show_tool_tips)
show_tool_tips = GTK_TOGGLE_BUTTON (widget)->active;
else if (data == &cubic_interpolation)
......@@ -696,6 +703,7 @@ file_pref_cmd_callback (GtkWidget *widget,
edit_cycled_marching_ants = cycled_marching_ants;
edit_last_opened_size = last_opened_size;
}
old_perfectmouse = perfectmouse;
old_transparency_type = transparency_type;
old_transparency_size = transparency_size;
old_levels_of_undo = levels_of_undo;
......@@ -973,26 +981,6 @@ file_pref_cmd_callback (GtkWidget *widget,
gtk_container_add (GTK_CONTAINER (out_frame), vbox);
gtk_widget_show (vbox);
hbox = gtk_hbox_new (FALSE, 2);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);
label = gtk_label_new ("Levels of undo:");
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
gtk_widget_show (label);
adj = (GtkAdjustment *) gtk_adjustment_new (levels_of_undo, 0.0,
255.0, 1.0, 5.0, 0.0);
spinbutton = gtk_spin_button_new (adj, 1.0, 0.0);
gtk_spin_button_set_shadow_type (GTK_SPIN_BUTTON(spinbutton), GTK_SHADOW_NONE);
gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(spinbutton), TRUE);
gtk_widget_set_usize (spinbutton, 75, 0);
gtk_box_pack_start (GTK_BOX (hbox), spinbutton, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (spinbutton), "changed",
(GtkSignalFunc) file_prefs_spinbutton_callback,
&levels_of_undo);
gtk_widget_show (spinbutton);
button = gtk_check_button_new_with_label("Resize window on zoom");
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (button),
allow_resize_windows);
......@@ -1002,6 +990,15 @@ file_pref_cmd_callback (GtkWidget *widget,
&allow_resize_windows);
gtk_widget_show (button);
button = gtk_check_button_new_with_label("Perfect-but-slow pointer tracking");
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (button),
perfectmouse);
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
(GtkSignalFunc) file_prefs_toggle_callback,
&perfectmouse);
gtk_widget_show (button);
/* Don't show the Auto-save button until we really
have auto-saving in the gimp.
......@@ -1037,6 +1034,26 @@ file_pref_cmd_callback (GtkWidget *widget,
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);
label = gtk_label_new ("Levels of undo:");
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
gtk_widget_show (label);
adj = (GtkAdjustment *) gtk_adjustment_new (levels_of_undo, 0.0,
255.0, 1.0, 5.0, 0.0);
spinbutton = gtk_spin_button_new (adj, 1.0, 0.0);
gtk_spin_button_set_shadow_type (GTK_SPIN_BUTTON(spinbutton), GTK_SHADOW_NONE);
gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(spinbutton), TRUE);
gtk_widget_set_usize (spinbutton, 75, 0);
gtk_box_pack_start (GTK_BOX (hbox), spinbutton, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (spinbutton), "changed",
(GtkSignalFunc) file_prefs_spinbutton_callback,
&levels_of_undo);
gtk_widget_show (spinbutton);
hbox = gtk_hbox_new (FALSE, 2);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);
label = gtk_label_new ("Marching ants speed:");
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
gtk_widget_show (label);
......
......@@ -20,6 +20,7 @@
#include "draw_core.h"
#include "gimage_mask.h"
#include "gimpbrushlist.h"
#include "gimprc.h"
#include "ink.h"
#include "tools.h"
#include "undo.h"
......@@ -151,10 +152,10 @@ create_ink_options ()
/* the new options structure */
options = (InkOptions *) g_malloc (sizeof (InkOptions));
options->size = 8.;
options->sensitivity = 1.;
options->aspect = 1.;
options->angle = 0.;
options->size = 3.0;
options->sensitivity = 1.0;
options->aspect = 1.0;
options->angle = 0.0;
/* the main vbox */
vbox = gtk_vbox_new (FALSE, 1);
......@@ -165,7 +166,7 @@ create_ink_options ()
label = gtk_label_new ("Size:");
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 2);
adj = GTK_ADJUSTMENT (gtk_adjustment_new (4.0, 0.0, 25.0, 1.0, 10.0, 0.0));
adj = GTK_ADJUSTMENT (gtk_adjustment_new (3.0, 0.0, 20.0, 1.0, 5.0, 0.0));
slider = gtk_hscale_new (adj);
gtk_box_pack_start (GTK_BOX (hbox), slider, TRUE, TRUE, 0);
gtk_scale_set_value_pos (GTK_SCALE (slider), GTK_POS_TOP);
......@@ -447,14 +448,15 @@ ink_button_press (Tool *tool,
/* pause the current selection and grab the pointer */
gdisplays_selection_visibility (gdisp->gimage, SelectionPause);
/* add motion memory if you press mod1 first */
if (bevent->state & GDK_MOD1_MASK)
/* add motion memory if you press mod1 first ^ perfectmouse */
if (((bevent->state & GDK_MOD1_MASK) != 0) != (perfectmouse != 0))
gdk_pointer_grab (gdisp->canvas->window, FALSE,
GDK_BUTTON1_MOTION_MASK | GDK_BUTTON_RELEASE_MASK,
NULL, NULL, bevent->time);
else
gdk_pointer_grab (gdisp->canvas->window, FALSE,
GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON1_MOTION_MASK | GDK_BUTTON_RELEASE_MASK,
GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON1_MOTION_MASK |
GDK_BUTTON_RELEASE_MASK,
NULL, NULL, bevent->time);
tool->gdisp_ptr = gdisp_ptr;
......
......@@ -20,6 +20,7 @@
#include "draw_core.h"
#include "gimage_mask.h"
#include "gimpbrushlist.h"
#include "gimprc.h"
#include "ink.h"
#include "tools.h"
#include "undo.h"
......@@ -151,10 +152,10 @@ create_ink_options ()
/* the new options structure */
options = (InkOptions *) g_malloc (sizeof (InkOptions));
options->size = 8.;
options->sensitivity = 1.;
options->aspect = 1.;
options->angle = 0.;
options->size = 3.0;
options->sensitivity = 1.0;
options->aspect = 1.0;
options->angle = 0.0;
/* the main vbox */
vbox = gtk_vbox_new (FALSE, 1);
......@@ -165,7 +166,7 @@ create_ink_options ()
label = gtk_label_new ("Size:");
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 2);
adj = GTK_ADJUSTMENT (gtk_adjustment_new (4.0, 0.0, 25.0, 1.0, 10.0, 0.0));
adj = GTK_ADJUSTMENT (gtk_adjustment_new (3.0, 0.0, 20.0, 1.0, 5.0, 0.0));
slider = gtk_hscale_new (adj);
gtk_box_pack_start (GTK_BOX (hbox), slider, TRUE, TRUE, 0);
gtk_scale_set_value_pos (GTK_SCALE (slider), GTK_POS_TOP);
......@@ -447,14 +448,15 @@ ink_button_press (Tool *tool,
/* pause the current selection and grab the pointer */
gdisplays_selection_visibility (gdisp->gimage, SelectionPause);
/* add motion memory if you press mod1 first */
if (bevent->state & GDK_MOD1_MASK)
/* add motion memory if you press mod1 first ^ perfectmouse */
if (((bevent->state & GDK_MOD1_MASK) != 0) != (perfectmouse != 0))
gdk_pointer_grab (gdisp->canvas->window, FALSE,
GDK_BUTTON1_MOTION_MASK | GDK_BUTTON_RELEASE_MASK,
NULL, NULL, bevent->time);
else
gdk_pointer_grab (gdisp->canvas->window, FALSE,
GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON1_MOTION_MASK | GDK_BUTTON_RELEASE_MASK,
GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON1_MOTION_MASK |
GDK_BUTTON_RELEASE_MASK,
NULL, NULL, bevent->time);
tool->gdisp_ptr = gdisp_ptr;
......
......@@ -25,6 +25,7 @@
#include "errors.h"
#include "gdisplay.h"
#include "gimage_mask.h"
#include "gimprc.h"
#include "layers_dialog.h"
#include "paint_funcs.h"
#include "paint_core.h"
......@@ -181,14 +182,15 @@ paint_core_button_press (tool, bevent, gdisp_ptr)
/* pause the current selection and grab the pointer */
gdisplays_selection_visibility (gdisp->gimage, SelectionPause);
/* add motion memory if you press mod1 first */
if (bevent->state & GDK_MOD1_MASK)
/* add motion memory if you press mod1 first ^ perfectmouse */
if (((bevent->state & GDK_MOD1_MASK) != 0) != (perfectmouse != 0))
gdk_pointer_grab (gdisp->canvas->window, FALSE,
GDK_BUTTON1_MOTION_MASK | GDK_BUTTON_RELEASE_MASK,
NULL, NULL, bevent->time);
else
gdk_pointer_grab (gdisp->canvas->window, FALSE,
GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON1_MOTION_MASK | GDK_BUTTON_RELEASE_MASK,
GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON1_MOTION_MASK |
GDK_BUTTON_RELEASE_MASK,
NULL, NULL, bevent->time);
/* Let the specific painting function initialize itself */
......
......@@ -72,6 +72,7 @@ static void file_prefs_clear_session_info_callback (GtkWidget *, gpointer);
static int last_type = RGB;
static GtkWidget *prefs_dlg = NULL;
static int old_perfectmouse;
static int old_transparency_type;
static int old_transparency_size;
static int old_levels_of_undo;
......@@ -316,6 +317,8 @@ file_prefs_save_callback (GtkWidget *widget,
update = g_list_append (update, "default-image-type");
if (preview_size != old_preview_size)
update = g_list_append (update, "preview-size");
if (perfectmouse != old_perfectmouse)
update = g_list_append (update, "perfect-mouse");
if (transparency_type != old_transparency_type)
update = g_list_append (update, "transparency-type");
if (transparency_size != old_transparency_size)
......@@ -438,6 +441,7 @@ file_prefs_cancel_callback (GtkWidget *widget,
allow_resize_windows = old_allow_resize_windows;
auto_save = old_auto_save;
no_cursor_updating = old_no_cursor_updating;
perfectmouse = old_perfectmouse;
show_tool_tips = old_show_tool_tips;
cubic_interpolation = old_cubic_interpolation;
confirm_on_close = old_confirm_on_close;
......@@ -445,6 +449,7 @@ file_prefs_cancel_callback (GtkWidget *widget,
default_width = old_default_width;
default_height = old_default_height;
default_type = old_default_type;
if (preview_size != old_preview_size)
{
lc_dialog_rebuild (old_preview_size);
......@@ -490,6 +495,8 @@ file_prefs_toggle_callback (GtkWidget *widget,
auto_save = GTK_TOGGLE_BUTTON (widget)->active;
else if (data == &no_cursor_updating)
no_cursor_updating = GTK_TOGGLE_BUTTON (widget)->active;
else if (data == &perfectmouse)
perfectmouse = GTK_TOGGLE_BUTTON (widget)->active;
else if (data == &show_tool_tips)
show_tool_tips = GTK_TOGGLE_BUTTON (widget)->active;
else if (data == &cubic_interpolation)
......@@ -696,6 +703,7 @@ file_pref_cmd_callback (GtkWidget *widget,
edit_cycled_marching_ants = cycled_marching_ants;
edit_last_opened_size = last_opened_size;
}
old_perfectmouse = perfectmouse;
old_transparency_type = transparency_type;
old_transparency_size = transparency_size;
old_levels_of_undo = levels_of_undo;
......@@ -973,26 +981,6 @@ file_pref_cmd_callback (GtkWidget *widget,
gtk_container_add (GTK_CONTAINER (out_frame), vbox);
gtk_widget_show (vbox);
hbox = gtk_hbox_new (FALSE, 2);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);
label = gtk_label_new ("Levels of undo:");
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
gtk_widget_show (label);
adj = (GtkAdjustment *) gtk_adjustment_new (levels_of_undo, 0.0,
255.0, 1.0, 5.0, 0.0);
spinbutton = gtk_spin_button_new (adj, 1.0, 0.0);
gtk_spin_button_set_shadow_type (GTK_SPIN_BUTTON(spinbutton), GTK_SHADOW_NONE);
gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(spinbutton), TRUE);
gtk_widget_set_usize (spinbutton, 75, 0);
gtk_box_pack_start (GTK_BOX (hbox), spinbutton, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (spinbutton), "changed",
(GtkSignalFunc) file_prefs_spinbutton_callback,
&levels_of_undo);
gtk_widget_show (spinbutton);
button = gtk_check_button_new_with_label("Resize window on zoom");
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (button),
allow_resize_windows);
......@@ -1002,6 +990,15 @@ file_pref_cmd_callback (GtkWidget *widget,
&allow_resize_windows);
gtk_widget_show (button);
button = gtk_check_button_new_with_label("Perfect-but-slow pointer tracking");
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (button),
perfectmouse);
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
(GtkSignalFunc) file_prefs_toggle_callback,
&perfectmouse);
gtk_widget_show (button);
/* Don't show the Auto-save button until we really
have auto-saving in the gimp.
......@@ -1037,6 +1034,26 @@ file_pref_cmd_callback (GtkWidget *widget,
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);
label = gtk_label_new ("Levels of undo:");
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
gtk_widget_show (label);
adj = (GtkAdjustment *) gtk_adjustment_new (levels_of_undo, 0.0,
255.0, 1.0, 5.0, 0.0);
spinbutton = gtk_spin_button_new (adj, 1.0, 0.0);
gtk_spin_button_set_shadow_type (GTK_SPIN_BUTTON(spinbutton), GTK_SHADOW_NONE);
gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(spinbutton), TRUE);
gtk_widget_set_usize (spinbutton, 75, 0);
gtk_box_pack_start (GTK_BOX (hbox), spinbutton, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (spinbutton), "changed",
(GtkSignalFunc) file_prefs_spinbutton_callback,
&levels_of_undo);
gtk_widget_show (spinbutton);
hbox = gtk_hbox_new (FALSE, 2);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);
label = gtk_label_new ("Marching ants speed:");
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
gtk_widget_show (label);
......
......@@ -20,6 +20,7 @@
#include "draw_core.h"
#include "gimage_mask.h"
#include "gimpbrushlist.h"
#include "gimprc.h"
#include "ink.h"
#include "tools.h"
#include "undo.h"
......@@ -151,10 +152,10 @@ create_ink_options ()
/* the new options structure */
options = (InkOptions *) g_malloc (sizeof (InkOptions));
options->size = 8.;
options->sensitivity = 1.;
options->aspect = 1.;
options->angle = 0.;
options->size = 3.0;
options->sensitivity = 1.0;
options->aspect = 1.0;
options->angle = 0.0;
/* the main vbox */
vbox = gtk_vbox_new (FALSE, 1);
......@@ -165,7 +166,7 @@ create_ink_options ()
label = gtk_label_new ("Size:");
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 2);
adj = GTK_ADJUSTMENT (gtk_adjustment_new (4.0, 0.0, 25.0, 1.0, 10.0, 0.0));
adj = GTK_ADJUSTMENT (gtk_adjustment_new (3.0, 0.0, 20.0, 1.0, 5.0, 0.0));
slider = gtk_hscale_new (adj);
gtk_box_pack_start (GTK_BOX (hbox), slider, TRUE, TRUE, 0);
gtk_scale_set_value_pos (GTK_SCALE (slider), GTK_POS_TOP);
......@@ -447,14 +448,15 @@ ink_button_press (Tool *tool,
/* pause the current selection and grab the pointer */
gdisplays_selection_visibility (gdisp->gimage, SelectionPause);
/* add motion memory if you press mod1 first */
if (bevent->state & GDK_MOD1_MASK)
/* add motion memory if you press mod1 first ^ perfectmouse */
if (((bevent->state & GDK_MOD1_MASK) != 0) != (perfectmouse != 0))
gdk_pointer_grab (gdisp->canvas->window, FALSE,
GDK_BUTTON1_MOTION_MASK | GDK_BUTTON_RELEASE_MASK,
NULL, NULL, bevent->time);
else
gdk_pointer_grab (gdisp->canvas->window, FALSE,
GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON1_MOTION_MASK | GDK_BUTTON_RELEASE_MASK,
GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON1_MOTION_MASK |
GDK_BUTTON_RELEASE_MASK,
NULL, NULL, bevent->time);
tool->gdisp_ptr = gdisp_ptr;
......
......@@ -20,6 +20,7 @@
#include "draw_core.h"
#include "gimage_mask.h"
#include "gimpbrushlist.h"
#include "gimprc.h"
#include "ink.h"
#include "tools.h"
#include "undo.h"
......@@ -151,10 +152,10 @@ create_ink_options ()
/* the new options structure */
options = (InkOptions *) g_malloc (sizeof (InkOptions));
options->size = 8.;
options->sensitivity = 1.;
options->aspect = 1.;
options->angle = 0.;
options->size = 3.0;
options->sensitivity = 1.0;
options->aspect = 1.0;
options->angle = 0.0;
/* the main vbox */
vbox = gtk_vbox_new (FALSE, 1);
......@@ -165,7 +166,7 @@ create_ink_options ()
label = gtk_label_new ("Size:");
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 2);
adj = GTK_ADJUSTMENT (gtk_adjustment_new (4.0, 0.0, 25.0, 1.0, 10.0, 0.0));
adj = GTK_ADJUSTMENT (gtk_adjustment_new (3.0, 0.0, 20.0, 1.0, 5.0, 0.0));
slider = gtk_hscale_new (adj);
gtk_box_pack_start (GTK_BOX (hbox), slider, TRUE, TRUE, 0);
gtk_scale_set_value_pos (GTK_SCALE (slider), GTK_POS_TOP);
......@@ -447,14 +448,15 @@ ink_button_press (Tool *tool,
/* pause the current selection and grab the pointer */
gdisplays_selection_visibility (gdisp->gimage, SelectionPause);
/* add motion memory if you press mod1 first */
if (bevent->state & GDK_MOD1_MASK)
/* add motion memory if you press mod1 first ^ perfectmouse */