當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。