Mercurial > MadButterfly
changeset 277:5006e4abdda5
Allow any elemnt to be a symbol.
author | wycc |
---|---|
date | Sun, 04 Jan 2009 12:01:41 +0800 |
parents | ab8284c8dcee |
children | a90fd749af82 61aebecbb994 |
files | examples/dynamic/Makefile.am inkscape/AssignSymbol.py |
diffstat | 2 files changed, 14 insertions(+), 35 deletions(-) [+] |
line wrap: on
line diff
--- 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 $< > $@
--- 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'))