Re: [gtk-vnc-devel] [patch] - properties



Em Ter, 2008-03-25 às 11:12 -0500, Anthony Liguori escreveu:
> Daniel P. Berrange wrote:
> > On Tue, Mar 25, 2008 at 12:44:24PM -0300, Jonh Wendell wrote:
> >   
> >> Hi.
> >>
> >> As a complement for my last patch (getters and setters), I added the
> >> property concept for the widget.
> >>
> >> May I commit?
> >>     
> >
> > I've no objections to the code. I'm not really familiar with GTK properties
> > though. What does this do / how does this help applications using GTK-VNC ?
> >   
> 
> Yeah, I don't know the answer myself.  Does anyone know of a good 
> example of a widget using properties for something useful?
> 
> Regards,
> 
> Anthony Liguori
> 
> > Regards,
> > Dan.
> >   

We can get/set more than 1 property with one function call:

  gchar *name = NULL;
  gint  width, height;

  g_object_get (G_OBJECT (tab->priv->vnc),
		"width", &width,
		"height", &height,
		"name", &name,
		NULL);

Cheers,
-- 
Jonh Wendell
www.bani.com.br






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