title: FileChooserButton behaviour
body: <p>I've been getting a strange behaviour when I connect selection_changed to a
  function in a FileChooserButton. With the help of
  <a href="https://stackoverflow.com/questions/34689763/the-signal-connect-syntax">SO</a>
  users I now understand the selection_changed syntax. But something weird is
  happening when I use it for the second time in the same program.</p>
  
  <h2>Context</h2>
  
  <p>My aim is to create a window with two FileChooserButtons and an Entry text
  at the end position of the window. The first FileChooserButton helps the
  user pick the directory and causes the second FileChooserButton to open at
  the directory the user chose in the first one. Up until this point the code
  is working perfectly. The entry is also properly drawn and says "Here goes
  the filename". The intended behaviour is to change the entry's text upon the
  selection of the filename in the second FileChooserButton after checking
  whether the file is writable.</p>
  
  <p>The strategy I used was to connect the selection_changed to a function that
  takes care of checking wether the file is writable and the change of the
  entry's text.</p>
  
  <p>The problem is that the function is never called. I added a debugging dumb
  code like:</p>
  
  <pre><code>stdout.printf("Checking whether this function is actually called")
  </code></pre>
  
  <p>It never gets printed,thus I suppose the function never gets called. The function in question is the file_changed one below.</p>
  
  <pre><code>[indent=4]
  uses
      Gtk
  
  class TestWindow:Window
      _file_chooser:FileChooserButton
      _entry:Gtk.Entry
  
      construct()
  
          title = "File chooser"
          window_position = WindowPosition.CENTER
          destroy.connect( Gtk.main_quit )
  
          var folder_chooser = new FileChooserButton("Choose a Folder",FileChooserAction.SELECT_FOLDER)
          folder_chooser.set_current_folder( Environment.get_home_dir() )
          folder_chooser.selection_changed.connect( folder_changed )
  
          _file_chooser = new FileChooserButton("Choose a File",FileChooserAction.OPEN)
          _file_chooser.set_current_folder( Environment.get_home_dir() )
  
          _file_chooser.selection_changed.connect( file_changed )
          var _entry = new Gtk.Entry()
          _entry.set_text("Here the file name")
  
          var box = new Box( Orientation.VERTICAL, 0 )
          box.pack_start( folder_chooser, true, true, 0 )
          box.pack_start( _file_chooser, true, true, 0 )
          box.pack_start( _entry, true, true, 0 )
  
          add( box )
  
      def folder_changed( folder_chooser_widget:FileChooser )
          folder:string = folder_chooser_widget.get_uri()
          _file_chooser.set_current_folder_uri( folder )
  
      def file_changed ( file_chooser_widget: FileChooser )
          stdout.printf(file_chooser_widget.get_filename())
  
          stdout.printf("Checking whether this function is actually called")
  
          file:File = File.new_for_uri(file_chooser_widget.get_filename())
          stdout.printf(file_chooser_widget.get_filename())
          info:FileInfo = file.query_info (FileAttribute.ACCESS_CAN_WRITE, FileQueryInfoFlags.NONE, null)
          writable:bool = info.get_attribute_boolean (FileAttribute.ACCESS_CAN_WRITE)
          stdout.printf(writable.to_string())
          if writable is true
              _entry.set_sensitive(false)
  
  
  init
      Gtk.init( ref args )
      var test = new TestWindow()
      test.show_all()
      Gtk.main()
  </code></pre>
  
  <h2>Question</h2>
  
  <ul>
  <li>Why the second selection_changed call does not work? Does the
  FileChooserButton with the Action.OPEN behaves differently from the one with
  the SELECT_FOLDER action?</li>
  </ul>