[Glade-users] Python and glade



I have a problem with python a glade window, probably because I'm a newbie. 
When I open the main window, all buttons function correctly. At every click 
in this one I open a new window with other buttons. The problem is that in 
the new one opened  no button functions. I attach the part of code that 
create this problem. 

Thanks. 

 

#!/usr/bin/env python 

# import dei moduli di interesse
import gtk.glade 


# Carica Interfaccia Glade
mainGlade = gtk.glade.XML("progetto.glade") 

# Carica finestra Principale
windo = mainGlade.get_widget("mainWindow") 

# Funzione per aprire la nuova finestra Database
def openDbWindow(obj):
   database = gtk.glade.XML("database.glade")
   windo.hide()
   return 

def aboutSw(obj):
   about = gtk.glade.XML("about.glade")
   return 

# Collegamento eventi
dic = {
     "on_mainWindow_delete_event":gtk.mainquit,
     "on_quit1_activate":gtk.mainquit,
     "on_about1_activate":aboutSw,
     "on_bt_db_clicked":openDbWindow
}
# Connessione delle callback
mainGlade.signal_autoconnect(dic) 

gtk.main() 





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]