~jblount/libubuntuone/classy-error-pages

« back to all changes in this revision

Viewing changes to bindings/python/test-music-store.py

  • Committer: joshua.blount at canonical
  • Date: 2010-03-17 17:55:30 UTC
  • mfrom: (50.2.16 trunk)
  • Revision ID: joshua.blount@canonical.com-20100317175530-2zvwfnsmnb6euzj7
merged with trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/python
 
2
 
 
3
import gtk
 
4
from ubuntuone.gtkwidgets import MusicStore
 
5
 
 
6
def preview_mp3_cb(music_store, url, title):
 
7
    print "Requested preview of file %s with title %s" % (url, title)
 
8
 
 
9
def url_loaded_cb(music_store, url):
 
10
    print "URL loaded %s" % url
 
11
 
 
12
window = gtk.Window()
 
13
window.set_size_request(839, 600)
 
14
window.connect("destroy", gtk.main_quit)
 
15
 
 
16
store = MusicStore()
 
17
store.show()
 
18
store.connect("preview-mp3", preview_mp3_cb)
 
19
store.connect("url-loaded", url_loaded_cb)
 
20
window.add(store)
 
21
window.show()
 
22
 
 
23
gtk.main()