X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=bindings%2Fpython%2Fvlcwidget.py;h=b987ee68928fcea477f42a4636aeb07131ffc25d;hb=10a6bde56813620846826fed6979b2548a6457ea;hp=b288460c85ea84f06896958bfe509a6ddb484605;hpb=07a52db97ca6689ecc846818cfb681dd9b3c02e3;p=vlc diff --git a/bindings/python/vlcwidget.py b/bindings/python/vlcwidget.py index b288460c85..b987ee6892 100755 --- a/bindings/python/vlcwidget.py +++ b/bindings/python/vlcwidget.py @@ -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()