def showSettings(self):
result = gtk.RESPONSE_CANCEL
settings = Settings()
for w in settings:
print w
widget = self.view.wTree.get_widget(w)
widget.set_value(settings[w])
print 'on_'+w+'_change_value'
#widget.connect('on_'+w+'_change_value', self.change_setting)
widget.connect('change_value', self.change_setting)
print "Muestro"
#run the dialog and store the response
result = self.view.dlg_settings.run()
if (result==gtk.RESPONSE_OK):
#get the value of the entry fields
print "grabaria la configuracion"
self.settings.save()
elif (result==gtk.RESPONSE_CANCEL):
print "cancelo"
self.settings.load()
else:
print "Result = ",result
#we are done with the dialog, destroy it
self.view.dlg_settings.hide()
#return the result
return result
评论列表
文章目录