controller.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:robik 作者: RecunchoMaker 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号