aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-01-16 00:52:43 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-06-30 00:41:19 +0800
commit5cc2615a37ebd621954d386639ae261165bc09ef (patch)
treecf65b6a0c2321768a652c134964a594d57ef8399 /widgets
parent855ac5276542db2a3b236113dad6af7bc6af8d3c (diff)
downloadgsoc2013-evolution-5cc2615a37ebd621954d386639ae261165bc09ef.tar
gsoc2013-evolution-5cc2615a37ebd621954d386639ae261165bc09ef.tar.gz
gsoc2013-evolution-5cc2615a37ebd621954d386639ae261165bc09ef.tar.bz2
gsoc2013-evolution-5cc2615a37ebd621954d386639ae261165bc09ef.tar.lz
gsoc2013-evolution-5cc2615a37ebd621954d386639ae261165bc09ef.tar.xz
gsoc2013-evolution-5cc2615a37ebd621954d386639ae261165bc09ef.tar.zst
gsoc2013-evolution-5cc2615a37ebd621954d386639ae261165bc09ef.zip
Remove some unused gnome-canvas options.
Simplifies the drawing code a bit. Public API removed: GnomeCanvas.center_scroll_region (is always TRUE) GnomeCanvas.pixels_per_unit (is always 1.0) gnome_canvas_set_center_scroll_region() gnome_canvas_get_center_scroll_region() gnome_canvas_set_pixels_per_unit()
Diffstat (limited to 'widgets')
-rw-r--r--widgets/misc/e-canvas.c4
-rw-r--r--widgets/text/e-text.c18
2 files changed, 7 insertions, 15 deletions
diff --git a/widgets/misc/e-canvas.c b/widgets/misc/e-canvas.c
index 21a7796b15..0c239b1a0c 100644
--- a/widgets/misc/e-canvas.c
+++ b/widgets/misc/e-canvas.c
@@ -272,8 +272,8 @@ pick_current_item (GnomeCanvas *canvas, GdkEvent *event)
/* world coords */
- x = canvas->scroll_x1 + x / canvas->pixels_per_unit;
- y = canvas->scroll_y1 + y / canvas->pixels_per_unit;
+ x = canvas->scroll_x1 + x;
+ y = canvas->scroll_y1 + y;
/* find the closest item */
diff --git a/widgets/text/e-text.c b/widgets/text/e-text.c
index fc0c5ee922..c6d3d81502 100644
--- a/widgets/text/e-text.c
+++ b/widgets/text/e-text.c
@@ -539,8 +539,8 @@ get_bounds (EText *text, gdouble *px1, gdouble *py1, gdouble *px2, gdouble *py2)
clip_height = text->clip_height;
/* Get canvas pixel coordinates for clip rectangle position */
- text->clip_cwidth = clip_width * item->canvas->pixels_per_unit;
- text->clip_cheight = clip_height * item->canvas->pixels_per_unit;
+ text->clip_cwidth = clip_width;
+ text->clip_cheight = clip_height;
text->text_cx = text->cx;
text->text_cy = text->cy;
@@ -1006,11 +1006,11 @@ e_text_get_property (GObject *object,
break;
case PROP_TEXT_WIDTH:
- g_value_set_double (value, text->width / text->item.canvas->pixels_per_unit);
+ g_value_set_double (value, text->width);
break;
case PROP_TEXT_HEIGHT:
- g_value_set_double (value, text->height / text->item.canvas->pixels_per_unit);
+ g_value_set_double (value, text->height);
break;
case PROP_EDITABLE:
@@ -1045,8 +1045,7 @@ e_text_get_property (GObject *object,
g_value_set_double (
value, text->clip &&
text->clip_height != -1 ?
- text->clip_height : text->height /
- text->item.canvas->pixels_per_unit);
+ text->clip_height : text->height);
break;
case PROP_DRAW_BORDERS:
@@ -1557,10 +1556,6 @@ e_text_point (GnomeCanvasItem *item, gdouble x, gdouble y,
else
clip_height = text->clip_height;
- /* Get canvas pixel coordinates for clip rectangle position */
- clip_width = clip_width * item->canvas->pixels_per_unit;
- clip_height = clip_height * item->canvas->pixels_per_unit;
-
if (cx < text->clip_cx ||
cx > text->clip_cx + clip_width ||
cy < text->clip_cy ||
@@ -1604,9 +1599,6 @@ e_text_bounds (GnomeCanvasItem *item,
height = text->clip_height;
}
- width = width / item->canvas->pixels_per_unit;
- height = height / item->canvas->pixels_per_unit;
-
*x2 = *x1 + width;
*y2 = *y1 + height;
}