Re: Develop a composite widget



You made an error in the declaration of the widget structure (struct
_GtkSwap). The first element (the parent of this widget) should be an
GtkScrolledWindow scrolledwin, not a pointer to a widget. The parent of
a widget should always be the first element of the new widget, and it
should be that widget itself, not a pointer to that widget. You could
use a program to generate this code for you. There are programs which
generate this code for you, simply be setting some parameters. One of
them is Gwf (http://gwf.sourceforge.net). Have a look at it! Especially
when desinging a lot of widgets it saves you a lot of work. Any problems
with it : mail me (i'm the author of the program).

Jeroen


Ottavio Campana wrote:
> 
> Hi,
> 
> I'm writing a new  widget. I will use it in a  linux installer to choose
> which swap  partitions to use and  which partition to initialize.  It is
> easy to explain:  it is a scrolled window witha  table inside. The table
> has  got 3  columns  (one for  the  name  of the  partition,  one for  a
> checkbutton to  know if  it has  to be used  and the  last column  for a
> checkbutton to know if it has to be initialized).
> 
> Following the gtk  tutorial I've tried to develop this  new widget. I've
> tried  to compile  an example  application but  when I  run it  I get  a
> segmentation fault. Debbugging  it I've seen that the problem  is in the
> function gtkswap_init .
> 
> Can anyone of you help me and find the bug?
> 
> Thanks.
> 
> PS: the source will  be released under GPL, so if you want  to use it do
> it. I just would like to know if you're interested on it, so that we can
> work together :)
> 
> --
> Non c'e' pił forza nella normalita', c'e' solo monotonia.
> 
>   ------------------------------------------------------------------------
> 
>    gtkswap.cName: gtkswap.c
>             Type: text/x-csrc
> 
>    gtkswap.hName: gtkswap.h
>             Type: text/x-chdr
> 
>    main.cName: main.c
>          Type: text/x-csrc




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]