Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorOwen Williams <owen@ywwg.localdomain>2007-03-06 02:24:59 (GMT)
committer Owen Williams <owen@ywwg.localdomain>2007-03-06 02:24:59 (GMT)
commit195e18d7b007966dc0bf30c0e6eee26149190bab (patch)
tree25b7d67ea16099a8d62f714f33b9a403b72030f1 /shell
parent3d32c9aaa67c416df90ff3b50ab84eef6db07928 (diff)
parent1992a8a2d8afab6c313eee5605ed5bd5ef9cf7e8 (diff)
Merge branch 'master' of git+ssh://ywwg@dev.laptop.org/git/sugar
Diffstat (limited to 'shell')
-rw-r--r--shell/intro/intro.py26
-rw-r--r--shell/model/MeshModel.py2
-rw-r--r--shell/view/Shell.py2
3 files changed, 24 insertions, 6 deletions
diff --git a/shell/intro/intro.py b/shell/intro/intro.py
index 75e3791..83c88da 100644
--- a/shell/intro/intro.py
+++ b/shell/intro/intro.py
@@ -15,6 +15,7 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
import gtk, gobject
+import dbus
import hippo
import logging
from gettext import gettext as _
@@ -100,11 +101,28 @@ class VideoBox(hippo.CanvasBox, hippo.CanvasItem):
self._label.props.font_desc = font.DEFAULT.get_pango_desc()
self.append(self._label)
+ # check for camera and if not generate a .jpg
+ has_webcam = False
try:
- import glive
- self._video = glive.LiveVideoSlot(_VIDEO_WIDTH, _VIDEO_HEIGHT)
- except ImportError:
- self._video = IntroFallbackVideo()
+ sys_bus = dbus.SystemBus()
+ hal_obj = sys_bus.get_object ('org.freedesktop.Hal', '/org/freedesktop/Hal/Manager')
+ hal = dbus.Interface (hal_obj, 'org.freedesktop.Hal.Manager')
+
+ udis = hal.FindDeviceByCapability ('video4linux')
+
+ # check for the olpc specific camera
+ if not udis:
+ udis = hal.FindDeviceStringMatch('info.linux.driver','cafe1000-ccic')
+
+ if udis:
+ has_webcam = True
+
+ finally:
+ if has_webcam:
+ import glive
+ self._video = glive.LiveVideoSlot(_VIDEO_WIDTH, _VIDEO_HEIGHT)
+ else:
+ self._video = IntroFallbackVideo()
self._video.set_size_request(_VIDEO_WIDTH, _VIDEO_HEIGHT)
self._video.connect('pixbuf', self._new_pixbuf_cb)
diff --git a/shell/model/MeshModel.py b/shell/model/MeshModel.py
index fb51912..b2c49bb 100644
--- a/shell/model/MeshModel.py
+++ b/shell/model/MeshModel.py
@@ -100,7 +100,7 @@ class MeshModel(gobject.GObject):
self._add_access_point(nm_device, nm_network)
def _nm_network_disappeared_cb(self, nm_device, nm_network):
- self._remove_access_point(nm_device, nm_network)
+ self._remove_access_point(nm_network)
def _add_network_device(self, nm_device):
for nm_network in nm_device.get_networks():
diff --git a/shell/view/Shell.py b/shell/view/Shell.py
index c032831..99c940f 100644
--- a/shell/view/Shell.py
+++ b/shell/view/Shell.py
@@ -55,7 +55,7 @@ class Shell(gobject.GObject):
self._frame = Frame(self)
self._frame.show_and_hide(3)
- self.start_activity('org.laptop.JournalActivity')
+ #self.start_activity('org.laptop.JournalActivity')
def _activity_added_cb(self, home_model, home_activity):
activity_host = ActivityHost(home_activity)