Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit bdec5cd
Showing
83 changed files
with
15,379 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,4 @@ | |||
__pycache__ | |||
*~ | |||
*.bak | |||
build |
Empty file.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1 @@ | |||
include COPYING |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,4 @@ | |||
unity-tweak-tool | |||
======== | |||
|
|||
Unity Tweak Tool - Unity configuration tool |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,49 @@ | |||
#!/usr/bin/env python3 | |||
# -*- coding: utf-8 -*- | |||
# | |||
# Team: | |||
# J Phani Mahesh <phanimahesh@gmail.com> | |||
# Barneedhar (jokerdino) <barneedhar@ubuntu.com> | |||
# Amith KK <amithkumaran@gmail.com> | |||
# Georgi Karavasilev <motorslav@gmail.com> | |||
# Sam Tran <samvtran@gmail.com> | |||
# Sam Hewitt <hewittsamuel@gmail.com> | |||
# | |||
# Description: | |||
# A One-stop configuration tool for Unity. | |||
# | |||
# Legal Stuff: | |||
# | |||
# This file is a part of Unity Tweak Tool | |||
# | |||
# Unity Tweak Tool 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; version 3. | |||
# | |||
# Unity Tweak Tool 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 <https://www.gnu.org/licenses/gpl-3.0.txt> | |||
|
|||
# List of all subpackages that can be imported using | |||
# from UnityTweakTool import * | |||
__all__=['backends','config','elements'] | |||
|
|||
import logging | |||
|
|||
logger=logging.getLogger('UnityTweakTool') | |||
logger.setLevel(logging.DEBUG) | |||
|
|||
# TODO : give a sensible logfile name. | |||
_fh=logging.FileHandler(logfile) | |||
_fh.setLevel(logging.DEBUG) | |||
|
|||
_formatter=logging.Formatter('%(asctime)s - %(levelname)-8s :: %(name)s - %(funcName)s - %(message)s') | |||
|
|||
_fh.setFormatter(_formatter) | |||
logger.setHandler(_fh) | |||
|
|||
del _fh, _formatter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1 @@ | |||
#! /usr/bin/env python3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,88 @@ | |||
#!/usr/bin/env python3 | |||
# -*- coding: utf-8 -*- | |||
# | |||
# Team: | |||
# J Phani Mahesh <phanimahesh@gmail.com> | |||
# Barneedhar (jokerdino) <barneedhar@ubuntu.com> | |||
# Amith KK <amithkumaran@gmail.com> | |||
# Georgi Karavasilev <motorslav@gmail.com> | |||
# Sam Tran <samvtran@gmail.com> | |||
# Sam Hewitt <hewittsamuel@gmail.com> | |||
# | |||
# Description: | |||
# A One-stop configuration tool for Unity. | |||
# | |||
# Legal Stuff: | |||
# | |||
# This file is a part of Unity Tweak Tool | |||
# | |||
# Unity Tweak Tool 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; version 3. | |||
# | |||
# Unity Tweak Tool 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 <https://www.gnu.org/licenses/gpl-3.0.txt> | |||
|
|||
# This file contains the bindings to Gio.Settings | |||
from gi.repository import Gio | |||
import logging | |||
|
|||
logger=logging.getLogger('UnityTweakTool.backends.gsettings') | |||
|
|||
all_schemas = frozenset( | |||
Gio.Settings.list_schemas() | |||
) | |||
all_relocatable_schemas = frozenset( | |||
Gio.Settings.list_relocatable_schemas() | |||
) | |||
|
|||
GSettings = dict() | |||
|
|||
|
|||
def is_valid(*,schema,key=None,path=None): | |||
if schema in all_schemas: | |||
if key is not None: | |||
return key in Gio.Settings(schema).list_keys() | |||
else: | |||
return True | |||
if schema in all_relocatable_schemas: | |||
if key is not None: | |||
assert path is not None, 'Relocatable schemas must be accompanied with path' | |||
return key in Gio.Settings(schema,path).list_keys() | |||
else: | |||
return True | |||
|
|||
# get_<type> and set_<type> are available for the following in Gio.Settings | |||
VALID_TYPES=frozenset([ | |||
'boolean', | |||
'int', | |||
'uint', | |||
'double', | |||
'string', | |||
'strv', | |||
'enum', | |||
'flags' | |||
]) | |||
|
|||
def get(*,schema,key,type,path=None): | |||
_suffix=':'+path if path is not None else '' | |||
try: | |||
_gs=GSettings[schema+_suffix] | |||
except KeyError as e: | |||
_gs=Gio.Settings(schema,path) | |||
return _gs.__getattr__('get_'+type)(key) | |||
|
|||
def set(*,schema,key,type,path=None,value): | |||
_suffix=':'+path if path is not None else '' | |||
try: | |||
_gs=GSettings[schema+_suffix] | |||
except KeyError as e: | |||
_gs=Gio.Settings(schema,path) | |||
# TODO : check if value is legal, if possible. | |||
return _gs.__setattr__('set_'+type)(key,value) | |||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1 @@ | |||
#! /usr/bin/env python3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,34 @@ | |||
#!/usr/bin/env python3 | |||
# -*- coding: utf-8 -*- | |||
# | |||
# Team: | |||
# J Phani Mahesh <phanimahesh@gmail.com> | |||
# Barneedhar (jokerdino) <barneedhar@ubuntu.com> | |||
# Amith KK <amithkumaran@gmail.com> | |||
# Georgi Karavasilev <motorslav@gmail.com> | |||
# Sam Tran <samvtran@gmail.com> | |||
# Sam Hewitt <hewittsamuel@gmail.com> | |||
# | |||
# Description: | |||
# A One-stop configuration tool for Unity. | |||
# | |||
# Legal Stuff: | |||
# | |||
# This file is a part of Unity Tweak Tool | |||
# | |||
# Unity Tweak Tool 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; version 3. | |||
# | |||
# Unity Tweak Tool 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 <https://www.gnu.org/licenses/gpl-3.0.txt> | |||
|
|||
# This file should control the logging setup for entire application | |||
# TODO : Decide if logger initialisations go here or in UTT.__init__ | |||
# Also decide a logfile name. | |||
# LOGFILE = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,31 @@ | |||
#!/usr/bin/env python3 | |||
# -*- coding: utf-8 -*- | |||
# | |||
# Team: | |||
# J Phani Mahesh <phanimahesh@gmail.com> | |||
# Barneedhar (jokerdino) <barneedhar@ubuntu.com> | |||
# Amith KK <amithkumaran@gmail.com> | |||
# Georgi Karavasilev <motorslav@gmail.com> | |||
# Sam Tran <samvtran@gmail.com> | |||
# Sam Hewitt <hewittsamuel@gmail.com> | |||
# | |||
# Description: | |||
# A One-stop configuration tool for Unity. | |||
# | |||
# Legal Stuff: | |||
# | |||
# This file is a part of Unity Tweak Tool | |||
# | |||
# Unity Tweak Tool 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; version 3. | |||
# | |||
# Unity Tweak Tool 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 <https://www.gnu.org/licenses/gpl-3.0.txt> | |||
|
|||
# Any Unity One Sync settings should appear here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1 @@ | |||
#! /usr/bin/env python3 |
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,46 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<interface> | |||
<!-- interface-requires gtk+ 3.0 --> | |||
<object class="GtkAboutDialog" id="about_unitytweak"> | |||
<property name="can_focus">False</property> | |||
<property name="border_width">5</property> | |||
<property name="resizable">False</property> | |||
<property name="default_width">70</property> | |||
<property name="type_hint">dialog</property> | |||
<property name="program_name">Unity Tweak Tool</property> | |||
<property name="version">0.0.2</property> | |||
<property name="copyright" translatable="yes">Copyright © 2013 Freyja Development team</property> | |||
<property name="comments" translatable="yes">Unity Tweak Tool is a settings manager intended to be used with Ubuntu Unity.</property> | |||
<property name="website">https://launchpad.net/unity-tweak-tool</property> | |||
<property name="website_label" translatable="yes">Unity Tweak Tool on Launchpad</property> | |||
<property name="license" translatable="yes">GPL3</property> | |||
<property name="authors">J Phani Mahesh <phanimahesh@gmail.com> | |||
Barneedhar (jokerdino) <barneedhar@ubuntu.com> | |||
Amith KK <amithkumaran@gmail.com> | |||
Georgi Karavasilev <motorslav@gmail.com> | |||
Sam Tran <samvtran@gmail.com> | |||
Sam Hewitt <hewittsamuel@gmail.com></property> | |||
<property name="documenters">Barneedhar (jokerdino) <barneedhar@ubuntu.com></property> | |||
<property name="artists">Sam Hewitt <hewittsamuel@gmail.com></property> | |||
<property name="license_type">gpl-3-0</property> | |||
<child internal-child="vbox"> | |||
<object class="GtkBox" id="box_aboutdialog"> | |||
<property name="can_focus">False</property> | |||
<property name="orientation">vertical</property> | |||
<property name="spacing">2</property> | |||
<child internal-child="action_area"> | |||
<object class="GtkButtonBox" id="action_aboutdialog"> | |||
<property name="can_focus">False</property> | |||
<property name="layout_style">end</property> | |||
</object> | |||
<packing> | |||
<property name="expand">False</property> | |||
<property name="fill">True</property> | |||
<property name="pack_type">end</property> | |||
<property name="position">0</property> | |||
</packing> | |||
</child> | |||
</object> | |||
</child> | |||
</object> | |||
</interface> |
Oops, something went wrong.