# HG changeset patch # User wycc # Date 1231041701 -28800 # Node ID 5006e4abdda5e8a41235eb71356c594ae8866439 # Parent ab8284c8dcee58d3d86aa8e10c94484b918d519d Allow any elemnt to be a symbol. diff -r ab8284c8dcee -r 5006e4abdda5 examples/dynamic/Makefile.am --- a/examples/dynamic/Makefile.am Sun Jan 04 09:32:49 2009 +0800 +++ b/examples/dynamic/Makefile.am Sun Jan 04 12:01:41 2009 +0800 @@ -1,10 +1,19 @@ include $(top_srcdir)/config.mk -noinst_PROGRAMS = dynamic hello button.so scene.so +SUFFIXES=.svg .mbso + +%.so:%.svg + $(top_srcdir)/tools/svg2code.py $< $<.mb + m4 -I $(top_srcdir)/tools mb_c_source.m4 $<.mb > $(<:.svg=.c) + m4 -I $(top_srcdir)/tools mb_c_header.m4 $<.mb > $(<:.svg=.h) + make $(<:.svg=.o) + gcc -shared -o $@ $(<:.svg=.o) + +noinst_PROGRAMS = dynamic hello list button.so scene.so EXTRA_DIST = menu.svg button.svg dynamic_SOURCES = main.c mbapp.c mbapp.h mbbutton.c mbbutton.h -nodist_dynamic_SOURCES = menu.c menu.h menu.mb +nodist_dynamic_SOURCES = CPPFLAGS = @cairo_CFLAGS@ $(INCLUDES) dynamic_LDFLAGS = @cairo_LIBS@ dynamic_LDADD = $(top_builddir)/src/libmbfly.la @@ -16,35 +25,8 @@ hello_LDFLAGS = @cairo_LIBS@ hello_LDADD = $(top_builddir)/src/libmbfly.la -menu.mb: $(srcdir)/menu.svg - $(top_srcdir)/tools/svg2code.py $? $@ - -menu.h: menu.mb - m4 -I $(top_srcdir)/tools mb_c_header.m4 $< > $@ - -menu.c: menu.mb - m4 -I $(top_srcdir)/tools mb_c_source.m4 $< > $@ - -button.so: button.o button.h - gcc -shared -o button.so button.o - -button.mb: $(srcdir)/button.svg - $(top_srcdir)/tools/svg2code.py $? $@ +list_SOURCES = list.c mbapp.c mbapp.h +list_LDFLAGS = @cairo_LIBS@ +list_LDADD = $(top_builddir)/src/libmbfly.la -button.h: button.mb - m4 -I $(top_srcdir)/tools mb_c_header.m4 $< > $@ -button.c: button.mb - m4 -I $(top_srcdir)/tools mb_c_source.m4 $< > $@ - -scene.so: scene.o scene.h - gcc -shared -o scene.so scene.o - -scene.mb: $(srcdir)/scene.svg - $(top_srcdir)/tools/svg2code.py $? $@ - -scene.h: scene.mb - m4 -I $(top_srcdir)/tools mb_c_header.m4 $< > $@ - -scene.c: scene.mb - m4 -I $(top_srcdir)/tools mb_c_source.m4 $< > $@ diff -r ab8284c8dcee -r 5006e4abdda5 inkscape/AssignSymbol.py --- a/inkscape/AssignSymbol.py Sun Jan 04 09:32:49 2009 +0800 +++ b/inkscape/AssignSymbol.py Sun Jan 04 12:01:41 2009 +0800 @@ -46,9 +46,6 @@ return for id,node in self.selected.iteritems(): #self.dump(node) - if node.tag != '{http://www.w3.org/2000/svg}g': - self.confirm('Only group element can be converted into a symbol') - return self.node = node vbox = gtk.VBox() vbox.pack_start(gtk.Label('Please input the symbol name'))