virt-manager/531db6a7-new-volume-tooltip-logic.patch
Charles Arnold 6786659bca - Upstream bug fixes
531db6a7-new-volume-tooltip-logic.patch
  531dbfa7-handle-errors-when-deregistering-events-on-close.patch

- Upstream bug fixes
  5318a2cd-cpu-model-fallback-failure-fix.patch
  5318a626-adding-filesystem-device-fix.patch
  5318aa88-invalid-libvirt-volume-XML.patch
  5318b486-virtinstall-location-iso-fix.patch
  5319db07-customize-add-disk-fix.patch

- Allow the installation repos provided by zypper to be selected
  as network installation sources
  virtman-show-suse-install-repos.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=148
2014-03-10 13:54:17 +00:00

43 lines
1.5 KiB
Diff

Subject: storagebrowse: Duplicate tooltip logic for 'new volume' button
From: Cole Robinson crobinso@redhat.com Mon Mar 10 08:56:51 2014 -0400
Date: Mon Mar 10 08:57:11 2014 -0400:
Git: cfc52051b71bcfbf3f58ea6eddf457298f186727
diff --git a/virtManager/storagebrowse.py b/virtManager/storagebrowse.py
index 314a6ab..3f61352 100644
--- a/virtManager/storagebrowse.py
+++ b/virtManager/storagebrowse.py
@@ -208,7 +208,8 @@ class vmmStorageBrowser(vmmGObjectUI):
self.local_args["dialog_type"] = data.get("dialog_type")
self.local_args["choose_button"] = data.get("choose_button")
- self.widget("new-volume").set_visible(self.can_new_volume)
+ self.widget("new-volume").set_visible(
+ self.can_new_volume and self.allow_create())
# Convenience helpers
@@ -302,13 +303,17 @@ class vmmStorageBrowser(vmmGObjectUI):
def pool_selected(self, src_ignore=None):
pool = self.current_pool()
- newvol = bool(pool)
+ can_new_vol = False
+ tt = ""
if pool:
pool.tick()
- newvol = pool.is_active()
+ can_new_vol = (pool.is_active() and
+ pool.supports_volume_creation())
+ if not can_new_vol:
+ tt = _("Pool does not support volume creation")
- newvol = newvol and self.allow_create()
- self.widget("new-volume").set_sensitive(newvol)
+ self.widget("new-volume").set_sensitive(can_new_vol)
+ self.widget("new-volume").set_tooltip_text(tt)
self.populate_storage_volumes()