title: pygtk running two windows, popup and main
body: <p>I'm creating script in python, which cooperate with bash. When I set all searching options and push the find button, I'd like to appear popup window with <code>progress bar</code>, which disappear when searching will be completed. I open <code>popup window</code> by <code>popup.show()</code> and no function is execute until I close popup. So how to solve this problem? </p>
  
  <p>In controller class:</p>
  
  <pre><code>def search(self, widget):
      cmd = "find " + self.model.directory + " -name \"" + self.model.name + "\"" + " -perm -" + str(self.model.mode)
      if self.model.type is not None and self.model.type != '':
          cmd += " -type " + self.model.type
      if self.model.owner is not None:
          cmd += " -user " + self.model.owner
      if self.model.days is not None:
          cmd += " -mtime -" + str(self.model.days)
  
      self.progress = SearcherProgressBar()
  
      output = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE)
      out = output.stdout.read().strip()
      array = string.split(out, '\n')
      self.list = list()
      self.progress.label = "sdsds"
      for value in array:
          self.add_to_list(value)
  
      #self.progress.popup.destroy() # when I uncomment, popup never appears
  
      self.view.treestore.clear()
      self.add_to_tree(self.list, None)
      self.view.expand_item.set_sensitive(True)
  </code></pre>
  
  <p>In progressbar class:</p>
  
  <pre><code>class SearcherProgressBar:
  
  def __init__(self):
      self.popup = gtk.Window(gtk.WINDOW_POPUP)
      vbox = gtk.VBox()
      self.popup.add(vbox)
      self.popup.set_size_request(500,100)
      self.label = gtk.Label("Searching...")
      vbox.pack_start(self.label, True, True, 0)
      self.popup.connect("destroy", self.dest)
      self.popup.show_all()
  
  
  def dest(self, widget, data=None):
      self.popup.destroy()
      return False
  </code></pre>