[fedora-virt-maint] rpms/virt-manager/devel virt-manager-0.8.0-createvol-alloc.patch, NONE, 1.1 virt-manager-0.8.0-createvol-name.patch, NONE, 1.1 virt-manager-0.8.0-toolbar-tooltips.patch, NONE, 1.1 virt-manager.spec, 1.62, 1.63

Cole Robinson crobinso at fedoraproject.org
Mon Oct 5 17:25:32 UTC 2009


Author: crobinso

Update of /cvs/pkgs/rpms/virt-manager/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv19628

Modified Files:
	virt-manager.spec 
Added Files:
	virt-manager-0.8.0-createvol-alloc.patch 
	virt-manager-0.8.0-createvol-name.patch 
	virt-manager-0.8.0-toolbar-tooltips.patch 
Log Message:
Don't allow creating a volume without a name (bz 526111)
Don't allow volume allocation > capacity (bz 526077)
Add tooltips for toolbar buttons (bz 524083)


virt-manager-0.8.0-createvol-alloc.patch:
 src/virtManager/createvol.py                |   20 ++++++++++++++++++++
 virt-manager-0.8.0/src/vmm-create-vol.glade |   10 ++++++----
 2 files changed, 26 insertions(+), 4 deletions(-)

--- NEW FILE virt-manager-0.8.0-createvol-alloc.patch ---
# HG changeset patch
# User Cole Robinson <crobinso at redhat.com>
# Date 1254757810 14400
# Node ID 97c40c4fb29f7b1b1aadcebd42781f0d471d4697
# Parent  c0cffb13680c120ceff22386754104f66bb01d25
create-vol: Don't allow allocation to be higher than capacity.

Also tweak the spin button climb rates to be more useful.

diff -r c0cffb13680c -r 97c40c4fb29f src/virtManager/createvol.py
--- a/src/virtManager/createvol.py	Mon Oct 05 11:34:39 2009 -0400
+++ b/src/virtManager/createvol.py	Mon Oct 05 11:50:10 2009 -0400
@@ -63,6 +63,8 @@
             "on_vol_cancel_clicked"  : self.close,
             "on_vol_create_clicked"  : self.finish,
             "on_vol_name_changed"    : self.vol_name_changed,
+            "on_vol_allocation_value_changed" : self.vol_allocation_changed,
+            "on_vol_capacity_value_changed"   : self.vol_capacity_changed,
         })
 
         format_list = self.window.get_widget("vol-format")
@@ -144,6 +146,24 @@
         text = src.get_text()
         self.window.get_widget("vol-create").set_sensitive(bool(text))
 
+    def vol_allocation_changed(self, src):
+        cap_widget = self.window.get_widget("vol-capacity")
+
+        alloc = src.get_value()
+        cap   = cap_widget.get_value()
+
+        if alloc > cap:
+            cap_widget.set_value(alloc)
+
+    def vol_capacity_changed(self, src):
+        alloc_widget = self.window.get_widget("vol-allocation")
+
+        cap   = src.get_value()
+        alloc = self.window.get_widget("vol-allocation").get_value()
+
+        if cap < alloc:
+            alloc_widget.set_value(cap)
+
     def finish(self, src):
         # validate input
         try:
diff -rup old/src/vmm-create-vol.glade virt-manager-0.8.0/src/vmm-create-vol.glade
--- old/src/vmm-create-vol.glade	2009-10-05 13:18:10.212062000 -0400
+++ virt-manager-0.8.0/src/vmm-create-vol.glade	2009-10-05 13:19:57.343395000 -0400
@@ -237,8 +237,9 @@
                               <widget class="GtkSpinButton" id="vol-capacity">
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
-                                <property name="adjustment">1 0 100000 1 10 0</property>
-                                <property name="climb_rate">1</property>
+                                <property name="adjustment">1 0 100000 1 1000 0</property>
+                                <property name="climb_rate">10</property>
+                                <signal name="value_changed" handler="on_vol_capacity_value_changed"/>
                               </widget>
                               <packing>
                                 <property name="left_attach">1</property>
@@ -251,8 +252,9 @@
                               <widget class="GtkSpinButton" id="vol-allocation">
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
-                                <property name="adjustment">1 0 100000 1 10 0</property>
-                                <property name="climb_rate">1</property>
+                                <property name="adjustment">1 0 100000 1 1000 0</property>
+                                <property name="climb_rate">10</property>
+                                <signal name="value_changed" handler="on_vol_allocation_value_changed"/>
                               </widget>
                               <packing>
                                 <property name="left_attach">1</property>

virt-manager-0.8.0-createvol-name.patch:
 src/virtManager/createvol.py                |    6 ++++++
 virt-manager-0.8.0/src/vmm-create-vol.glade |    1 +
 2 files changed, 7 insertions(+)

