title: Python/Glade/PyGTK - Check if Checkbox is Active
body: <p>After going through the PyGTK libraries and tutorials, I haven't managed to find an exact answer I'm looking for, or maybe I'm just doing something wrong... </p>
  
  <p>Anyway, I'm learning PyGTK and Glade, I'm in the process of scripting a simple downloader application. The GUI of the application has three check boxes, and then a submit button. </p>
  
  <p>What I'm trying to do is get the status of the check boxes after the submit button is pressed, that way I can continue my script to download applications based on whether the checkboxes are true or false.</p>
  
  <p>Here's what I have so far. (Still very early stages and learning from mistakes)</p>
  
  <p><strong>Python Script:</strong></p>
  
  <pre><code>import sys
  try:
      import pygtk
      pygtk.require("2.0")
  except:
      pass
  try:
      import gtk
      import gtk.glade
  except:
      sys.exit(1)
  
  
  class GladeTest:
  
      def __init__(self):
  
          #Set the Glade file
              filename = "gui.glade"
              builder = gtk.Builder()
              builder.add_from_file(filename)
              builder.connect_signals(self)
  
          #Create our dictionay and connect it
              dic = { "btnSubmit_clicked" : self.btnSubmit_clicked,
              "chkboxDropbox_toggled" : self.chkboxDropbox_toggled,
              "MainWindow_destroy" : gtk.main_quit }
  
          def btnSubmit_clicked(self, widget):
              self.button = gtk.ToggleButton("chkboxDropbox_toggled")
              status = self.button.get_active()
              print status
  
          def chkboxDropbox_toggled(self, widget):
              print ""
  
  
  
  
  if __name__ == "__main__":
      hwg = GladeTest()
      gtk.main()
  </code></pre>
  
  <p>Glade 3 XML (gui.glade):</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;interface&gt;
    &lt;requires lib="gtk+" version="2.24"/&gt;
    &lt;!-- interface-naming-policy project-wide --&gt;
    &lt;object class="GtkAction" id="action1"/&gt;
    &lt;object class="GtkWindow" id="MainWindow"&gt;
      &lt;property name="visible"&gt;True&lt;/property&gt;
      &lt;property name="can_focus"&gt;False&lt;/property&gt;
      &lt;property name="title" translatable="yes"&gt;MainWindow&lt;/property&gt;
      &lt;property name="resizable"&gt;False&lt;/property&gt;
      &lt;property name="window_position"&gt;center&lt;/property&gt;
      &lt;signal name="destroy" handler="MainWindow_destroy" swapped="no"/&gt;
      &lt;child&gt;
        &lt;object class="GtkVBox" id="vbox1"&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="GtkLabel" id="label1"&gt;
              &lt;property name="visible"&gt;True&lt;/property&gt;
              &lt;property name="can_focus"&gt;False&lt;/property&gt;
              &lt;property name="label" translatable="yes"&gt;Downloader&lt;/property&gt;
              &lt;attributes&gt;
                &lt;attribute name="style" value="normal"/&gt;
                &lt;attribute name="size" value="300"/&gt;
              &lt;/attributes&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="GtkCheckButton" id="chkboxDropbox"&gt;
              &lt;property name="label" translatable="yes"&gt;Dropbox&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;False&lt;/property&gt;
              &lt;property name="use_action_appearance"&gt;False&lt;/property&gt;
              &lt;property name="draw_indicator"&gt;True&lt;/property&gt;
              &lt;signal name="toggled" handler="chkboxDropbox_toggled" swapped="no"/&gt;
              &lt;signal name="activate" handler="chkboxDropbox_active" 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="GtkCheckButton" id="chkboxPython"&gt;
              &lt;property name="label" translatable="yes"&gt;Python&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;False&lt;/property&gt;
              &lt;property name="use_action_appearance"&gt;False&lt;/property&gt;
              &lt;property name="draw_indicator"&gt;True&lt;/property&gt;
              &lt;signal name="toggled" handler="chkboxPython_checked" 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;2&lt;/property&gt;
            &lt;/packing&gt;
          &lt;/child&gt;
          &lt;child&gt;
            &lt;object class="GtkCheckButton" id="chkboxChrome"&gt;
              &lt;property name="label" translatable="yes"&gt;Google Chrome&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;False&lt;/property&gt;
              &lt;property name="use_action_appearance"&gt;False&lt;/property&gt;
              &lt;property name="draw_indicator"&gt;True&lt;/property&gt;
              &lt;signal name="toggled" handler="chkboxChrome_checked" 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;3&lt;/property&gt;
            &lt;/packing&gt;
          &lt;/child&gt;
          &lt;child&gt;
            &lt;object class="GtkButton" id="btnSubmit"&gt;
              &lt;property name="label" translatable="yes"&gt;Download/Run&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;property name="use_action_appearance"&gt;False&lt;/property&gt;
              &lt;signal name="clicked" handler="btnSubmit_clicked" 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;4&lt;/property&gt;
            &lt;/packing&gt;
          &lt;/child&gt;
        &lt;/object&gt;
      &lt;/child&gt;
    &lt;/object&gt;
  &lt;/interface&gt;
  </code></pre>
  
  <p>Either I can't find the proper method of calling for the status, or I have found it and I'm just using it wrong... Any help is greatly appreciated, thanks in advance!</p>