Commit da513839 authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg

http://bugzilla.gnome.org/show_bug.cgi?id=137377 init markup even if there

2004-03-16  Jody Goldberg <jody@gnome.org>

	http://bugzilla.gnome.org/show_bug.cgi?id=137377
	* ms-obj.c (ms_read_TXO) : init markup even if there is no string.

2004-03-16  Jody Goldberg <jody@gnome.org>

	http://bugzilla.gnome.org/show_bug.cgi?id=137357
	* src/item-bar.c : Use a custom detail 'GnmItemBarCell' rather than
	  the more generic 'button' to keep some themes 'industrial and gorilla'
	  from freaking out at the lack of button.
parent fd657198
......@@ -387,7 +387,7 @@ Short Term Goals
1.32.3) axis labels
1.32.4) fix xls import of marker vs no marker
1.33) Single point formating
1.33.1) Basic {emmanual}
1.33.1) Basic (DONE)
2) stf {Andreas/Morten}
2.1) UTF-8 cleanliness (DONE)
......
2004-03-16 Jody Goldberg <jody@gnome.org>
http://bugzilla.gnome.org/show_bug.cgi?id=137357
* src/item-bar.c : Use a custom detail 'GnmItemBarCell' rather than
the more generic 'button' to keep some themes 'industrial and gorilla'
from freaking out at the lack of button.
2004-03-16 Jody Goldberg <jody@gnome.org>
* configure.in : bump the gtk req to reflect the churn in the filesel
2004-03-16 Morten Welinder <terra@gnome.org>
* src/sheet-autofill.c (autofill_cell): Kill some read-only
......
2004-03-16 Jody Goldberg <jody@gnome.org>
http://bugzilla.gnome.org/show_bug.cgi?id=137357
* src/item-bar.c : Use a custom detail 'GnmItemBarCell' rather than
the more generic 'button' to keep some themes 'industrial and gorilla'
from freaking out at the lack of button.
2004-03-16 Jody Goldberg <jody@gnome.org>
* configure.in : bump the gtk req to reflect the churn in the filesel
2004-03-16 Morten Welinder <terra@gnome.org>
* src/sheet-autofill.c (autofill_cell): Kill some read-only
......
......@@ -44,11 +44,11 @@ Please use another compiler, for example a gcc 2.95 series compiler.])
fi
gnumeric_reqs="
glib-2.0 >= 2.3.2
glib-2.0 >= 2.3.3
gobject-2.0 >= 2.3.2
gmodule-2.0 >= 2.0.0
libgsf-1 >= 1.8.2
gtk+-2.0 >= 2.3.2
gtk+-2.0 >= 2.3.5
libxml-2.0 >= 2.4.12
libglade-2.0 >= 2.0.0
libgnomecanvas-2.0 >= 2.0.0
......
......@@ -155,8 +155,7 @@ scc_finalize (GObject *obj)
}
parent_class = g_type_class_peek (SHEET_CONTROL_TYPE);
if (parent_class->finalize)
parent_class->finalize (obj);
parent_class->finalize (obj);
}
static void
......
......@@ -246,8 +246,7 @@ wbcc_finalize (GObject *obj)
CORBA_exception_free (&ev);
parent_class = g_type_class_peek (WORKBOOK_CONTROL_TYPE);
if (parent_class->finalize)
parent_class->finalize (obj);
(*parent_class->finalize) (obj);
}
static void
......
2004-03-16 Jody Goldberg <jody@gnome.org>
http://bugzilla.gnome.org/show_bug.cgi?id=137377
* ms-obj.c (ms_read_TXO) : init markup even if there is no string.
2004-03-11 Jody Goldberg <jody@gnome.org>
http://bugzilla.gnome.org/show_bug.cgi?id=136730
......
......@@ -1847,10 +1847,11 @@ ms_escher_read_ClientTextbox (MSEscherState *state, MSEscherHeader *h)
text = ms_read_TXO (state->q, state->container, &markup);
ms_escher_header_add_attr (h,
ms_obj_attr_new_ptr (MS_OBJ_ATTR_TEXT, text));
if (markup != NULL)
if (markup != NULL) {
ms_escher_header_add_attr (h,
ms_obj_attr_new_markup (MS_OBJ_ATTR_MARKUP, markup));
pango_attr_list_unref (markup);
pango_attr_list_unref (markup);
}
d (0, printf ("'%s';\n", text););
return FALSE;
}
......
......@@ -391,6 +391,7 @@ ms_read_TXO (BiffQuery *q, MSContainer *c, PangoAttrList **markup)
char *text;
guint16 op;
*markup = NULL;
if (text_len == 0)
return NULL;
......@@ -398,7 +399,6 @@ ms_read_TXO (BiffQuery *q, MSContainer *c, PangoAttrList **markup)
g_return_val_if_fail (1 <= halign && halign <= 4, NULL);
g_return_val_if_fail (1 <= valign && valign <= 4, NULL);
*markup = NULL;
if (ms_biff_query_peek_next (q, &op) && op == BIFF_CONTINUE) {
ms_biff_query_next (q);
......
......@@ -364,7 +364,7 @@ gnumeric_accrint (FunctionEvalInfo *ei, GnmValue **argv)
if (!is_valid_basis (basis)
|| !is_valid_freq (freq)
|| g_date_compare (&settlement, &first_interest) > 0
|| g_date_compare (&settlement, &first_interest) < 0
|| g_date_compare (&first_interest, &maturity) < 0)
return value_new_error_NUM (ei->pos);
......
......@@ -36,8 +36,7 @@ complete_sheet_finalize (GObject *object)
cs->current = NULL;
}
parent_class = g_type_class_peek (PARENT_TYPE);
if (parent_class && parent_class->finalize)
parent_class->finalize (object);
parent_class->finalize (object);
}
#define MAX_SCAN_SPACE 1024
......
......@@ -57,8 +57,7 @@ complete_finalize (GObject *object)
}
parent = g_type_class_peek (PARENT_TYPE);
if (parent != NULL && parent->finalize != NULL)
(parent->finalize) (object);
(parent->finalize) (object);
}
static gint
......
......@@ -980,7 +980,8 @@ foo_canvas_text_set_property (GObject *object,
case PROP_WRAP_WIDTH: {
double w = fabs (g_value_get_double (value));
pango_layout_set_width (text->layout, w * PANGO_SCALE);
pango_layout_set_width (text->layout,
w * text->item.canvas->pixels_per_unit * PANGO_SCALE);
break;
}
......
......@@ -50,8 +50,7 @@ go_data_scalar_val_finalize (GObject *obj)
val->str = NULL;
}
if (scalar_val_parent_klass->finalize)
(*scalar_val_parent_klass->finalize) (obj);
(*scalar_val_parent_klass->finalize) (obj);
}
static GOData *
......@@ -162,8 +161,7 @@ go_data_scalar_str_finalize (GObject *obj)
g_free ((char *)str->str);
str->str = NULL;
}
if (scalar_str_parent_klass->finalize)
(*scalar_str_parent_klass->finalize) (obj);
(*scalar_str_parent_klass->finalize) (obj);
}
static GOData *
......@@ -283,8 +281,7 @@ go_data_vector_val_finalize (GObject *obj)
{
/* GODataVectorVal *val = (GODataVectorVal *)obj; */
if (vector_val_parent_klass->finalize)
(*vector_val_parent_klass->finalize) (obj);
(*vector_val_parent_klass->finalize) (obj);
}
static GOData *
......@@ -391,8 +388,7 @@ go_data_vector_str_finalize (GObject *obj)
{
/* GODataVectorStr *str = (GODataVectorStr *)obj; */
if (vector_str_parent_klass->finalize)
(*vector_str_parent_klass->finalize) (obj);
(*vector_str_parent_klass->finalize) (obj);
}
static GOData *
......
......@@ -64,8 +64,7 @@ static void
go_data_finalize (GOData *obj)
{
g_warning ("finalize");
if (parent_klass->finalize)
(parent_klass->finalize) (obj);
(parent_klass->finalize) (obj);
}
#endif
......
......@@ -344,8 +344,7 @@ gog_axis_finalize (GObject *obj)
}
gog_dataset_finalize (GOG_DATASET (axis));
if (parent_klass != NULL && parent_klass->finalize != NULL)
(parent_klass->finalize) (obj);
(parent_klass->finalize) (obj);
}
static double
......
......@@ -142,8 +142,7 @@ gog_control_foocanvas_finalize (GObject *obj)
g_object_unref (ctrl->renderer);
ctrl->renderer = NULL;
}
if (parent_klass != NULL && parent_klass->finalize)
(*parent_klass->finalize) (obj);
(*parent_klass->finalize) (obj);
}
static void
......
......@@ -312,9 +312,11 @@ static void
gog_error_bar_finalize (GObject *obj)
{
GogErrorBar *bar = GOG_ERROR_BAR (obj);
if (bar->style) g_object_unref (bar->style);
if (error_bar_parent_klass->finalize != NULL)
(error_bar_parent_klass->finalize) (obj);
if (bar->style) {
g_object_unref (bar->style);
bar->style = NULL;
}
(error_bar_parent_klass->finalize) (obj);
}
static void
......
......@@ -92,8 +92,7 @@ static void
gog_label_finalize (GObject *obj)
{
gog_dataset_finalize (GOG_DATASET (obj));
if (label_parent_klass->finalize != NULL)
(label_parent_klass->finalize) (obj);
(*label_parent_klass->finalize) (obj);
}
static gpointer
......
......@@ -54,8 +54,7 @@ gog_object_finalize (GObject *gobj)
g_slist_free (obj->children);
obj->children = NULL;
if (parent_klass != NULL && parent_klass->finalize != NULL)
(parent_klass->finalize) (gobj);
(parent_klass->finalize) (gobj);
}
static void
......
......@@ -52,8 +52,7 @@ gog_plot_finalize (GObject *obj)
gog_plot_axis_clear (plot, GOG_AXIS_SET_ALL); /* just in case */
if (plot_parent_klass != NULL && plot_parent_klass->finalize != NULL)
(plot_parent_klass->finalize) (obj);
(*plot_parent_klass->finalize) (obj);
}
static gboolean
......
......@@ -81,8 +81,7 @@ gog_renderer_gnome_print_finalize (GObject *obj)
prend->fonts = NULL;
}
if (parent_klass != NULL && parent_klass->finalize != NULL)
(parent_klass->finalize) (obj);
(*parent_klass->finalize) (obj);
}
/*
......
......@@ -78,8 +78,7 @@ gog_renderer_pixbuf_finalize (GObject *obj)
prend->pango_context = NULL;
}
if (parent_klass != NULL && parent_klass->finalize != NULL)
(parent_klass->finalize) (obj);
(*parent_klass->finalize) (obj);
}
static void
......
......@@ -72,8 +72,7 @@ gog_renderer_finalize (GObject *obj)
rend->font_watcher = NULL;
}
if (parent_klass != NULL && parent_klass->finalize != NULL)
(parent_klass->finalize) (obj);
(*parent_klass->finalize) (obj);
}
static void
......
......@@ -234,8 +234,7 @@ gog_series_finalize (GObject *obj)
series->values = NULL;
}
if (parent_klass != NULL && parent_klass->finalize != NULL)
(parent_klass->finalize) (obj);
(*parent_klass->finalize) (obj);
}
static unsigned
......
......@@ -93,8 +93,7 @@ gog_styled_object_finalize (GObject *obj)
gso->style = NULL;
}
if (parent_klass != NULL && parent_klass->finalize != NULL)
(parent_klass->finalize) (obj);
(*parent_klass->finalize) (obj);
}
static gpointer
......
......@@ -97,8 +97,7 @@ gog_theme_finalize (GObject *obj)
if (theme->elem_hash_by_class_name)
g_hash_table_destroy (theme->elem_hash_by_class_name);
if (parent_klass != NULL && parent_klass->finalize != NULL)
(parent_klass->finalize) (obj);
(parent_klass->finalize) (obj);
}
static void
......
......@@ -186,8 +186,7 @@ gog_view_finalize (GObject *obj)
g_slist_free (view->children);
view->children = NULL;
if (parent_klass != NULL && parent_klass->finalize)
(*parent_klass->finalize) (obj);
(*parent_klass->finalize) (obj);
}
static void
......
......@@ -60,8 +60,7 @@ static void
gog_plot1_5d_finalize (GObject *obj)
{
gog_plot_1_5d_clear_formats (GOG_PLOT1_5D (obj));
if (G_OBJECT_CLASS (plot1_5d_parent_klass)->finalize)
G_OBJECT_CLASS (plot1_5d_parent_klass)->finalize (obj);
G_OBJECT_CLASS (plot1_5d_parent_klass)->finalize (obj);
}
static void
......
......@@ -402,7 +402,7 @@ enum {
static void
gog_bubble_plot_set_property (GObject *obj, guint param_id,
GValue const *value, GParamSpec *pspec)
GValue const *value, GParamSpec *pspec)
{
GogBubblePlot *bubble = GOG_BUBBLE_PLOT (obj);
......@@ -713,7 +713,7 @@ gog_xy_view_render (GogView *view, GogViewAllocation const *bbox)
/* draw error bars after line */
if (prev_valid) {
if (gog_error_bar_is_visible (series->x_errors)) {
const GogErrorBar* bar = series->x_errors;
GogErrorBar const *bar = series->x_errors;
if (gog_error_bar_get_bounds (bar, i - 2, &xerrmin, &xerrmax)) {
xerrmax = x_off + x_scale * xerrmax;
xerrmin = x_off + x_scale * xerrmin;
......@@ -721,7 +721,7 @@ gog_xy_view_render (GogView *view, GogViewAllocation const *bbox)
}
}
if (gog_error_bar_is_visible (series->y_errors)) {
const GogErrorBar* bar = series->y_errors;
GogErrorBar const *bar = series->y_errors;
if (gog_error_bar_get_bounds (bar, i - 2, &yerrmin, &yerrmax)) {
yerrmax = y_off + y_scale * yerrmax;
yerrmin = y_off + y_scale * yerrmin;
......@@ -743,7 +743,7 @@ gog_xy_view_render (GogView *view, GogViewAllocation const *bbox)
/* draw error bars after line */
if (gog_error_bar_is_visible (series->x_errors)) {
const GogErrorBar* bar = series->x_errors;
GogErrorBar const *bar = series->x_errors;
if (gog_error_bar_get_bounds (bar, i - 2, &xerrmin, &xerrmax)) {
xerrmax = x_off + x_scale * xerrmax;
xerrmin = x_off + x_scale * xerrmin;
......@@ -751,7 +751,7 @@ gog_xy_view_render (GogView *view, GogViewAllocation const *bbox)
}
}
if (gog_error_bar_is_visible (series->y_errors)) {
const GogErrorBar* bar = series->y_errors;
GogErrorBar const *bar = series->y_errors;
if (gog_error_bar_get_bounds (bar, i - 2, &yerrmin, &yerrmax)) {
yerrmax = y_off + y_scale * yerrmax;
yerrmin = y_off + y_scale * yerrmin;
......@@ -898,7 +898,7 @@ gog_xy_series_init_style (GogStyledObject *gso, GogStyle *style)
static void
gog_xy_series_set_property (GObject *obj, guint param_id,
GValue const *value, GParamSpec *pspec)
GValue const *value, GParamSpec *pspec)
{
GogXYSeries *series= GOG_XY_SERIES (obj);
GogErrorBar* bar;
......
......@@ -58,8 +58,7 @@ go_color_group_finalize (GObject *obj)
cg->name = NULL;
}
if (go_color_group_parent_class->finalize)
(go_color_group_parent_class->finalize) (obj);
(go_color_group_parent_class->finalize) (obj);
}
static void
......
......@@ -353,8 +353,7 @@ go_marker_finalize (GObject *obj)
marker->pixbuf = NULL;
}
if (marker_parent_klass->finalize)
marker_parent_klass->finalize (obj);
marker_parent_klass->finalize (obj);
}
static void
......
......@@ -216,8 +216,7 @@ gnm_go_data_scalar_finalize (GObject *obj)
g_free (scalar->val_str);
scalar->val_str = NULL;
if (scalar_parent_klass->finalize)
(*scalar_parent_klass->finalize) (obj);
(*scalar_parent_klass->finalize) (obj);
}
static double
......@@ -321,8 +320,7 @@ gnm_go_data_vector_finalize (GObject *obj)
vec->base.values = NULL;
}
if (vector_parent_klass->finalize)
(*vector_parent_klass->finalize) (obj);
(*vector_parent_klass->finalize) (obj);
}
static void
......
......@@ -81,8 +81,7 @@ gnm_hlink_finalize (GObject *obj)
lnk->tip = NULL;
parent_class = g_type_class_peek (G_TYPE_OBJECT);
if (parent_class && parent_class->finalize)
parent_class->finalize (obj);
parent_class->finalize (obj);
}
static void
......
......@@ -53,8 +53,7 @@ gnm_input_msg_finalize (GObject *obj)
}
parent_class = g_type_class_peek (G_TYPE_OBJECT);
if (parent_class && parent_class->finalize)
parent_class->finalize (obj);
parent_class->finalize (obj);
}
static void
......
......@@ -288,7 +288,7 @@ ib_draw_cell (ItemBar const * const ib, GdkDrawable *drawable,
gdk_draw_rectangle (drawable, gc, TRUE,
rect->x + 1, rect->y + 1, rect->width-2, rect->height-2);
gtk_paint_shadow (canvas->style, drawable, GTK_STATE_NORMAL, shadow,
NULL, NULL, "button",
NULL, NULL, "GnmItemBarCell",
rect->x, rect->y, rect->width, rect->height);
gdk_gc_set_clip_rectangle (text_gc, rect);
......@@ -418,7 +418,7 @@ item_bar_draw (FooCanvasItem *item, GdkDrawable *drawable, GdkEventExpose *expos
(canvas->style, drawable,
GTK_STATE_NORMAL,
prev_visible ? GTK_SHADOW_OUT : GTK_SHADOW_IN,
NULL, NULL, "button",
NULL, NULL, "GnmItemBarCell",
left, top+safety, size, size);
if (size > 9) {
if (!prev_visible) {
......@@ -454,7 +454,7 @@ item_bar_draw (FooCanvasItem *item, GdkDrawable *drawable, GdkEventExpose *expos
(canvas->style, drawable,
GTK_STATE_NORMAL,
next->visible ? GTK_SHADOW_OUT : GTK_SHADOW_IN,
NULL, NULL, "button",
NULL, NULL, "GnmItemBarCell",
right, top+safety, size, size);
if (size > 9) {
if (!next->visible) {
......@@ -580,7 +580,7 @@ item_bar_draw (FooCanvasItem *item, GdkDrawable *drawable, GdkEventExpose *expos
(canvas->style, drawable,
GTK_STATE_NORMAL,
prev_visible ? GTK_SHADOW_OUT : GTK_SHADOW_IN,
NULL, NULL, "button",
NULL, NULL, "GnmItemBarCell",
left+safety, top, size, size);
if (size > 9) {
if (!prev_visible) {
......@@ -616,7 +616,7 @@ item_bar_draw (FooCanvasItem *item, GdkDrawable *drawable, GdkEventExpose *expos
(canvas->style, drawable,
GTK_STATE_NORMAL,
next->visible ? GTK_SHADOW_OUT : GTK_SHADOW_IN,
NULL, NULL, "button",
NULL, NULL, "GnmItemBarCell",
left+safety, bottom, size, size);
if (size > 9) {
if (!next->visible) {
......@@ -1041,8 +1041,7 @@ item_bar_finalize (GObject *obj)
ib->pango.item = NULL;
}
if (G_OBJECT_CLASS (parent_class)->finalize)
(*G_OBJECT_CLASS (parent_class)->finalize) (obj);
(*G_OBJECT_CLASS (parent_class)->finalize) (obj);
}
static void
......
......@@ -113,8 +113,7 @@ item_cursor_finalize (GObject *obj)
ic->tip = NULL;
}
if (G_OBJECT_CLASS (parent_class)->finalize)
(*G_OBJECT_CLASS (parent_class)->finalize) (obj);
(*G_OBJECT_CLASS (parent_class)->finalize) (obj);
}
static void
......
......@@ -492,8 +492,7 @@ item_edit_finalize (GObject *gobject)
ie->style= NULL;
}
if (G_OBJECT_CLASS (parent_class)->finalize)
(G_OBJECT_CLASS (parent_class)->finalize) (gobject);
(G_OBJECT_CLASS (parent_class)->finalize) (gobject);
}
static int
......
......@@ -127,8 +127,7 @@ item_grid_finalize (GObject *object)
ig_clear_hlink_tip (ig);
ig->cur_link = NULL;
if (G_OBJECT_CLASS (parent_class)->finalize)
(*G_OBJECT_CLASS (parent_class)->finalize) (object);
(*G_OBJECT_CLASS (parent_class)->finalize) (object);
}
static void
......
......@@ -508,8 +508,7 @@ preview_grid_finalize (GObject *obj)
pg->defaults.value = NULL;
}
if (G_OBJECT_CLASS (parent_klass)->finalize)
(*G_OBJECT_CLASS (parent_klass)->finalize) (obj);
(*G_OBJECT_CLASS (parent_klass)->finalize) (obj);
}
static void
......
......@@ -58,7 +58,7 @@
#include <string.h>
static SheetControlClass *scg_parent_class;
static GObjectClass *scg_parent_class;
static void scg_ant (SheetControl *sc);
static void scg_unant (SheetControl *sc);
......@@ -1255,8 +1255,7 @@ scg_finalize (GObject *object)
scg->table =NULL;
}
if (G_OBJECT_CLASS (scg_parent_class)->finalize)
(*G_OBJECT_CLASS (scg_parent_class)->finalize)(object);
(*scg_parent_class->finalize) (object);
}
static void
......
......@@ -132,8 +132,7 @@ filter_field_finalize (GObject *object)
}
parent = g_type_class_peek (SHEET_OBJECT_TYPE);
if (parent != NULL && parent->finalize != NULL)
parent->finalize (object);
parent->finalize (object);
}
static void
......
......@@ -70,8 +70,7 @@ cell_comment_finalize (GObject *object)
scg_comment_unselect ((SheetControlGUI *) control, cc););
}
if (parent_klass != NULL && parent_klass->finalize != NULL)
parent_klass->finalize (object);
parent_klass->finalize (object);
}
#define TRIANGLE_WIDTH 6
......
......@@ -116,8 +116,7 @@ sheet_object_graph_finalize (GObject *obj)
sog->graph = NULL;
}
if (parent_klass && parent_klass->finalize)
parent_klass->finalize (obj);
parent_klass->finalize (obj);
}
static GObject *
......
......@@ -1398,6 +1398,9 @@ typedef struct {
char *label;
PangoAttrList *markup;
struct {
float top, bottom, left, right;
} margin_pts;
} SheetObjectText;
typedef struct {
SheetObjectFilledClass parent;
......@@ -1439,6 +1442,8 @@ static void
sheet_object_text_init (SheetObjectText *sot)
{
sot->markup = NULL;
sot->margin_pts.top = sot->margin_pts.bottom = 3;
sot->margin_pts.left = sot->margin_pts.right = 5;
sheet_object_text_init_full (sot, _("Label"));
}
......@@ -1479,8 +1484,8 @@ sheet_object_text_new_view (SheetObject *so, SheetControl *sc, gpointer key)
"text", sot->label,
"anchor", GTK_ANCHOR_NW,
"clip", TRUE,
"x", 0.,
"y", 0.,
"x", sot->margin_pts.left,
"y", sot->margin_pts.top,
"attributes", sot->markup,
NULL);
back = sheet_object_filled_new_view_internal (so, sc, gcanvas, group);
......@@ -1496,30 +1501,50 @@ sheet_object_text_update_bounds (SheetObject *so, GObject *view)
SheetControlGUI *scg =
SHEET_CONTROL_GUI (sheet_object_view_control (view));
FooCanvasGroup *group = FOO_CANVAS_GROUP (view);
FooCanvasItem *item;
SheetObjectText *sot = SHEET_OBJECT_TEXT (so);
double h, w;
if (!so->is_visible) {
foo_canvas_item_hide (FOO_CANVAS_ITEM (view));
return;
}
foo_canvas_item_show (FOO_CANVAS_ITEM (view));
scg_object_view_position (scg, so, coords);
foo_canvas_item_set (FOO_CANVAS_ITEM (group->item_list->next->data),
"clip_width", fabs (coords [0] - coords [2]),
"wrap_width", fabs (coords [0] - coords [2]),
"clip_height", fabs (coords [1] - coords [3]),
foo_canvas_item_set (FOO_CANVAS_ITEM (view),
"x", MIN (coords [0], coords [2]),
"y", MIN (coords [1], coords [3]),
NULL);
w = fabs (coords [2] - coords [0]);
h = fabs (coords [3] - coords [1]);
foo_canvas_item_set (FOO_CANVAS_ITEM (group->item_list->data),
"x1", 0.,
"y1", 0.,
"x2", fabs (coords [0] - coords [2]),
"y2", fabs (coords [1] - coords [3]),
"x2", w,
"y2", h,
NULL);
foo_canvas_item_set (FOO_CANVAS_ITEM (view),
"x", MIN (coords [0], coords [2]),
"y", MIN (coords [1], coords [3]),
NULL);
if (so->is_visible)
foo_canvas_item_show (FOO_CANVAS_ITEM (view));
else
foo_canvas_item_hide (FOO_CANVAS_ITEM (view));
item = FOO_CANVAS_ITEM (group->item_list->next->data);
w -= (sot->margin_pts.left + sot->margin_pts.right)
* item->canvas->pixels_per_unit;
h -= (sot->margin_pts.top + sot->margin_pts.bottom)
* item->canvas->pixels_per_unit;
if (h > 0. && w > 0.) {
foo_canvas_item_show (item);
foo_canvas_item_set (item,
"clip_width", w,
"wrap_width", w,