summaryrefslogtreecommitdiffstats
path: root/src/remote-viewer.c
diff options
context:
space:
mode:
authorJonathon Jongsma <jjongsma@redhat.com>2014-08-20 16:30:58 -0500
committerJonathon Jongsma <jjongsma@redhat.com>2014-09-24 10:21:22 -0500
commit453704789036551aa61bf19bc369c8c5709e49f3 (patch)
treea207055fa39a4093cd8746b41e1ec10b141181c5 /src/remote-viewer.c
parent0e6735b4a4f1c21364781f97630ec1a12a82fd60 (diff)
downloadvirt-viewer-453704789036551aa61bf19bc369c8c5709e49f3.tar.gz
virt-viewer-453704789036551aa61bf19bc369c8c5709e49f3.tar.xz
virt-viewer-453704789036551aa61bf19bc369c8c5709e49f3.zip
VirtViewerApp: store windows in a list
Use a list to store the application's windows. This is another step towards separating the window from the guest display ID.
Diffstat (limited to 'src/remote-viewer.c')
-rw-r--r--src/remote-viewer.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/src/remote-viewer.c b/src/remote-viewer.c
index a813480..49981aa 100644
--- a/src/remote-viewer.c
+++ b/src/remote-viewer.c
@@ -407,8 +407,7 @@ spice_menu_update(RemoteViewer *self, VirtViewerWindow *win)
}
static void
-spice_menu_update_each(gpointer key G_GNUC_UNUSED,
- gpointer value,
+spice_menu_update_each(gpointer value,
gpointer user_data)
{
spice_menu_update(REMOTE_VIEWER(user_data), VIRT_VIEWER_WINDOW(value));
@@ -417,11 +416,11 @@ spice_menu_update_each(gpointer key G_GNUC_UNUSED,
static void
spice_ctrl_menu_updated(RemoteViewer *self)
{
- GHashTable *windows = virt_viewer_app_get_windows(VIRT_VIEWER_APP(self));
+ GList *windows = virt_viewer_app_get_windows(VIRT_VIEWER_APP(self));
g_debug("Spice controller menu updated");
- g_hash_table_foreach(windows, spice_menu_update_each, self);
+ g_list_foreach(windows, spice_menu_update_each, self);
}
static void
@@ -456,8 +455,7 @@ spice_foreign_menu_update(RemoteViewer *self, VirtViewerWindow *win)
}
static void
-spice_foreign_menu_update_each(gpointer key G_GNUC_UNUSED,
- gpointer value,
+spice_foreign_menu_update_each(gpointer value,
gpointer user_data)
{
spice_foreign_menu_update(REMOTE_VIEWER(user_data), VIRT_VIEWER_WINDOW(value));
@@ -466,11 +464,11 @@ spice_foreign_menu_update_each(gpointer key G_GNUC_UNUSED,
static void
spice_foreign_menu_updated(RemoteViewer *self)
{
- GHashTable *windows = virt_viewer_app_get_windows(VIRT_VIEWER_APP(self));
+ GList *windows = virt_viewer_app_get_windows(VIRT_VIEWER_APP(self));
g_debug("Spice foreign menu updated");
- g_hash_table_foreach(windows, spice_foreign_menu_update_each, self);
+ g_list_foreach(windows, spice_foreign_menu_update_each, self);
}
static SpiceSession *
@@ -751,8 +749,7 @@ ovirt_foreign_menu_update(RemoteViewer *app, VirtViewerWindow *win)
}
static void
-ovirt_foreign_menu_update_each(gpointer key G_GNUC_UNUSED,
- gpointer value,
+ovirt_foreign_menu_update_each(gpointer value,
gpointer user_data)
{
ovirt_foreign_menu_update(REMOTE_VIEWER(user_data),
@@ -762,11 +759,11 @@ ovirt_foreign_menu_update_each(gpointer key G_GNUC_UNUSED,
static void
ovirt_foreign_menu_updated(RemoteViewer *self)
{
- GHashTable *windows = virt_viewer_app_get_windows(VIRT_VIEWER_APP(self));
+ GList *windows = virt_viewer_app_get_windows(VIRT_VIEWER_APP(self));
g_debug("Spice foreign menu updated");
- g_hash_table_foreach(windows, ovirt_foreign_menu_update_each, self);
+ g_list_foreach(windows, ovirt_foreign_menu_update_each, self);
}
static void