aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/text/e-text.c
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 /widgets/text/e-text.c
parentde12bb89a800991bd63ce09ae42b04e1f7903198 (diff)
downloadgsoc2013-evolution-5d812173d0e4e12a74bce2ee137d04b0e56db827.tar.gz
gsoc2013-evolution-5d812173d0e4e12a74bce2ee137d04b0e56db827.tar.zst
gsoc2013-evolution-5d812173d0e4e12a74bce2ee137d04b0e56db827.zip
Drop usage of GtkAnchorType.
gtk+-3.0 removed it for being "unused".
Diffstat (limited to 'widgets/text/e-text.c')
-rw-r--r--widgets/text/e-text.c100
1 files changed, 0 insertions, 100 deletions
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;