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 dia-list digest..."
>
>
> Today's Topics:
>
>    1. DIA extend properties (Yosua Alvin Adi Soetrisno)
>    2. Re: DIA extend properties (Michael Ross)
>    3. Re: DIA extend properties (Octavio Alvarez)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 2 Apr 2015 00:21:24 +0700
> From: Yosua Alvin Adi Soetrisno <yosuaalvin.mt...@mail.ugm.ac.id>
> To: dia-list@gnome.org
> Subject: DIA extend properties
> Message-ID:
>         <
> cafzkh6qicst4-gtvdae45omgl4emslcfvrdlthsotj5chkc...@mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> 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. My problem is I can't extend default object
> properties with custom data type like properties list. I want to ask how to
> compile DIA with make, but there is some customization in dispcallback.c
> with include Python.h, i want to extend some right click properties with
> custom Python GTK Window, so i linked it with C script
> Thanks before, I've referenced by Lars Causen to ask in mailing list
> Regards Yosua Alvin
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> https://mail.gnome.org/archives/dia-list/attachments/20150402/462e7627/attachment.html
> >
>
> ------------------------------
>
> Message: 2
> Date: Wed, 1 Apr 2015 15:11:45 -0400
> From: Michael Ross <michael.e.r...@gmail.com>
> To: discussions about usage and development of dia
>         <dia-list@gnome.org>
> Subject: Re: DIA extend properties
> Message-ID:
>         <CANNQeoLcA=
> 7qelc3kdmq6ufeodckfpykrtucqwnqtmexgsg...@mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Your message is received, but I do not know the answer.  Someone will write
> back who does know.
>
> On Wed, Apr 1, 2015 at 1:21 PM, Yosua Alvin Adi Soetrisno <
> yosuaalvin.mt...@mail.ugm.ac.id> wrote:
>
> > 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. My problem is I can't extend default
> object
> > properties with custom data type like properties list. I want to ask how
> to
> > compile DIA with make, but there is some customization in dispcallback.c
> > with include Python.h, i want to extend some right click properties with
> > custom Python GTK Window, so i linked it with C script
> > Thanks before, I've referenced by Lars Causen to ask in mailing list
> > Regards Yosua Alvin
> >
> > _______________________________________________
> > 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
> >
> >
> >
>
>
> --
> 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>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> https://mail.gnome.org/archives/dia-list/attachments/20150401/d30455d8/attachment.html
> >
>
> ------------------------------
>
> Message: 3
> Date: Wed, 01 Apr 2015 23:19:49 -0700
> From: Octavio Alvarez <alvar...@alvarezp.ods.org>
> To: discussions about usage and development of dia
>         <dia-list@gnome.org>
> Subject: Re: DIA extend properties
> Message-ID: <551cdf85.8060...@alvarezp.ods.org>
> Content-Type: text/plain; charset=windows-1252
>
> On 01/04/15 10:21, Yosua Alvin Adi Soetrisno wrote:
> > I want to ask how to compile DIA with make
>
> Hi.
>
> What happens when you try it?
>
>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> dia-list mailing list
> dia-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/dia-list
>
>
> ------------------------------
>
> End of dia-list Digest, Vol 132, Issue 1
> ****************************************
>
_______________________________________________
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

Reply via email to