Re: [Bluez-devel] [PATCH] [RESEND] make bluez GNOME UIs singletons

Marcel Holtmann
2007-12-18T19:58:37Z

Hi Chris,

> patch looks good to me. One question though, why do we use the
> extra
> register function. Can't we include that in the _new function.
> This
> would make the code a little simpler. We still have to check
> if the
> object creation succeeded.
>
> This would require defining GObject properties and get and set
> operations. Also, the register function is what actually initiates
> the connection to the bus and requests the bus name. This sort of
> operation might fail and shouldn't be done in an object constructor.
> The register function seemed like the simplest solution.

I did it the way I think it should be done to make it a lot simpler. It
works, but I am not sure if it is the best way. Feel free to improve it.
The stuff is in the CVS now.

Regards

Marcel