Esempio n. 1
0
    def __init__(self, playlist, player):
        PlaylistPageBase.__init__(self)

        self.playlist = playlist

        self.swindow = Gtk.ScrolledWindow()
        self.swindow.set_policy(Gtk.PolicyType.AUTOMATIC,
                                Gtk.PolicyType.AUTOMATIC)
        self.pack_start(self.swindow, True, True, 0)

        self.view = PlaylistView(self.playlist, player)
        self.swindow.add(self.view)

        hbox = Gtk.ButtonBox()
        hbox.set_halign(Gtk.Align.END)

        button = Gtk.Button(stock=Gtk.STOCK_CLEAR)
        button.connect('clicked', self.on_clear_history)
        hbox.pack_start(button, True, True, 0)

        button = Gtk.Button(stock=Gtk.STOCK_SAVE)
        button.connect('clicked', self.on_save_history)
        hbox.pack_start(button, True, True, 0)

        self.pack_start(hbox, False, False, 0)

        self.show_all()
Esempio n. 2
0
    def __init__(self, playlist, player):
        PlaylistPageBase.__init__(self)
        
        self.playlist = playlist
        
        self.swindow = Gtk.ScrolledWindow()
        self.swindow.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)
        self.pack_start(self.swindow, True, True, 0)

        self.view = PlaylistView(self.playlist, player)
        self.swindow.add(self.view)
        
        hbox = Gtk.HButtonBox()
        
        button = Gtk.Button(stock=Gtk.STOCK_CLEAR)
        button.connect( 'clicked', self.on_clear_history )
        hbox.pack_start( button , True, True, 0)
        
        button = Gtk.Button(stock=Gtk.STOCK_SAVE)
        button.connect( 'clicked', self.on_save_history )
        hbox.pack_start( button , True, True, 0)
        
        align = Gtk.Alignment.new(1, 0, 0, 0)
        align.add( hbox )
        
        self.pack_start( align, False, False, 0 )
        
        self.show_all()
Esempio n. 3
0
    def __init__(self, container, player):
        PlaylistPageBase.__init__(self)
        self.plcontainer = container
        self.player = player
        self.playlist = player.queue  # a queue is a playlist object...

        self.swindow = Gtk.ScrolledWindow()
        self.swindow.set_policy(Gtk.PolicyType.AUTOMATIC,
                                Gtk.PolicyType.AUTOMATIC)
        self.pack_start(self.swindow, True, True, 0)

        self.view = PlaylistView(self.player.queue, self.player)
        self.view.dragdrop_copyonly = True
        self.swindow.add(self.view)

        event.add_ui_callback(
            self.on_length_changed,
            'playlist_current_position_changed',
            self.player.queue,
        )
        event.add_ui_callback(self.on_length_changed, "playlist_tracks_added",
                              self.player.queue)
        event.add_ui_callback(self.on_length_changed,
                              "playlist_tracks_removed", self.player.queue)

        self.show_all()
Esempio n. 4
0
    def __init__(self, container, player):
        PlaylistPageBase.__init__(self)
        self.plcontainer = container
        self.player = player
        self.playlist = player.queue  # a queue is a playlist object...

        self.swindow = Gtk.ScrolledWindow()
        self.swindow.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)
        self.pack_start(self.swindow, True, True, 0)

        self.view = PlaylistView(self.player.queue, self.player)
        self.view.dragdrop_copyonly = True
        self.swindow.add(self.view)

        event.add_ui_callback(
            self.on_length_changed,
            'playlist_current_position_changed',
            self.player.queue,
        )
        event.add_ui_callback(
            self.on_length_changed, "playlist_tracks_added", self.player.queue
        )
        event.add_ui_callback(
            self.on_length_changed, "playlist_tracks_removed", self.player.queue
        )

        self.show_all()