Re: Choosing a parent class

2006-04-12 Thread Andreas Kotowicz
On Tue, 2006-04-11 at 14:04 -0700, Brian J. Tarricone wrote: > Why are you creating 'main_box'? Your AppCalendar *is* the main box. > > > hbox = gtk_hbox_new(TRUE, DEF_PAD); > > gtk_box_pack_start (GTK_BOX (main_box), hbox, TRUE, TRUE, 0); > > gtk_widget_show (hbox); > > At this point, yo

Re: Choosing a parent class

2006-04-11 Thread Brian J. Tarricone
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 4/11/2006 2:00 PM, Andreas Kotowicz wrote: > On Tue, 2006-04-11 at 17:02 -0400, Tristan Van Berkom wrote: >> Andreas Kotowicz wrote: >> [...] >>> ok, I think I understand now. but somehow it seems that my class has >>> some mistake in it (see attach

Re: Choosing a parent class

2006-04-11 Thread Andreas Kotowicz
On Tue, 2006-04-11 at 17:02 -0400, Tristan Van Berkom wrote: > Andreas Kotowicz wrote: > [...] > > ok, I think I understand now. but somehow it seems that my class has > > some mistake in it (see attachment). I'm calling it like this in my > > code: > > > > > > . > > . > > window->priv->o

Re: Choosing a parent class

2006-04-11 Thread Tristan Van Berkom
Andreas Kotowicz wrote: [...] ok, I think I understand now. but somehow it seems that my class has some mistake in it (see attachment). I'm calling it like this in my code: . . window->priv->object = app_calendar_new (); gtk_box_pack_end (GTK_BOX (main_box), GTK_WIDGET(window->priv->

Re: Choosing a parent class

2006-04-11 Thread Andreas Kotowicz
On Tue, 2006-04-11 at 19:53 +0200, David Necas (Yeti) wrote: > Inherit from the class the widget actually *is*. If you > inherit from GtkFoo, your widget will inherit the properties > and methods (this is what inheritance is about) -- > gtk_foo_blow_up() can be expected to work with your new > wid

Re: Choosing a parent class

2006-04-11 Thread David Necas (Yeti)
On Tue, Apr 11, 2006 at 07:35:41PM +0200, Andreas Kotowicz wrote: > I created a composite widget which consists of two frames, one of which > holds a calendar and a second one which has some buttons. I now ask > myself what is the right parent class to choose from. Is it GtkFrame? > Why can't I jus

Re: Choosing a parent class

2006-04-11 Thread Michael L Torrie
On Tue, 2006-04-11 at 19:35 +0200, Andreas Kotowicz wrote: > I created a composite widget which consists of two frames, one of which > holds a calendar and a second one which has some buttons. I now ask > myself what is the right parent class to choose from. Is it GtkFrame? > Why can't I just choos

Choosing a parent class

2006-04-11 Thread Andreas Kotowicz
I created a composite widget which consists of two frames, one of which holds a calendar and a second one which has some buttons. I now ask myself what is the right parent class to choose from. Is it GtkFrame? Why can't I just choose GtkWidget? are there any rules which classes to choose from for c