From 8cec55287fe7b96209c8a6d8e92e2a924e5caa55 Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Wed, 9 Nov 2011 15:47:15 -0600 Subject: [PATCH] clean up some whitespace and text --- debian/changelog | 1 + usr/bin/byobu-config | 23 +++-------------------- 2 files changed, 4 insertions(+), 20 deletions(-) diff --git a/debian/changelog b/debian/changelog index e7c31dac..7ba24709 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Tue, 08 Nov 2011 19:16:15 -0600 diff --git a/usr/bin/byobu-config b/usr/bin/byobu-config index ffe1eb62..f8ca8159 100755 --- a/usr/bin/byobu-config +++ b/usr/bin/byobu-config @@ -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("", 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(_('/ between elements | selects | exits')) - + snackScreen.drawRootText(1,0,_('Byobu Configuration Menu')) + snackScreen.pushHelpLine(_(' between elements | selects | 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)