From 8be90fbec3e8b79eb744d22728e15bd63f968295 Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Wed, 29 Apr 2009 02:11:55 -0500 Subject: [PATCH] * screen-profiles: ensure that all registered keybindings get updated if the user changes their escape sequence, LP: #368937 Signed-off-by: Dustin Kirkland --- debian/changelog | 4 +++- screen-profiles | 21 ++++++++------------- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/debian/changelog b/debian/changelog index bfae44de..c9677107 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,8 +9,10 @@ screen-profiles (1.52) unreleased; urgency=low * profiles/common, screen: create a temp file to use on screen launch, consisting of the profile plus the windows, but don't source default windows otherwise as this breaks F5-refresh, LP: #368786 + * screen-profiles: ensure that all registered keybindings get updated + if the user changes their escape sequence, LP: #368937 - -- Dustin Kirkland Wed, 29 Apr 2009 01:14:27 -0500 + -- Dustin Kirkland Wed, 29 Apr 2009 02:10:39 -0500 screen-profiles (1.51-0ubuntu1) karmic; urgency=low diff --git a/screen-profiles b/screen-profiles index 3dc18a08..5badf307 100755 --- a/screen-profiles +++ b/screen-profiles @@ -411,19 +411,14 @@ def setesckey(key): if key != "": u = key[0].upper() l = key[0].lower() - if not os.path.exists(path): - appendtofile(path, "escape ^"+u+l+"\nregister n ^"+l+"^c^"+l+"A\n") - else: - out = commands.getoutput("grep ^escape "+path) - if out == "": - appendtofile(path, "escape ^"+u+l+"\n") - else: - out = commands.getoutput("sed -i -e 's/^escape \^.*/escape ^"+u+l+"/' "+path) - out = commands.getoutput("grep \"^register n \" "+path) - if out == "": - appendtofile(path, "register n ^"+l+"^c^"+l+"A\n") - else: - out = commands.getoutput("sed -i -e 's/^register n .*/register n ^"+l+"^c^"+l+"A/' "+path) + if os.path.exists(path): + out = commands.getoutput("sed -i -e 's/^escape.*$//' "+path) + appendtofile(path, "escape ^"+u+l+"\n") + out = commands.getoutput("sed -i -e 's/^register.*$//' "+path) + out = commands.getoutput("grep ^register "+SHARE+"/keybindings/common") + appendtofile(path, out+"\n") + out = commands.getoutput("sed -i -e 's/\"\^a/\"\^"+l+"/' "+path) + out = commands.getoutput("sed -i -e '/^$/d' "+path) def chgesc(screen, size): esc=Entry(2, text=getesckey(), returnExit=1)