title: using the filechooser dialog with glade
body: <p>I would like to ask if anyone knows how to use the filechooser dialog in glade and pygtk. (It should be very similar in any of the language bindings, and that is why I didn't specify the language.) Basically, the filechooser now looks like this: there are two columns, one for the folders (left), and one for the files (right). Then at the bottom of the dialog, there are two empty slots for two buttons, so I just dropped a cancel and an OK button there. But then my question is what does the dialog return? My code looks like this:</p>
  
  <pre><code>    filename = None
      response = self.widget('filechooserdialog').run()
      print response
      #if response == Gtk.RESPONSE_OK: 
      filename = self.widget('filechooserdialog').get_filename()
      self.widget('filechooserdialog').hide()
  </code></pre>
  
  <p>and at the moment, the callback to 'Cancel' and 'OK' just hides the dialog. But I can't find out what the dialog is supposed to return. In other words, how can I specify in the response whether the 'Cancel', or the 'OK' button was pressed?</p>
  
  <p>Thanks,</p>
  
  <p>v923z</p>
  
  <p>PS: Here is an image to illustrate the situation:</p>
  
  <p><img src="https://i.stack.imgur.com/7Kqr6.png" alt="enter image description here"></p>