Cubells,
here would be an acceptable second.py with minimal changes made:

#/usr/bin/env python
# -*- coding: utf-8 -*-

import pygtk
pygtk.require('2.0')
import gtk

class second(gtk.Window):

  def close_second(self,widget):
      self.window2.destroy()


  def __init__(self, parent=None):
      gtk.Window.__init__(self)
      try:
          self.set_screen(parent.get_screen())
      except:
          self.connect("destroy", lambda *w: gtk.main_quit())
      self.window2 = gtk.Window(gtk.WINDOW_TOPLEVEL)
      self.window2.set_title("Second")
      self.window2.set_border_width(10)
      self.window2.set_modal(True)
      self.window2.set_resizable(False)
      button2 = gtk.Button("Second")
      button2.connect("clicked", self.close_second)
      self.window2.add(button2)
      self.window2.show_all()

def main():
  gtk.main()
  return 0

_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to