Пример #1
0
def prefs_changed(cmdr, is_beta):
    """
    Save settings.
    """
    this.news.prefs_changed(cmdr, is_beta)
    this.release.prefs_changed(cmdr, is_beta)
    this.patrol.prefs_changed(cmdr, is_beta)
    this.codexcontrol.prefs_changed(cmdr, is_beta)
    Debug.prefs_changed()
Пример #2
0
def plugin_start(plugin_dir):
    """
    Load Template plugin into EDMC
    """

    # print this.patrol
    release.Release.plugin_start(plugin_dir)
    Debug.setClient(this.client_version)
    patrol.CanonnPatrol.plugin_start(plugin_dir)
    codex.CodexTypes.plugin_start(plugin_dir)

    return 'Canonn'
Пример #3
0
def plugin_prefs(parent, cmdr, is_beta):
    """
    Return a TK Frame for adding to the EDMC settings dialog.
    """
    frame = nb.Frame(parent)
    frame.columnconfigure(1, weight=1)

    this.news.plugin_prefs(frame, cmdr, is_beta, 0)
    this.release.plugin_prefs(frame, cmdr, is_beta, 1)
    this.patrol.plugin_prefs(frame, cmdr, is_beta, 2)
    this.codexcontrol.plugin_prefs(frame, cmdr, is_beta, 3)
    hdreport.HDInspector(frame, cmdr, is_beta, this.client_version, 4)
    Debug.plugin_prefs(frame, this.client_version, 5)
    return frame
Пример #4
0
from canonn.debug import debug
from canonn.systems import Systems
from canonn.whitelist import whiteList
from config import config
from ttkHyperlinkLabel import HyperlinkLabel
import webbrowser

import logging
from config import appname

this = sys.modules[__name__]

plugin_name = os.path.basename(os.path.dirname(__file__))
this.logger = logging.getLogger(f'{appname}.{plugin_name}')
logger = this.logger
Debug.setLogger(logger)

# If the Logger has handlers then it was already set up by the core code, else
# it needs setting up here.
if not logger.hasHandlers():
    level = logging.INFO  # So logger.info(...) is equivalent to print()

    logger.setLevel(level)
    logger_channel = logging.StreamHandler()
    logger_formatter = logging.Formatter(
        f'%(asctime)s - %(name)s - %(levelname)s - %(module)s:%(lineno)d:%(funcName)s: %(message)s'
    )
    logger_formatter.default_time_format = '%Y-%m-%d %H:%M:%S'
    logger_formatter.default_msec_format = '%s.%03d'
    logger_channel.setFormatter(logger_formatter)
    logger.addHandler(logger_channel)