--- NEW FILE virt-manager-0.8.0-createvol-name.patch ---
# HG changeset patch
# User Cole Robinson <crobinso at redhat.com>
# Date 1254756879 14400
# Node ID c0cffb13680c120ceff22386754104f66bb01d25
# Parent  67d5721a535f204db27f532e59f491f562c8ff18
create-vol: Don't allow creating vol without a name entered

diff -r 67d5721a535f -r c0cffb13680c src/virtManager/createvol.py
--- a/src/virtManager/createvol.py	Mon Oct 05 10:06:29 2009 -0400
+++ b/src/virtManager/createvol.py	Mon Oct 05 11:34:39 2009 -0400
@@ -62,6 +62,7 @@
             "on_vmm_create_vol_delete_event" : self.close,
             "on_vol_cancel_clicked"  : self.close,
             "on_vol_create_clicked"  : self.finish,
+            "on_vol_name_changed"    : self.vol_name_changed,
         })
 
         format_list = self.window.get_widget("vol-format")
@@ -99,6 +100,7 @@
 
     def reset_state(self):
         self.window.get_widget("vol-name").set_text("")
+        self.window.get_widget("vol-create").set_sensitive(False)
         self.populate_vol_format()
         self.populate_vol_suffix()
 
@@ -138,6 +140,10 @@
             suffix = ".img"
         self.window.get_widget("vol-name-suffix").set_text(suffix)
 
+    def vol_name_changed(self, src):
+        text = src.get_text()
+        self.window.get_widget("vol-create").set_sensitive(bool(text))
+
     def finish(self, src):
         # validate input
         try:
diff -rup new/src/vmm-create-vol.glade virt-manager-0.8.0/src/vmm-create-vol.glade
--- new/src/vmm-create-vol.glade	2009-10-05 13:15:48.335564000 -0400
+++ virt-manager-0.8.0/src/vmm-create-vol.glade	2009-10-05 13:16:48.288704000 -0400
@@ -96,6 +96,7 @@
                               <widget class="GtkEntry" id="vol-name">
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
+                                <signal name="changed" handler="on_vol_name_changed"/>
                               </widget>
                             </child>
                             <child>

virt-manager-0.8.0-toolbar-tooltips.patch:
 vmm-details.glade |    6 ++++++
 vmm-manager.glade |    5 +++++
 2 files changed, 11 insertions(+)

--- NEW FILE virt-manager-0.8.0-toolbar-tooltips.patch ---
# HG changeset patch
# User Cole Robinson <crobinso at redhat.com>
# Date 1254762221 14400
# Node ID 7df46187c156c7697b9b93e46e3b391a19c4fbb2
# Parent  97c40c4fb29f7b1b1aadcebd42781f0d471d4697
Add tooltips for toolbar buttons in manager and details.

diff -r 97c40c4fb29f -r 7df46187c156 src/vmm-details.glade
--- a/src/vmm-details.glade	Mon Oct 05 11:50:10 2009 -0400
+++ b/src/vmm-details.glade	Mon Oct 05 13:03:41 2009 -0400
@@ -430,6 +430,7 @@
                 <child>
                   <widget class="GtkRadioToolButton" id="control-vm-console">
                     <property name="visible">True</property>
+                    <property name="tooltip" translatable="yes">Show the graphical console</property>
                     <property name="label" translatable="yes">Console</property>
                     <property name="icon_name">icon_console</property>
                     <property name="active">True</property>
@@ -443,6 +444,7 @@
                 <child>
                   <widget class="GtkRadioToolButton" id="control-vm-details">
                     <property name="visible">True</property>
+                    <property name="tooltip" translatable="yes">Show virtual hardware details</property>
                     <property name="label" translatable="yes">Details</property>
                     <property name="stock_id">gtk-info</property>
                     <property name="group">control-vm-console</property>
@@ -465,6 +467,7 @@
                 <child>
                   <widget class="GtkToolButton" id="control-run">
                     <property name="visible">True</property>
+                    <property name="tooltip" translatable="yes">Power on the virtual machine</property>
                     <property name="is_important">True</property>
                     <property name="label" translatable="yes">Run</property>
                     <property name="use_underline">True</property>
@@ -479,6 +482,7 @@
                 <child>
                   <widget class="GtkToggleToolButton" id="control-pause">
                     <property name="visible">True</property>
+                    <property name="tooltip" translatable="yes">Pause the virtual machine</property>
                     <property name="is_important">True</property>
                     <property name="label" translatable="yes">Pause</property>
                     <property name="use_underline">True</property>
@@ -493,6 +497,7 @@
                 <child>
                   <widget class="GtkMenuToolButton" id="control-shutdown">
                     <property name="visible">True</property>
+                    <property name="tooltip" translatable="yes">Shutdown the virtual machine</property>
                     <property name="is_important">True</property>
                     <property name="label" translatable="yes">Shut Down</property>
                     <property name="use_underline">True</property>
