-
Notifications
You must be signed in to change notification settings - Fork 385
/
compatconfig.py
50 lines (40 loc) · 1.33 KB
/
compatconfig.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# -*- coding: utf-8 -*-
# This file is part of MyPaint.
# Copyright (C) 2019 by the MyPaint Development Team
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
class CompatFileBehaviorConfig:
# Key for the behavior setting in user preferences
SETTING = 'compat_behavior_when_unknown'
# Setting options
ALWAYS_1X = 'always-1.x'
ALWAYS_2X = 'always-2.x'
UNLESS_PIGMENT_LAYER_1X = 'unless-pigment-layer-1.x'
CFBC = CompatFileBehaviorConfig
# Keys for settings in the user preferences
DEFAULT_COMPAT = 'default_compatibility_mode'
COMPAT_SETTINGS = 'compability_settings'
# Keys for compat mode sub-options in the user preferences
PIGMENT_BY_DEFAULT = 'pigment_on_by_default'
PIGMENT_LAYER_BY_DEFAULT = 'pigment_layer_is_default'
C1X = '1.x'
C2X = '2.x'
# Default compatibility settings
DEFAULT_CONFIG = {
CFBC.SETTING:
CFBC.UNLESS_PIGMENT_LAYER_1X,
DEFAULT_COMPAT: C2X,
COMPAT_SETTINGS: {
C1X: {
PIGMENT_BY_DEFAULT: False,
PIGMENT_LAYER_BY_DEFAULT: False,
},
C2X: {
PIGMENT_BY_DEFAULT: True,
PIGMENT_LAYER_BY_DEFAULT: True,
},
},
}