当前位置: 首页>>代码示例>>Python>>正文


Python browser.LibraryBrowser类代码示例

本文整理汇总了Python中quodlibet.qltk.browser.LibraryBrowser的典型用法代码示例。如果您正苦于以下问题:Python LibraryBrowser类的具体用法?Python LibraryBrowser怎么用?Python LibraryBrowser使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了LibraryBrowser类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_ctr

 def test_ctr(self):
     from quodlibet.library import SongLibrary
     from quodlibet.browsers.empty import EmptyBar
     win = LibraryBrowser(EmptyBar, SongLibrary(), NullPlayer())
     win.browser.emit("songs-selected", [], False)
     win.songlist.get_selection().emit("changed")
     win.destroy()
开发者ID:Konzertheld,项目名称:quodlibet,代码行数:7,代码来源:test_qltk_browser.py

示例2: quit_gtk

    def quit_gtk(window):

        if before_quit is not None:
            before_quit()

        # disable plugins
        import quodlibet.plugins
        quodlibet.plugins.quit()

        # for debug: this will list active copools
        from quodlibet.util import copool
        copool.pause_all()

        # See which browser windows are open and save their names
        # so we can restore them on start
        from quodlibet.qltk.browser import LibraryBrowser
        LibraryBrowser.save()

        # destroy all open windows so they hide immediately on close:
        # destroying all top level windows doesn't work (weird errors),
        # so we hide them all and only destroy our tracked instances
        # (browser windows, tag editors, pref window etc.)
        from quodlibet.qltk import Window
        for toplevel in Gtk.Window.list_toplevels():
            toplevel.hide()

        for window in Window.windows:
            window.destroy()

        Gtk.main_quit()

        print_d("Quit GTK: done.")
开发者ID:Konzertheld,项目名称:quodlibet,代码行数:32,代码来源:__init__.py

示例3: _open_browser

def _open_browser(app, value):
    value = arg2text(value)

    try:
        Kind = browsers.get(value)
    except ValueError:
        raise CommandError("Unknown browser %r" % value)
    LibraryBrowser.open(Kind, app.library, app.player)
开发者ID:ZDBioHazard,项目名称:quodlibet,代码行数:8,代码来源:commands.py

示例4: test_open

    def test_open(self):
        from quodlibet.browsers.empty import EmptyBar
        from quodlibet.library import SongLibrary

        widget = LibraryBrowser.open(EmptyBar, SongLibrary(), NullPlayer())
        self.assertTrue(widget)
        self.assertTrue(widget.get_visible())
        widget.destroy()
开发者ID:Konzertheld,项目名称:quodlibet,代码行数:8,代码来源:test_qltk_browser.py

示例5: __copy_to_device

 def __copy_to_device(device, songs, library):
     if len(MediaDevices.instances()) > 0:
         browser = MediaDevices.instances()[0]
     else:
         win = LibraryBrowser.open(MediaDevices, library, app.player)
         browser = win.browser
     browser.select(device)
     browser.dropped(songs)
开发者ID:Tjorriemorrie,项目名称:quodlibet,代码行数:8,代码来源:media.py

示例6: plugin_songs

    def plugin_songs(self, songs):
        tag = "~dirname"

        values = []
        for song in songs:
            values.extend(song.list(tag))

        browser = LibraryBrowser.open(
            browsers.get("SearchBar"), app.library, app.player)
        browser.browser.filter(tag, set(values))
开发者ID:Konzertheld,项目名称:quodlibet,代码行数:10,代码来源:filterbrowser.py

示例7: browser_activate

 def browser_activate(action, Kind):
     LibraryBrowser.open(Kind, library, player)
开发者ID:kriskielce88,项目名称:xn--ls8h,代码行数:2,代码来源:quodlibetwindow.py

示例8: _open_browser

def _open_browser(app, value):
    Kind = browsers.get(value)
    if Kind is not browsers.empty.EmptyBar:
        LibraryBrowser.open(Kind, app.library, app.player)
    else:
        raise CommandError("Unknown browser %r" % value)
开发者ID:SimonLarsen,项目名称:quodlibet,代码行数:6,代码来源:commands.py


注:本文中的quodlibet.qltk.browser.LibraryBrowser类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。