本文整理汇总了Python中kuwo.Config.load_conf方法的典型用法代码示例。如果您正苦于以下问题:Python Config.load_conf方法的具体用法?Python Config.load_conf怎么用?Python Config.load_conf使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类kuwo.Config
的用法示例。
在下文中一共展示了Config.load_conf方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from kuwo import Config [as 别名]
# 或者: from kuwo.Config import load_conf [as 别名]
def __init__(self):
self.app = Gtk.Application.new(DBUS_APP_NAME, 0)
self.app.connect('startup', self.on_app_startup)
self.app.connect('activate', self.on_app_activate)
self.app.connect('shutdown', self.on_app_shutdown)
self.conf = Config.load_conf()
self.theme, self.theme_path = Config.load_theme()
示例2: __init__
# 需要导入模块: from kuwo import Config [as 别名]
# 或者: from kuwo.Config import load_conf [as 别名]
def __init__(self):
self.app = Gtk.Application.new('org.gtk.kuwo', 0)
self.app.connect('startup', self.on_app_startup)
self.app.connect('activate', self.on_app_activate)
self.app.connect('shutdown', self.on_app_shutdown)
self.conf = Config.load_conf()
self.theme = Config.load_theme()
示例3: __init__
# 需要导入模块: from kuwo import Config [as 别名]
# 或者: from kuwo.Config import load_conf [as 别名]
def __init__(self):
self.app = Gtk.Application.new('org.gtk.kuwo', 0)
self.app.connect('startup', self.on_app_startup)
self.app.connect('activate', self.on_app_activate)
self.app.connect('shutdown', self.on_app_shutdown)
self.conf = Config.load_conf()
if 'use-status-icon' not in self.conf:
self.conf['use-status-icon'] = True
self.theme = Config.load_theme()
示例4: on_app_startup
# 需要导入模块: from kuwo import Config [as 别名]
# 或者: from kuwo.Config import load_conf [as 别名]
def on_app_startup(self, app):
self.conf = Config.load_conf()
self.icon_theme = Gtk.IconTheme.get_default()
self.icon_theme.append_search_path(Config.ICON_PATH)
GLib.set_application_name(Config.APPNAME)
self.window = Gtk.ApplicationWindow(application=app)
self.window.set_default_size(*self.conf['window-size'])
self.window.set_title(Config.APPNAME)
self.window.set_default_icon_name(Config.NAME)
self.window.props.hide_titlebar_when_maximized = True
app.add_window(self.window)
self.window.connect('check-resize', self.on_main_window_resized)
self.window.connect('delete-event', self.on_main_window_deleted)
self.accel_group = Gtk.AccelGroup()
self.window.add_accel_group(self.accel_group)
box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
self.window.add(box)
self.osdlrc = OSDLrc(self)
self.notify = None
self.init_notify()
self.player = Player(self)
box.pack_start(self.player, False, False, 0)
self.notebook = Gtk.Notebook()
self.notebook.props.tab_pos = Gtk.PositionType.BOTTOM
self.notebook.get_style_context().add_class('main_tab')
box.pack_start(self.notebook, True, True, 0)
self.init_notebook()
self.notebook.connect('switch-page', self.on_notebook_switch_page)
self.init_status_icon()
# load default styles when all widgets have been constructed.
self.load_styles()