當前位置: 首頁>>代碼示例>>Python>>正文


Python DialogBox.show_all方法代碼示例

本文整理匯總了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()
開發者ID:electricface,項目名稱:deepin-system-settings,代碼行數:16,代碼來源:accel_entry.py

示例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()
開發者ID:electricface,項目名稱:deepin-system-settings,代碼行數:20,代碼來源:accel_entry.py


注:本文中的dtk.ui.dialog.DialogBox.show_all方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。