Commit 282e4102 authored by Dom Lachowicz's avatar Dom Lachowicz

bug 155433

parent e9ffc4d0
2004-09-29 Dom Lachowicz <cinamod@hotmail.com> 2004-10-14 Dom Lachowicz <cinamod@hotmail.com>
* rsvg.c: Push gnome_vfs_init() up to rsvg_init()
* rsvg-shapes.c: ditto, bug #155433
2004-09-29 Dom Lachowicz <cinamod@hotmail.com>
* moz-plugin/moz-plugin.c: Fix bug #154083 * moz-plugin/moz-plugin.c: Fix bug #154083
......
...@@ -92,10 +92,8 @@ rsvg_cond_parse_required_features (const char * value) ...@@ -92,10 +92,8 @@ rsvg_cond_parse_required_features (const char * value)
return permitted; return permitted;
} }
static const char * implemented_extensions [] = static const char ** implemented_extensions = NULL;
{ static const guint nb_implemented_extensions = G_N_ELEMENTS(implemented_extensions);
};
static const guint nb_implemented_extensions = G_N_ELEMENTS(implemented_features);
/* http://www.w3.org/TR/SVG/struct.html#SystemLanguageAttribute */ /* http://www.w3.org/TR/SVG/struct.html#SystemLanguageAttribute */
static gboolean static gboolean
......
...@@ -833,6 +833,7 @@ rsvg_start_any_poly(RsvgHandle *ctx, RsvgPropertyBag *atts, gboolean is_polyline ...@@ -833,6 +833,7 @@ rsvg_start_any_poly(RsvgHandle *ctx, RsvgPropertyBag *atts, gboolean is_polyline
GString * g = NULL; GString * g = NULL;
gchar ** pointlist = NULL; gchar ** pointlist = NULL;
const char * klazz = NULL, * id = NULL, *value; const char * klazz = NULL, * id = NULL, *value;
gsize pointlist_len = 0;
if (rsvg_property_bag_size (atts)) if (rsvg_property_bag_size (atts))
{ {
...@@ -855,10 +856,16 @@ rsvg_start_any_poly(RsvgHandle *ctx, RsvgPropertyBag *atts, gboolean is_polyline ...@@ -855,10 +856,16 @@ rsvg_start_any_poly(RsvgHandle *ctx, RsvgPropertyBag *atts, gboolean is_polyline
pointlist = g_strsplit (g->str, " ", -1); pointlist = g_strsplit (g->str, " ", -1);
g_string_free (g, TRUE); g_string_free (g, TRUE);
/* represent as a "moveto, lineto*, close" path */
if (pointlist) if (pointlist)
{ {
int i; while(pointlist[pointlist_len] != NULL)
pointlist_len++;
}
/* represent as a "moveto, lineto*, close" path */
if (pointlist_len >= 2)
{
gsize i;
GString * d = g_string_sized_new (strlen(verts)); GString * d = g_string_sized_new (strlen(verts));
g_string_append_printf (d, "M %s %s ", pointlist[0], pointlist[1] ); g_string_append_printf (d, "M %s %s ", pointlist[0], pointlist[1] );
...@@ -868,10 +875,12 @@ rsvg_start_any_poly(RsvgHandle *ctx, RsvgPropertyBag *atts, gboolean is_polyline ...@@ -868,10 +875,12 @@ rsvg_start_any_poly(RsvgHandle *ctx, RsvgPropertyBag *atts, gboolean is_polyline
if (!is_polyline) if (!is_polyline)
g_string_append (d, "Z"); g_string_append (d, "Z");
g_strfreev(pointlist);
rsvg_handle_path (ctx, d->str, id); rsvg_handle_path (ctx, d->str, id);
g_string_free (d, TRUE); g_string_free (d, TRUE);
} }
if (pointlist)
g_strfreev(pointlist);
} }
void void
...@@ -1595,9 +1604,7 @@ rsvg_pixbuf_new_from_vfs_at_size (const char *filename, ...@@ -1595,9 +1604,7 @@ rsvg_pixbuf_new_from_vfs_at_size (const char *filename,
GnomeVFSResult res; GnomeVFSResult res;
g_return_val_if_fail (filename != NULL, NULL); g_return_val_if_fail (filename != NULL, NULL);
g_return_val_if_fail (gnome_vfs_initialized (), NULL);
if (!gnome_vfs_initialized())
gnome_vfs_init();
res = gnome_vfs_open (&f, filename, GNOME_VFS_OPEN_READ); res = gnome_vfs_open (&f, filename, GNOME_VFS_OPEN_READ);
...@@ -1924,7 +1931,6 @@ rsvg_defs_drawable_image_draw (RsvgDefsDrawable * self, RsvgHandle *ctx, ...@@ -1924,7 +1931,6 @@ rsvg_defs_drawable_image_draw (RsvgDefsDrawable * self, RsvgHandle *ctx,
art_affine_multiply(tmp_affine, tmp_tmp_affine, tmp_affine); art_affine_multiply(tmp_affine, tmp_tmp_affine, tmp_affine);
intermediate = gdk_pixbuf_new (GDK_COLORSPACE_RGB, 1, 8, intermediate = gdk_pixbuf_new (GDK_COLORSPACE_RGB, 1, 8,
gdk_pixbuf_get_width (ctx->pixbuf), gdk_pixbuf_get_width (ctx->pixbuf),
gdk_pixbuf_get_height (ctx->pixbuf)); gdk_pixbuf_get_height (ctx->pixbuf));
......
...@@ -1881,6 +1881,10 @@ rsvg_handle_free (RsvgHandle *handle) ...@@ -1881,6 +1881,10 @@ rsvg_handle_free (RsvgHandle *handle)
(*handle->free) (handle); (*handle->free) (handle);
} }
#ifdef HAVE_GNOME_VFS
#include <libgnomevfs/gnome-vfs.h>
#endif
/** /**
* rsvg_init: * rsvg_init:
* *
...@@ -1897,6 +1901,10 @@ rsvg_init (void) ...@@ -1897,6 +1901,10 @@ rsvg_init (void)
#endif #endif
xmlInitParser (); xmlInitParser ();
#ifdef HAVE_GNOME_VFS
gnome_vfs_init();
#endif
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment