diff --git a/debian/changelog b/debian/changelog index 2911dfa1..fd06c0f4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,16 @@ -screen-profiles (1.8) UNRELEASED; urgency=low +screen-profiles (1.9) UNRELEASED; urgency=low + + * + + -- Dustin Kirkland Mon, 12 Jan 2009 09:11:30 -0600 + +screen-profiles (1.8-0ubuntu1) jaunty; urgency=low [ Dustin Kirkland ] - * profiles/common: source the system default /etc/screenrc + * screen-profiles-helper: fix crash on startup, when + ~/.screen-profiles-helper does not exist - -- Dustin Kirkland Mon, 12 Jan 2009 01:09:14 -0600 + -- Dustin Kirkland Mon, 12 Jan 2009 09:11:15 -0600 screen-profiles (1.7-0ubuntu1) jaunty; urgency=low diff --git a/screen-profiles-helper b/screen-profiles-helper index fb058a0c..7ded790e 100755 --- a/screen-profiles-helper +++ b/screen-profiles-helper @@ -96,21 +96,24 @@ def help(screen, size, config): t = Textbox(74, 19, text, scroll=1) bb = ButtonBar(screen, (("Menu", "menu"), ("Exit", "exit")), compact = 1) - - if (config.get('Defaults', 'help') == "on"): + + try: + if (config.get('Defaults', 'help') == "on"): + cbOn = 1 + else: + cbOn = 0 + except: cbOn = 1 - else: - cbOn = 0 cb=Checkbox("Display this help on startup", isOn=cbOn) - + g = GridForm(screen, "GNU Screen Profiles Help", 1, 3) g.add(t, 0, 0, padding=(0,0,0,0)) g.add(cb, 0, 1, padding=(1,0,0,0)) g.add(bb, 0, 2, padding=(1,1,0,0)) button = bb.buttonPressed(g.runOnce()) - + if cb.value() != cbOn: #Check box value has change, write config file if not config.has_section('Defaults'): @@ -321,10 +324,13 @@ def main(): screen.pushHelpLine("/ between elements | Validates") config = SafeConfigParser() - config.read(os.getenv("HOME")+'/.screen-profiles-helper') - if config.has_option('Defaults', 'help'): - showhelp=config.get('Defaults', 'help') - else: + try: + config.read(os.getenv("HOME")+'/.screen-profiles-helper') + if config.has_option('Defaults', 'help'): + showhelp=config.get('Defaults', 'help') + else: + showhelp="on" + except: showhelp="on" isInstalled = (commands.getoutput('grep screen-launcher '+(os.getenv("HOME")+'/.bashrc')) != "")