[gimp] app: remove "gboolean use_cairo" from the draw tool again
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: remove "gboolean use_cairo" from the draw tool again
- Date: Fri, 24 Sep 2010 19:15:22 +0000 (UTC)
commit 313f8bee1edde4f2939d9eb3d74c97ba3d2dafe7
Author: Michael Natterer <mitch gimp org>
Date: Fri Sep 24 21:14:49 2010 +0200
app: remove "gboolean use_cairo" from the draw tool again
It's always TRUE now.
app/tools/gimpaligntool.c | 2 -
app/tools/gimpblendtool.c | 2 -
app/tools/gimpcolorpickertool.c | 2 -
app/tools/gimpcroptool.c | 2 -
app/tools/gimpdrawtool.c | 88 +++++++++++++---------------------
app/tools/gimpdrawtool.h | 1 -
app/tools/gimpeditselectiontool.c | 2 -
app/tools/gimpellipseselecttool.c | 2 -
app/tools/gimpfreeselecttool.c | 2 -
app/tools/gimpiscissorstool.c | 2 -
app/tools/gimpmagnifytool.c | 2 -
app/tools/gimpmeasuretool.c | 4 +-
app/tools/gimpmovetool.c | 2 -
app/tools/gimppainttool.c | 2 -
app/tools/gimprectangleselecttool.c | 2 -
app/tools/gimpregionselecttool.c | 2 -
app/tools/gimptexttool.c | 2 -
app/tools/gimptransformtool.c | 2 -
app/tools/gimpvectortool.c | 2 -
19 files changed, 35 insertions(+), 90 deletions(-)
---
diff --git a/app/tools/gimpaligntool.c b/app/tools/gimpaligntool.c
index 75b3dad..092377c 100644
--- a/app/tools/gimpaligntool.c
+++ b/app/tools/gimpaligntool.c
@@ -180,8 +180,6 @@ gimp_align_tool_init (GimpAlignTool *align_tool)
gimp_tool_control_set_precision (tool->control,
GIMP_CURSOR_PRECISION_PIXEL_BORDER);
gimp_tool_control_set_tool_cursor (tool->control, GIMP_TOOL_CURSOR_MOVE);
-
- GIMP_DRAW_TOOL (tool)->use_cairo = TRUE;
}
static GObject *
diff --git a/app/tools/gimpblendtool.c b/app/tools/gimpblendtool.c
index bac44b4..18b3216 100644
--- a/app/tools/gimpblendtool.c
+++ b/app/tools/gimpblendtool.c
@@ -146,8 +146,6 @@ gimp_blend_tool_init (GimpBlendTool *blend_tool)
"context/context-opacity-set");
gimp_tool_control_set_action_object_1 (tool->control,
"context/context-gradient-select-set");
-
- GIMP_DRAW_TOOL (tool)->use_cairo = TRUE;
}
static gboolean
diff --git a/app/tools/gimpcolorpickertool.c b/app/tools/gimpcolorpickertool.c
index b79db5f..9e2f304 100644
--- a/app/tools/gimpcolorpickertool.c
+++ b/app/tools/gimpcolorpickertool.c
@@ -124,8 +124,6 @@ gimp_color_picker_tool_init (GimpColorPickerTool *tool)
GimpColorTool *color_tool = GIMP_COLOR_TOOL (tool);
color_tool->pick_mode = GIMP_COLOR_PICK_MODE_FOREGROUND;
-
- GIMP_DRAW_TOOL (tool)->use_cairo = TRUE;
}
static GObject *
diff --git a/app/tools/gimpcroptool.c b/app/tools/gimpcroptool.c
index 066bbc5..02dd197 100644
--- a/app/tools/gimpcroptool.c
+++ b/app/tools/gimpcroptool.c
@@ -178,8 +178,6 @@ gimp_crop_tool_init (GimpCropTool *crop_tool)
gimp_tool_control_set_tool_cursor (tool->control, GIMP_TOOL_CURSOR_CROP);
crop_tool->current_image = NULL;
-
- GIMP_DRAW_TOOL (crop_tool)->use_cairo = TRUE;
}
static GObject *
diff --git a/app/tools/gimpdrawtool.c b/app/tools/gimpdrawtool.c
index 710f9ac..7c253b6 100644
--- a/app/tools/gimpdrawtool.c
+++ b/app/tools/gimpdrawtool.c
@@ -158,13 +158,7 @@ gimp_draw_tool_control (GimpTool *tool,
switch (action)
{
case GIMP_TOOL_ACTION_PAUSE:
- if (! draw_tool->use_cairo)
- gimp_draw_tool_pause (draw_tool);
- break;
-
case GIMP_TOOL_ACTION_RESUME:
- if (! draw_tool->use_cairo)
- gimp_draw_tool_resume (draw_tool);
break;
case GIMP_TOOL_ACTION_HALT:
@@ -181,34 +175,27 @@ gimp_draw_tool_draw (GimpDrawTool *draw_tool)
if (draw_tool->paused_count == 0 &&
draw_tool->display)
{
- if (draw_tool->use_cairo)
- {
- GimpDisplayShell *shell = gimp_display_get_shell (draw_tool->display);
- GdkWindow *window = gtk_widget_get_window (shell->canvas);
- GList *list;
-
- if (draw_tool->items)
- {
- g_list_foreach (draw_tool->items, (GFunc) g_object_unref, NULL);
- g_list_free (draw_tool->items);
- draw_tool->items = NULL;
- }
+ GimpDisplayShell *shell = gimp_display_get_shell (draw_tool->display);
+ GdkWindow *window = gtk_widget_get_window (shell->canvas);
+ GList *list;
- GIMP_DRAW_TOOL_GET_CLASS (draw_tool)->draw (draw_tool);
+ if (draw_tool->items)
+ {
+ g_list_foreach (draw_tool->items, (GFunc) g_object_unref, NULL);
+ g_list_free (draw_tool->items);
+ draw_tool->items = NULL;
+ }
- for (list = draw_tool->items; list; list = g_list_next (list))
- {
- GimpCanvasItem *item = list->data;
- GdkRegion *region;
+ GIMP_DRAW_TOOL_GET_CLASS (draw_tool)->draw (draw_tool);
- region = gimp_canvas_item_get_extents (item, shell);
- gdk_window_invalidate_region (window, region, TRUE);
- gdk_region_destroy (region);
- }
- }
- else
+ for (list = draw_tool->items; list; list = g_list_next (list))
{
- GIMP_DRAW_TOOL_GET_CLASS (draw_tool)->draw (draw_tool);
+ GimpCanvasItem *item = list->data;
+ GdkRegion *region;
+
+ region = gimp_canvas_item_get_extents (item, shell);
+ gdk_window_invalidate_region (window, region, TRUE);
+ gdk_region_destroy (region);
}
draw_tool->is_drawn = TRUE;
@@ -221,32 +208,25 @@ gimp_draw_tool_undraw (GimpDrawTool *draw_tool)
if (draw_tool->paused_count == 0 &&
draw_tool->display)
{
- if (draw_tool->use_cairo)
- {
- GimpDisplayShell *shell = gimp_display_get_shell (draw_tool->display);
- GdkWindow *window = gtk_widget_get_window (shell->canvas);
- GList *list;
-
- for (list = draw_tool->items; list; list = g_list_next (list))
- {
- GimpCanvasItem *item = list->data;
- GdkRegion *region;
+ GimpDisplayShell *shell = gimp_display_get_shell (draw_tool->display);
+ GdkWindow *window = gtk_widget_get_window (shell->canvas);
+ GList *list;
- region = gimp_canvas_item_get_extents (item, shell);
- gdk_window_invalidate_region (window, region, TRUE);
- gdk_region_destroy (region);
- }
+ for (list = draw_tool->items; list; list = g_list_next (list))
+ {
+ GimpCanvasItem *item = list->data;
+ GdkRegion *region;
- if (draw_tool->items)
- {
- g_list_foreach (draw_tool->items, (GFunc) g_object_unref, NULL);
- g_list_free (draw_tool->items);
- draw_tool->items = NULL;
- }
+ region = gimp_canvas_item_get_extents (item, shell);
+ gdk_window_invalidate_region (window, region, TRUE);
+ gdk_region_destroy (region);
}
- else
+
+ if (draw_tool->items)
{
- GIMP_DRAW_TOOL_GET_CLASS (draw_tool)->draw (draw_tool);
+ g_list_foreach (draw_tool->items, (GFunc) g_object_unref, NULL);
+ g_list_free (draw_tool->items);
+ draw_tool->items = NULL;
}
draw_tool->is_drawn = FALSE;
diff --git a/app/tools/gimpdrawtool.h b/app/tools/gimpdrawtool.h
index 1c32ebb..9974638 100644
--- a/app/tools/gimpdrawtool.h
+++ b/app/tools/gimpdrawtool.h
@@ -43,7 +43,6 @@ struct _GimpDrawTool
gint paused_count; /* count to keep track of multiple pauses */
gboolean is_drawn; /* is the stuff we draw currently visible */
- gboolean use_cairo;
GList *items;
};
diff --git a/app/tools/gimpeditselectiontool.c b/app/tools/gimpeditselectiontool.c
index c8953c2..b75aec5 100644
--- a/app/tools/gimpeditselectiontool.c
+++ b/app/tools/gimpeditselectiontool.c
@@ -158,8 +158,6 @@ gimp_edit_selection_tool_init (GimpEditSelectionTool *edit_selection_tool)
edit_selection_tool->first_move = TRUE;
edit_selection_tool->constrain = FALSE;
-
- GIMP_DRAW_TOOL (tool)->use_cairo = TRUE;
}
static void
diff --git a/app/tools/gimpellipseselecttool.c b/app/tools/gimpellipseselecttool.c
index 8651b27..9e7b0cc 100644
--- a/app/tools/gimpellipseselecttool.c
+++ b/app/tools/gimpellipseselecttool.c
@@ -94,8 +94,6 @@ gimp_ellipse_select_tool_init (GimpEllipseSelectTool *ellipse_select)
gimp_tool_control_set_tool_cursor (tool->control,
GIMP_TOOL_CURSOR_ELLIPSE_SELECT);
-
- GIMP_DRAW_TOOL (tool)->use_cairo = TRUE;
}
static void
diff --git a/app/tools/gimpfreeselecttool.c b/app/tools/gimpfreeselecttool.c
index 53ff8d8..028798f 100644
--- a/app/tools/gimpfreeselecttool.c
+++ b/app/tools/gimpfreeselecttool.c
@@ -267,8 +267,6 @@ gimp_free_select_tool_init (GimpFreeSelectTool *fst)
priv->supress_handles = FALSE;
priv->last_click_time = NO_CLICK_TIME_AVAILABLE;
-
- GIMP_DRAW_TOOL (tool)->use_cairo = TRUE;
}
static void
diff --git a/app/tools/gimpiscissorstool.c b/app/tools/gimpiscissorstool.c
index 3b59832..ab61f4b 100644
--- a/app/tools/gimpiscissorstool.c
+++ b/app/tools/gimpiscissorstool.c
@@ -345,8 +345,6 @@ gimp_iscissors_tool_init (GimpIscissorsTool *iscissors)
gimp_tool_control_set_tool_cursor (tool->control, GIMP_TOOL_CURSOR_ISCISSORS);
gimp_iscissors_tool_reset (iscissors);
-
- GIMP_DRAW_TOOL (tool)->use_cairo = TRUE;
}
static void
diff --git a/app/tools/gimpmagnifytool.c b/app/tools/gimpmagnifytool.c
index 353cd58..7650ceb 100644
--- a/app/tools/gimpmagnifytool.c
+++ b/app/tools/gimpmagnifytool.c
@@ -130,8 +130,6 @@ gimp_magnify_tool_init (GimpMagnifyTool *magnify_tool)
GIMP_CURSOR_MODIFIER_PLUS);
gimp_tool_control_set_toggle_cursor_modifier (tool->control,
GIMP_CURSOR_MODIFIER_MINUS);
-
- GIMP_DRAW_TOOL (tool)->use_cairo = TRUE;
}
static void
diff --git a/app/tools/gimpmeasuretool.c b/app/tools/gimpmeasuretool.c
index 6d360c0..f2448fd 100644
--- a/app/tools/gimpmeasuretool.c
+++ b/app/tools/gimpmeasuretool.c
@@ -156,10 +156,8 @@ gimp_measure_tool_init (GimpMeasureTool *measure_tool)
gimp_tool_control_set_tool_cursor (tool->control,
GIMP_TOOL_CURSOR_MEASURE);
- measure_tool->function = CREATING;
+ measure_tool->function = CREATING;
measure_tool->status_help = TRUE;
-
- GIMP_DRAW_TOOL (tool)->use_cairo = TRUE;
}
static void
diff --git a/app/tools/gimpmovetool.c b/app/tools/gimpmovetool.c
index d96f45e..cb30d9f 100644
--- a/app/tools/gimpmovetool.c
+++ b/app/tools/gimpmovetool.c
@@ -173,8 +173,6 @@ gimp_move_tool_init (GimpMoveTool *move_tool)
gimp_tool_control_set_handle_empty_image (tool->control, TRUE);
gimp_tool_control_set_tool_cursor (tool->control,
GIMP_TOOL_CURSOR_MOVE);
-
- GIMP_DRAW_TOOL (tool)->use_cairo = TRUE;
}
static void
diff --git a/app/tools/gimppainttool.c b/app/tools/gimppainttool.c
index a0595f8..6810194 100644
--- a/app/tools/gimppainttool.c
+++ b/app/tools/gimppainttool.c
@@ -147,8 +147,6 @@ gimp_paint_tool_init (GimpPaintTool *paint_tool)
tool->max_coord_smooth = 0.80;
paint_tool->core = NULL;
-
- GIMP_DRAW_TOOL (tool)->use_cairo = TRUE;
}
static GObject *
diff --git a/app/tools/gimprectangleselecttool.c b/app/tools/gimprectangleselecttool.c
index 055f241..fb80467 100644
--- a/app/tools/gimprectangleselecttool.c
+++ b/app/tools/gimprectangleselecttool.c
@@ -238,8 +238,6 @@ gimp_rectangle_select_tool_init (GimpRectangleSelectTool *rect_sel_tool)
priv->press_x = 0.0;
priv->press_y = 0.0;
-
- GIMP_DRAW_TOOL (tool)->use_cairo = TRUE;
}
static GObject *
diff --git a/app/tools/gimpregionselecttool.c b/app/tools/gimpregionselecttool.c
index bf2e8db..b332748 100644
--- a/app/tools/gimpregionselecttool.c
+++ b/app/tools/gimpregionselecttool.c
@@ -114,8 +114,6 @@ gimp_region_select_tool_init (GimpRegionSelectTool *region_select)
region_select->region_mask = NULL;
region_select->segs = NULL;
region_select->n_segs = 0;
-
- GIMP_DRAW_TOOL (tool)->use_cairo = TRUE;
}
static void
diff --git a/app/tools/gimptexttool.c b/app/tools/gimptexttool.c
index 3c078c1..c8d4fee 100644
--- a/app/tools/gimptexttool.c
+++ b/app/tools/gimptexttool.c
@@ -272,8 +272,6 @@ gimp_text_tool_init (GimpTextTool *text_tool)
GIMP_TOOL_CURSOR_TEXT);
gimp_tool_control_set_action_object_1 (tool->control,
"context/context-font-select-set");
-
- GIMP_DRAW_TOOL (tool)->use_cairo = TRUE;
}
static GObject *
diff --git a/app/tools/gimptransformtool.c b/app/tools/gimptransformtool.c
index 3879e38..a61a5a1 100644
--- a/app/tools/gimptransformtool.c
+++ b/app/tools/gimptransformtool.c
@@ -238,8 +238,6 @@ gimp_transform_tool_init (GimpTransformTool *tr_tool)
tr_tool->progress_text = _("Transforming");
tr_tool->dialog = NULL;
-
- GIMP_DRAW_TOOL (tool)->use_cairo = TRUE;
}
static GObject *
diff --git a/app/tools/gimpvectortool.c b/app/tools/gimpvectortool.c
index e567b75..b88bc2a 100644
--- a/app/tools/gimpvectortool.c
+++ b/app/tools/gimpvectortool.c
@@ -219,8 +219,6 @@ gimp_vector_tool_init (GimpVectorTool *vector_tool)
vector_tool->sel_stroke = NULL;
vector_tool->saved_mode = GIMP_VECTOR_MODE_DESIGN;
-
- GIMP_DRAW_TOOL (tool)->use_cairo = TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]