[virt-tools-list] [PATCH virt-viewer 1/5] ovirt-foreign-menu: Add accessors for current iso and iso list

Christophe Fergeau cfergeau at redhat.com
Fri Jan 20 15:16:33 UTC 2017


Acked-by: Christophe Fergeau <cfergeau at redhat.com>

On Thu, Jan 19, 2017 at 01:42:10PM -0200, Eduardo Lima (Etrunko) wrote:
> Also, to keep consistency around the codebase, changed the return value
> of ovirt_foreign_menu_get_current_iso_name() from char * to gchar *.
> 
> Signed-off-by: Eduardo Lima (Etrunko) <etrunko at redhat.com>
> ---
>  src/ovirt-foreign-menu.c | 11 +++++++++--
>  src/ovirt-foreign-menu.h |  2 ++
>  2 files changed, 11 insertions(+), 2 deletions(-)
> 
> diff --git a/src/ovirt-foreign-menu.c b/src/ovirt-foreign-menu.c
> index 8a99665..ef3ddd9 100644
> --- a/src/ovirt-foreign-menu.c
> +++ b/src/ovirt-foreign-menu.c
> @@ -85,10 +85,10 @@ enum {
>  };
>  
>  
> -static char *
> +gchar *
>  ovirt_foreign_menu_get_current_iso_name(OvirtForeignMenu *foreign_menu)
>  {
> -    char *name;
> +    gchar *name;
>  
>      if (foreign_menu->priv->cdrom == NULL) {
>          return NULL;
> @@ -100,6 +100,13 @@ ovirt_foreign_menu_get_current_iso_name(OvirtForeignMenu *foreign_menu)
>  }
>  
>  
> +GList*
> +ovirt_foreign_menu_get_iso_names(OvirtForeignMenu *foreign_menu)
> +{
> +    return foreign_menu->priv->iso_names;
> +}
> +
> +
>  static void
>  ovirt_foreign_menu_get_property(GObject *object, guint property_id,
>                                         GValue *value, GParamSpec *pspec)
> diff --git a/src/ovirt-foreign-menu.h b/src/ovirt-foreign-menu.h
> index a864a60..340201f 100644
> --- a/src/ovirt-foreign-menu.h
> +++ b/src/ovirt-foreign-menu.h
> @@ -88,6 +88,8 @@ gboolean ovirt_foreign_menu_set_current_iso_name_finish(OvirtForeignMenu *foreig
>  
>  
>  GtkWidget *ovirt_foreign_menu_get_gtk_menu(OvirtForeignMenu *foreign_menu);
> +gchar *ovirt_foreign_menu_get_current_iso_name(OvirtForeignMenu *menu);
> +GList *ovirt_foreign_menu_get_iso_names(OvirtForeignMenu *menu);
>  
>  G_END_DECLS
>  
> -- 
> 2.9.3
> 
> _______________________________________________
> virt-tools-list mailing list
> virt-tools-list at redhat.com
> https://www.redhat.com/mailman/listinfo/virt-tools-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20170120/8fb672c5/attachment.sig>


More information about the virt-tools-list mailing list