dd8a28d4b2
virt-manager.spec - Upstream bug fixes 76bad650-fix-virt-xml-define-and-update.patch fc93e154-fix-udp-tcp-host-vs-mode-UI.patch 34db1af7-fix-adding-iscsi-pools.patch 77423e7a-connection-catch-more-errors-in-filter_nodedevs.patch - fate#318394: Update to version 1.2.1 OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=241
53 lines
2.0 KiB
Diff
53 lines
2.0 KiB
Diff
Subject: createpool: Fix adding iscsi pools (bz 1231558)
|
|
From: Cole Robinson crobinso@redhat.com Sun Jun 21 15:47:31 2015 -0400
|
|
Date: Sun Jun 21 15:47:31 2015 -0400:
|
|
Git: 34db1af7b661b7eb5df4c71fc910d31c1ae9f7a4
|
|
|
|
|
|
diff --git a/virtManager/createpool.py b/virtManager/createpool.py
|
|
index bd18d43..1eaa805 100644
|
|
--- a/virtManager/createpool.py
|
|
+++ b/virtManager/createpool.py
|
|
@@ -479,9 +479,11 @@ class vmmCreatePool(vmmGObjectUI):
|
|
source_list = self.widget("pool-source-path")
|
|
target_list = self.widget("pool-target-path")
|
|
|
|
- pool = uiutil.get_list_selection(source_list, column=2)
|
|
+ pool = uiutil.get_list_selection(source_list, column=2,
|
|
+ check_entry=False)
|
|
if pool is None:
|
|
- pool = uiutil.get_list_selection(target_list, column=2)
|
|
+ pool = uiutil.get_list_selection(target_list, column=2,
|
|
+ check_entry=False)
|
|
|
|
return pool
|
|
|
|
diff --git a/virtManager/uiutil.py b/virtManager/uiutil.py
|
|
index 82d2c1d..40b74d4 100644
|
|
--- a/virtManager/uiutil.py
|
|
+++ b/virtManager/uiutil.py
|
|
@@ -70,17 +70,21 @@ def get_list_selected_row(widget, check_visible=False):
|
|
return row
|
|
|
|
|
|
-def get_list_selection(widget, column=0, check_visible=False):
|
|
+def get_list_selection(widget, column=0,
|
|
+ check_visible=False, check_entry=True):
|
|
"""
|
|
Helper to simplify getting the selected row and value in a list/tree/combo.
|
|
If nothing is selected, and the widget is a combo box with a text entry,
|
|
return the value of that.
|
|
+
|
|
+ :param check_entry: If True, attempt to check the widget's text entry
|
|
+ using the logic described above.
|
|
"""
|
|
row = get_list_selected_row(widget, check_visible=check_visible)
|
|
if row is not None:
|
|
return row[column]
|
|
|
|
- if hasattr(widget, "get_has_entry"):
|
|
+ if check_entry and hasattr(widget, "get_has_entry"):
|
|
if widget.get_has_entry():
|
|
return widget.get_child().get_text().strip()
|
|
|