@@ -514,6 +519,7 @@
                 <child>
                   <widget class="GtkToggleToolButton" id="control-fullscreen">
                     <property name="visible">True</property>
+                    <property name="tooltip" translatable="yes">Switch to fullscreen view</property>
                     <property name="stock_id">gtk-fullscreen</property>
                     <signal name="toggled" handler="on_control_fullscreen_toggled"/>
                   </widget>
diff -r 97c40c4fb29f -r 7df46187c156 src/vmm-manager.glade
--- a/src/vmm-manager.glade	Mon Oct 05 11:50:10 2009 -0400
+++ b/src/vmm-manager.glade	Mon Oct 05 13:03:41 2009 -0400
@@ -229,6 +229,7 @@
                     <child>
                       <widget class="GtkToolButton" id="vm-new">
                         <property name="visible">True</property>
+                        <property name="tooltip" translatable="yes">Create a new virtual machine</property>
                         <property name="label" translatable="yes">_New</property>
                         <property name="use_underline">True</property>
                         <property name="icon_name">vm_new_large</property>
@@ -251,6 +252,7 @@
                     <child>
                       <widget class="GtkToolButton" id="vm-open">
                         <property name="visible">True</property>
+                        <property name="tooltip" translatable="yes">Show the virtual machine's details</property>
                         <property name="label" translatable="yes">_Open</property>
                         <property name="use_underline">True</property>
                         <property name="icon_name">icon_console</property>
@@ -264,6 +266,7 @@
                     <child>
                       <widget class="GtkToolButton" id="vm-run">
                         <property name="visible">True</property>
+                        <property name="tooltip" translatable="yes">Power on the virtual machine</property>
                         <property name="label" translatable="yes">_Run</property>
                         <property name="use_underline">True</property>
                         <property name="stock_id">gtk-media-play</property>
@@ -277,6 +280,7 @@
                     <child>
                       <widget class="GtkToggleToolButton" id="vm-pause">
                         <property name="visible">True</property>
+                        <property name="tooltip" translatable="yes">Pause the virtual machine</property>
                         <property name="label" translatable="yes">_Pause</property>
                         <property name="use_underline">True</property>
                         <property name="stock_id">gtk-media-pause</property>
@@ -290,6 +294,7 @@
                     <child>
                       <widget class="GtkMenuToolButton" id="vm-shutdown">
                         <property name="visible">True</property>
+                        <property name="tooltip" translatable="yes">Shutdown the virtual machine</property>
                         <property name="label" translatable="yes">_Shutdown</property>
                         <property name="use_underline">True</property>
                         <signal name="clicked" handler="on_vm_shutdown_clicked"/>


Index: virt-manager.spec
===================================================================
RCS file: /cvs/pkgs/rpms/virt-manager/devel/virt-manager.spec,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -p -r1.62 -r1.63
--- virt-manager.spec	5 Oct 2009 14:19:29 -0000	1.62
+++ virt-manager.spec	5 Oct 2009 17:25:32 -0000	1.63
@@ -8,7 +8,7 @@
 
 Name: virt-manager
 Version: 0.8.0
-Release: 7%{_extra_release}
+Release: 8%{_extra_release}
 Summary: Virtual Machine Manager
 
 Group: Applications/Emulators
@@ -50,6 +50,12 @@ Patch13: %{name}-%{version}-update-vm-st
 Patch14: %{name}-%{version}-update-translations.patch
 # More translations (bz 493795)
 Patch15: %{name}-%{version}-more-translations.patch
+# Don't allow creating a volume without a name (bz 526111)
+Patch16: %{name}-%{version}-createvol-name.patch
+# Don't allow volume allocation > capacity (bz 526077)
+Patch17: %{name}-%{version}-createvol-alloc.patch
+# Add tooltips for toolbar buttons (bz 524083)
+Patch18: %{name}-%{version}-toolbar-tooltips.patch
 
 # These two are just the oldest version tested
 Requires: pygtk2 >= 1.99.12-6
@@ -132,6 +138,9 @@ cp %{SOURCE3} pixmaps
 %patch13 -p1
 %patch14 -p1
 %patch15 -p1
+%patch16 -p1
+%patch17 -p1
+%patch18 -p1
 
 %build
 %configure
@@ -205,6 +214,11 @@ fi
 %{_datadir}/dbus-1/services/%{name}.service
 
 %changelog
+* Mon Oct 05 2009 Cole Robinson <crobinso at redhat.com> - 0.8.0-8.fc13
+- Don't allow creating a volume without a name (bz 526111)
+- Don't allow volume allocation > capacity (bz 526077)
+- Add tooltips for toolbar buttons (bz 524083)
+
 * Mon Oct 05 2009 Cole Robinson <crobinso at redhat.com> - 0.8.0-7.fc13
 - More translations (bz 493795)
 




More information about the Fedora-virt-maint mailing list