]> git.sesse.net Git - vlc/blobdiff - bindings/python/vlcwidget.py
libvlccore: Don't set the priority on first thread on Mac OS X.
[vlc] / bindings / python / vlcwidget.py
index b288460c85ea84f06896958bfe509a6ddb484605..b987ee68928fcea477f42a4636aeb07131ffc25d 100755 (executable)
@@ -8,6 +8,8 @@ VLC component inside a pygtk application.
 VLCWidget is a simple VLC widget.
 
 DecoratedVLCWidget provides simple player controls.
+
+$Id$
 """
 
 import gtk
@@ -42,7 +44,7 @@ class DecoratedVLCWidget(gtk.VBox):
     VLC widget decorated with a player control toolbar.
 
     Its player can be controlled through the 'player' attribute, which
-    is a MediaControl instance.    
+    is a MediaControl instance.
     """
     def __init__(self, *p):
         gtk.VBox.__init__(self)
@@ -56,7 +58,7 @@ class DecoratedVLCWidget(gtk.VBox):
         """Return a player control toolbar
         """
         tb=gtk.Toolbar()
-        tb.set_style(gtk.TOOLBAR_ICONS) 
+        tb.set_style(gtk.TOOLBAR_ICONS)
 
         def on_play(b):
             self.player.start(0)
@@ -75,7 +77,7 @@ class DecoratedVLCWidget(gtk.VBox):
              on_play),
             (_("Pause"), _("Pause"), gtk.STOCK_MEDIA_PAUSE,
              on_pause),
-            (_("Stop"), _("Stop"), gtk.STOCK_MEDIA_STOP, 
+            (_("Stop"), _("Stop"), gtk.STOCK_MEDIA_STOP,
              on_stop),
             )
 
@@ -91,9 +93,9 @@ class VideoPlayer:
     """
     def __init__(self):
         self.vlc = DecoratedVLCWidget()
-        
+
     def main(self, fname):
-        self.vlc.player.playlist_add_item(fname)
+        self.vlc.player.set_mrl(fname)
         self.popup()
         gtk.main()