On 07/19/2016 12:32 PM, Christophe Fergeau wrote:
> On Sun, Jul 17, 2016 at 11:13:04PM -0300, Eduardo Lima (Etrunko) wrote:
>> Signed-off-by: Eduardo Lima (Etrunko) <etru...@redhat.com>
>> ---
>>  src/ovirt-foreign-menu.c | 49 
>> ++++++++++++++++++++++++++++++++++--------------
>>  src/ovirt-foreign-menu.h |  5 ++++-
>>  2 files changed, 39 insertions(+), 15 deletions(-)
>>
>> diff --git a/src/ovirt-foreign-menu.c b/src/ovirt-foreign-menu.c
>> index b071e27..2446239 100644
>> --- a/src/ovirt-foreign-menu.c
>> +++ b/src/ovirt-foreign-menu.c
>> @@ -47,6 +47,7 @@ static void 
>> ovirt_foreign_menu_fetch_storage_domain_async(OvirtForeignMenu *menu
>>  static void ovirt_foreign_menu_fetch_vm_cdrom_async(OvirtForeignMenu *menu);
>>  static void ovirt_foreign_menu_refresh_cdrom_file_async(OvirtForeignMenu 
>> *menu);
>>  static void ovirt_foreign_menu_fetch_iso_list_async(OvirtForeignMenu *menu);
>> +static void updated_cdrom_cb(GObject *source_object, GAsyncResult *result, 
>> gpointer user_data);
>>  
>>  G_DEFINE_TYPE (OvirtForeignMenu, ovirt_foreign_menu, G_TYPE_OBJECT)
>>  
>> @@ -85,7 +86,7 @@ enum {
>>  };
>>  
>>  
>> -static char *
>> +char *
>>  ovirt_foreign_menu_get_current_iso_name(OvirtForeignMenu *foreign_menu)
>>  {
>>      char *name;
>> @@ -100,6 +101,36 @@ 
>> ovirt_foreign_menu_get_current_iso_name(OvirtForeignMenu *foreign_menu)
>>  }
>>  
>>  
>> +void
>> +ovirt_foreign_menu_set_current_iso_name(OvirtForeignMenu *foreign_menu, 
>> char *name)
>> +{
> 
> For what it's worth, this is a bit misleading as this going to trigger
> an async update of the ISO name, and this sets "next_iso_name" more than
> "current_iso_name". I think you need to expose this an async method
> anyway, so that you can catch failures to change the ISO (ie the REST
> API call failed).
> 

Okay, I will work on it. I really did it the laziest way possible,
without any error treatment indeed.

-- 
Eduardo de Barros Lima (Etrunko)
Software Engineer - RedHat
etru...@redhat.com

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
virt-tools-list mailing list
virt-tools-list@redhat.com
https://www.redhat.com/mailman/listinfo/virt-tools-list

Reply via email to