title: Change button icon in constructor after displaying the window
body: <p>I want to change the icon of a button through the constructor method. But it's not happening as I wish. See the following code:</p>
  
  <p>demo.glade:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!-- Generated with glade 3.18.3 --&gt;
  &lt;interface&gt;
    &lt;requires lib="gtk+" version="3.12"/&gt;
    &lt;object class="GtkImage" id="image1"&gt;
      &lt;property name="visible"&gt;True&lt;/property&gt;
      &lt;property name="can_focus"&gt;False&lt;/property&gt;
      &lt;property name="icon_name"&gt;network-transmit-receive&lt;/property&gt;
      &lt;property name="icon_size"&gt;2&lt;/property&gt;
    &lt;/object&gt;
    &lt;object class="GtkBox" id="box1"&gt;
      &lt;property name="visible"&gt;True&lt;/property&gt;
      &lt;property name="can_focus"&gt;False&lt;/property&gt;
      &lt;property name="orientation"&gt;vertical&lt;/property&gt;
      &lt;child&gt;
        &lt;object class="GtkBox" id="box3"&gt;
          &lt;property name="visible"&gt;True&lt;/property&gt;
          &lt;property name="can_focus"&gt;False&lt;/property&gt;
          &lt;child&gt;
            &lt;object class="GtkButtonBox" id="buttonbox1"&gt;
              &lt;property name="visible"&gt;True&lt;/property&gt;
              &lt;property name="can_focus"&gt;False&lt;/property&gt;
              &lt;property name="orientation"&gt;vertical&lt;/property&gt;
              &lt;property name="layout_style"&gt;start&lt;/property&gt;
              &lt;child&gt;
                &lt;object class="GtkButton" id="button2"&gt;
                  &lt;property name="label" translatable="yes"&gt;button1&lt;/property&gt;
                  &lt;property name="visible"&gt;True&lt;/property&gt;
                  &lt;property name="can_focus"&gt;True&lt;/property&gt;
                  &lt;property name="receives_default"&gt;True&lt;/property&gt;
                &lt;/object&gt;
                &lt;packing&gt;
                  &lt;property name="expand"&gt;True&lt;/property&gt;
                  &lt;property name="fill"&gt;True&lt;/property&gt;
                  &lt;property name="position"&gt;0&lt;/property&gt;
                &lt;/packing&gt;
              &lt;/child&gt;
              &lt;child&gt;
                &lt;object class="GtkButton" id="button3"&gt;
                  &lt;property name="label" translatable="yes"&gt;button2&lt;/property&gt;
                  &lt;property name="visible"&gt;True&lt;/property&gt;
                  &lt;property name="can_focus"&gt;True&lt;/property&gt;
                  &lt;property name="receives_default"&gt;True&lt;/property&gt;
                &lt;/object&gt;
                &lt;packing&gt;
                  &lt;property name="expand"&gt;True&lt;/property&gt;
                  &lt;property name="fill"&gt;True&lt;/property&gt;
                  &lt;property name="position"&gt;1&lt;/property&gt;
                &lt;/packing&gt;
              &lt;/child&gt;
              &lt;child&gt;
                &lt;object class="GtkButton" id="button4"&gt;
                  &lt;property name="label" translatable="yes"&gt;button2&lt;/property&gt;
                  &lt;property name="visible"&gt;True&lt;/property&gt;
                  &lt;property name="can_focus"&gt;True&lt;/property&gt;
                  &lt;property name="receives_default"&gt;True&lt;/property&gt;
                &lt;/object&gt;
                &lt;packing&gt;
                  &lt;property name="expand"&gt;True&lt;/property&gt;
                  &lt;property name="fill"&gt;True&lt;/property&gt;
                  &lt;property name="position"&gt;2&lt;/property&gt;
                &lt;/packing&gt;
              &lt;/child&gt;
            &lt;/object&gt;
            &lt;packing&gt;
              &lt;property name="expand"&gt;False&lt;/property&gt;
              &lt;property name="fill"&gt;True&lt;/property&gt;
              &lt;property name="position"&gt;0&lt;/property&gt;
            &lt;/packing&gt;
          &lt;/child&gt;
          &lt;child&gt;
            &lt;placeholder/&gt;
          &lt;/child&gt;
        &lt;/object&gt;
        &lt;packing&gt;
          &lt;property name="expand"&gt;False&lt;/property&gt;
          &lt;property name="fill"&gt;True&lt;/property&gt;
          &lt;property name="position"&gt;0&lt;/property&gt;
        &lt;/packing&gt;
      &lt;/child&gt;
      &lt;child&gt;
        &lt;object class="GtkBox" id="box2"&gt;
          &lt;property name="visible"&gt;True&lt;/property&gt;
          &lt;property name="can_focus"&gt;False&lt;/property&gt;
          &lt;child&gt;
            &lt;object class="GtkStatusbar" id="statusbar1"&gt;
              &lt;property name="visible"&gt;True&lt;/property&gt;
              &lt;property name="can_focus"&gt;False&lt;/property&gt;
              &lt;property name="valign"&gt;center&lt;/property&gt;
              &lt;property name="margin_start"&gt;10&lt;/property&gt;
              &lt;property name="margin_end"&gt;10&lt;/property&gt;
              &lt;property name="hexpand"&gt;True&lt;/property&gt;
              &lt;property name="orientation"&gt;vertical&lt;/property&gt;
              &lt;property name="spacing"&gt;2&lt;/property&gt;
            &lt;/object&gt;
            &lt;packing&gt;
              &lt;property name="expand"&gt;False&lt;/property&gt;
              &lt;property name="fill"&gt;True&lt;/property&gt;
              &lt;property name="position"&gt;0&lt;/property&gt;
            &lt;/packing&gt;
          &lt;/child&gt;
          &lt;child&gt;
            &lt;object class="GtkSpinner" id="spinner1"&gt;
              &lt;property name="visible"&gt;True&lt;/property&gt;
              &lt;property name="can_focus"&gt;False&lt;/property&gt;
              &lt;property name="halign"&gt;center&lt;/property&gt;
              &lt;property name="valign"&gt;center&lt;/property&gt;
              &lt;property name="active"&gt;True&lt;/property&gt;
            &lt;/object&gt;
            &lt;packing&gt;
              &lt;property name="expand"&gt;False&lt;/property&gt;
              &lt;property name="fill"&gt;True&lt;/property&gt;
              &lt;property name="position"&gt;1&lt;/property&gt;
            &lt;/packing&gt;
          &lt;/child&gt;
          &lt;child&gt;
            &lt;object class="GtkButton" id="button1"&gt;
              &lt;property name="visible"&gt;True&lt;/property&gt;
              &lt;property name="can_focus"&gt;True&lt;/property&gt;
              &lt;property name="receives_default"&gt;True&lt;/property&gt;
              &lt;property name="halign"&gt;center&lt;/property&gt;
              &lt;property name="valign"&gt;center&lt;/property&gt;
              &lt;property name="image"&gt;image1&lt;/property&gt;
              &lt;property name="always_show_image"&gt;True&lt;/property&gt;
            &lt;/object&gt;
            &lt;packing&gt;
              &lt;property name="expand"&gt;False&lt;/property&gt;
              &lt;property name="fill"&gt;True&lt;/property&gt;
              &lt;property name="position"&gt;2&lt;/property&gt;
            &lt;/packing&gt;
          &lt;/child&gt;
        &lt;/object&gt;
        &lt;packing&gt;
          &lt;property name="expand"&gt;False&lt;/property&gt;
          &lt;property name="fill"&gt;True&lt;/property&gt;
          &lt;property name="position"&gt;1&lt;/property&gt;
        &lt;/packing&gt;
      &lt;/child&gt;
    &lt;/object&gt;
  &lt;/interface&gt;
  </code></pre>
  
  <p>demo.py</p>
  
  <pre><code>import gi
  
  gi.require_version('Gtk','3.0')
  
  from gi.repository import Gtk
  from others.dbconnections import PgSqlConnection
  
  class MyWind(Gtk.ApplicationWindow):
  
      def __init__(self, app):
          super().__init__(application=app)
          self.builder = Gtk.Builder.new_from_file('demo.glade')
  
          self.add(self.builder.get_object('box1'))
  
          if not PgSQLConnection.test():
              self.builder.get_object('image1').set_from_icon_name('network-error', Gtk.IconSize.SMALL_TOOLBAR)
  
          self.builder.get_object('spinner1').stop()
  </code></pre>
  
  <p>The <code>PgSqlConnection.test()</code> is a method that returns <code>True</code> if the connection was successful otherwise it returns <code>False</code>.
  However, this method takes a few seconds to return. So the window is displayed only after the return of the method.
  This is not the behavior I want. I want to display the window while waiting for the return of the method <code>test</code>. The component <code>spinner1</code> is active by default.
  Depending on the return, the icon of the <code>button1</code> is changes and <code>spinner1</code> will be disabled.
  The <code>spinner1</code> component is a animation that indicate that something is being processed.</p>