On Wed, 2005-06-15 at 18:53 -0500, aaron@...749... wrote:
Greg Steffensen wrote:
Done (all necessary files are now in the tgz). For some reason, the effects menu doesn't work on my Inkscape. My GTK doesn't like to add menu entries dynamically for some reason; I've had the same problem when working with Dia extensions. So I haven't been able to test this in Inkscape, but it works when invoked from the command line the way the extension docs describe. If it doesn't work, let me know. Again, the link is
https://developer.berlios.de/project/filelist.php?group_id=3863
Just a few picky comments on the inx file:
<inkscape-extension> <name>OCAL Helper</name> <!-- changed id for consistency with other inx files, a matter of taste :) --> <id>org.openclipart.filter.helper</id> <dependency type="executable" location="extensions">ocal.py</dependency> <!-- avoiding absolute paths --> <dependency type="executable" location="path">python</dependency> <effect> <object-type>all</object-type> </effect> <script> <!-- adding interpreter property helps script to be called properly on all supported platforms --> <command reldir="extensions" interpreter="python">ocal.py</command> </script> </inkscape-extension>
Cool...Aaron...Greg, maybe once this is working a little better, we could move this work into CVS for others to work on as well...Sound good?
When I run this as an effect from my home directory Inkscape crashes. Something must be wrong with finding extensions in the home directory. And something must be wrong with the how inkscape handles scripts that fail to give output. (Well, at least something must have been wrong when I compiled yesterday.)
Yeah, I filed this as a bug yesterday. You probaby have some good input for that bug. It is in the bug tracker (sf.net is down right now ;()
Starting program: /usr/local/bin/inkscape [Thread debugging using libthread_db enabled] [New Thread -1225103968 (LWP 6491)] No preferences for Effect python: can't open file '/usr/local/share/inkscape/extensions/ocal.py' Extension::Script: Unknown error for pclose : Success
Program received signal SIGSEGV, Segmentation fault. [Switching to Thread -1225103968 (LWP 6491)] 0x0838da91 in Inkscape::Extension::Implementation::Script::effect (this=0x84fd7a8, module=0x48, doc=0x86194d0) at extension/implementation/script.cpp:627 627 copy_doc(doc->doc->rroot, mydoc->rroot); (gdb) bt #0 0x0838da91 in Inkscape::Extension::Implementation::Script::effect (this=0x84fd7a8, module=0x48, doc=0x86194d0) at extension/implementation/script.cpp:627 #1 0x0838c1d0 in Inkscape::Extension::Effect::effect (this=0x85184e0, doc=0x86194d0) at extension/effect.cpp:87 #2 0x0838c26c in Inkscape::Extension::Effect::EffectVerb::perform (action=0x48, data=0x85184e0, pdata=0x0) at extension/effect.cpp:120 #3 0x082c6aff in sp_action_perform (action=0x85a6b10, data=0x0) at helper/action.cpp:135 #4 0xb74532a6 in g_cclosure_marshal_VOID__VOID () from /usr/lib/libgobject-2.0.so.0 #5 0xb7441736 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0 #6 0xb7452dcf in g_signal_emit_by_name () from /usr/lib/libgobject-2.0.so.0 #7 0xb7451e9c in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0 #8 0xb7452126 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0 #9 0xb7b8d697 in gtk_widget_activate () from /usr/lib/libgtk-x11-2.0.so.0 #10 0xb7aad052 in gtk_menu_shell_activate_item () from /usr/lib/libgtk-x11-2.0.so.0 #11 0xb7aac5e5 in _gtk_menu_shell_activate () from /usr/lib/libgtk-x11-2.0.so.0 #12 0xb7aa5376 in gtk_menu_reorder_child () from /usr/lib/libgtk-x11-2.0.so.0 #13 0xb7a9e02e in _gtk_marshal_BOOLEAN__BOXED () from /usr/lib/libgtk-x11-2.0.so.0 #14 0xb74419c9 in g_cclosure_new_swap () from /usr/lib/libgobject-2.0.so.0 #15 0xb7441736 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0 #16 0xb7452855 in g_signal_emit_by_name () from /usr/lib/libgobject-2.0.so.0 #17 0xb7451c8c in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0 #18 0xb7452126 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0 #19 0xb7b8d4c7 in gtk_widget_send_expose () from /usr/lib/libgtk-x11-2.0.so.0 #20 0xb7a9cb42 in gtk_propagate_event () from /usr/lib/libgtk-x11-2.0.so.0 #21 0xb7a9b996 in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0 #22 0xb793a8b5 in _gdk_events_queue () from /usr/lib/libgdk-x11-2.0.so.0 #23 0xb73d55c2 in g_main_depth () from /usr/lib/libglib-2.0.so.0 #24 0xb73d6638 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0 #25 0xb73d6970 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0 #26 0xb73d6f13 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0 #27 0xb7a9b243 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0 #28 0xb7eb47e9 in Gtk::Main::run_impl () from /usr/lib/libgtkmm-2.4.so.1 #29 0xb7eb44f4 in Gtk::Main::run () from /usr/lib/libgtkmm-2.4.so.1 #30 0x08116786 in sp_main_gui (argc=1, argv=0xbffff914) at main.cpp:545 #31 0x081ecb48 in Inkscape::NSApplication::Application::run (this=0xbffff850) at application/application.cpp:134 #32 0x08116370 in main (argc=1, argv=0xbffff914) at main.cpp:418
But even when I run the program straight from the command line I can't find a query that gives results from ocal. So, while I can't test this out, I think it is a great idea. Thanks.
Yeah, I hit a wall too...it is a great idea that needs implementation :)
Jon
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel