summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorracarr <racarr>2007-01-22 23:59:46 +0000
committerracarr <racarr>2007-01-22 23:59:46 +0000
commit06f22bd04a15587e38033a256697bf01e3fb0a7d (patch)
treef341ff741d14d6c3821012cd413a9678e1d7f4c9
parenteeca42aca54d61ef9af79a293be0a62c0e56cb6a (diff)
downloadberyl-settings-simple-06f22bd04a15587e38033a256697bf01e3fb0a7d.tar.gz
beryl-settings-simple-06f22bd04a15587e38033a256697bf01e3fb0a7d.tar.bz2
don't crash if someone doesn't have annotate
-rwxr-xr-xsrc/beryl-settings-simple.in12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/beryl-settings-simple.in b/src/beryl-settings-simple.in
index a30e742..c0e1fe1 100755
--- a/src/beryl-settings-simple.in
+++ b/src/beryl-settings-simple.in
@@ -107,7 +107,10 @@ class SettingsManager:
self.opacify.Setting("____plugin_enabled").Value=not self.opacify.Setting("____plugin_enabled").Value
if data==1:
- self.annotate.Setting("____plugin_enabled").Value=not self.opacify.Setting("____plugin_enabled").Value
+ try:
+ self.annotate.Setting("____plugin_enabled").Value=not self.opacify.Setting("____plugin_enabled").Value
+ except:
+ print "No annotate"
if data==2:
if widget.get_active():
self.resize.Setting("resize_mode").Value=self.resize.Setting("resize_mode").Restrictions[0]
@@ -319,7 +322,10 @@ class SettingsManager:
if i==0:
check.set_active(self.opacify.Setting("____plugin_enabled").Value)
if i==1:
- check.set_active(self.annotate.Setting("____plugin_enabled").Value)
+ try:
+ check.set_active(self.annotate.Setting("____plugin_enabled").Value)
+ except:
+ print "No annotate"
if i==2:
check.set_active(self.resize.Setting("resize_mode").Value=="Normal")
i+=1
@@ -516,13 +522,13 @@ class SettingsManager:
self.Ctx=berylsettings.Context()
self.Ctx.Read()
try:
- self.annotate=self.Ctx.Plugin("annotate")
self.resize=self.Ctx.Plugin("resize")
self.scale=self.Ctx.Plugin("scale")
self.animation=self.Ctx.Plugin("animation")
self.opacify=self.Ctx.Plugin("opacify")
self.cube=self.Ctx.Plugin("cube")
self.core=self.Ctx.Plugin("_")
+ self.annotate=self.Ctx.Plugin("annotate")
except:
print "Couldn't load plugins"
self.window.add(self.windowBox)