From 1cb89bf43f2d3a4021e8a148cc94493b8ab7150c Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Wed, 7 Jun 2006 07:30:40 +0000 Subject: [PATCH] cosmetic cleanup. 2006-06-07 Michael Natterer * app/actions/context-commands.c: cosmetic cleanup. * app/core/core-types.h: move the GimpGuide typedef to the "misc objects" section. * app/tools/gimpforegroundselecttool.c: cosmetic cleanup. * app/tools/gimpmeasuretool.c (gimp_measure_tool_cursor_update): use the new corner and side cursors instead of using X cursors. * app/display/gimpdisplayshell-callbacks.c (gimp_display_shell_canvas_tool_events): renamed local variable "update_cursor" to "update_sw_cursor", it has confused me too often... --- ChangeLog | 17 +++++++++++++++++ app/actions/context-commands.c | 10 +++------- app/core/core-types.h | 2 +- app/display/gimpdisplayshell-callbacks.c | 12 ++++++------ app/tools/gimpforegroundselecttool.c | 4 ++-- app/tools/gimpmeasuretool.c | 6 +++--- 6 files changed, 32 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9a9a55c8e3..fe393bb021 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +2006-06-07 Michael Natterer + + * app/actions/context-commands.c: cosmetic cleanup. + + * app/core/core-types.h: move the GimpGuide typedef to the + "misc objects" section. + + * app/tools/gimpforegroundselecttool.c: cosmetic cleanup. + + * app/tools/gimpmeasuretool.c (gimp_measure_tool_cursor_update): + use the new corner and side cursors instead of using X cursors. + + * app/display/gimpdisplayshell-callbacks.c + (gimp_display_shell_canvas_tool_events): renamed local variable + "update_cursor" to "update_sw_cursor", it has confused me too + often... + 2006-06-07 Bill Skaggs * app/core/gimpguide.[ch]: new files, implementing GimpGuide as a diff --git a/app/actions/context-commands.c b/app/actions/context-commands.c index 07eddb2705..4cbb55d876 100644 --- a/app/actions/context-commands.c +++ b/app/actions/context-commands.c @@ -124,14 +124,13 @@ context_##name##_##fgbg##ground_cmd_callback (GtkAction *action, \ gint value, \ gpointer data) \ { \ - GimpRGB color; \ GimpContext *context; \ + GimpRGB color; \ return_if_no_context (context, data); \ \ gimp_context_get_##fgbg##ground (context, &color); \ context_select_color ((GimpActionSelectType) value, &color, usec, usep); \ gimp_context_set_##fgbg##ground (context, &color); \ -\ } SELECT_COLOR_CMD_CALLBACK (palette, fore, FALSE, TRUE) @@ -508,7 +507,6 @@ context_brush_radius_cmd_callback (GtkAction *action, gdouble radius; radius = gimp_brush_generated_get_radius (generated); - radius = action_select_value ((GimpActionSelectType) value, radius, 1.0, 256.0, @@ -534,7 +532,6 @@ context_brush_spikes_cmd_callback (GtkAction *action, gint spikes; spikes = gimp_brush_generated_get_spikes (generated); - spikes = action_select_value ((GimpActionSelectType) value, spikes, 2.0, 20.0, @@ -560,7 +557,6 @@ context_brush_hardness_cmd_callback (GtkAction *action, gdouble hardness; hardness = gimp_brush_generated_get_hardness (generated); - hardness = action_select_value ((GimpActionSelectType) value, hardness, 0.0, 1.0, @@ -586,7 +582,6 @@ context_brush_aspect_cmd_callback (GtkAction *action, gdouble aspect; aspect = gimp_brush_generated_get_aspect_ratio (generated); - aspect = action_select_value ((GimpActionSelectType) value, aspect, 1.0, 20.0, @@ -668,7 +663,8 @@ context_select_color (GimpActionSelectType select_type, index = context_get_color_index (use_colormap, use_palette, color); max = context_max_color_index (use_colormap, use_palette); - index = action_select_value (select_type, index, + index = action_select_value (select_type, + index, 0, max, 1, 4, FALSE); diff --git a/app/core/core-types.h b/app/core/core-types.h index b7a95a8720..45b71567af 100644 --- a/app/core/core-types.h +++ b/app/core/core-types.h @@ -119,6 +119,7 @@ typedef struct _GimpUndoAccumulator GimpUndoAccumulator; typedef struct _GimpBuffer GimpBuffer; typedef struct _GimpEnvironTable GimpEnvironTable; /* typedef struct _GimpGrid GimpGrid; in config-types.h */ +typedef struct _GimpGuide GimpGuide; typedef struct _GimpImagefile GimpImagefile; typedef struct _GimpImageMap GimpImageMap; typedef struct _GimpInterpreterDB GimpInterpreterDB; @@ -140,7 +141,6 @@ typedef struct _GimpProgress GimpProgress; /* dummy typedef */ typedef struct _GimpArea GimpArea; typedef struct _GimpCoords GimpCoords; typedef struct _GimpGradientSegment GimpGradientSegment; -typedef struct _GimpGuide GimpGuide; typedef struct _GimpSamplePoint GimpSamplePoint; typedef guint32 GimpTattoo; typedef struct _GimpPaletteEntry GimpPaletteEntry; diff --git a/app/display/gimpdisplayshell-callbacks.c b/app/display/gimpdisplayshell-callbacks.c index 97f52950dc..c22595988f 100644 --- a/app/display/gimpdisplayshell-callbacks.c +++ b/app/display/gimpdisplayshell-callbacks.c @@ -458,7 +458,7 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas, GdkModifierType state; guint32 time; gboolean return_val = FALSE; - gboolean update_cursor = FALSE; + gboolean update_sw_cursor = FALSE; static GimpToolInfo *space_shaded_tool = NULL; @@ -511,7 +511,7 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas, &image_coords, x, y, width, height)) { - update_cursor = TRUE; + update_sw_cursor = TRUE; } } @@ -524,7 +524,7 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas, if (cevent->mode != GDK_CROSSING_NORMAL) return TRUE; - update_cursor = TRUE; + update_sw_cursor = TRUE; tool_manager_oper_update_active (gimp, &image_coords, state, @@ -954,7 +954,7 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas, &image_coords, x, y, width, height)) { - update_cursor = TRUE; + update_sw_cursor = TRUE; } } @@ -1024,7 +1024,7 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas, &display_coords); } - update_cursor = TRUE; + update_sw_cursor = TRUE; if (! shell->proximity) { @@ -1356,7 +1356,7 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas, } } - if (update_cursor) + if (update_sw_cursor) gimp_display_shell_update_cursor (shell, (gint) display_coords.x, (gint) display_coords.y, diff --git a/app/tools/gimpforegroundselecttool.c b/app/tools/gimpforegroundselecttool.c index 577e77f269..e08586c5a9 100644 --- a/app/tools/gimpforegroundselecttool.c +++ b/app/tools/gimpforegroundselecttool.c @@ -182,11 +182,11 @@ gimp_foreground_select_tool_init (GimpForegroundSelectTool *fg_select) GimpTool *tool = GIMP_TOOL (fg_select); gimp_tool_control_set_scroll_lock (tool->control, TRUE); - gimp_tool_control_set_preserve (tool->control, FALSE); + gimp_tool_control_set_preserve (tool->control, FALSE); gimp_tool_control_set_dirty_mask (tool->control, GIMP_DIRTY_IMAGE_SIZE); - gimp_tool_control_set_tool_cursor (tool->control, GIMP_TOOL_CURSOR_FREE_SELECT); + fg_select->idle_id = 0; fg_select->stroke = NULL; fg_select->strokes = NULL; diff --git a/app/tools/gimpmeasuretool.c b/app/tools/gimpmeasuretool.c index 66bd557ba2..3aaccaa5d4 100644 --- a/app/tools/gimpmeasuretool.c +++ b/app/tools/gimpmeasuretool.c @@ -507,15 +507,15 @@ gimp_measure_tool_cursor_update (GimpTool *tool, if (state & GDK_CONTROL_MASK) { if (state & GDK_MOD1_MASK) - cursor = GDK_BOTTOM_RIGHT_CORNER; + cursor = GIMP_CURSOR_CORNER_BOTTOM_RIGHT; else - cursor = GDK_BOTTOM_SIDE; + cursor = GIMP_CURSOR_SIDE_BOTTOM; break; } if (state & GDK_MOD1_MASK) { - cursor = GDK_RIGHT_SIDE; + cursor = GIMP_CURSOR_SIDE_RIGHT; break; }