Beispiel #1
0
class QueueBrowser(GtkBrowser):
    def do_build(self):
        from moosecat.gtk.completion import FishySearchOverlay

        playlist_widget = QueuePlaylistWidget()

        def search_changed(entry, query, playlist_widget):
            playlist_widget.do_search(query)

        remove_ctrlf()

        self._overlay = FishySearchOverlay()
        self._overlay.get_entry().connect(
            'search-changed', search_changed, playlist_widget
        )
        self._overlay.add(playlist_widget)
        GLib.timeout_add(500, lambda: self._overlay.show())

    def get_root_widget(self):
        'Return the root widget of your browser window.'
        return self._overlay

    def get_browser_name(self):
        'Get the name of the browser (displayed in the sidebar)'
        return 'Queue'

    def get_browser_icon_name(self):
        return Gtk.STOCK_FIND

    def priority(self):
        return 90
Beispiel #2
0
    def do_build(self):
        from moosecat.gtk.completion import FishySearchOverlay

        playlist_widget = QueuePlaylistWidget()

        def search_changed(entry, query, playlist_widget):
            playlist_widget.do_search(query)

        remove_ctrlf()

        self._overlay = FishySearchOverlay()
        self._overlay.get_entry().connect(
            'search-changed', search_changed, playlist_widget
        )
        self._overlay.add(playlist_widget)
        GLib.timeout_add(500, lambda: self._overlay.show())