Re: [Nautilus-list] adapter port



On 1/4/02 11:42 AM, "Dave Camp" <dave ximian com> wrote:

> This patch ports the adapter component, minus the embeddable and
> progressive data sink strategies.  It also ports/re-enables the code in
> nautilus-component-adapter-factory.c.

> -#include <bonobo/bonobo-generic-factory.h>
> -#include <bonobo/bonobo-main.h>
> +#include <bonobo.h>

Normally I prefer to include the minimum set of individual headers instead
of catch-all headers like <bonobo.h>. Across the entire project, this speeds
up compile times.

> +               (GWeakNotify)adapter_factory_object_weak_notify,

As it says in the Nautilus coding style guide, we try to avoid casting the
type of function pointers. Is this cast really needed? Can't we just change
the signature of adapter_factory_object_weak_notify instead?

> +        g_error (_("I could not initialize Bonobo"));

Is this really what programs should write out if they fail to initialize?
The message seems a little silly to me.

> +#ifdef GNOME2_CONVERSION_COMPLETE
>      g_free (registration_id);
> +#endif

What's the issue here? Does something go wrong if we free the registration
ID?

> +        g_print ("couldn't get stream object\n");
> +        fprintf (stderr, "before load\n");
> +        fprintf (stderr, "after load\n");
> +            g_print ("couldn't load stream object: %s\n",
bonobo_exception_get_text (&ev));
> +            g_print ("couldn't unref stream object: %s\n",
bonobo_exception_get_text (&ev));

Maybe these should be removed. If we want to keep some, they should be
changed to g_message or g_warning.

Otherwise, the code looks good. Please fix and commit.

    -- Darin





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