Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mantid
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mantidproject
mantid
Commits
1a19129b
Commit
1a19129b
authored
6 years ago
by
Peterson, Peter
Browse files
Options
Downloads
Patches
Plain Diff
Move singleton and config into module
parent
bddad0bb
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
qt/applications/workbench/workbench/config/__init__.py
+36
-0
36 additions, 0 deletions
qt/applications/workbench/workbench/config/__init__.py
qt/applications/workbench/workbench/config/main.py
+0
-51
0 additions, 51 deletions
qt/applications/workbench/workbench/config/main.py
with
36 additions
and
51 deletions
qt/applications/workbench/workbench/config/__init__.py
+
36
−
0
View file @
1a19129b
...
...
@@ -14,3 +14,39 @@
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
Main configuration module.
A singleton instance called CONF is defined. Modules wishing to access the settings
should import the CONF object as
from workbench.config.main import CONF
and use it to access the settings
"""
from
__future__
import
(
absolute_import
,
unicode_literals
)
from
workbench.config.user
import
UserConfig
# -----------------------------------------------------------------------------
# Constants
# -----------------------------------------------------------------------------
ORGANIZATION
=
'
mantidproject
'
ORG_DOMAIN
=
'
mantidproject.org
'
APPNAME
=
'
workbench
'
# Iterable containing defaults for each configurable section of the code
# General application settings are in the main section
DEFAULTS
=
{
'
main
'
:
{
'
high_dpi_scaling
'
:
True
,
'
window/size
'
:
(
1260
,
740
),
'
window/position
'
:
(
10
,
10
),
'
window/is_maximized
'
:
True
,
'
window/is_fullscreen
'
:
False
,
}
}
# -----------------------------------------------------------------------------
# 'Singleton' instance
# -----------------------------------------------------------------------------
CONF
=
UserConfig
(
ORGANIZATION
,
APPNAME
,
defaults
=
DEFAULTS
)
This diff is collapsed.
Click to expand it.
qt/applications/workbench/workbench/config/main.py
deleted
100644 → 0
+
0
−
51
View file @
bddad0bb
# This file is part of the mantid workbench.
#
# Copyright (C) 2017 mantidproject
#
# 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 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
Main configuration module.
A singleton instance called CONF is defined. Modules wishing to access the settings
should import the CONF object as
from workbench.config.main import CONF
and use it to access the settings
"""
from
__future__
import
(
absolute_import
,
unicode_literals
)
from
workbench.config.user
import
UserConfig
# -----------------------------------------------------------------------------
# Constants
# -----------------------------------------------------------------------------
ORGANIZATION
=
'
mantidproject
'
APPNAME
=
'
workbench
'
# Iterable containing defaults for each configurable section of the code
# General application settings are in the main section
DEFAULTS
=
{
'
main
'
:
{
'
high_dpi_scaling
'
:
True
,
'
window/size
'
:
(
1260
,
740
),
'
window/position
'
:
(
10
,
10
),
'
window/is_maximized
'
:
True
,
'
window/is_fullscreen
'
:
False
,
}
}
# -----------------------------------------------------------------------------
# 'Singleton' instance
# -----------------------------------------------------------------------------
CONF
=
UserConfig
(
ORGANIZATION
,
APPNAME
,
defaults
=
DEFAULTS
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment