summaryrefslogtreecommitdiffstats
path: root/src/virt-viewer-file.c
diff options
context:
space:
mode:
authorJonathon Jongsma <jjongsma@redhat.com>2014-01-20 14:59:26 -0600
committerJonathon Jongsma <jjongsma@redhat.com>2014-02-11 11:56:43 -0600
commit0383cc4c9be9628d1f5535f5839b6538a74d7456 (patch)
tree997cc14acbbc500a9d8d0e5e234dd0f254b51a52 /src/virt-viewer-file.c
parentbee13a6a59e44a9184f8c548207f0bddf8845d2e (diff)
downloadvirt-viewer-0383cc4c9be9628d1f5535f5839b6538a74d7456.tar.gz
virt-viewer-0383cc4c9be9628d1f5535f5839b6538a74d7456.tar.xz
virt-viewer-0383cc4c9be9628d1f5535f5839b6538a74d7456.zip
Improve window title when connected to newer spice-server
Recent spice servers send the guest vm name and uuid to the client. We can use these values to display the proper vm name in the window title if a title is not specified on the commandline. We can also be smarter about the title in virt-viewer as well. If a title is specified on the comamndline (-t/--title=foo), we use that. If not, we fall back to the vm name. If that is empty, we fall back to the uri of the connection. Comparison between old behavior and new behavior Using new spice-server Command Old title New title ------- --------- --------- remote-viewer -t xyz spice://host:port xyz xyz remote-viewer spice://host:port spice://host:port <vmname> virt-viewer <vmname> <vmname> <vmname> virt-viewer <uuid> <uuid> <vmname> Using old spice-server Command Old title New title ------- --------- --------- remote-viewer -t xyz spice://host:port xyz xyz remote-viewer spice://host:port spice://host:port spice://host:port virt-viewer <vmname> <vmname> <vmname> virt-viewer <uuid> <uuid> <vmname>
Diffstat (limited to 'src/virt-viewer-file.c')
-rw-r--r--src/virt-viewer-file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/virt-viewer-file.c b/src/virt-viewer-file.c
index 639d96e..09f76b3 100644
--- a/src/virt-viewer-file.c
+++ b/src/virt-viewer-file.c
@@ -632,7 +632,7 @@ virt_viewer_file_fill_app(VirtViewerFile* self, VirtViewerApp *app, GError **err
}
if (virt_viewer_file_is_set(self, "title"))
- virt_viewer_app_set_title(app, virt_viewer_file_get_title(self));
+ g_object_set(app, "title", virt_viewer_file_get_title(self), NULL);
virt_viewer_app_clear_hotkeys(app);