本文整理汇总了Python中dtk.ui.dialog.DialogBox.show_all方法的典型用法代码示例。如果您正苦于以下问题:Python DialogBox.show_all方法的具体用法?Python DialogBox.show_all怎么用?Python DialogBox.show_all使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dtk.ui.dialog.DialogBox
的用法示例。
在下文中一共展示了DialogBox.show_all方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: process_unmodifier_key
# 需要导入模块: from dtk.ui.dialog import DialogBox [as 别名]
# 或者: from dtk.ui.dialog.DialogBox import show_all [as 别名]
def process_unmodifier_key(tmp_accel_buf):
dialog = DialogBox(" ", 550, 150)
dialog.window_frame.connect("expose-event", draw_widget_background)
dialog.set_keep_above(True)
dialog.set_modal(True)
dialog.body_align.set_padding(15, 10, 10, 10)
label1 = Label(_("The shortcut \"%s\" cannot be used because it will become impossible to type using this key.")% tmp_accel_buf.get_accel_label(), enable_select=False, enable_double_click=False)
label2 = Label(_("Please try with a key such as Control, Alt or Shift at the same time."), enable_select=False, enable_double_click=False)
dialog.body_box.pack_start(label1)
dialog.body_box.pack_start(label2)
button = Button(_("Cancel"))
button.connect("clicked", lambda b: dialog.destroy())
dialog.right_button_box.set_buttons([button])
dialog.show_all()
示例2: resolve_accel_entry_conflict
# 需要导入模块: from dtk.ui.dialog import DialogBox [as 别名]
# 或者: from dtk.ui.dialog.DialogBox import show_all [as 别名]
def resolve_accel_entry_conflict(origin_entry, conflict_entry, tmp_accel_buf):
dialog = DialogBox(" ", 620, 150)
dialog.window_frame.connect("expose-event", draw_widget_background)
dialog.set_keep_above(True)
dialog.set_modal(True)
dialog.body_align.set_padding(15, 10, 10, 10)
label1 = Label(_("The shortcut \"%s\" is already used for \"%s\"")%
(tmp_accel_buf.get_accel_label(), conflict_entry.settings_description), enable_select=False, enable_double_click=False)
label2 = Label(_("If you reassign the shortcut to \"%s\", the \"%s\" shortcut will be disabled.")%
(origin_entry.settings_description, conflict_entry.settings_description), enable_select=False, enable_double_click=False)
dialog.body_box.pack_start(label1)
dialog.body_box.pack_start(label2)
button_reassign = Button(_("Reassign"))
button_cancel = Button(_("Cancel"))
button_cancel.connect("clicked", lambda b: origin_entry.reassign_cancel(dialog))
button_reassign.connect("clicked", lambda b: origin_entry.reassign(tmp_accel_buf, conflict_entry, dialog))
dialog.right_button_box.set_buttons([button_cancel, button_reassign])
dialog.show_all()