| 1 |
""" |
| 2 |
Functions to configure Basic Settings |
| 3 |
""" |
| 4 |
|
| 5 |
language = "C" |
| 6 |
windowmanager = None |
| 7 |
icon_theme = "hicolor" |
| 8 |
icon_size = 48 |
| 9 |
cache_time = 5 |
| 10 |
root_mode = False |
| 11 |
|
| 12 |
def setWindowManager(wm): |
| 13 |
global windowmanager |
| 14 |
windowmanager = wm |
| 15 |
|
| 16 |
def setIconTheme(theme): |
| 17 |
global icon_theme |
| 18 |
icon_theme = theme |
| 19 |
import xdg.IconTheme |
| 20 |
xdg.IconTheme.themes = [] |
| 21 |
|
| 22 |
def setIconSize(size): |
| 23 |
global icon_size |
| 24 |
icon_size = size |
| 25 |
|
| 26 |
def setCacheTime(time): |
| 27 |
global cache_time |
| 28 |
cache_time = time |
| 29 |
|
| 30 |
def setLocale(lang): |
| 31 |
import locale |
| 32 |
lang = locale.normalize(lang) |
| 33 |
locale.setlocale(locale.LC_ALL, lang) |
| 34 |
import xdg.Locale |
| 35 |
xdg.Locale.update(lang) |
| 36 |
|
| 37 |
def setRootMode(boolean): |
| 38 |
global root_mode |
| 39 |
root_mode = boolean |