aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/text
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
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')
-rw-r--r--widgets/text/e-reflow.c1
-rw-r--r--widgets/text/e-text.c100
-rw-r--r--widgets/text/e-text.h2
3 files changed, 0 insertions, 103 deletions
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 */