From d445bc086da8dac2c4944afa98ae8681031ed86f Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Fri, 02 Nov 2007 10:04:41 +0000 Subject: Free the sound device when the startup when the sound has been played. Factored out to a separate sound module from cjb patch. --- (limited to 'bin/sugar-shell') diff --git a/bin/sugar-shell b/bin/sugar-shell index 8f78289..7b5452d 100755 --- a/bin/sugar-shell +++ b/bin/sugar-shell @@ -25,10 +25,10 @@ import pygtk pygtk.require('2.0') import gtk import gobject -import gst from sugar import env from sugar import logger +from sugar import sound from sugar.profile import get_profile sys.path.insert(0, env.get_shell_path()) @@ -89,9 +89,7 @@ def _shell_started_cb(): startup_sound = os.path.join(env.get_data_path('startup.flac')) if os.path.exists(startup_sound): - player = gst.element_factory_make("playbin", "player") - player.set_property("uri", "file://" + startup_sound) - player.set_state(gst.STATE_PLAYING) + sound.play(startup_sound) def main(): gobject.idle_add(_shell_started_cb) -- cgit v0.9.1