~ubuntu-branches/ubuntu/saucy/unity-tweak-tool/saucy-proposed

« back to all changes in this revision

Viewing changes to UnityTweakTool/section/sphagetti/values.py

  • Committer: Package Import Robot
  • Author(s): Barneedhar Vigneshwar, J Phani Mahesh, Barneedhar Vigneshwar
  • Date: 2013-09-16 19:34:38 UTC
  • Revision ID: package-import@ubuntu.com-20130916193438-dw14bzxkohvxub2y
Tags: 0.0.5
[ J Phani Mahesh ]
* New upstream release (LP: #1226059)
  - New application icon 
  - Show error dialog when schemas are missing instead of crashing
  - Trigger new build of pot files
* UnityTweakTool/section/unity.py
  - Fix Show recently used and more suggestions in dash search (LP: #1166294)
  - Fix Launcher reveal sensitivity scale update issues (LP: #1168863)
* UnityTweakTool/elements/colorchooser.py
  - Fix TypeError in get_rgba() (LP: #1165627)
  - Fix segmentation fault on selecting custom launcher (LP: #1190398)
* UnityTweakTool/elements/option.py
  - Fix "Restore defaults" button (LP: #1186634)
* UnityTweakTool/__init__.py  
  - Fix unity-tweak-tool crashed with dbus.exceptions.DBusException in
  call_blocking() (LP: #1168738)
  - Fix FileNotFoundError (LP: #1225463)
  - Fix dbus.exceptions.DBusException (LP: #1170571)
* data/unity.ui
  - Remove Panel transparency switch (LP: #1168836)
  - Remove Launcher transparency switch (LP: #1168834)

[ Barneedhar Vigneshwar ]
* UnityTweakTool/section/unity.py
  - Fix 'Can't set background blur to static' (LP: #1167343)
  - Fix non-working Launcher only on primary desktop (LP: #1173977)
* UnityTweakTool/section/sphagetti/compiz.py
  - Fix TypeError in color_to_hash() (LP: #1166884)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/env python3
2
 
# -*- coding: utf-8 -*-
3
 
#
4
 
# Team:
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>
12
 
#
13
 
# Description:
14
 
#   A One-stop configuration tool for Unity.
15
 
#
16
 
# Legal Stuff:
17
 
#
18
 
# This file is a part of Unity Tweak Tool
19
 
#
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.
23
 
#
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
27
 
# details.
28
 
#
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>
31
 
 
32
 
from . import gsettings
33
 
from UnityTweakTool.config.ui import ui
34
 
 
35
 
class values():
36
 
 
37
 
    def get_value(self, type, schema, key, key_list):
38
 
        if schema is not None:
39
 
            if gsettings.test_key(schema, key):
40
 
                attr = 'get_' + type
41
 
                return getattr(schema, attr)(key)
42
 
            else:
43
 
                print('%s key not present.' % key)
44
 
                self.ui.tooltip(key_list)
45
 
        else:
46
 
            print('%s schema not present.' % schema)
47
 
 
48
 
    def set_value(self, type, schema, key, setting):
49
 
        if schema is not None:
50
 
            if gsettings.test_key(schema, key):
51
 
                attr = 'set_' + type
52
 
                return getattr(schema, attr)(key, setting)
53
 
            else:
54
 
                print('%s key not present.' % key)
55
 
        else:
56
 
            print('%s schema not present.' % schema)
57
 
 
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)
62
 
            else:
63
 
                print('%s key not present.' % key)
64
 
        else:
65
 
            print('%s schema not present.' % schema)