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