*** /tmp/createpool.py	2011-11-10 07:22:11.724815643 -0500
--- createpool.py	2011-11-10 07:14:48.257872805 -0500
***************
*** 167,173 ****
          self.widget("pool-pages").set_current_page(0)
          self.widget("pool-forward").show()
          self.widget("pool-finish").hide()
!         self.widget("pool-back").set_sensitive(False)
  
          self.widget("pool-name").set_text("")
          self.widget("pool-name").grab_focus()
--- 167,174 ----
          self.widget("pool-pages").set_current_page(0)
          self.widget("pool-forward").show()
          self.widget("pool-finish").hide()
!         if self.widget("pool-back").get_property("sensitive"):
!                 self.widget("pool-back").set_sensitive(False)
  
          self.widget("pool-name").set_text("")
          self.widget("pool-name").grab_focus()
***************
*** 179,185 ****
          self.widget("pool-iqn-chk").toggled()
          self.widget("pool-iqn").set_text("")
          self.widget("pool-format").set_active(-1)
!         self.widget("pool-build").set_sensitive(True)
          self.widget("pool-build").set_active(False)
  
  
--- 180,187 ----
          self.widget("pool-iqn-chk").toggled()
          self.widget("pool-iqn").set_text("")
          self.widget("pool-format").set_active(-1)
!         if self.widget("pool-build").get_property("sensitive"):
!                 self.widget("pool-build").set_sensitive(True)
          self.widget("pool-build").set_active(False)
  
  
***************
*** 188,194 ****
          self.populate_pool_sources()
  
      def iqn_toggled(self, src):
!         self.widget("pool-iqn").set_sensitive(src.get_active())
  
      def populate_pool_type(self):
          model = self.widget("pool-type").get_model()
--- 190,197 ----
          self.populate_pool_sources()
  
      def iqn_toggled(self, src):
!         if self.widget("pool-iqn").get_property("sensitive"):
!                 self.widget("pool-iqn").set_sensitive(src.get_active())
  
      def populate_pool_type(self):
          model = self.widget("pool-type").get_model()
***************
*** 328,335 ****
          show_row("pool-iqn", iqn)
  
          self.widget("pool-target-path").child.set_text(self._pool.target_path)
!         self.widget("pool-target-button").set_sensitive(tgt_b)
!         self.widget("pool-source-button").set_sensitive(src_b)
          self.widget("pool-build").set_active(builddef)
  
          self.widget("pool-format").set_active(-1)
--- 331,339 ----
          show_row("pool-iqn", iqn)
  
          self.widget("pool-target-path").child.set_text(self._pool.target_path)
!         if self.widget("pool-target-button").get_property("sensitive"):
!                 self.widget("pool-target-button").set_sensitive(tgt_b)
!                 self.widget("pool-source-button").set_sensitive(src_b)
          self.widget("pool-build").set_active(builddef)
  
          self.widget("pool-format").set_active(-1)
***************
*** 391,397 ****
  
      def get_config_iqn(self):
          iqn = self.widget("pool-iqn")
!         if iqn.get_sensitive() and iqn.get_property("visible"):
              return iqn.get_text().strip()
          return None
  
--- 395,401 ----
  
      def get_config_iqn(self):
          iqn = self.widget("pool-iqn")
!         if (not iqn.get_property("sensitive") or iqn.get_sensitive()) and iqn.get_property("visible"):
              return iqn.get_text().strip()
          return None
  
***************
*** 447,453 ****
          self.widget("pool-pages").prev_page()
  
      def finish(self):
!         self.topwin.set_sensitive(False)
          self.topwin.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))
  
          progWin = vmmAsyncJob(self._async_pool_create, [],
--- 451,458 ----
          self.widget("pool-pages").prev_page()
  
      def finish(self):
!         if self.topwin.get_property("sensitive"):
!                 self.topwin.set_sensitive(False)
          self.topwin.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))
  
          progWin = vmmAsyncJob(self._async_pool_create, [],
***************
*** 457,463 ****
                                self.topwin)
          error, details = progWin.run()
  
!         self.topwin.set_sensitive(True)
          self.topwin.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.TOP_LEFT_ARROW))
  
          if error:
--- 462,469 ----
                                self.topwin)
          error, details = progWin.run()
  
!         if self.topwin.get_property("sensitive"):
!                 self.topwin.set_sensitive(True)
          self.topwin.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.TOP_LEFT_ARROW))
  
          if error:
***************
*** 483,494 ****
  
      def page_changed(self, notebook_ignore, page_ignore, page_number):
          if page_number == PAGE_NAME:
!             self.widget("pool-back").set_sensitive(False)
              self.widget("pool-finish").hide()
              self.widget("pool-forward").show()
              self.widget("pool-forward").grab_focus()
          elif page_number == PAGE_FORMAT:
!             self.widget("pool-back").set_sensitive(True)
              self.widget("pool-finish").show()
              self.widget("pool-finish").grab_focus()
              self.widget("pool-forward").hide()
--- 489,502 ----
  
      def page_changed(self, notebook_ignore, page_ignore, page_number):
          if page_number == PAGE_NAME:
!             if self.widget("pool-back").get_property("sensitive"):
!                 self.widget("pool-back").set_sensitive(False)
              self.widget("pool-finish").hide()
              self.widget("pool-forward").show()
              self.widget("pool-forward").grab_focus()
          elif page_number == PAGE_FORMAT:
!             if self.widget("pool-back").get_property("sensitive"):
!                 self.widget("pool-back").set_sensitive(True)
              self.widget("pool-finish").show()
              self.widget("pool-finish").grab_focus()
              self.widget("pool-forward").hide()
***************
*** 550,557 ****
                  return self.err.val_err(_("Pool Parameter Error"), str(e))
  
              buildval = self.widget("pool-build").get_active()
!             buildsen = (self.widget("pool-build").get_property("sensitive") and
!                         self.widget("pool-build-box").get_property("visible"))
              if buildsen and buildval:
                  ret = self.err.yes_no(_("Building a pool of this type will "
                                          "format the source device. Are you "
--- 558,565 ----
                  return self.err.val_err(_("Pool Parameter Error"), str(e))
  
              buildval = self.widget("pool-build").get_active()
!             buildsen = ((not self.widget("pool-build").get_property("sensitive") or self.widget("pool-build").get_property("sensitive")) and
!                  self.widget("pool-build-box").get_property("visible"))
              if buildsen and buildval:
                  ret = self.err.yes_no(_("Building a pool of this type will "
                                          "format the source device. Are you "
