示例#1
0
    def on_have_update(self, client, id, entry, data):
        if entry.get_value().get_bool():
            dialog = QuestionDialog(_('New application data available, would you like to update?'))
            response = dialog.run()
            dialog.destroy()

            if response == gtk.RESPONSE_YES:
                dialog = FetchingDialog(get_app_data_url(), self.get_toplevel())
                dialog.connect('destroy', self.on_app_data_downloaded)
                dialog.run()
                dialog.destroy()
    def on_have_update(self, client, id, entry, data):
        if entry.get_value().get_bool():
            if self.check_update():
                dialog = QuestionDialog(_("New source data available, would you like to update?"))
                response = dialog.run()
                dialog.destroy()

                if response == gtk.RESPONSE_YES:
                    dialog = FetchingDialog(get_source_data_url(), self.get_toplevel())
                    dialog.connect("destroy", self.on_source_data_downloaded)
                    dialog.run()
                    dialog.destroy()
示例#3
0
    def on_idle_check(self):
        gtk.gdk.threads_enter()
        if self.check_update():
            dialog = QuestionDialog(_('New application data available, would you like to update?'))
            response = dialog.run()
            dialog.destroy()

            if response == gtk.RESPONSE_YES:
                dialog = FetchingDialog(APP_URL, self.get_toplevel())
                dialog.connect('destroy', self.on_app_data_downloaded)
                dialog.run()
                dialog.destroy()

        gtk.gdk.threads_leave()