aboutsummaryrefslogtreecommitdiffstats
path: root/libgnomecanvas/gnome-canvas-widget.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 /libgnomecanvas/gnome-canvas-widget.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 'libgnomecanvas/gnome-canvas-widget.c')
-rw-r--r--libgnomecanvas/gnome-canvas-widget.c111
1 files changed, 0 insertions, 111 deletions
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;
}