本文整理汇总了Python中quodlibet.qltk.browser.LibraryBrowser.open方法的典型用法代码示例。如果您正苦于以下问题:Python LibraryBrowser.open方法的具体用法?Python LibraryBrowser.open怎么用?Python LibraryBrowser.open使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类quodlibet.qltk.browser.LibraryBrowser
的用法示例。
在下文中一共展示了LibraryBrowser.open方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _open_browser
# 需要导入模块: from quodlibet.qltk.browser import LibraryBrowser [as 别名]
# 或者: from quodlibet.qltk.browser.LibraryBrowser import open [as 别名]
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)
示例2: test_open
# 需要导入模块: from quodlibet.qltk.browser import LibraryBrowser [as 别名]
# 或者: from quodlibet.qltk.browser.LibraryBrowser import open [as 别名]
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()
示例3: __copy_to_device
# 需要导入模块: from quodlibet.qltk.browser import LibraryBrowser [as 别名]
# 或者: from quodlibet.qltk.browser.LibraryBrowser import open [as 别名]
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)
示例4: plugin_songs
# 需要导入模块: from quodlibet.qltk.browser import LibraryBrowser [as 别名]
# 或者: from quodlibet.qltk.browser.LibraryBrowser import open [as 别名]
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))
示例5: browser_activate
# 需要导入模块: from quodlibet.qltk.browser import LibraryBrowser [as 别名]
# 或者: from quodlibet.qltk.browser.LibraryBrowser import open [as 别名]
def browser_activate(action, Kind):
LibraryBrowser.open(Kind, library, player)
示例6: _open_browser
# 需要导入模块: from quodlibet.qltk.browser import LibraryBrowser [as 别名]
# 或者: from quodlibet.qltk.browser.LibraryBrowser import open [as 别名]
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)