Adding a Python dependency to app/* (was: Re: dia-list Digest, Vol 132, Issue 3)
Thanks for the clear explanation Hans Breuer So to avoid direct dependency, how is the best way to put my modification code? and how the best way to integrate python with dia core functionality? Thanks before, Regards Yosua Alvin On Fri, Apr 3, 2015 at 9:13 PM, dia-list-requ...@gnome.org wrote: Send dia-list mailing list submissions to dia-list@gnome.org To subscribe or unsubscribe via the World Wide Web, visit https://mail.gnome.org/mailman/listinfo/dia-list or, via email, send a message with subject or body 'help' to dia-list-requ...@gnome.org You can reach the person managing the list at dia-list-ow...@gnome.org When replying, please edit your Subject line so it is more specific than Re: Contents of dia-list digest... Today's Topics: 1. Re: dia-list Digest, Vol 131, Issue 5 (Hans Breuer) 2. Re: dia-list Digest, Vol 132, Issue 2 (Yosua Alvin Adi Soetrisno) 3. Adding a Python dependency to app/* (was: Re: dia-list Digest, Vol 132, Issue 2) (Hans Breuer) -- Message: 1 Date: Fri, 03 Apr 2015 14:16:12 +0200 From: Hans Breuer h...@breuer.org To: discussions about usage and development of dia dia-list@gnome.org Cc: ewager...@gmail.com Subject: Re: dia-list Digest, Vol 131, Issue 5 Message-ID: 551e848c.5000...@breuer.org Content-Type: text/plain; charset=utf-8; format=flowed Am 25.03.2015 um 00:21 schrieb Elijah Wagers: Remove from list please. Done. Good bye, Hans Hans at Breuer dot Org --- Tell me what you need, and I'll tell you how to get along without it.-- Dilbert -- Message: 2 Date: Fri, 3 Apr 2015 19:59:35 +0700 From: Yosua Alvin Adi Soetrisno yosuaalvin.mt...@mail.ugm.ac.id To: dia-list@gnome.org Subject: Re: dia-list Digest, Vol 132, Issue 2 Message-ID: CAFZkH6SFicNcq49dqfsXgQEt= ylet2j6nand7ubqrqiqyxt...@mail.gmail.com Content-Type: text/plain; charset=utf-8 I've installed python2-dev, but i haven't try python3-dev, i use ubuntu 12.04, outside dia folder i have been succeed to compile c file with gcc, but when code inserted inside commands.c in folder dia/app, make have error like commands.c:17:20: fatal error: Python.h: No such file or directory, Must i installed python3-dev? On Apr 3, 2015 7:00 PM, dia-list-requ...@gnome.org wrote: Send dia-list mailing list submissions to dia-list@gnome.org To subscribe or unsubscribe via the World Wide Web, visit https://mail.gnome.org/mailman/listinfo/dia-list or, via email, send a message with subject or body 'help' to dia-list-requ...@gnome.org You can reach the person managing the list at dia-list-ow...@gnome.org When replying, please edit your Subject line so it is more specific than Re: Contents of dia-list digest... Today's Topics: 1. Re: dia-list Digest, Vol 132, Issue 1 (Yosua Alvin Adi Soetrisno) 2. Re: dia-list Digest, Vol 132, Issue 1 (Octavio Alvarez) -- Message: 1 Date: Fri, 3 Apr 2015 09:48:43 +0700 From: Yosua Alvin Adi Soetrisno yosuaalvin.mt...@mail.ugm.ac.id To: dia-list@gnome.org, alvar...@alvarezp.ods.org Subject: Re: dia-list Digest, Vol 132, Issue 1 Message-ID: CAFZkH6TQSq-eaD7akCdZz_1dG-903-LBN-U7zfcLJV= j9sv...@mail.gmail.com Content-Type: text/plain; charset=utf-8 I add some line to disp_callback.c like this static void add_custom_menu_item (GtkMenu *menu) { GtkWidget *menu_item = gtk_menu_item_new_with_label(_(Custom Link)); g_signal_connect(GTK_OBJECT(menu_item), activate, G_CALLBACK(call_python_callback), NULL); gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item); gtk_widget_show(menu_item); } and i add some line to commands.c like this #include Python.h ... void call_python_callback (GtkAction *action) { Py_SetProgramName(Testing); /* optional but recommended */ Py_Initialize(); FILE *fp = fopen(tree.py, r); if (fp == NULL) return 2; PyRun_SimpleFile(fp, tree.py); Py_Finalize(); fclose(fp); return 0; } When i make the compilation commands.c:17:20: fatal error: Python.h: No such file or directory How to solve that thanks On Thu, Apr 2, 2015 at 7:00 PM, dia-list-requ...@gnome.org wrote: Send dia-list mailing list submissions to dia-list@gnome.org To subscribe or unsubscribe via the World Wide Web, visit https://mail.gnome.org/mailman/listinfo/dia-list or, via email, send a message with subject or body 'help' to dia-list-requ...@gnome.org You can reach the person managing the list at dia-list-ow...@gnome.org When replying, please edit your Subject line so it is more specific than Re: Contents of
Re: Adding a Python dependency to app/* (was: Re: dia-list Digest, Vol 132, Issue 3)
Respectfully, could you cut off the text of the digest not pertinent to your message when replying? For example, see below. Thanks. On Sat, Apr 4, 2015 at 2:18 AM, Yosua Alvin Adi Soetrisno yosuaalvin.mt...@mail.ugm.ac.id wrote: Thanks for the clear explanation Hans Breuer So to avoid direct dependency, how is the best way to put my modification code? and how the best way to integrate python with dia core functionality? Thanks before, Regards Yosua Alvin ​SNIP -- To invent, you need a good imagination and a pile of junk. Thomas A. Edison http://www.brainyquote.com/quotes/quotes/t/thomasaed125362.html A public-opinion poll is no substitute for thought. *Warren Buffet* Michael E. Ross (919) 585-6737 Land (919) 576-0824 https://www.google.com/voice/b/0?pli=1#phones Google Phone (919) 631-1451 Cell michael.e.r...@gmail.com michael.e.r...@gmail.com ___ dia-list mailing list dia-list@gnome.org https://mail.gnome.org/mailman/listinfo/dia-list FAQ at http://live.gnome.org/Dia/Faq Main page at http://live.gnome.org/Dia
Re: dia-list Digest, Vol 132, Issue 3
Thanks for the clear explanation Hans Breuer So to avoid direct dependency, how is the best way to put my modification code? and how the best way to integrate python with dia core functionality? Thanks before, Regards Yosua Alvin On Fri, Apr 3, 2015 at 9:13 PM, dia-list-requ...@gnome.org wrote: Send dia-list mailing list submissions to dia-list@gnome.org To subscribe or unsubscribe via the World Wide Web, visit https://mail.gnome.org/mailman/listinfo/dia-list or, via email, send a message with subject or body 'help' to dia-list-requ...@gnome.org You can reach the person managing the list at dia-list-ow...@gnome.org When replying, please edit your Subject line so it is more specific than Re: Contents of dia-list digest... Today's Topics: 1. Re: dia-list Digest, Vol 131, Issue 5 (Hans Breuer) 2. Re: dia-list Digest, Vol 132, Issue 2 (Yosua Alvin Adi Soetrisno) 3. Adding a Python dependency to app/* (was: Re: dia-list Digest, Vol 132, Issue 2) (Hans Breuer) -- Message: 1 Date: Fri, 03 Apr 2015 14:16:12 +0200 From: Hans Breuer h...@breuer.org To: discussions about usage and development of dia dia-list@gnome.org Cc: ewager...@gmail.com Subject: Re: dia-list Digest, Vol 131, Issue 5 Message-ID: 551e848c.5000...@breuer.org Content-Type: text/plain; charset=utf-8; format=flowed Am 25.03.2015 um 00:21 schrieb Elijah Wagers: Remove from list please. Done. Good bye, Hans Hans at Breuer dot Org --- Tell me what you need, and I'll tell you how to get along without it.-- Dilbert -- Message: 2 Date: Fri, 3 Apr 2015 19:59:35 +0700 From: Yosua Alvin Adi Soetrisno yosuaalvin.mt...@mail.ugm.ac.id To: dia-list@gnome.org Subject: Re: dia-list Digest, Vol 132, Issue 2 Message-ID: CAFZkH6SFicNcq49dqfsXgQEt= ylet2j6nand7ubqrqiqyxt...@mail.gmail.com Content-Type: text/plain; charset=utf-8 I've installed python2-dev, but i haven't try python3-dev, i use ubuntu 12.04, outside dia folder i have been succeed to compile c file with gcc, but when code inserted inside commands.c in folder dia/app, make have error like commands.c:17:20: fatal error: Python.h: No such file or directory, Must i installed python3-dev? On Apr 3, 2015 7:00 PM, dia-list-requ...@gnome.org wrote: Send dia-list mailing list submissions to dia-list@gnome.org To subscribe or unsubscribe via the World Wide Web, visit https://mail.gnome.org/mailman/listinfo/dia-list or, via email, send a message with subject or body 'help' to dia-list-requ...@gnome.org You can reach the person managing the list at dia-list-ow...@gnome.org When replying, please edit your Subject line so it is more specific than Re: Contents of dia-list digest... Today's Topics: 1. Re: dia-list Digest, Vol 132, Issue 1 (Yosua Alvin Adi Soetrisno) 2. Re: dia-list Digest, Vol 132, Issue 1 (Octavio Alvarez) -- Message: 1 Date: Fri, 3 Apr 2015 09:48:43 +0700 From: Yosua Alvin Adi Soetrisno yosuaalvin.mt...@mail.ugm.ac.id To: dia-list@gnome.org, alvar...@alvarezp.ods.org Subject: Re: dia-list Digest, Vol 132, Issue 1 Message-ID: CAFZkH6TQSq-eaD7akCdZz_1dG-903-LBN-U7zfcLJV= j9sv...@mail.gmail.com Content-Type: text/plain; charset=utf-8 I add some line to disp_callback.c like this static void add_custom_menu_item (GtkMenu *menu) { GtkWidget *menu_item = gtk_menu_item_new_with_label(_(Custom Link)); g_signal_connect(GTK_OBJECT(menu_item), activate, G_CALLBACK(call_python_callback), NULL); gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item); gtk_widget_show(menu_item); } and i add some line to commands.c like this #include Python.h ... void call_python_callback (GtkAction *action) { Py_SetProgramName(Testing); /* optional but recommended */ Py_Initialize(); FILE *fp = fopen(tree.py, r); if (fp == NULL) return 2; PyRun_SimpleFile(fp, tree.py); Py_Finalize(); fclose(fp); return 0; } When i make the compilation commands.c:17:20: fatal error: Python.h: No such file or directory How to solve that thanks On Thu, Apr 2, 2015 at 7:00 PM, dia-list-requ...@gnome.org wrote: Send dia-list mailing list submissions to dia-list@gnome.org To subscribe or unsubscribe via the World Wide Web, visit https://mail.gnome.org/mailman/listinfo/dia-list or, via email, send a message with subject or body 'help' to dia-list-requ...@gnome.org You can reach the person managing the list at dia-list-ow...@gnome.org When replying, please edit your Subject line so it is more specific than Re: Contents of
Re: DIA extend properties
Am 01.04.2015 um 19:21 schrieb Yosua Alvin Adi Soetrisno: Let me introduce myself I'm Yosua from Gadjah Mada University, I'm still on progress working my master thesis. I'd like to develop OpenERP module based on DIA OpenERP Interface. After some googling I still don't know what Dia OpenERP interface you are referring to. IIRC once upon a time there was some EERP plug-in with Dia, but it had to be removed for license reasons. The other thing I've found is a blog entry talking about a Dia plug-in installation _for_ OpenERP [1]. This seems to be interfacing Dia's UML - CLass (the most complex object with Dia). My problem is I can't extend default object properties with custom data type like properties list. Custom data types are only working for shapes, not for built-in objects (again IIRC). I want to ask how to compile DIA with make, but there is some customization in dispcallback.c with include Python.h, Did compilation work for you before you made your modification? If so you might need some extra includes and libs in app/Makefile.am to make your modification compile and link. See plug-ins/python/Makefile.am for Python inclusion and linking. A better solution would be to follow the existing design: - Python _scripts_ to be registered/invoked by the PyDia plug-in (see plug-ins/python/*.py for some working scripts) i want to extend some right click properties with custom Python GTK Window, so i linked it with C script If this is just for your local version: happy hacking ;) But if you want to contribute your modification back to the community you should take a different approach: - only the PyDia plug-in shall include Python headers and link Python libs - use the existing mechanism to register PyDia plug-ins dynamically - call dia.register_action() in your script - place the script into one of the python directories created during installation (i.e. ~/.dia/python IIRC) Thanks before, I've referenced by Lars Causen to ask in mailing list Welcome to Dia development. Don't hesitate to ask for further details if the source code or it's documentation are unclear. Regards Yosua Alvin HTH, Hans [1] http://fheopenerp.blogspot.de/2011/09/dia-plug-in-installation-for-openerp-6.html Hans at Breuer dot Org --- Tell me what you need, and I'll tell you how to get along without it.-- Dilbert ___ dia-list mailing list dia-list@gnome.org https://mail.gnome.org/mailman/listinfo/dia-list FAQ at http://live.gnome.org/Dia/Faq Main page at http://live.gnome.org/Dia