On 18/01/17 15:45, Christophe Fergeau wrote: > On Wed, Jan 18, 2017 at 12:16:53PM -0200, Eduardo Lima (Etrunko) wrote: >> Similar to the previous commit, the ISO dialog will fetch the result >> asynchronously, rather than relying on the "notify::files" signal from >> OvirtForeignMenu object. It also enables error to be shown if anything >> goes wrong. >> >> Signed-off-by: Eduardo Lima (Etrunko) <etrunko@xxxxxxxxxx> >> --- >> src/ovirt-foreign-menu.c | 170 +++++++++++++++++++++++++++-------------------- >> src/ovirt-foreign-menu.h | 9 ++- >> src/remote-viewer.c | 45 +++++++++++-- >> 3 files changed, 147 insertions(+), 77 deletions(-) >> >> diff --git a/src/ovirt-foreign-menu.c b/src/ovirt-foreign-menu.c >> index 366259a..50a8ea6 100644 >> --- a/src/ovirt-foreign-menu.c >> +++ b/src/ovirt-foreign-menu.c >> -static void ovirt_foreign_menu_refresh_cdrom_file_async(OvirtForeignMenu *menu) >> +static void ovirt_foreign_menu_refresh_cdrom_file_async(OvirtForeignMenu *menu, >> + GTask *task) >> { >> g_return_if_fail(OVIRT_IS_RESOURCE(menu->priv->cdrom)); >> >> ovirt_resource_refresh_async(OVIRT_RESOURCE(menu->priv->cdrom), >> menu->priv->proxy, NULL, >> - cdrom_file_refreshed_cb, menu); >> + cdrom_file_refreshed_cb, task); > > Since we have a GTask, we could pass the GCancellable it contains when > we make ovirt_*_async() calls. Since we don't use the GCancellable > functionality, that's probably not worth it ;) You're right, for the sake of completeness, if some day we get to implement the functionality, the change will be slightly easier. I have replaced the NULL parameters with calls to g_task_get_cancellable(task). -- Eduardo de Barros Lima (Etrunko) Software Engineer - RedHat etrunko@xxxxxxxxxx
Attachment:
signature.asc
Description: OpenPGP digital signature
_______________________________________________ virt-tools-list mailing list virt-tools-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/virt-tools-list