diff --git a/shell/data/Makefile.am b/shell/data/Makefile.am index 1f0f9c05..2709c921 100644 --- a/shell/data/Makefile.am +++ b/shell/data/Makefile.am @@ -1,4 +1,7 @@ confdir = $(pkgdatadir) conf_DATA = kbdconfig -EXTRA_DIST = $(conf_DATA) +imagedir = $(pkgdatadir) +image_DATA = default-picture.png + +EXTRA_DIST = $(conf_DATA) $(image_DATA) diff --git a/shell/data/default-picture.png b/shell/data/default-picture.png new file mode 100644 index 00000000..e26b9b01 Binary files /dev/null and b/shell/data/default-picture.png differ diff --git a/shell/intro/intro.py b/shell/intro/intro.py index 83c88da8..55aa1354 100644 --- a/shell/intro/intro.py +++ b/shell/intro/intro.py @@ -63,6 +63,7 @@ class IntroFallbackVideo(gtk.EventBox): self._image = gtk.Image() self._image.set_from_stock(gtk.STOCK_OPEN, -1) self.add(self._image) + self._image.show() self.connect('button-press-event', self._button_press_event_cb) def play(self): @@ -80,12 +81,15 @@ class IntroFallbackVideo(gtk.EventBox): resp = chooser.run() if resp == gtk.RESPONSE_ACCEPT: fname = chooser.get_filename() - pixbuf = gtk.gdk.pixbuf_new_from_file(fname) - self.emit('pixbuf', pixbuf) + self.load_image(fname) chooser.hide() chooser.destroy() return True + def load_image(self, path): + pixbuf = gtk.gdk.pixbuf_new_from_file(path) + self.emit('pixbuf', pixbuf) + class VideoBox(hippo.CanvasBox, hippo.CanvasItem): __gtype_name__ = "SugarVideoBox" @@ -138,6 +142,10 @@ class VideoBox(hippo.CanvasBox, hippo.CanvasItem): self._img_widget = hippo.CanvasWidget() self._img_widget.props.widget = self._img + if not has_webcam: + path = os.path.join(env.get_data_dir(),'default-picture.png') + self._video.load_image(path) + def _clear_image_cb(self, widget, event): del self._pixbuf self._pixbuf = None