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


Python kuwo.Config类代码示例

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


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

示例1: __init__

    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()
开发者ID:sumous,项目名称:kwplayer,代码行数:8,代码来源:App.py

示例2: __init__

    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()
开发者ID:baiyunping333,项目名称:kwplayer,代码行数:8,代码来源:App.py

示例3: __init__

    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()
开发者ID:jiuerd,项目名称:kwplayer,代码行数:11,代码来源:App.py

示例4: on_app_startup

    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()
开发者ID:wangjiezhe,项目名称:kwplayer,代码行数:38,代码来源:App.py

示例5: on_app_shutdown

 def on_app_shutdown(self, app):
     Config.dump_conf(self.conf)
开发者ID:baiyunping333,项目名称:kwplayer,代码行数:2,代码来源:App.py

示例6: Copyright

# Copyright (C) 2013-2014 LiuLang <[email protected]>

# Use of this source code is governed by GPLv3 license that can be found
# in the LICENSE file.

import os
import sys
from gi.repository import Gdk
from gi.repository import GdkPixbuf
from gi.repository import GObject
from gi.repository import Gtk

from kuwo import Config
# ~/.config/kuwo and ~/.cache/kuwo need to be created at first time
Config.check_first()
_ = Config._
from kuwo.Artists import Artists
from kuwo.Lrc import Lrc
from kuwo.MV import MV
from kuwo.Player import Player
from kuwo.PlayList import PlayList
from kuwo.Radio import Radio
from kuwo.Search import Search
from kuwo.Themes import Themes
from kuwo.TopCategories import TopCategories
from kuwo.TopList import TopList
from kuwo.Shortcut import Shortcut

GObject.threads_init()
DBUS_APP_NAME = 'org.liulang.kwplayer'
开发者ID:baiyunping333,项目名称:kwplayer,代码行数:30,代码来源:App.py

示例7: on_destroy

 def on_destroy(self):
     print('dialog.on_destroy()')
     Config.dump_conf(self.app.conf)
开发者ID:badwtg1111,项目名称:kwplayer,代码行数:3,代码来源:Preferences.py

示例8: on_destroy

 def on_destroy(self):
     Config.dump_conf(self.app.conf)
开发者ID:Holdlen2DH,项目名称:kwplayer,代码行数:2,代码来源:Preferences.py


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