fix problem with screen-profiles-helper not starting with the config file

does not exist

release as 1.8
open 1.9 for development
This commit is contained in:
Dustin Kirkland 2009-01-12 09:11:42 -06:00
commit 87dd5a7cac
2 changed files with 26 additions and 13 deletions

13
debian/changelog vendored
View file

@ -1,9 +1,16 @@
screen-profiles (1.8) UNRELEASED; urgency=low
screen-profiles (1.9) UNRELEASED; urgency=low
*
-- Dustin Kirkland <kirkland@ubuntu.com> 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 <kirkland@ubuntu.com> Mon, 12 Jan 2009 01:09:14 -0600
-- Dustin Kirkland <kirkland@ubuntu.com> Mon, 12 Jan 2009 09:11:15 -0600
screen-profiles (1.7-0ubuntu1) jaunty; urgency=low

View file

@ -97,10 +97,13 @@ def help(screen, size, config):
t = Textbox(74, 19, text, scroll=1)
bb = ButtonBar(screen, (("Menu", "menu"), ("Exit", "exit")), compact = 1)
try:
if (config.get('Defaults', 'help') == "on"):
cbOn = 1
else:
cbOn = 0
except:
cbOn = 1
cb=Checkbox("Display this help on startup", isOn=cbOn)
@ -321,11 +324,14 @@ def main():
screen.pushHelpLine("<Tab>/<Alt-Tab> between elements | <Return> Validates")
config = SafeConfigParser()
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')) != "")