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

« back to all changes in this revision

Viewing changes to UnityTweakTool/section/spaghetti/unitytweakconfig.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
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
 
2
#
 
3
# Team:
 
4
#   J Phani Mahesh <phanimahesh@gmail.com>
 
5
#   Barneedhar (jokerdino) <barneedhar@ubuntu.com>
 
6
#   Amith KK <amithkumaran@gmail.com>
 
7
#   Georgi Karavasilev <motorslav@gmail.com>
 
8
#   Sam Tran <samvtran@gmail.com>
 
9
#   Sam Hewitt <hewittsamuel@gmail.com>
 
10
#   Angel Araya <al.arayaq@gmail.com>
 
11
#
 
12
# Description:
 
13
#   A One-stop configuration tool for Unity.
 
14
#
 
15
# Legal Stuff:
 
16
#
 
17
# This file is a part of Unity Tweak Tool
 
18
#
 
19
# Unity Tweak Tool is free software; you can redistribute it and/or modify it under
 
20
# the terms of the GNU General Public License as published by the Free Software
 
21
# Foundation; version 3.
 
22
#
 
23
# Unity Tweak Tool is distributed in the hope that it will be useful, but WITHOUT
 
24
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 
25
# FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
 
26
# details.
 
27
#
 
28
# You should have received a copy of the GNU General Public License along with
 
29
# this program; if not, see <https://www.gnu.org/licenses/gpl-3.0.txt>
 
30
 
 
31
__all__ = [
 
32
    'project_path_not_found',
 
33
    'get_data_file',
 
34
    'get_data_path',
 
35
    ]
 
36
 
 
37
# Where your project will look for your data (for instance, images and ui
 
38
# files). By default, this is ../data, relative your trunk layout
 
39
__unity_tweak_tool_data_directory__ = '../../../data/'
 
40
__license__ = 'GPL-3'
 
41
__version__ = '0.0.5'
 
42
 
 
43
import os
 
44
 
 
45
from locale import gettext as _
 
46
 
 
47
class project_path_not_found(Exception):
 
48
    """Raised when we can't find the project directory."""
 
49
 
 
50
 
 
51
def get_data_file(*path_segments):
 
52
    """Get the full path to a data file.
 
53
 
 
54
    Returns the path to a file underneath the data directory (as defined by
 
55
    `get_data_path`). Equivalent to os.path.join(get_data_path(),
 
56
    *path_segments).
 
57
    """
 
58
    return os.path.join(get_data_path(), *path_segments)
 
59
 
 
60
 
 
61
def get_data_path():
 
62
    """Retrieve unity-tweak-tool data path"""
 
63
 
 
64
    # Get pathname absolute or relative.
 
65
    path = os.path.join(
 
66
        os.path.dirname(__file__), __unity_tweak_tool_data_directory__)
 
67
 
 
68
    abs_data_path = os.path.abspath(path)
 
69
    if not os.path.exists(abs_data_path):
 
70
        raise project_path_not_found
 
71
 
 
72
    return abs_data_path
 
73
 
 
74
def get_version():
 
75
    return __version__