mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 06:23:19 -07:00
* byobu-config: have ESC be a hotkey for 'cancel', LP: #373473
Signed-off-by: Dustin Kirkland <kirkland@canonical.com>
This commit is contained in:
parent
368c2c6ee3
commit
c0151638d3
2 changed files with 16 additions and 11 deletions
23
byobu-config
23
byobu-config
|
@ -22,7 +22,7 @@
|
|||
# ./debian/rules get-po
|
||||
|
||||
|
||||
import sys, os, os.path, time, string, commands, gettext, glob
|
||||
import sys, os, os.path, time, string, commands, gettext, glob, snack
|
||||
from ConfigParser import SafeConfigParser
|
||||
from snack import *
|
||||
|
||||
|
@ -32,6 +32,9 @@ SHARE='/usr/share/'+PKG
|
|||
DOC='/usr/share/doc/'+PKG
|
||||
DEF_ESC="A"
|
||||
RELOAD = "If you are using the default set of keybindings, press\n<F5> to activate these changes.\n\nOtherwise, exit this screen session and start a new one."
|
||||
ESC = ''
|
||||
snack.hotkeys[ESC] = ord(ESC)
|
||||
snack.hotkeys[ord(ESC)] = ESC
|
||||
|
||||
gettext.bindtextdomain(PKG, SHARE+'/po')
|
||||
gettext.textdomain(PKG)
|
||||
|
@ -83,7 +86,7 @@ def menu(screen, size, isInstalled):
|
|||
li.append(_("Create new window(s)"), 6)
|
||||
li.append(_("Manage default windows"), 7)
|
||||
li.append(installtext, 8)
|
||||
bb = ButtonBar(screen, ((_("Exit"), )), compact = 1)
|
||||
bb = ButtonBar(screen, (("Exit", "exit", ESC),), compact=1)
|
||||
|
||||
g = GridForm(screen, _(" Byobu Configuration Menu"), 1, 2)
|
||||
g.add(li, 0, 0, padding=(4,2,4,2))
|
||||
|
@ -96,7 +99,7 @@ def menu(screen, size, isInstalled):
|
|||
|
||||
def messagebox(screen, width, height, title, text, \
|
||||
scroll=0, \
|
||||
buttons=((_("Okay"), "okay"),(_("Cancel"), "cancel")) ):
|
||||
buttons=((_("Okay"), "okay"),(_("Cancel"), "cancel", ESC)) ):
|
||||
|
||||
t = Textbox(width, height, text, scroll=scroll )
|
||||
bb = ButtonBar(screen, buttons, compact = 1)
|
||||
|
@ -115,7 +118,7 @@ def help(screen, size, config):
|
|||
text=text.replace("<esckey>", getesckey(), 1)
|
||||
|
||||
t = Textbox(70, 14, text, scroll=0)
|
||||
bb = ButtonBar(screen, ((_("Menu"), )), compact = 1)
|
||||
bb = ButtonBar(screen, ((_("Menu"), "menu", ESC),), compact = 1)
|
||||
g = GridForm(screen, _("Byobu Help"), 1, 3)
|
||||
g.add(t, 0, 0, padding=(0,0,0,0))
|
||||
g.add(bb, 0, 2, padding=(1,1,0,0))
|
||||
|
@ -130,7 +133,7 @@ def profile(screen, size):
|
|||
for choice in commands.getoutput('select-screen-profile -l').splitlines():
|
||||
li.append(choice, choice)
|
||||
|
||||
bb = ButtonBar(screen, ((_("Apply"), "apply"), (_("Cancel"), "cancel")), compact = 1)
|
||||
bb = ButtonBar(screen, ((_("Apply"), "apply"), (_("Cancel"), "cancel", ESC)), compact = 1)
|
||||
|
||||
g = GridForm(screen, _("Which profile would you like to use?"), 1, 2)
|
||||
g.add(li, 0, 0, padding=(4,2,4,2))
|
||||
|
@ -146,7 +149,7 @@ def keybindings(screen, size):
|
|||
li = Listbox(height = 6, width = 60, returnExit = 1)
|
||||
for choice in commands.getoutput('ls '+SHARE+'/keybindings').splitlines():
|
||||
li.append(choice, choice)
|
||||
bb = ButtonBar(screen, ((_("Apply"), "apply"), (_("Cancel"), "cancel")), compact = 1)
|
||||
bb = ButtonBar(screen, ((_("Apply"), "apply"), (_("Cancel"), "cancel", ESC)), compact = 1)
|
||||
g = GridForm(screen, _("Which set of keybindings would you like to use?"), 1, 2)
|
||||
g.add(li, 0, 0, padding=(4,2,4,2))
|
||||
g.add(bb, 0, 1, padding=(1,1,0,0))
|
||||
|
@ -181,7 +184,7 @@ def newwindow(screen, size):
|
|||
|
||||
cb=Checkbox(_("Add to default windows"))
|
||||
|
||||
bb = ButtonBar(screen, ((_("Apply"), "apply"), (_("Cancel"), "cancel")), compact = 1)
|
||||
bb = ButtonBar(screen, ((_("Apply"), "apply"), (_("Cancel"), "cancel", ESC)), compact = 1)
|
||||
|
||||
g = GridForm(screen, _("Create new window(s):"), 2, 5 )
|
||||
g.add(titlel, 0, 0, anchorLeft=1,padding=(4,1,0,1))
|
||||
|
@ -313,7 +316,7 @@ def togglestatus(screen, size):
|
|||
if item[0] != -1:
|
||||
r.append(item[1],count,selected=item[0])
|
||||
count=count+1
|
||||
bb = ButtonBar(screen, ((_("Apply"), "apply"), (_("Cancel"), "cancel")), compact = 1)
|
||||
bb = ButtonBar(screen, ((_("Apply"), "apply"), (_("Cancel"), "cancel", ESC)), compact = 1)
|
||||
g = GridForm(screen, _("Toggle status notifications:"), 2, 4 )
|
||||
g.add(rl, 0, 0, anchorLeft=1, anchorTop=1, padding=(4,0,0,1))
|
||||
g.add(r, 1, 0)
|
||||
|
@ -355,7 +358,7 @@ def defaultwindows(screen, size):
|
|||
r.append(win[1],count,selected=win[0])
|
||||
count=count+1
|
||||
|
||||
bb = ButtonBar(screen, ((_("Apply"), "apply"), (_("Cancel"), "cancel")), compact = 1)
|
||||
bb = ButtonBar(screen, ((_("Apply"), "apply"), (_("Cancel"), "cancel"), ESC), compact = 1)
|
||||
|
||||
g = GridForm(screen, _("Select window(s) to create by default:"), 2, 4 )
|
||||
g.add(rl, 0, 0, anchorLeft=1, anchorTop=1, padding=(4,0,0,1))
|
||||
|
@ -428,7 +431,7 @@ def setesckey(key):
|
|||
def chgesc(screen, size):
|
||||
esc=Entry(2, text=getesckey(), returnExit=1)
|
||||
escl=Label(_("Escape key: ctrl-"))
|
||||
bb = ButtonBar(screen, ((_("Apply"), "apply"), (_("Cancel"), "cancel")), compact = 1)
|
||||
bb = ButtonBar(screen, ((_("Apply"), "apply"), (_("Cancel"), "cancel", ESC)), compact = 1)
|
||||
|
||||
g = GridForm(screen, _("Change escape sequence:"), 2, 4 )
|
||||
g.add(escl, 0, 0, anchorLeft=1, padding=(1,0,0,1))
|
||||
|
|
4
debian/changelog
vendored
4
debian/changelog
vendored
|
@ -38,7 +38,9 @@ byobu (2.12) unreleased; urgency=low
|
|||
* bin/network: pull network bytes directly from /proc/net/dev, performance
|
||||
improvement
|
||||
|
||||
-- Dustin Kirkland <kirkland@ubuntu.com> Tue, 16 Jun 2009 20:47:32 -0500
|
||||
* byobu-config: have ESC be a hotkey for 'cancel', LP: #373473
|
||||
|
||||
-- Dustin Kirkland <kirkland@ubuntu.com> Wed, 17 Jun 2009 11:07:18 -0500
|
||||
|
||||
byobu (2.11-0ubuntu1) karmic; urgency=low
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue