[Pkg-libvirt-commits] [virt-manager] 01/01: details: Fix changing graphics type (bz 1083903)
Guido Guenther
agx at moszumanska.debian.org
Sun Oct 12 11:31:51 UTC 2014
This is an automated email from the git hooks/post-receive script.
agx pushed a commit to branch master
in repository virt-manager.
commit da12f607a8282eeff96b1ecac5c1b213ec7de812
Author: Guido Günther <agx at sigxcpu.org>
Date: Sun Oct 12 12:00:35 2014 +0200
details: Fix changing graphics type (bz 1083903)
Closes: #764880
---
...ils-Fix-changing-graphics-type-bz-1083903.patch | 307 +++++++++++++++++++++
debian/patches/fix-removable-drive-support.patch | 18 +-
debian/patches/series | 1 +
3 files changed, 318 insertions(+), 8 deletions(-)
diff --git a/debian/patches/details-Fix-changing-graphics-type-bz-1083903.patch b/debian/patches/details-Fix-changing-graphics-type-bz-1083903.patch
new file mode 100644
index 0000000..5b41fb2
--- /dev/null
+++ b/debian/patches/details-Fix-changing-graphics-type-bz-1083903.patch
@@ -0,0 +1,307 @@
+From: Cole Robinson <crobinso at redhat.com>
+Date: Thu, 3 Apr 2014 10:53:54 -0400
+Subject: details: Fix changing graphics type (bz 1083903)
+
+And clean up the API usage to avoid these types of issues in the future.
+
+Closes: #764880
+---
+ virtManager/addhardware.py | 8 ++++----
+ virtManager/create.py | 13 ++++++++-----
+ virtManager/createinterface.py | 2 +-
+ virtManager/details.py | 4 ++--
+ virtManager/fsdetails.py | 20 ++++++++++----------
+ virtManager/gfxdetails.py | 4 ++--
+ virtManager/manager.py | 2 +-
+ virtManager/migrate.py | 4 ++--
+ virtManager/netlist.py | 10 ++++------
+ virtManager/storagebrowse.py | 4 ++--
+ virtManager/uiutil.py | 8 +++++---
+ 11 files changed, 41 insertions(+), 38 deletions(-)
+
+diff --git a/virtManager/addhardware.py b/virtManager/addhardware.py
+index c7ee0f0..653fdf5 100644
+--- a/virtManager/addhardware.py
++++ b/virtManager/addhardware.py
+@@ -905,12 +905,12 @@ class vmmAddHardware(vmmGObjectUI):
+
+ # Input getters
+ def get_config_input(self):
+- row = uiutil.get_list_selection(self.widget("input-type"))
++ row = uiutil.get_list_selection(self.widget("input-type"), None)
+ return row[1], row[2]
+
+ # Network getters
+ def get_config_net_model(self):
+- return uiutil.get_list_selection(self.widget("net-model"))[0]
++ return uiutil.get_list_selection(self.widget("net-model"), 0)
+
+ def get_config_macaddr(self):
+ macaddr = None
+@@ -933,7 +933,7 @@ class vmmAddHardware(vmmGObjectUI):
+ return usb_info
+
+ def get_config_host_device_info(self):
+- return uiutil.get_list_selection(self.widget("host-device"))
++ return uiutil.get_list_selection(self.widget("host-device"), None)
+
+ # Video Getters
+ def get_config_video_model(self):
+@@ -1016,7 +1016,7 @@ class vmmAddHardware(vmmGObjectUI):
+ uiutil.set_list_selection(self.widget("hw-list"), page)
+
+ def get_hw_selection(self):
+- return uiutil.get_list_selection(self.widget("hw-list"))
++ return uiutil.get_list_selection(self.widget("hw-list"), None)
+
+ def update_char_device_type_model(self):
+ stable_blacklist = ["pipe", "udp"]
+diff --git a/virtManager/create.py b/virtManager/create.py
+index 29f7c92..86f8bd3 100644
+--- a/virtManager/create.py
++++ b/virtManager/create.py
+@@ -935,8 +935,8 @@ class vmmCreate(vmmGObjectUI):
+ return self.widget("create-vm-name").get_text()
+
+ def get_config_machine(self):
+- return uiutil.get_list_selection(self.widget("config-machine"),
+- rowindex=0, check_visible=True)
++ return uiutil.get_list_selection(self.widget("config-machine"), 0,
++ check_visible=True)
+
+ def is_install_page(self):
+ notebook = self.widget("create-pages")
+@@ -960,8 +960,10 @@ class vmmCreate(vmmGObjectUI):
+ return INSTALL_PAGE_CONTAINER_OS
+
+ def get_config_os_info(self):
+- drow = uiutil.get_list_selection(self.widget("install-os-type"))
+- vrow = uiutil.get_list_selection(self.widget("install-os-version"))
++ drow = uiutil.get_list_selection(
++ self.widget("install-os-type"), None)
++ vrow = uiutil.get_list_selection(
++ self.widget("install-os-version"), None)
+ distro = None
+ dlabel = None
+ variant = None
+@@ -1142,7 +1144,8 @@ class vmmCreate(vmmGObjectUI):
+ self.detect_media_os()
+
+ def _selected_os_row(self):
+- return uiutil.get_list_selection(self.widget("install-os-type"))
++ return uiutil.get_list_selection(
++ self.widget("install-os-type"), None)
+
+ def change_os_type(self, box):
+ ignore = box
+diff --git a/virtManager/createinterface.py b/virtManager/createinterface.py
+index 77fb6e1..809da13 100644
+--- a/virtManager/createinterface.py
++++ b/virtManager/createinterface.py
+@@ -775,7 +775,7 @@ class vmmCreateInterface(vmmGObjectUI):
+ is_manual = self.widget("ip-do-manual").get_active()
+
+ copy_row = uiutil.get_list_selection(
+- self.widget("ip-copy-interface-combo"))
++ self.widget("ip-copy-interface-combo"), None)
+
+ v4_mode = self.widget("ipv4-mode").get_active()
+ v4_addr = self.widget("ipv4-address").get_text()
+diff --git a/virtManager/details.py b/virtManager/details.py
+index 75b9fa8..e82fbc9 100644
+--- a/virtManager/details.py
++++ b/virtManager/details.py
+@@ -1096,7 +1096,7 @@ class vmmDetails(vmmGObjectUI):
+ self.widget("toolbar-box").hide()
+
+ def get_boot_selection(self):
+- return uiutil.get_list_selection(self.widget("config-boot-list"))
++ return uiutil.get_list_selection(self.widget("config-boot-list"), None)
+
+ def set_hw_selection(self, page, disable_apply=True):
+ if disable_apply:
+@@ -1104,7 +1104,7 @@ class vmmDetails(vmmGObjectUI):
+ uiutil.set_list_selection(self.widget("hw-list"), page)
+
+ def get_hw_row(self):
+- return uiutil.get_list_selection(self.widget("hw-list"))
++ return uiutil.get_list_selection(self.widget("hw-list"), None)
+
+ def get_hw_selection(self, field):
+ row = self.get_hw_row()
+diff --git a/virtManager/fsdetails.py b/virtManager/fsdetails.py
+index f47bd55..ce78912 100644
+--- a/virtManager/fsdetails.py
++++ b/virtManager/fsdetails.py
+@@ -155,16 +155,16 @@ class vmmFSDetails(vmmGObjectUI):
+ return self._dev
+
+ def get_config_fs_mode(self):
+- return uiutil.get_list_selection(self.widget("fs-mode-combo"),
+- rowindex=0, check_visible=True)
++ return uiutil.get_list_selection(self.widget("fs-mode-combo"), 0,
++ check_visible=True)
+
+ def get_config_fs_wrpolicy(self):
+- return uiutil.get_list_selection(self.widget("fs-wrpolicy-combo"),
+- rowindex=0, check_visible=True)
++ return uiutil.get_list_selection(self.widget("fs-wrpolicy-combo"), 0,
++ check_visible=True)
+
+ def get_config_fs_type(self):
+- return uiutil.get_list_selection(self.widget("fs-type-combo"),
+- rowindex=0, check_visible=True)
++ return uiutil.get_list_selection(self.widget("fs-type-combo"), 0,
++ check_visible=True)
+
+ def get_config_fs_readonly(self):
+ if not self.widget("fs-readonly").is_visible():
+@@ -172,12 +172,12 @@ class vmmFSDetails(vmmGObjectUI):
+ return self.widget("fs-readonly").get_active()
+
+ def get_config_fs_driver(self):
+- return uiutil.get_list_selection(self.widget("fs-driver-combo"),
+- rowindex=0, check_visible=True)
++ return uiutil.get_list_selection(self.widget("fs-driver-combo"), 0,
++ check_visible=True)
+
+ def get_config_fs_format(self):
+- return uiutil.get_list_selection(self.widget("fs-format-combo"),
+- rowindex=0, check_visible=True)
++ return uiutil.get_list_selection(self.widget("fs-format-combo"), 0,
++ check_visible=True)
+
+ # Setters
+ def set_dev(self, dev):
+diff --git a/virtManager/gfxdetails.py b/virtManager/gfxdetails.py
+index 0141f7e..9fd21ab 100644
+--- a/virtManager/gfxdetails.py
++++ b/virtManager/gfxdetails.py
+@@ -134,9 +134,9 @@ class vmmGraphicsDetails(vmmGObjectUI):
+ self.widget("graphics-password-chk").set_active(False)
+
+ def get_values(self):
+- gtype = uiutil.get_list_selection(self.widget("graphics-type"))
++ gtype = uiutil.get_list_selection(self.widget("graphics-type"), 0)
+ port, tlsport = self._get_config_graphics_ports()
+- addr = uiutil.get_list_selection(self.widget("graphics-address"))
++ addr = uiutil.get_list_selection(self.widget("graphics-address"), 0)
+ keymap = uiutil.get_combo_entry(self.widget("graphics-keymap"))
+ if keymap == "auto":
+ keymap = None
+diff --git a/virtManager/manager.py b/virtManager/manager.py
+index 4c99a44..b611e0d 100644
+--- a/virtManager/manager.py
++++ b/virtManager/manager.py
+@@ -427,7 +427,7 @@ class vmmManager(vmmGObjectUI):
+ ##################
+
+ def current_row(self):
+- return uiutil.get_list_selection(self.widget("vm-list"))
++ return uiutil.get_list_selection(self.widget("vm-list"), None)
+
+ def current_vm(self):
+ row = self.current_row()
+diff --git a/virtManager/migrate.py b/virtManager/migrate.py
+index f392737..f5cb86c 100644
+--- a/virtManager/migrate.py
++++ b/virtManager/migrate.py
+@@ -184,7 +184,7 @@ class vmmMigrateDialog(vmmGObjectUI):
+ self.reset_state()
+
+ def destconn_changed(self, src):
+- row = uiutil.get_list_selection(src)
++ row = uiutil.get_list_selection(src, None)
+ tooltip = ""
+ if row:
+ tooltip = _("A valid destination connection must be selected.")
+@@ -212,7 +212,7 @@ class vmmMigrateDialog(vmmGObjectUI):
+ self.widget("migrate-port").set_sensitive(enable)
+
+ def get_config_destconn(self):
+- row = uiutil.get_list_selection(self.widget("migrate-dest"))
++ row = uiutil.get_list_selection(self.widget("migrate-dest"), None)
+ if not row or not row[2]:
+ return None
+ return row[1]
+diff --git a/virtManager/netlist.py b/virtManager/netlist.py
+index 0e24f4e..01ad2e4 100644
+--- a/virtManager/netlist.py
++++ b/virtManager/netlist.py
+@@ -284,13 +284,11 @@ class vmmNetworkList(vmmGObjectUI):
+ ###############
+
+ def get_network_row(self):
+- return uiutil.get_list_selection(self.widget("net-source"))
++ return uiutil.get_list_selection(self.widget("net-source"), None)
+
+ def get_network_selection(self):
+- net_list = self.widget("net-source")
+ bridge_entry = self.widget("net-bridge-name")
+-
+- row = uiutil.get_list_selection(net_list)
++ row = self.get_network_row()
+ if not row:
+ return None, None, None
+
+@@ -472,9 +470,9 @@ class vmmNetworkList(vmmGObjectUI):
+ return
+
+ def _on_net_source_changed(self, src):
++ ignore = src
+ self._emit_changed()
+-
+- row = uiutil.get_list_selection(src)
++ row = self.get_network_row()
+ if not row:
+ return
+
+diff --git a/virtManager/storagebrowse.py b/virtManager/storagebrowse.py
+index 3f61352..30b5c2a 100644
+--- a/virtManager/storagebrowse.py
++++ b/virtManager/storagebrowse.py
+@@ -221,7 +221,7 @@ class vmmStorageBrowser(vmmGObjectUI):
+ return data["enable_create"]
+
+ def current_pool(self):
+- row = uiutil.get_list_selection(self.widget("pool-list"))
++ row = uiutil.get_list_selection(self.widget("pool-list"), None)
+ if not row:
+ return
+ try:
+@@ -232,7 +232,7 @@ class vmmStorageBrowser(vmmGObjectUI):
+ def current_vol_row(self):
+ if not self.current_pool():
+ return
+- return uiutil.get_list_selection(self.widget("vol-list"))
++ return uiutil.get_list_selection(self.widget("vol-list"), None)
+
+ def current_vol(self):
+ pool = self.current_pool()
+diff --git a/virtManager/uiutil.py b/virtManager/uiutil.py
+index 364aaa7..2ce6c9a 100644
+--- a/virtManager/uiutil.py
++++ b/virtManager/uiutil.py
+@@ -58,9 +58,11 @@ def spin_get_helper(widget):
+ return adj.get_value()
+
+
+-def get_list_selection(widget, rowindex=None, check_visible=False):
++def get_list_selection(widget, rowindex, check_visible=False):
+ """
+- Helper to simplify getting the selected row in a list/tree/combo
++ Helper to simplify getting the selected row and value in a list/tree/combo
++
++ If rowindex is None, return the whole row.
+ """
+ if check_visible and not widget.get_visible():
+ return None
+@@ -145,7 +147,7 @@ def get_combo_entry(combo, rowidx=0):
+ Helper to get the value specified in a combo box, with or
+ without and entry
+ """
+- row = get_list_selection(combo)
++ row = get_list_selection(combo, None)
+ if row:
+ return row[rowidx]
+ if not combo.get_has_entry():
diff --git a/debian/patches/fix-removable-drive-support.patch b/debian/patches/fix-removable-drive-support.patch
index 6f08a2d..f9adb46 100644
--- a/debian/patches/fix-removable-drive-support.patch
+++ b/debian/patches/fix-removable-drive-support.patch
@@ -1,15 +1,17 @@
-Author: Giuseppe Scrivano <gscrivan at redhat.com>
-Date: Tue Jun 24 13:59:12 2014 +0200
-Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1112629
-Bug-Debian: https://bugs.debian.org/764508
-Origin: upstream, https://git.fedorahosted.org/cgit/virt-manager.git/commit/?id=eb5b2613110dfaa23626a16704d18df0dbba5086
-Description: details.py: fix typo s|removeable|removable|
+From: Debian Libvirt Maintainers
+ <pkg-libvirt-maintainers at lists.alioth.debian.org>
+Date: Sun, 12 Oct 2014 11:55:00 +0200
+Subject: fix-removable-drive-support
+
+---
+ virtManager/details.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/virtManager/details.py b/virtManager/details.py
-index dd43259..d3826e5 100644
+index c1833ae..75b9fa8 100644
--- a/virtManager/details.py
+++ b/virtManager/details.py
-@@ -2166,7 +2166,7 @@ class vmmDetails(vmmGObjectUI):
+@@ -2092,7 +2092,7 @@ class vmmDetails(vmmGObjectUI):
kwargs["shareable"] = self.widget("disk-shareable").get_active()
if self.edited(EDIT_DISK_REMOVABLE):
diff --git a/debian/patches/series b/debian/patches/series
index 4ff2c04..0c6e63a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@ virtinst/fix-path-to-hvmloader.patch
virtinst/Fix-patch-to-pygrub.patch
Move-GConf-values-to-GSettings.patch
fix-removable-drive-support.patch
+details-Fix-changing-graphics-type-bz-1083903.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/virt-manager.git
More information about the Pkg-libvirt-commits
mailing list