本文整理汇总了Python中ubuntutweak.widgets.dialogs.QuestionDialog.connect方法的典型用法代码示例。如果您正苦于以下问题:Python QuestionDialog.connect方法的具体用法?Python QuestionDialog.connect怎么用?Python QuestionDialog.connect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ubuntutweak.widgets.dialogs.QuestionDialog
的用法示例。
在下文中一共展示了QuestionDialog.connect方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: on_have_update
# 需要导入模块: from ubuntutweak.widgets.dialogs import QuestionDialog [as 别名]
# 或者: from ubuntutweak.widgets.dialogs.QuestionDialog import connect [as 别名]
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()
示例2: on_have_update
# 需要导入模块: from ubuntutweak.widgets.dialogs import QuestionDialog [as 别名]
# 或者: from ubuntutweak.widgets.dialogs.QuestionDialog import connect [as 别名]
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: on_idle_check
# 需要导入模块: from ubuntutweak.widgets.dialogs import QuestionDialog [as 别名]
# 或者: from ubuntutweak.widgets.dialogs.QuestionDialog import connect [as 别名]
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()