mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-04 09:53:25 +00:00
cosmetic cleanup.
2006-06-07 Michael Natterer <mitch@gimp.org> * 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...
This commit is contained in:
parent
2234b2f029
commit
1cb89bf43f
6 changed files with 32 additions and 19 deletions
17
ChangeLog
17
ChangeLog
|
@ -1,3 +1,20 @@
|
||||||
|
2006-06-07 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
|
* 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 <weskaggs@primate.ucdavis.edu>
|
2006-06-07 Bill Skaggs <weskaggs@primate.ucdavis.edu>
|
||||||
|
|
||||||
* app/core/gimpguide.[ch]: new files, implementing GimpGuide as a
|
* app/core/gimpguide.[ch]: new files, implementing GimpGuide as a
|
||||||
|
|
|
@ -124,14 +124,13 @@ context_##name##_##fgbg##ground_cmd_callback (GtkAction *action, \
|
||||||
gint value, \
|
gint value, \
|
||||||
gpointer data) \
|
gpointer data) \
|
||||||
{ \
|
{ \
|
||||||
GimpRGB color; \
|
|
||||||
GimpContext *context; \
|
GimpContext *context; \
|
||||||
|
GimpRGB color; \
|
||||||
return_if_no_context (context, data); \
|
return_if_no_context (context, data); \
|
||||||
\
|
\
|
||||||
gimp_context_get_##fgbg##ground (context, &color); \
|
gimp_context_get_##fgbg##ground (context, &color); \
|
||||||
context_select_color ((GimpActionSelectType) value, &color, usec, usep); \
|
context_select_color ((GimpActionSelectType) value, &color, usec, usep); \
|
||||||
gimp_context_set_##fgbg##ground (context, &color); \
|
gimp_context_set_##fgbg##ground (context, &color); \
|
||||||
\
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SELECT_COLOR_CMD_CALLBACK (palette, fore, FALSE, TRUE)
|
SELECT_COLOR_CMD_CALLBACK (palette, fore, FALSE, TRUE)
|
||||||
|
@ -508,7 +507,6 @@ context_brush_radius_cmd_callback (GtkAction *action,
|
||||||
gdouble radius;
|
gdouble radius;
|
||||||
|
|
||||||
radius = gimp_brush_generated_get_radius (generated);
|
radius = gimp_brush_generated_get_radius (generated);
|
||||||
|
|
||||||
radius = action_select_value ((GimpActionSelectType) value,
|
radius = action_select_value ((GimpActionSelectType) value,
|
||||||
radius,
|
radius,
|
||||||
1.0, 256.0,
|
1.0, 256.0,
|
||||||
|
@ -534,7 +532,6 @@ context_brush_spikes_cmd_callback (GtkAction *action,
|
||||||
gint spikes;
|
gint spikes;
|
||||||
|
|
||||||
spikes = gimp_brush_generated_get_spikes (generated);
|
spikes = gimp_brush_generated_get_spikes (generated);
|
||||||
|
|
||||||
spikes = action_select_value ((GimpActionSelectType) value,
|
spikes = action_select_value ((GimpActionSelectType) value,
|
||||||
spikes,
|
spikes,
|
||||||
2.0, 20.0,
|
2.0, 20.0,
|
||||||
|
@ -560,7 +557,6 @@ context_brush_hardness_cmd_callback (GtkAction *action,
|
||||||
gdouble hardness;
|
gdouble hardness;
|
||||||
|
|
||||||
hardness = gimp_brush_generated_get_hardness (generated);
|
hardness = gimp_brush_generated_get_hardness (generated);
|
||||||
|
|
||||||
hardness = action_select_value ((GimpActionSelectType) value,
|
hardness = action_select_value ((GimpActionSelectType) value,
|
||||||
hardness,
|
hardness,
|
||||||
0.0, 1.0,
|
0.0, 1.0,
|
||||||
|
@ -586,7 +582,6 @@ context_brush_aspect_cmd_callback (GtkAction *action,
|
||||||
gdouble aspect;
|
gdouble aspect;
|
||||||
|
|
||||||
aspect = gimp_brush_generated_get_aspect_ratio (generated);
|
aspect = gimp_brush_generated_get_aspect_ratio (generated);
|
||||||
|
|
||||||
aspect = action_select_value ((GimpActionSelectType) value,
|
aspect = action_select_value ((GimpActionSelectType) value,
|
||||||
aspect,
|
aspect,
|
||||||
1.0, 20.0,
|
1.0, 20.0,
|
||||||
|
@ -668,7 +663,8 @@ context_select_color (GimpActionSelectType select_type,
|
||||||
index = context_get_color_index (use_colormap, use_palette, color);
|
index = context_get_color_index (use_colormap, use_palette, color);
|
||||||
max = context_max_color_index (use_colormap, use_palette);
|
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,
|
0, max,
|
||||||
1, 4, FALSE);
|
1, 4, FALSE);
|
||||||
|
|
||||||
|
|
|
@ -119,6 +119,7 @@ typedef struct _GimpUndoAccumulator GimpUndoAccumulator;
|
||||||
typedef struct _GimpBuffer GimpBuffer;
|
typedef struct _GimpBuffer GimpBuffer;
|
||||||
typedef struct _GimpEnvironTable GimpEnvironTable;
|
typedef struct _GimpEnvironTable GimpEnvironTable;
|
||||||
/* typedef struct _GimpGrid GimpGrid; in config-types.h */
|
/* typedef struct _GimpGrid GimpGrid; in config-types.h */
|
||||||
|
typedef struct _GimpGuide GimpGuide;
|
||||||
typedef struct _GimpImagefile GimpImagefile;
|
typedef struct _GimpImagefile GimpImagefile;
|
||||||
typedef struct _GimpImageMap GimpImageMap;
|
typedef struct _GimpImageMap GimpImageMap;
|
||||||
typedef struct _GimpInterpreterDB GimpInterpreterDB;
|
typedef struct _GimpInterpreterDB GimpInterpreterDB;
|
||||||
|
@ -140,7 +141,6 @@ typedef struct _GimpProgress GimpProgress; /* dummy typedef */
|
||||||
typedef struct _GimpArea GimpArea;
|
typedef struct _GimpArea GimpArea;
|
||||||
typedef struct _GimpCoords GimpCoords;
|
typedef struct _GimpCoords GimpCoords;
|
||||||
typedef struct _GimpGradientSegment GimpGradientSegment;
|
typedef struct _GimpGradientSegment GimpGradientSegment;
|
||||||
typedef struct _GimpGuide GimpGuide;
|
|
||||||
typedef struct _GimpSamplePoint GimpSamplePoint;
|
typedef struct _GimpSamplePoint GimpSamplePoint;
|
||||||
typedef guint32 GimpTattoo;
|
typedef guint32 GimpTattoo;
|
||||||
typedef struct _GimpPaletteEntry GimpPaletteEntry;
|
typedef struct _GimpPaletteEntry GimpPaletteEntry;
|
||||||
|
|
|
@ -458,7 +458,7 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
|
||||||
GdkModifierType state;
|
GdkModifierType state;
|
||||||
guint32 time;
|
guint32 time;
|
||||||
gboolean return_val = FALSE;
|
gboolean return_val = FALSE;
|
||||||
gboolean update_cursor = FALSE;
|
gboolean update_sw_cursor = FALSE;
|
||||||
|
|
||||||
static GimpToolInfo *space_shaded_tool = NULL;
|
static GimpToolInfo *space_shaded_tool = NULL;
|
||||||
|
|
||||||
|
@ -511,7 +511,7 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
|
||||||
&image_coords,
|
&image_coords,
|
||||||
x, y, width, height))
|
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)
|
if (cevent->mode != GDK_CROSSING_NORMAL)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
update_cursor = TRUE;
|
update_sw_cursor = TRUE;
|
||||||
|
|
||||||
tool_manager_oper_update_active (gimp,
|
tool_manager_oper_update_active (gimp,
|
||||||
&image_coords, state,
|
&image_coords, state,
|
||||||
|
@ -954,7 +954,7 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
|
||||||
&image_coords,
|
&image_coords,
|
||||||
x, y, width, height))
|
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);
|
&display_coords);
|
||||||
}
|
}
|
||||||
|
|
||||||
update_cursor = TRUE;
|
update_sw_cursor = TRUE;
|
||||||
|
|
||||||
if (! shell->proximity)
|
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,
|
gimp_display_shell_update_cursor (shell,
|
||||||
(gint) display_coords.x,
|
(gint) display_coords.x,
|
||||||
(gint) display_coords.y,
|
(gint) display_coords.y,
|
||||||
|
|
|
@ -184,9 +184,9 @@ gimp_foreground_select_tool_init (GimpForegroundSelectTool *fg_select)
|
||||||
gimp_tool_control_set_scroll_lock (tool->control, TRUE);
|
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_dirty_mask (tool->control, GIMP_DIRTY_IMAGE_SIZE);
|
||||||
|
|
||||||
gimp_tool_control_set_tool_cursor (tool->control,
|
gimp_tool_control_set_tool_cursor (tool->control,
|
||||||
GIMP_TOOL_CURSOR_FREE_SELECT);
|
GIMP_TOOL_CURSOR_FREE_SELECT);
|
||||||
|
|
||||||
fg_select->idle_id = 0;
|
fg_select->idle_id = 0;
|
||||||
fg_select->stroke = NULL;
|
fg_select->stroke = NULL;
|
||||||
fg_select->strokes = NULL;
|
fg_select->strokes = NULL;
|
||||||
|
|
|
@ -507,15 +507,15 @@ gimp_measure_tool_cursor_update (GimpTool *tool,
|
||||||
if (state & GDK_CONTROL_MASK)
|
if (state & GDK_CONTROL_MASK)
|
||||||
{
|
{
|
||||||
if (state & GDK_MOD1_MASK)
|
if (state & GDK_MOD1_MASK)
|
||||||
cursor = GDK_BOTTOM_RIGHT_CORNER;
|
cursor = GIMP_CURSOR_CORNER_BOTTOM_RIGHT;
|
||||||
else
|
else
|
||||||
cursor = GDK_BOTTOM_SIDE;
|
cursor = GIMP_CURSOR_SIDE_BOTTOM;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state & GDK_MOD1_MASK)
|
if (state & GDK_MOD1_MASK)
|
||||||
{
|
{
|
||||||
cursor = GDK_RIGHT_SIDE;
|
cursor = GIMP_CURSOR_SIDE_RIGHT;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue