[packagekit] Media Change Enums

Daniel Nicoletti dantti85-pk at yahoo.com.br
Thu Apr 2 07:28:38 PDT 2009


>On Wed, 2009-04-01 at 10:36 -0700, Daniel Nicoletti wrote:
>> +      g_signal_emit (client, signals [PK_CLIENT_MEDIA_CHANGE_REQUIRED], 0,
>> +                      media_type_text, media_id, media_text);
>
>You want to convert the media_type_text to media_type and send the uint,
>not the string. The PkClient does all the conversion work to save the
>application from doing it.

i copied this loking at other methods, can you give me an example?

the following i'll do as you say, all this code i did i was
looking at error code and eula_required, that's why i looks like this..

...

> +      signals [PK_CLIENT_MEDIA_CHANGE_REQUIRED] =
> +              g_signal_new ("media_change_required",
> +                            G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST,
> +                            G_STRUCT_OFFSET (PkClientClass, media_change_required),
> +                            NULL, NULL, g_cclosure_marshal_VOID__POINTER,
> +                            G_TYPE_NONE, 1, G_TYPE_POINTER);

I think you want:

        g_signal_new ("media-change-required",
                  G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST,
                  G_STRUCT_OFFSET (PkClientClass, media_change_required),
                  NULL, NULL, pk_marshal_VOID__UINT_STRING_STRING,
                  G_TYPE_NONE, 3, G_TYPE_UINT, G_TYPE_STRING, G_TYPE_STRING);

i>.e. uss and dashes rather than underscores. Other than that it looks
>great, thanks. Please commit after you've fixed the signal.

Richard.


_______________________________________________
PackageKit mailing list
PackageKit at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/packagekit



      Veja quais são os assuntos do momento no Yahoo! +Buscados
http://br.maisbuscados.yahoo.com



More information about the PackageKit mailing list