aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-10-25 22:36:27 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-10-27 01:31:26 +0800
commit5d812173d0e4e12a74bce2ee137d04b0e56db827 (patch)
tree3e86f53297ae3f0e5c61385c9fa430ca1bb05373
parentde12bb89a800991bd63ce09ae42b04e1f7903198 (diff)
downloadgsoc2013-evolution-5d812173d0e4e12a74bce2ee137d04b0e56db827.tar
gsoc2013-evolution-5d812173d0e4e12a74bce2ee137d04b0e56db827.tar.gz
gsoc2013-evolution-5d812173d0e4e12a74bce2ee137d04b0e56db827.tar.bz2
gsoc2013-evolution-5d812173d0e4e12a74bce2ee137d04b0e56db827.tar.lz
gsoc2013-evolution-5d812173d0e4e12a74bce2ee137d04b0e56db827.tar.xz
gsoc2013-evolution-5d812173d0e4e12a74bce2ee137d04b0e56db827.tar.zst
gsoc2013-evolution-5d812173d0e4e12a74bce2ee137d04b0e56db827.zip
Drop usage of GtkAnchorType.
gtk+-3.0 removed it for being "unused".
-rw-r--r--addressbook/gui/widgets/e-minicard-label.c2
-rw-r--r--addressbook/gui/widgets/e-minicard.c1
-rw-r--r--calendar/gui/e-day-view.c4
-rw-r--r--calendar/gui/e-week-view.c1
-rw-r--r--calendar/gui/weekday-picker.c1
-rw-r--r--libgnomecanvas/gnome-canvas-pixbuf.c70
-rw-r--r--libgnomecanvas/gnome-canvas-rich-text.c85
-rw-r--r--libgnomecanvas/gnome-canvas-text.c111
-rw-r--r--libgnomecanvas/gnome-canvas-text.h2
-rw-r--r--libgnomecanvas/gnome-canvas-widget.c111
-rw-r--r--libgnomecanvas/gnome-canvas-widget.h2
-rw-r--r--widgets/table/e-table-click-to-add.c1
-rw-r--r--widgets/table/e-table-group-container.c1
-rw-r--r--widgets/table/e-tree.c1
-rw-r--r--widgets/text/e-reflow.c1
-rw-r--r--widgets/text/e-text.c100
-rw-r--r--widgets/text/e-text.h2
17 files changed, 7 insertions, 489 deletions
diff --git a/addressbook/gui/widgets/e-minicard-label.c b/addressbook/gui/widgets/e-minicard-label.c
index 6b01750a87..4b05f11138 100644
--- a/addressbook/gui/widgets/e-minicard-label.c
+++ b/addressbook/gui/widgets/e-minicard-label.c
@@ -307,7 +307,6 @@ e_minicard_label_realize (GnomeCanvasItem *item)
e_minicard_label->fieldname =
gnome_canvas_item_new ( group,
e_text_get_type (),
- "anchor", GTK_ANCHOR_NW,
"clip_width", (double) ( e_minicard_label->width / 2 - 4 ),
"clip", TRUE,
"use_ellipsis", TRUE,
@@ -320,7 +319,6 @@ e_minicard_label_realize (GnomeCanvasItem *item)
e_minicard_label->field =
gnome_canvas_item_new ( group,
e_text_get_type (),
- "anchor", GTK_ANCHOR_NW,
"clip_width", (double) ( ( e_minicard_label->width + 1 ) / 2 - 4 ),
"clip", TRUE,
"use_ellipsis", TRUE,
diff --git a/addressbook/gui/widgets/e-minicard.c b/addressbook/gui/widgets/e-minicard.c
index e3dc55bb70..a91e0c3a14 100644
--- a/addressbook/gui/widgets/e-minicard.c
+++ b/addressbook/gui/widgets/e-minicard.c
@@ -516,7 +516,6 @@ e_minicard_realize (GnomeCanvasItem *item)
e_minicard->header_text =
gnome_canvas_item_new ( group,
e_text_get_type (),
- "anchor", GTK_ANCHOR_NW,
"width", (double) MAX( e_minicard->width - 12, 0 ),
"clip", TRUE,
"use_ellipsis", TRUE,
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c
index aa081ca3d1..758b18d93c 100644
--- a/calendar/gui/e-day-view.c
+++ b/calendar/gui/e-day-view.c
@@ -1162,7 +1162,6 @@ e_day_view_init (EDayView *day_view)
day_view->drag_long_event_item =
gnome_canvas_item_new (canvas_group,
e_text_get_type (),
- "anchor", GTK_ANCHOR_NW,
"line_wrap", TRUE,
"clip", TRUE,
"max_lines", 1,
@@ -1242,7 +1241,6 @@ e_day_view_init (EDayView *day_view)
day_view->drag_item =
gnome_canvas_item_new (canvas_group,
e_text_get_type (),
- "anchor", GTK_ANCHOR_NW,
"line_wrap", TRUE,
"clip", TRUE,
"editable", TRUE,
@@ -4942,7 +4940,6 @@ e_day_view_reshape_long_event (EDayView *day_view,
event->canvas_item =
gnome_canvas_item_new (GNOME_CANVAS_GROUP (GNOME_CANVAS (day_view->top_canvas)->root),
e_text_get_type (),
- "anchor", GTK_ANCHOR_NW,
"clip", TRUE,
"max_lines", 1,
"editable", TRUE,
@@ -5129,7 +5126,6 @@ e_day_view_reshape_day_event (EDayView *day_view,
event->canvas_item =
gnome_canvas_item_new (GNOME_CANVAS_GROUP (GNOME_CANVAS (day_view->main_canvas)->root),
e_text_get_type (),
- "anchor", GTK_ANCHOR_NW,
"line_wrap", TRUE,
"editable", TRUE,
"clip", TRUE,
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c
index 86d5774e46..bb6784d053 100644
--- a/calendar/gui/e-week-view.c
+++ b/calendar/gui/e-week-view.c
@@ -3200,7 +3200,6 @@ e_week_view_reshape_event_span (EWeekView *week_view,
span->text_item =
gnome_canvas_item_new (GNOME_CANVAS_GROUP (GNOME_CANVAS (week_view->main_canvas)->root),
e_text_get_type (),
- "anchor", GTK_ANCHOR_NW,
"clip", TRUE,
"max_lines", 1,
"editable", TRUE,
diff --git a/calendar/gui/weekday-picker.c b/calendar/gui/weekday-picker.c
index 7586ad2439..490e9feb17 100644
--- a/calendar/gui/weekday-picker.c
+++ b/calendar/gui/weekday-picker.c
@@ -182,7 +182,6 @@ configure_items (WeekdayPicker *wp)
"text", c,
"x", (double) (i * box_width) + box_width / 2.0,
"y", (double) (1 + PADDING),
- "anchor", GTK_ANCHOR_N,
NULL);
g_free (c);
}
diff --git a/libgnomecanvas/gnome-canvas-pixbuf.c b/libgnomecanvas/gnome-canvas-pixbuf.c
index 3ea3f647be..9ae353b1f8 100644
--- a/libgnomecanvas/gnome-canvas-pixbuf.c
+++ b/libgnomecanvas/gnome-canvas-pixbuf.c
@@ -59,9 +59,6 @@ typedef struct {
/* Whether the transformation or size have changed */
guint need_xform_update : 1;
-
- /* Anchor */
- GtkAnchorType anchor;
} PixbufPrivate;
/* Object argument IDs */
@@ -77,8 +74,7 @@ enum {
PROP_X,
PROP_X_IN_PIXELS,
PROP_Y,
- PROP_Y_IN_PIXELS,
- PROP_ANCHOR
+ PROP_Y_IN_PIXELS
};
static void gnome_canvas_pixbuf_class_init (GnomeCanvasPixbufClass *class);
@@ -227,13 +223,6 @@ gnome_canvas_pixbuf_class_init (GnomeCanvasPixbufClass *class)
g_param_spec_boolean ("y_in_pixels", NULL, NULL,
FALSE,
(G_PARAM_READABLE | G_PARAM_WRITABLE)));
- g_object_class_install_property
- (gobject_class,
- PROP_ANCHOR,
- g_param_spec_enum ("anchor", NULL, NULL,
- GTK_TYPE_ANCHOR_TYPE,
- GTK_ANCHOR_NW,
- (G_PARAM_READABLE | G_PARAM_WRITABLE)));
item_class->destroy = gnome_canvas_pixbuf_destroy;
item_class->update = gnome_canvas_pixbuf_update;
@@ -256,7 +245,6 @@ gnome_canvas_pixbuf_init (GnomeCanvasPixbuf *gcp)
priv->height = 0.0;
priv->x = 0.0;
priv->y = 0.0;
- priv->anchor = GTK_ANCHOR_NW;
}
/* Destroy handler for the pixbuf canvas item */
@@ -406,12 +394,6 @@ gnome_canvas_pixbuf_set_property (GObject *object,
gnome_canvas_item_request_update (item);
break;
- case PROP_ANCHOR:
- priv->anchor = g_value_get_enum (value);
- priv->need_xform_update = TRUE;
- gnome_canvas_item_request_update (item);
- break;
-
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
break;
@@ -479,10 +461,6 @@ gnome_canvas_pixbuf_get_property (GObject *object,
g_value_set_boolean (value, priv->y_in_pixels);
break;
- case PROP_ANCHOR:
- g_value_set_enum (value, priv->anchor);
- break;
-
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
break;
@@ -595,29 +573,6 @@ compute_viewport_affine (GnomeCanvasPixbuf *gcp,
} else
ti_len = 1.0;
- switch (priv->anchor) {
- case GTK_ANCHOR_NW:
- case GTK_ANCHOR_W:
- case GTK_ANCHOR_SW:
- ti_len *= x;
- break;
-
- case GTK_ANCHOR_N:
- case GTK_ANCHOR_CENTER:
- case GTK_ANCHOR_S:
- ti_len *= x - w * si_len / 2;
- break;
-
- case GTK_ANCHOR_NE:
- case GTK_ANCHOR_E:
- case GTK_ANCHOR_SE:
- ti_len *= x - w * si_len;
- break;
-
- default:
- break;
- }
-
if (priv->y_in_pixels) {
if (j_len > GNOME_CANVAS_EPSILON)
tj_len = 1.0 / j_len;
@@ -626,29 +581,6 @@ compute_viewport_affine (GnomeCanvasPixbuf *gcp,
} else
tj_len = 1.0;
- switch (priv->anchor) {
- case GTK_ANCHOR_NW:
- case GTK_ANCHOR_N:
- case GTK_ANCHOR_NE:
- tj_len *= y;
- break;
-
- case GTK_ANCHOR_W:
- case GTK_ANCHOR_CENTER:
- case GTK_ANCHOR_E:
- tj_len *= y - h * sj_len / 2;
- break;
-
- case GTK_ANCHOR_SW:
- case GTK_ANCHOR_S:
- case GTK_ANCHOR_SE:
- tj_len *= y - h * sj_len;
- break;
-
- default:
- break;
- }
-
/* Compute the final affine */
art_affine_scale (scale, si_len, sj_len);
diff --git a/libgnomecanvas/gnome-canvas-rich-text.c b/libgnomecanvas/gnome-canvas-rich-text.c
index bd988ae3f5..2decb1dfbf 100644
--- a/libgnomecanvas/gnome-canvas-rich-text.c
+++ b/libgnomecanvas/gnome-canvas-rich-text.c
@@ -58,7 +58,6 @@ struct _GnomeCanvasRichTextPrivate {
GtkWrapMode wrap_mode;
GtkJustification justification;
GtkTextDirection direction;
- GtkAnchorType anchor;
gint pixels_above_lines;
gint pixels_below_lines;
gint pixels_inside_wrap;
@@ -316,15 +315,6 @@ gnome_canvas_rich_text_class_init (GnomeCanvasRichTextClass *klass)
G_PARAM_READWRITE));
g_object_class_install_property (
gobject_class,
- PROP_ANCHOR,
- g_param_spec_enum ("anchor",
- "Anchor",
- "Anchor point for text",
- GTK_TYPE_ANCHOR_TYPE,
- GTK_ANCHOR_NW,
- G_PARAM_READWRITE));
- g_object_class_install_property (
- gobject_class,
PROP_PIXELS_ABOVE_LINES,
g_param_spec_int ("pixels_above_lines",
"Pixels Above Lines",
@@ -418,7 +408,6 @@ gnome_canvas_rich_text_init (GnomeCanvasRichText *text)
text->_priv->wrap_mode = GTK_WRAP_WORD;
text->_priv->justification = GTK_JUSTIFY_LEFT;
text->_priv->direction = gtk_widget_get_default_direction ();
- text->_priv->anchor = GTK_ANCHOR_NW;
text->_priv->blink_timeout = 0;
text->_priv->preblink_timeout = 0;
@@ -531,9 +520,6 @@ gnome_canvas_rich_text_set_property (GObject *object, guint property_id,
gtk_text_layout_default_style_changed (text->_priv->layout);
}
break;
- case PROP_ANCHOR:
- text->_priv->anchor = g_value_get_enum (value);
- break;
case PROP_PIXELS_ABOVE_LINES:
text->_priv->pixels_above_lines = g_value_get_int (value);
@@ -639,9 +625,6 @@ gnome_canvas_rich_text_get_property (GObject *object, guint property_id,
case PROP_DIRECTION:
g_value_set_enum (value, text->_priv->direction);
break;
- case PROP_ANCHOR:
- g_value_set_enum (value, text->_priv->anchor);
- break;
case PROP_PIXELS_ABOVE_LINES:
g_value_set_enum (value, text->_priv->pixels_above_lines);
break;
@@ -1969,65 +1952,6 @@ gnome_canvas_rich_text_destroy_layout (GnomeCanvasRichText *text)
} /* gnome_canvas_rich_text_destroy_layout */
static void
-adjust_for_anchors (GnomeCanvasRichText *text, gdouble *ax, gdouble *ay)
-{
- gdouble x, y;
-
- x = text->_priv->x;
- y = text->_priv->y;
-
- /* Anchor text */
- /* X coordinates */
- switch (text->_priv->anchor) {
- case GTK_ANCHOR_NW:
- case GTK_ANCHOR_W:
- case GTK_ANCHOR_SW:
- break;
-
- case GTK_ANCHOR_N:
- case GTK_ANCHOR_CENTER:
- case GTK_ANCHOR_S:
- x -= text->_priv->width / 2;
- break;
-
- case GTK_ANCHOR_NE:
- case GTK_ANCHOR_E:
- case GTK_ANCHOR_SE:
- x -= text->_priv->width;
- break;
- default:
- break;
- }
-
- /* Y coordinates */
- switch (text->_priv->anchor) {
- case GTK_ANCHOR_NW:
- case GTK_ANCHOR_N:
- case GTK_ANCHOR_NE:
- break;
-
- case GTK_ANCHOR_W:
- case GTK_ANCHOR_CENTER:
- case GTK_ANCHOR_E:
- y -= text->_priv->height / 2;
- break;
-
- case GTK_ANCHOR_SW:
- case GTK_ANCHOR_S:
- case GTK_ANCHOR_SE:
- y -= text->_priv->height;
- break;
- default:
- break;
- }
-
- if (ax)
- *ax = x;
- if (ay)
- *ay = y;
-} /* adjust_for_anchors */
-
-static void
get_bounds (GnomeCanvasRichText *text, gdouble *px1, gdouble *py1,
gdouble *px2, gdouble *py2)
{
@@ -2036,7 +1960,8 @@ get_bounds (GnomeCanvasRichText *text, gdouble *px1, gdouble *py1,
gdouble x1, x2, y1, y2;
gint cx1, cx2, cy1, cy2;
- adjust_for_anchors (text, &x, &y);
+ x = text->_priv->x;
+ y = text->_priv->y;
x1 = x;
y1 = y;
@@ -2099,7 +2024,8 @@ gnome_canvas_rich_text_point (GnomeCanvasItem *item, gdouble x, gdouble y,
/* This is a lame cop-out. Anywhere inside of the bounding box. */
- adjust_for_anchors (text, &ax, &ay);
+ ax = text->_priv->x;
+ ay = text->_priv->y;
x1 = ax;
y1 = ay;
@@ -2143,7 +2069,8 @@ gnome_canvas_rich_text_draw (GnomeCanvasItem *item, GdkDrawable *drawable,
gnome_canvas_w2c_affine (item->canvas, w2c);
art_affine_multiply (i2c, i2w, w2c);
- adjust_for_anchors (text, &ax, &ay);
+ ax = text->_priv->x;
+ ay = text->_priv->y;
i1.x = ax;
i1.y = ay;
diff --git a/libgnomecanvas/gnome-canvas-text.c b/libgnomecanvas/gnome-canvas-text.c
index 5f7679f3aa..7b3dd0695b 100644
--- a/libgnomecanvas/gnome-canvas-text.c
+++ b/libgnomecanvas/gnome-canvas-text.c
@@ -79,7 +79,6 @@ enum {
PROP_SCALE, PROP_SCALE_SET,
/* Clipping */
- PROP_ANCHOR,
PROP_JUSTIFICATION,
PROP_CLIP_WIDTH,
PROP_CLIP_HEIGHT,
@@ -374,13 +373,6 @@ gnome_canvas_text_class_init (GnomeCanvasTextClass *class)
G_PARAM_READABLE | G_PARAM_WRITABLE));
g_object_class_install_property
- (gobject_class,
- PROP_ANCHOR,
- g_param_spec_enum ("anchor", NULL, NULL,
- GTK_TYPE_ANCHOR_TYPE,
- GTK_ANCHOR_CENTER,
- (G_PARAM_READABLE | G_PARAM_WRITABLE)));
- g_object_class_install_property
(gobject_class,
PROP_JUSTIFICATION,
g_param_spec_enum ("justification", NULL, NULL,
@@ -527,7 +519,6 @@ gnome_canvas_text_init (GnomeCanvasText *text)
{
text->x = 0.0;
text->y = 0.0;
- text->anchor = GTK_ANCHOR_CENTER;
text->justification = GTK_JUSTIFY_LEFT;
text->clip_width = 0.0;
text->clip_height = 0.0;
@@ -619,56 +610,6 @@ get_bounds (GnomeCanvasText *text,
text->clip_cwidth = text->clip_width * item->canvas->pixels_per_unit;
text->clip_cheight = text->clip_height * item->canvas->pixels_per_unit;
- /* Anchor text */
-
- switch (text->anchor) {
- case GTK_ANCHOR_NW:
- case GTK_ANCHOR_W:
- case GTK_ANCHOR_SW:
- break;
-
- case GTK_ANCHOR_N:
- case GTK_ANCHOR_CENTER:
- case GTK_ANCHOR_S:
- text->cx -= text->max_width / 2;
- text->clip_cx -= text->clip_cwidth / 2;
- break;
-
- case GTK_ANCHOR_NE:
- case GTK_ANCHOR_E:
- case GTK_ANCHOR_SE:
- text->cx -= text->max_width;
- text->clip_cx -= text->clip_cwidth;
- break;
-
- default:
- break;
- }
-
- switch (text->anchor) {
- case GTK_ANCHOR_NW:
- case GTK_ANCHOR_N:
- case GTK_ANCHOR_NE:
- break;
-
- case GTK_ANCHOR_W:
- case GTK_ANCHOR_CENTER:
- case GTK_ANCHOR_E:
- text->cy -= text->height / 2;
- text->clip_cy -= text->clip_cheight / 2;
- break;
-
- case GTK_ANCHOR_SW:
- case GTK_ANCHOR_S:
- case GTK_ANCHOR_SE:
- text->cy -= text->height;
- text->clip_cy -= text->clip_cheight;
- break;
-
- default:
- break;
- }
-
/* Bounds */
if (text->clip) {
@@ -984,10 +925,6 @@ gnome_canvas_text_set_property (GObject *object,
text->priv->render_dirty = 1;
break;
- case PROP_ANCHOR:
- text->anchor = g_value_get_enum (value);
- break;
-
case PROP_JUSTIFICATION:
text->justification = g_value_get_enum (value);
@@ -1244,10 +1181,6 @@ gnome_canvas_text_get_property (GObject *object,
g_value_set_boxed (value, text->attr_list);
break;
- case PROP_ANCHOR:
- g_value_set_enum (value, text->anchor);
- break;
-
case PROP_JUSTIFICATION:
g_value_set_enum (value, text->justification);
break;
@@ -1720,50 +1653,6 @@ gnome_canvas_text_bounds (GnomeCanvasItem *item,
height = text->height / item->canvas->pixels_per_unit;
}
- switch (text->anchor) {
- case GTK_ANCHOR_NW:
- case GTK_ANCHOR_W:
- case GTK_ANCHOR_SW:
- break;
-
- case GTK_ANCHOR_N:
- case GTK_ANCHOR_CENTER:
- case GTK_ANCHOR_S:
- *x1 -= width / 2.0;
- break;
-
- case GTK_ANCHOR_NE:
- case GTK_ANCHOR_E:
- case GTK_ANCHOR_SE:
- *x1 -= width;
- break;
-
- default:
- break;
- }
-
- switch (text->anchor) {
- case GTK_ANCHOR_NW:
- case GTK_ANCHOR_N:
- case GTK_ANCHOR_NE:
- break;
-
- case GTK_ANCHOR_W:
- case GTK_ANCHOR_CENTER:
- case GTK_ANCHOR_E:
- *y1 -= height / 2.0;
- break;
-
- case GTK_ANCHOR_SW:
- case GTK_ANCHOR_S:
- case GTK_ANCHOR_SE:
- *y1 -= height;
- break;
-
- default:
- break;
- }
-
*x2 = *x1 + width;
*y2 = *y1 + height;
}
diff --git a/libgnomecanvas/gnome-canvas-text.h b/libgnomecanvas/gnome-canvas-text.h
index 64eda6a9d4..0d754dab4b 100644
--- a/libgnomecanvas/gnome-canvas-text.h
+++ b/libgnomecanvas/gnome-canvas-text.h
@@ -75,7 +75,6 @@ G_BEGIN_DECLS
* size_points gdouble RW Size (in points) of font
* scale gdouble RW Ratio to scale font [*]
*
- * anchor GtkAnchorType RW Anchor side for the text
* justification GtkJustification RW Justification for multiline text
* clip_width gdouble RW Width of clip rectangle
* clip_height gdouble RW Height of clip rectangle
@@ -130,7 +129,6 @@ struct _GnomeCanvasText {
gdouble affine[6]; /* The item -> canvas affine */ /*AA*/
- GtkAnchorType anchor; /* Anchor side for text */
GtkJustification justification; /* Justification for text */
gint cx, cy; /* Top-left canvas coordinates for text */
diff --git a/libgnomecanvas/gnome-canvas-widget.c b/libgnomecanvas/gnome-canvas-widget.c
index fbcb0a6a53..85259f0ce0 100644
--- a/libgnomecanvas/gnome-canvas-widget.c
+++ b/libgnomecanvas/gnome-canvas-widget.c
@@ -43,7 +43,6 @@ enum {
PROP_Y,
PROP_WIDTH,
PROP_HEIGHT,
- PROP_ANCHOR,
PROP_SIZE_PIXELS
};
@@ -158,13 +157,6 @@ gnome_canvas_widget_class_init (GnomeCanvasWidgetClass *class)
(G_PARAM_READABLE | G_PARAM_WRITABLE)));
g_object_class_install_property
(gobject_class,
- PROP_ANCHOR,
- g_param_spec_enum ("anchor", NULL, NULL,
- GTK_TYPE_ANCHOR_TYPE,
- GTK_ANCHOR_NW,
- (G_PARAM_READABLE | G_PARAM_WRITABLE)));
- g_object_class_install_property
- (gobject_class,
PROP_SIZE_PIXELS,
g_param_spec_boolean ("size_pixels", NULL, NULL,
FALSE,
@@ -198,7 +190,6 @@ gnome_canvas_widget_init (GnomeCanvasWidget *witem)
witem->y = 0.0;
witem->width = 0.0;
witem->height = 0.0;
- witem->anchor = GTK_ANCHOR_NW;
witem->size_pixels = FALSE;
}
@@ -240,52 +231,6 @@ recalc_bounds (GnomeCanvasWidget *witem)
gnome_canvas_w2c (item->canvas, wx, wy, &witem->cx, &witem->cy);
- /* Anchor widget item */
-
- switch (witem->anchor) {
- case GTK_ANCHOR_NW:
- case GTK_ANCHOR_W:
- case GTK_ANCHOR_SW:
- break;
-
- case GTK_ANCHOR_N:
- case GTK_ANCHOR_CENTER:
- case GTK_ANCHOR_S:
- witem->cx -= witem->cwidth / 2;
- break;
-
- case GTK_ANCHOR_NE:
- case GTK_ANCHOR_E:
- case GTK_ANCHOR_SE:
- witem->cx -= witem->cwidth;
- break;
-
- default:
- break;
- }
-
- switch (witem->anchor) {
- case GTK_ANCHOR_NW:
- case GTK_ANCHOR_N:
- case GTK_ANCHOR_NE:
- break;
-
- case GTK_ANCHOR_W:
- case GTK_ANCHOR_CENTER:
- case GTK_ANCHOR_E:
- witem->cy -= witem->cheight / 2;
- break;
-
- case GTK_ANCHOR_SW:
- case GTK_ANCHOR_S:
- case GTK_ANCHOR_SE:
- witem->cy -= witem->cheight;
- break;
-
- default:
- break;
- }
-
/* Bounds */
item->x1 = witem->cx;
@@ -371,14 +316,6 @@ gnome_canvas_widget_set_property (GObject *object,
}
break;
- case PROP_ANCHOR:
- if (witem->anchor != g_value_get_enum (value))
- {
- witem->anchor = g_value_get_enum (value);
- update = TRUE;
- }
- break;
-
case PROP_SIZE_PIXELS:
if (witem->size_pixels != g_value_get_boolean (value))
{
@@ -433,10 +370,6 @@ gnome_canvas_widget_get_property (GObject *object,
g_value_set_double (value, witem->height);
break;
- case PROP_ANCHOR:
- g_value_set_enum (value, witem->anchor);
- break;
-
case PROP_SIZE_PIXELS:
g_value_set_boolean (value, witem->size_pixels);
break;
@@ -564,50 +497,6 @@ gnome_canvas_widget_bounds (GnomeCanvasItem *item,
*x1 = witem->x;
*y1 = witem->y;
- switch (witem->anchor) {
- case GTK_ANCHOR_NW:
- case GTK_ANCHOR_W:
- case GTK_ANCHOR_SW:
- break;
-
- case GTK_ANCHOR_N:
- case GTK_ANCHOR_CENTER:
- case GTK_ANCHOR_S:
- *x1 -= witem->width / 2.0;
- break;
-
- case GTK_ANCHOR_NE:
- case GTK_ANCHOR_E:
- case GTK_ANCHOR_SE:
- *x1 -= witem->width;
- break;
-
- default:
- break;
- }
-
- switch (witem->anchor) {
- case GTK_ANCHOR_NW:
- case GTK_ANCHOR_N:
- case GTK_ANCHOR_NE:
- break;
-
- case GTK_ANCHOR_W:
- case GTK_ANCHOR_CENTER:
- case GTK_ANCHOR_E:
- *y1 -= witem->height / 2.0;
- break;
-
- case GTK_ANCHOR_SW:
- case GTK_ANCHOR_S:
- case GTK_ANCHOR_SE:
- *y1 -= witem->height;
- break;
-
- default:
- break;
- }
-
*x2 = *x1 + witem->width;
*y2 = *y1 + witem->height;
}
diff --git a/libgnomecanvas/gnome-canvas-widget.h b/libgnomecanvas/gnome-canvas-widget.h
index 62000299b1..f96a52ea92 100644
--- a/libgnomecanvas/gnome-canvas-widget.h
+++ b/libgnomecanvas/gnome-canvas-widget.h
@@ -48,7 +48,6 @@ G_BEGIN_DECLS
* y gdouble RW Y coordinate of anchor point
* width gdouble RW Width of widget (see below)
* height gdouble RW Height of widget (see below)
- * anchor GtkAnchorType RW Anchor side for widget
* size_pixels boolean RW Specifies whether the widget size
* is specified in pixels or canvas units.
* If it is in pixels, then the widget will not
@@ -73,7 +72,6 @@ struct _GnomeCanvasWidget {
gdouble x, y; /* Position at anchor */
gdouble width, height; /* Dimensions of widget */
- GtkAnchorType anchor; /* Anchor side for widget */
gint cx, cy; /* Top-left canvas coordinates for widget */
gint cwidth, cheight; /* Size of widget in pixels */
diff --git a/widgets/table/e-table-click-to-add.c b/widgets/table/e-table-click-to-add.c
index 8f46620ae5..a68e7f755f 100644
--- a/widgets/table/e-table-click-to-add.c
+++ b/widgets/table/e-table-click-to-add.c
@@ -266,7 +266,6 @@ create_rect_and_text (ETableClickToAdd *etcta)
GNOME_CANVAS_GROUP (etcta),
e_text_get_type (),
"text", etcta->message ? etcta->message : "",
- "anchor", GTK_ANCHOR_NW,
"width", etcta->width - 4,
"draw_background", FALSE,
"fill_color_gdk", &style->text[GTK_STATE_NORMAL],
diff --git a/widgets/table/e-table-group-container.c b/widgets/table/e-table-group-container.c
index 4f5a8751c3..898672430c 100644
--- a/widgets/table/e-table-group-container.c
+++ b/widgets/table/e-table-group-container.c
@@ -439,7 +439,6 @@ create_child_node (ETableGroupContainer *etgc, gpointer val)
NULL);
child_node->text = gnome_canvas_item_new (GNOME_CANVAS_GROUP (etgc),
e_text_get_type (),
- "anchor", GTK_ANCHOR_SW,
"fill_color", "black",
"draw_background", FALSE,
NULL);
diff --git a/widgets/table/e-tree.c b/widgets/table/e-tree.c
index dfb145e86f..b9f1437b49 100644
--- a/widgets/table/e-tree.c
+++ b/widgets/table/e-tree.c
@@ -3651,7 +3651,6 @@ e_tree_set_info_message (ETree *tree, const gchar *info_message)
tree->priv->info_text = gnome_canvas_item_new (
GNOME_CANVAS_GROUP (gnome_canvas_root (tree->priv->table_canvas)),
e_text_get_type (),
- "anchor", GTK_ANCHOR_NW,
"line_wrap", TRUE,
"clip", TRUE,
"justification", GTK_JUSTIFY_LEFT,
diff --git a/widgets/text/e-reflow.c b/widgets/text/e-reflow.c
index a796d92bba..cc1c64ebfa 100644
--- a/widgets/text/e-reflow.c
+++ b/widgets/text/e-reflow.c
@@ -545,7 +545,6 @@ set_empty (EReflow *reflow)
reflow->empty_text =
gnome_canvas_item_new (GNOME_CANVAS_GROUP (reflow),
e_text_get_type (),
- "anchor", GTK_ANCHOR_N,
"width", reflow->minimum_width,
"clip", TRUE,
"use_ellipsis", TRUE,
diff --git a/widgets/text/e-text.c b/widgets/text/e-text.c
index 90eb4d01ca..9946cab16c 100644
--- a/widgets/text/e-text.c
+++ b/widgets/text/e-text.c
@@ -540,50 +540,6 @@ get_bounds (EText *text, gdouble *px1, gdouble *py1, gdouble *px2, gdouble *py2)
text->clip_cwidth = clip_width * item->canvas->pixels_per_unit;
text->clip_cheight = clip_height * item->canvas->pixels_per_unit;
- /* Anchor text */
-
- switch (text->anchor) {
- case GTK_ANCHOR_NW:
- case GTK_ANCHOR_W:
- case GTK_ANCHOR_SW:
- break;
-
- case GTK_ANCHOR_N:
- case GTK_ANCHOR_CENTER:
- case GTK_ANCHOR_S:
- text->cx -= text->width / 2;
- text->clip_cx -= text->clip_cwidth / 2;
- break;
-
- case GTK_ANCHOR_NE:
- case GTK_ANCHOR_E:
- case GTK_ANCHOR_SE:
- text->cx -= text->width;
- text->clip_cx -= text->clip_cwidth;
- break;
- }
-
- switch (text->anchor) {
- case GTK_ANCHOR_NW:
- case GTK_ANCHOR_N:
- case GTK_ANCHOR_NE:
- break;
-
- case GTK_ANCHOR_W:
- case GTK_ANCHOR_CENTER:
- case GTK_ANCHOR_E:
- text->cy -= text->height / 2;
- text->clip_cy -= text->clip_cheight / 2;
- break;
-
- case GTK_ANCHOR_SW:
- case GTK_ANCHOR_S:
- case GTK_ANCHOR_SE:
- text->cy -= text->height;
- text->clip_cy -= text->clip_cheight;
- break;
- }
-
text->text_cx = text->cx;
text->text_cy = text->cy;
@@ -783,12 +739,6 @@ e_text_set_property (GObject *object,
needs_update = 1;
break;
- case PROP_ANCHOR:
- text->anchor = g_value_get_enum (value);
- text->needs_recalc_bounds = 1;
- needs_update = 1;
- break;
-
case PROP_JUSTIFICATION:
text->justification = g_value_get_enum (value);
text->needs_redraw = 1;
@@ -1069,10 +1019,6 @@ e_text_get_property (GObject *object,
g_value_set_boolean (value, text->strikeout);
break;
- case PROP_ANCHOR:
- g_value_set_enum (value, text->anchor);
- break;
-
case PROP_JUSTIFICATION:
g_value_set_enum (value, text->justification);
break;
@@ -1794,44 +1740,6 @@ e_text_bounds (GnomeCanvasItem *item,
width = width / item->canvas->pixels_per_unit;
height = height / item->canvas->pixels_per_unit;
- switch (text->anchor) {
- case GTK_ANCHOR_NW:
- case GTK_ANCHOR_W:
- case GTK_ANCHOR_SW:
- break;
-
- case GTK_ANCHOR_N:
- case GTK_ANCHOR_CENTER:
- case GTK_ANCHOR_S:
- *x1 -= width / 2.0;
- break;
-
- case GTK_ANCHOR_NE:
- case GTK_ANCHOR_E:
- case GTK_ANCHOR_SE:
- *x1 -= width;
- break;
- }
-
- switch (text->anchor) {
- case GTK_ANCHOR_NW:
- case GTK_ANCHOR_N:
- case GTK_ANCHOR_NE:
- break;
-
- case GTK_ANCHOR_W:
- case GTK_ANCHOR_CENTER:
- case GTK_ANCHOR_E:
- *y1 -= height / 2.0;
- break;
-
- case GTK_ANCHOR_SW:
- case GTK_ANCHOR_S:
- case GTK_ANCHOR_SE:
- *y1 -= height;
- break;
- }
-
*x2 = *x1 + width;
*y2 = *y1 + height;
}
@@ -3416,13 +3324,6 @@ e_text_class_init (ETextClass *klass)
FALSE,
G_PARAM_READWRITE));
- g_object_class_install_property (gobject_class, PROP_ANCHOR,
- g_param_spec_enum ("anchor",
- "Anchor",
- "Anchor",
- GTK_TYPE_ANCHOR_TYPE, GTK_ANCHOR_CENTER,
- G_PARAM_READWRITE));
-
g_object_class_install_property (gobject_class, PROP_JUSTIFICATION,
g_param_spec_enum ("justification",
"Justification",
@@ -3648,7 +3549,6 @@ e_text_init (EText *text)
G_CALLBACK (e_text_text_model_reposition),
text);
- text->anchor = GTK_ANCHOR_CENTER;
text->justification = GTK_JUSTIFY_LEFT;
text->clip_width = -1.0;
text->clip_height = -1.0;
diff --git a/widgets/text/e-text.h b/widgets/text/e-text.h
index bed5ff95e8..ab5c4fbd51 100644
--- a/widgets/text/e-text.h
+++ b/widgets/text/e-text.h
@@ -62,7 +62,6 @@ G_BEGIN_DECLS
* ------------------------------------------------------------------------------------------
* text string RW The string of the text label
* bold boolean RW Bold?
- * anchor GtkAnchorType RW Anchor side for the text
* justification GtkJustification RW Justification for multiline text
* fill_color string W X color specification for text
* fill_color_gdk GdkColor* RW Pointer to an allocated GdkColor
@@ -114,7 +113,6 @@ struct _EText {
gchar *revert; /* Text to revert to */
- GtkAnchorType anchor; /* Anchor side for text */
GtkJustification justification; /* Justification for text */
gdouble clip_width; /* Width of optional clip rectangle */