title: GUI Freezes when clicking a button in PyGtk
body: <p>I know this may be a recurring question, but I don't get the point in the other answers to that problem.<br>
  First of all, here is my code (if you want syntax highlighting) : <a href="http://pastebin.com/9uJah8t2" rel="nofollow">http://pastebin.com/9uJah8t2</a></p>
  
  <pre><code>#!/usr/bin/python2.7
  from mega import Mega
  import pygtk
  import gtk
  import glib
  
  class HelloWorld:
  #def onSuccess(self, widget, data):
  
  
  def test(self, widget, data):
      email = self.login.get_text()
      password = self.password.get_text()
      mega = Mega()
      m =  mega.login(email, password)
      details = m.get_user()
      print(details)
      #get account files
      files = m.get_files()
      print(files)
  
  def hello(self, widget, data=None):
      print "Hello World"
  
  def delete_event(self, widget, event, data=None):
      return False
  
  def destroy(self, widget, data=None):
      gtk.main_quit()
  
  def __init__(self):
      # Window Settings
      self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
      self.window.set_title("Mega Connector") 
      self.window.connect("delete_event", self.delete_event)
      self.window.connect("destroy", self.destroy)
      self.window.set_border_width(5)
      self.window.set_resizable(False)
  
      # Vbox
      self.vbox = gtk.VBox(True, 0)
  
      # Login
      self.hboxlogin = gtk.HBox(True, 0)
      self.labellogin = gtk.Label("Login")
      self.hboxlogin.pack_start(self.labellogin, True, True, 0)
      self.labellogin.show()
      self.login = gtk.Entry(0)
      self.hboxlogin.pack_start(self.login, True, True, 0)
      self.login.show()
      self.hboxlogin.show()
      self.vbox.pack_start(self.hboxlogin, True, True, 0)
  
      # Password
      self.hboxpassword = gtk.HBox(True, 0)
      self.labelpassword = gtk.Label("Password")
      self.hboxpassword.pack_start(self.labelpassword, True, True, 0)
      self.labelpassword.show()
      self.password = gtk.Entry(0)
      self.password.set_visibility(False)
      self.hboxpassword.pack_start(self.password, True, True, 0)
      self.password.show()
      self.hboxpassword.show()
      self.vbox.pack_start(self.hboxpassword, True, True, 0)
  
      # Button
      self.button = gtk.Button("Connect")
      self.button.connect("clicked", self.test, None)
      self.vbox.pack_start(self.button, True, True, 0)
      self.button.show()
  
      self.window.add(self.vbox)
      self.vbox.show()
      self.window.show()
  
  def main(self):
      gtk.main()
  
  if __name__ == "__main__":
      hello = HelloWorld()
      hello.main()
  </code></pre>
  
  <p>It's a very simple GUI for loging in MEGA and retrieve informations about your account (such as uploaded files and stuff). The fact is that when I click "Login" the GUI freezes until all the informations has been retrieved. Could you please tell me what I am doing wrong in this program ?    </p>
  
  <p>Thanks in advance for your answers.</p>