diff options
author | Marco Pesenti Gritti <mpg@redhat.com> | 2007-11-02 10:04:41 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <mpg@redhat.com> | 2007-11-02 10:04:41 (GMT) |
commit | d445bc086da8dac2c4944afa98ae8681031ed86f (patch) | |
tree | 24da05325f7277b48ae8f3bbed0febd584cbca8a /bin | |
parent | 70079de872305eaaacf70364801895ad036d1c4f (diff) |
Free the sound device when the startup when the sound has been played.
Factored out to a separate sound module from cjb patch.
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/sugar-shell | 6 |
1 files changed, 2 insertions, 4 deletions
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) |