2
# -*- coding: utf-8 -*-
5
# J Phani Mahesh <phanimahesh@gmail.com>
6
# Barneedhar (jokerdino) <barneedhar@ubuntu.com>
7
# Amith KK <amithkumaran@gmail.com>
8
# Georgi Karavasilev <motorslav@gmail.com>
9
# Sam Tran <samvtran@gmail.com>
10
# Sam Hewitt <hewittsamuel@gmail.com>
11
# Angel Araya <al.arayaq@gmail.com>
14
# A One-stop configuration tool for Unity.
18
# This file is a part of Unity Tweak Tool
20
# Unity Tweak Tool is free software; you can redistribute it and/or modify it under
21
# the terms of the GNU General Public License as published by the Free Software
22
# Foundation; version 3.
24
# Unity Tweak Tool is distributed in the hope that it will be useful, but WITHOUT
25
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
26
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
29
# You should have received a copy of the GNU General Public License along with
30
# this program; if not, see <https://www.gnu.org/licenses/gpl-3.0.txt>
32
from . import gsettings
33
from UnityTweakTool.config.ui import ui
37
def get_value(self, type, schema, key, key_list):
38
if schema is not None:
39
if gsettings.test_key(schema, key):
41
return getattr(schema, attr)(key)
43
print('%s key not present.' % key)
44
self.ui.tooltip(key_list)
46
print('%s schema not present.' % schema)
48
def set_value(self, type, schema, key, setting):
49
if schema is not None:
50
if gsettings.test_key(schema, key):
52
return getattr(schema, attr)(key, setting)
54
print('%s key not present.' % key)
56
print('%s schema not present.' % schema)
58
def reset_value(self, schema, key):
59
if schema is not None:
60
if gsettings.test_key(schema, key):
61
return schema.reset(key)
63
print('%s key not present.' % key)
65
print('%s schema not present.' % schema)