6505c36ecc
virtman-netstats-fix.diff virtman-finish-button-fix.diff virtman-shutoff-fix.diff virtman-set-has-window-fix.diff virtman-grep-fix.diff virtman-no-cd-present-fix.diff virtman-resize-menu-fix.diff virtman-vcpu-count-fix.diff virtman-storage-pool-fix.diff virtman-domain-name-fix.diff virtman-unapplied-changes-fix.diff virtman-details-fix.diff virtman-delete-fix.diff virtman-collidelist-fix.diff virtman-char-device-mode-fix.diff virtinst-hv-version-fix.diff virtinst-initrd-inject-fix.diff virtinst-initrd-inject2-fix.diff virtinst-no-volume-fix.diff virtinst-prompts-fix.diff virtinst-cpu-model-name-fix.diff virtinst-xml-clear-fix.diff virtinst-remote-storage-fix.diff virtinst-error-message-fix.diff virtinst-typo-fix.diff virtinst-cdrom.diff virtinst-storage-ocfs2.diff OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=63
77 lines
3.1 KiB
Diff
77 lines
3.1 KiB
Diff
|
|
Subject: manager: Properly show domain names with reserved XML characters
|
|
From: Cole Robinson crobinso@redhat.com Mon Aug 29 12:11:43 2011 -0400
|
|
Date: Mon Aug 29 12:11:43 2011 -0400:
|
|
Git: 8a513361522780fcc126ec2ded48839ecc24ef6e
|
|
|
|
|
|
Index: virt-manager-0.9.0/src/virtManager/delete.py
|
|
===================================================================
|
|
--- virt-manager-0.9.0.orig/src/virtManager/delete.py
|
|
+++ virt-manager-0.9.0/src/virtManager/delete.py
|
|
@@ -91,7 +91,7 @@ class vmmDeleteDialog(vmmGObjectUI):
|
|
|
|
# Set VM name in title'
|
|
title_str = ("<span size='x-large'>%s '%s'</span>" %
|
|
- (_("Delete"), self.vm.get_name()))
|
|
+ (_("Delete"), util.xml_escape(self.vm.get_name())))
|
|
self.widget("delete-main-label").set_markup(title_str)
|
|
|
|
self.widget("delete-cancel").grab_focus()
|
|
Index: virt-manager-0.9.0/src/virtManager/manager.py
|
|
===================================================================
|
|
--- virt-manager-0.9.0.orig/src/virtManager/manager.py
|
|
+++ virt-manager-0.9.0/src/virtManager/manager.py
|
|
@@ -701,12 +701,12 @@ class vmmManager(vmmGObjectUI):
|
|
return hint
|
|
|
|
def _build_conn_markup(self, conn, row):
|
|
+ name = util.xml_escape(row[ROW_NAME])
|
|
+ text = name
|
|
if conn.state == conn.STATE_DISCONNECTED:
|
|
- text = str(row[ROW_NAME]) + " - " + _("Not Connected")
|
|
+ text += " - " + _("Not Connected")
|
|
elif conn.state == conn.STATE_CONNECTING:
|
|
- text = str(row[ROW_NAME]) + " - " + _("Connecting...")
|
|
- else:
|
|
- text = str(row[ROW_NAME])
|
|
+ text += " - " + _("Connecting...")
|
|
|
|
markup = "<span size='smaller'>%s</span>" % text
|
|
return markup
|
|
@@ -720,7 +720,7 @@ class vmmManager(vmmGObjectUI):
|
|
|
|
def _build_vm_markup(self, row):
|
|
domtext = ("<span size='smaller' weight='bold'>%s</span>" %
|
|
- row[ROW_NAME])
|
|
+ util.xml_escape(row[ROW_NAME]))
|
|
statetext = "<span size='smaller'>%s</span>" % row[ROW_STATUS]
|
|
return domtext + "\n" + statetext
|
|
|
|
Index: virt-manager-0.9.0/src/virtManager/migrate.py
|
|
===================================================================
|
|
--- virt-manager-0.9.0.orig/src/virtManager/migrate.py
|
|
+++ virt-manager-0.9.0/src/virtManager/migrate.py
|
|
@@ -122,7 +122,7 @@ class vmmMigrateDialog(vmmGObjectUI):
|
|
|
|
def reset_state(self):
|
|
title_str = ("<span size='large' color='white'>%s '%s'</span>" %
|
|
- (_("Migrate"), self.vm.get_name()))
|
|
+ (_("Migrate"), util.xml_escape(self.vm.get_name())))
|
|
self.widget("migrate-main-label").set_markup(title_str)
|
|
|
|
self.widget("migrate-cancel").grab_focus()
|
|
Index: virt-manager-0.9.0/src/virtManager/util.py
|
|
===================================================================
|
|
--- virt-manager-0.9.0.orig/src/virtManager/util.py
|
|
+++ virt-manager-0.9.0/src/virtManager/util.py
|
|
@@ -29,6 +29,8 @@ import virtinst
|
|
|
|
running_config = None
|
|
|
|
+xml_escape = virtinst.util.xml_escape
|
|
+
|
|
# FIXME: selinux policy also has a ~/VirtualMachines/isos dir
|
|
def get_default_pool_path(conn):
|
|
if conn.is_session_uri():
|