mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-21 22:13:19 -07:00
clean up some whitespace and text
This commit is contained in:
parent
84a2bf837c
commit
8cec55287f
2 changed files with 4 additions and 20 deletions
1
debian/changelog
vendored
1
debian/changelog
vendored
|
@ -69,6 +69,7 @@ byobu (4.47) unreleased; urgency=low
|
|||
right for both screen and tmux; and I don't perceive that this
|
||||
is any longer one of byobu's main features (?)
|
||||
- standardize title formatting
|
||||
- clean up some whitespace and text
|
||||
|
||||
-- Dustin Kirkland <kirkland@ubuntu.com> Tue, 08 Nov 2011 19:16:15 -0600
|
||||
|
||||
|
|
|
@ -88,18 +88,15 @@ def menu(snackScreen, size, isInstalled):
|
|||
installtext=_("Byobu currently launches at login (toggle off)")
|
||||
else:
|
||||
installtext=_("Byobu currently does not launch at login (toggle on)")
|
||||
|
||||
li = Listbox(height = 9, width = 60, returnExit = 1)
|
||||
li = Listbox(height = 6, width = 60, returnExit = 1)
|
||||
li.append(_("Help -- Quick Start Guide"), 1)
|
||||
li.append(_("Toggle status notifications"), 2)
|
||||
li.append(_("Change escape sequence"), 3)
|
||||
li.append(installtext, 4)
|
||||
bb = ButtonBar(snackScreen, (("Exit", "exit", ESC),), compact=1)
|
||||
|
||||
g = GridForm(snackScreen, _(" Byobu Configuration Menu"), 1, 2)
|
||||
g.add(li, 0, 0, padding=(4,2,4,2))
|
||||
g.add(bb, 0, 1, padding=(1,1,0,0))
|
||||
|
||||
if bb.buttonPressed(g.runOnce()) == "exit":
|
||||
return 0
|
||||
else:
|
||||
|
@ -107,31 +104,25 @@ def menu(snackScreen, size, isInstalled):
|
|||
|
||||
def messagebox(snackScreen, width, height, title, text, scroll=0, \
|
||||
buttons=((_("Okay"), "okay"),(_("Cancel"), "cancel", ESC)) ):
|
||||
|
||||
t = Textbox(width, height, text, scroll=scroll )
|
||||
bb = ButtonBar(snackScreen, buttons, compact = 1)
|
||||
g = GridForm(snackScreen, title, 1, 2)
|
||||
g.add(t, 0, 0, padding=(0,0,0,0))
|
||||
g.add(bb, 0, 1, padding=(1,1,0,0))
|
||||
|
||||
return bb.buttonPressed(g.runOnce())
|
||||
|
||||
def help(snackScreen, size, config):
|
||||
f=file(DOC+'/help.txt')
|
||||
text=f.read()
|
||||
f.close()
|
||||
|
||||
text=text.replace("<esckey>", getesckey(), 1)
|
||||
text=text.replace("_VER_", commands.getoutput("byobu -v | head -n1 | " + SED + " 's/.* //'"), 1)
|
||||
|
||||
t = Textbox(70, 14, text, scroll=0)
|
||||
bb = ButtonBar(snackScreen, ((_("Menu"), "menu", ESC),), compact = 1)
|
||||
g = GridForm(snackScreen, _("Byobu Help"), 1, 3)
|
||||
g.add(t, 0, 0, padding=(0,0,0,0))
|
||||
g.add(bb, 0, 2, padding=(1,1,0,0))
|
||||
|
||||
button = bb.buttonPressed(g.runOnce())
|
||||
|
||||
return 100
|
||||
|
||||
def readstatus():
|
||||
|
@ -241,7 +232,6 @@ def appendtofile(p, s):
|
|||
f.close()
|
||||
return
|
||||
|
||||
|
||||
def getesckey():
|
||||
path=BYOBU_CONFIG_DIR+'/keybindings'
|
||||
if not os.path.exists(path):
|
||||
|
@ -274,7 +264,6 @@ def chgesc(snackScreen, size):
|
|||
esc=Entry(2, text=getesckey(), returnExit=1)
|
||||
escl=Label(_("Escape key: ctrl-"))
|
||||
bb = ButtonBar(snackScreen, ((_("Apply"), "apply"), (_("Cancel"), "cancel", ESC)), compact = 1)
|
||||
|
||||
g = GridForm(snackScreen, _("Change escape sequence"), 2, 4 )
|
||||
g.add(escl, 0, 0, anchorLeft=1, padding=(1,0,0,1))
|
||||
g.add(esc, 1, 0, anchorLeft=1)
|
||||
|
@ -321,18 +310,13 @@ def autolaunch():
|
|||
def main():
|
||||
"""This is the main loop of our utility
|
||||
"""
|
||||
|
||||
size = terminal_size()
|
||||
snackScreen = SnackScreen()
|
||||
snackScreen.drawRootText(1,0,_(' Byobu Configuration Menu'))
|
||||
snackScreen.pushHelpLine(_('<Tab>/<Alt-Tab> between elements | <Enter> selects | <Esc> exits'))
|
||||
|
||||
snackScreen.drawRootText(1,0,_('Byobu Configuration Menu'))
|
||||
snackScreen.pushHelpLine(_('<Tab> between elements | <Enter> selects | <Esc> exits'))
|
||||
config = SafeConfigParser()
|
||||
|
||||
isInstalled = autolaunch()
|
||||
|
||||
tag = 100
|
||||
|
||||
while tag > 0 :
|
||||
tag = menu(snackScreen, size, isInstalled)
|
||||
if tag == 1:
|
||||
|
@ -344,7 +328,6 @@ def main():
|
|||
elif tag == 4:
|
||||
tag = install(snackScreen, size, isInstalled)
|
||||
isInstalled = autolaunch()
|
||||
|
||||
snackScreen.finish()
|
||||
sys.exit(0)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue