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()
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()
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()
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()