Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/colors.py
diff options
context:
space:
mode:
authorWade Brainerd <wadetb@gmail.com>2009-12-09 19:35:07 (GMT)
committer Wade Brainerd <wadetb@gmail.com>2009-12-09 19:35:07 (GMT)
commit032104042de6bfa29e32e8481194997c4f8f130d (patch)
tree25c372e5cbabb2c9820c029da3c64a5b26302fa5 /colors.py
parentfb101a4abe47a560393e1f9c7cb13c0d1a982cf7 (diff)
Disable videopaint when camera cannot be found.
Diffstat (limited to 'colors.py')
-rwxr-xr-xcolors.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/colors.py b/colors.py
index 5222c89..37bf493 100755
--- a/colors.py
+++ b/colors.py
@@ -729,6 +729,7 @@ class Colors(activity.Activity, ExportedGObject):
def init_camera (self):
self.camera_enabled = False
+ self.videopaintbtn.set_sensitive(False)
try:
camera_list = camera.list_cameras()
@@ -738,6 +739,7 @@ class Colors(activity.Activity, ExportedGObject):
self.camsmall = surface.Surface((240,180),0,self.camcapture)
self.camhsv = surface.Surface((240,180),0,self.camcapture)
self.camera_enabled = True
+ self.videopaintbtn.set_sensitive(True)
else:
log.debug('No cameras found, videopaint disabled.')