Change spinner status with class Glade Gtk+ python3
<p>I am starting to learn python3 using gtk+ to create ui.</p>

<p>So i like to make spinner start work in my ui when button is clicked but nothing happens when button was clicked</p>

<p>if i follow GTK+ tutorial the spinner work fine.  But i like to use class in my code I like the sugestion here (<a href="http://python-gtk-3-tutorial.readthedocs.org/en/latest/builder.html#example" rel="nofollow">http://python-gtk-3-tutorial.readthedocs.org/en/latest/builder.html#example</a>) to make some class to invoke actions in connect_signals </p>

<p>someone can help me ?</p>

<p>my python code:</p>

<pre><code>#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import sys

try:
    from gi.repository import Gtk
except ImportError:
    print &gt;&gt; sys.stderr, 'ERRO: requer a lib python3-gi'
    sys.exit(1)

require_version('Gtk', '3.0')

class application:
    def __init__(self):
        self.builder = Gtk.Builder()
        self.builder.add_from_file("stack.glade")
        self.builder.connect_signals(actions())
        self.spinner = self.builder.get_object("spinner1")

    def spinner_start(self):
        self.spinner.start()

class actions:

    def onDeleteWindow(self, *args):
        Gtk.main_quit(*args)

    def onButtonClick(self, widget, button="button1"):
        application().spinner_start()

if __name__ == "__main__":
    main = application()
    window = main.builder.get_object("window1")
    window.show()
    Gtk.main()
</code></pre>

<p>my glade file:</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="GtkWindow" id="window1"&gt;
    &lt;property name="can_focus"&gt;False&lt;/property&gt;
    &lt;child&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="GtkEntry" id="entry1"&gt;
            &lt;property name="visible"&gt;True&lt;/property&gt;
            &lt;property name="can_focus"&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;0&lt;/property&gt;
          &lt;/packing&gt;
        &lt;/child&gt;
        &lt;child&gt;
          &lt;object class="GtkButton" id="button1"&gt;
            &lt;property name="label" translatable="yes"&gt;button&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;signal name="clicked" handler="onButtonClick" swapped="no"/&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="GtkSpinner" id="spinner1"&gt;
            &lt;property name="visible"&gt;True&lt;/property&gt;
            &lt;property name="can_focus"&gt;False&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;/child&gt;
  &lt;/object&gt;
&lt;/interface&gt;
</code></pre>