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

Eduardo Lima (Etrunko) etrunko at redhat.com
Thu Jan 19 15:42:10 UTC 2017


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




More information about the virt-tools-list mailing list