本文整理匯總了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()