Aurélio A. Heckert wrote, On 01/07/09 19:56:
On Wed, Jan 7, 2009 at 2:57 PM, Ted Gould <ted@...11...>
wrote:
> On Sat, 2008-12-13 at 22:38 +0100, Thomas Holder wrote:
>> is it possible to make the new namespace for inx files optional?
>> I see no real benefit for the namespace, but it is a real
>> drawback that all previous custom extensions will become invalid
>> (until you add the namespace to the inx files). When we release
>> 0.47 lots of users will be confused and will report bugs for this
>> I guess.
> Not really. Basically by doing this transition once we make things
> a lot better for the future. I wasn't able to find a way to bring
> in old files without doing something nasty like string editing them
> on the fly -- which isn't desirable at all.
we could use a function like that to match all tag names:
gboolean match_tagname(const gchar *cstr, const gchar *tagname,
const gchar *ns = INKSCAPE_EXTENSION_NS_NC) {
gchar *str = (gchar*) cstr;
int nslen = strlen(ns);
if (!strncmp(str, ns, nslen))
if (str[nslen] == ':')
str += nslen + 1;
if (*str == '_')
str += 1;
return strcmp(str, tagname) == 0;
}
maybe this is "nasty", but it works (I've tested it) and I would prefer
it over broken old extensions.
> I'm not sure how to deal with the confused users though,
ideas?
The Inkscape dump extension loading errors to the stdio. I think it
must to show an alert message for each loading error in a gui window
for the non tech user know what is happening.
Most people who I know and who are not computer nerds would not manage
to put a namespace attribute into some XML file, even if they would get
clear instructions :-) Ok, the number of unexperienced users who ever
installed some custom inkscape extension might be small, but why bother
them if there are other solutions?
Thomas